diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/CHANGELOG.md b/sdk/webpubsub/azure-resourcemanager-webpubsub/CHANGELOG.md index c422efb6998e..5d1ed1536bd1 100644 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/CHANGELOG.md +++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/CHANGELOG.md @@ -1,6 +1,8 @@ # Release History -## 1.0.0-beta.3 (Unreleased) +## 1.0.0-beta.1 (2022-10-19) + +- 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-2022-08-01-preview. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ### Features Added diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/README.md b/sdk/webpubsub/azure-resourcemanager-webpubsub/README.md index aed73f4e1fd9..8a1e49faf40d 100644 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/README.md +++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/README.md @@ -2,7 +2,7 @@ Azure Resource Manager WebPubSub client library for Java. -This package contains Microsoft Azure SDK for WebPubSub Management SDK. REST API for Azure WebPubSub Service. Package tag package-2021-10-01. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). +This package contains Microsoft Azure SDK for WebPubSub Management SDK. REST API for Azure WebPubSub Service. Package tag package-2022-08-01-preview. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ## We'd love to hear your feedback @@ -32,7 +32,7 @@ Various documentation is available to help you get started com.azure.resourcemanager azure-resourcemanager-webpubsub - 1.0.0-beta.2 + 1.0.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 a0716708906a..d4a28cd4ffd2 100644 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/SAMPLE.md +++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/SAMPLE.md @@ -23,6 +23,20 @@ - [Restart](#webpubsub_restart) - [Update](#webpubsub_update) +## WebPubSubCustomCertificates + +- [CreateOrUpdate](#webpubsubcustomcertificates_createorupdate) +- [Delete](#webpubsubcustomcertificates_delete) +- [Get](#webpubsubcustomcertificates_get) +- [List](#webpubsubcustomcertificates_list) + +## WebPubSubCustomDomains + +- [CreateOrUpdate](#webpubsubcustomdomains_createorupdate) +- [Delete](#webpubsubcustomdomains_delete) +- [Get](#webpubsubcustomdomains_get) +- [List](#webpubsubcustomdomains_list) + ## WebPubSubHubs - [CreateOrUpdate](#webpubsubhubs_createorupdate) @@ -55,7 +69,7 @@ import com.azure.core.util.Context; /** Samples for Operations List. */ public final class OperationsListSamples { /* - * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2021-10-01/examples/Operations_List.json + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/preview/2022-08-01-preview/examples/Operations_List.json */ /** * Sample code: Operations_List. @@ -76,7 +90,7 @@ import com.azure.core.util.Context; /** Samples for Usages List. */ public final class UsagesListSamples { /* - * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2021-10-01/examples/Usages_List.json + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/preview/2022-08-01-preview/examples/Usages_List.json */ /** * Sample code: Usages_List. @@ -98,7 +112,7 @@ import com.azure.resourcemanager.webpubsub.models.NameAvailabilityParameters; /** Samples for WebPubSub CheckNameAvailability. */ public final class WebPubSubCheckNameAvailabilitySamples { /* - * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2021-10-01/examples/WebPubSub_CheckNameAvailability.json + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/preview/2022-08-01-preview/examples/WebPubSub_CheckNameAvailability.json */ /** * Sample code: WebPubSub_CheckNameAvailability. @@ -127,7 +141,6 @@ 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.ResourceSku; import com.azure.resourcemanager.webpubsub.models.WebPubSubNetworkACLs; import com.azure.resourcemanager.webpubsub.models.WebPubSubRequestType; @@ -140,7 +153,7 @@ import java.util.Map; /** Samples for WebPubSub CreateOrUpdate. */ public final class WebPubSubCreateOrUpdateSamples { /* - * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2021-10-01/examples/WebPubSub_CreateOrUpdate.json + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/preview/2022-08-01-preview/examples/WebPubSub_CreateOrUpdate.json */ /** * Sample code: WebPubSub_CreateOrUpdate. @@ -154,7 +167,7 @@ public final class WebPubSubCreateOrUpdateSamples { .withRegion("eastus") .withExistingResourceGroup("myResourceGroup") .withTags(mapOf("key1", "value1")) - .withSku(new ResourceSku().withName("Standard_S1").withTier(WebPubSubSkuTier.STANDARD).withCapacity(1)) + .withSku(new ResourceSku().withName("Premium_P1").withTier(WebPubSubSkuTier.PREMIUM).withCapacity(1)) .withIdentity(new ManagedIdentity().withType(ManagedIdentityType.SYSTEM_ASSIGNED)) .withTls(new WebPubSubTlsSettings().withClientCertEnabled(false)) .withLiveTraceConfiguration( @@ -166,13 +179,7 @@ public final class WebPubSubCreateOrUpdateSamples { 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")))) + new NetworkAcl().withAllow(Arrays.asList(WebPubSubRequestType.CLIENT_CONNECTION)))) .withPublicNetworkAccess("Enabled") .withDisableLocalAuth(false) .withDisableAadAuth(false) @@ -200,7 +207,7 @@ import com.azure.core.util.Context; /** Samples for WebPubSub Delete. */ public final class WebPubSubDeleteSamples { /* - * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2021-10-01/examples/WebPubSub_Delete.json + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/preview/2022-08-01-preview/examples/WebPubSub_Delete.json */ /** * Sample code: WebPubSub_Delete. @@ -221,7 +228,7 @@ import com.azure.core.util.Context; /** Samples for WebPubSub GetByResourceGroup. */ public final class WebPubSubGetByResourceGroupSamples { /* - * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2021-10-01/examples/WebPubSub_Get.json + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/preview/2022-08-01-preview/examples/WebPubSub_Get.json */ /** * Sample code: WebPubSub_Get. @@ -242,7 +249,7 @@ import com.azure.core.util.Context; /** Samples for WebPubSub List. */ public final class WebPubSubListSamples { /* - * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2021-10-01/examples/WebPubSub_ListBySubscription.json + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/preview/2022-08-01-preview/examples/WebPubSub_ListBySubscription.json */ /** * Sample code: WebPubSub_ListBySubscription. @@ -263,7 +270,7 @@ import com.azure.core.util.Context; /** Samples for WebPubSub ListByResourceGroup. */ public final class WebPubSubListByResourceGroupSamples { /* - * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2021-10-01/examples/WebPubSub_ListByResourceGroup.json + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/preview/2022-08-01-preview/examples/WebPubSub_ListByResourceGroup.json */ /** * Sample code: WebPubSub_ListByResourceGroup. @@ -284,7 +291,7 @@ import com.azure.core.util.Context; /** Samples for WebPubSub ListKeys. */ public final class WebPubSubListKeysSamples { /* - * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2021-10-01/examples/WebPubSub_ListKeys.json + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/preview/2022-08-01-preview/examples/WebPubSub_ListKeys.json */ /** * Sample code: WebPubSub_ListKeys. @@ -305,7 +312,7 @@ import com.azure.core.util.Context; /** Samples for WebPubSub ListSkus. */ public final class WebPubSubListSkusSamples { /* - * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2021-10-01/examples/WebPubSub_ListSkus.json + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/preview/2022-08-01-preview/examples/WebPubSub_ListSkus.json */ /** * Sample code: WebPubSub_ListSkus. @@ -328,7 +335,7 @@ import com.azure.resourcemanager.webpubsub.models.RegenerateKeyParameters; /** Samples for WebPubSub RegenerateKey. */ public final class WebPubSubRegenerateKeySamples { /* - * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2021-10-01/examples/WebPubSub_RegenerateKey.json + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/preview/2022-08-01-preview/examples/WebPubSub_RegenerateKey.json */ /** * Sample code: WebPubSub_RegenerateKey. @@ -355,7 +362,7 @@ import com.azure.core.util.Context; /** Samples for WebPubSub Restart. */ public final class WebPubSubRestartSamples { /* - * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2021-10-01/examples/WebPubSub_Restart.json + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/preview/2022-08-01-preview/examples/WebPubSub_Restart.json */ /** * Sample code: WebPubSub_Restart. @@ -378,7 +385,6 @@ 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.ResourceSku; import com.azure.resourcemanager.webpubsub.models.WebPubSubNetworkACLs; import com.azure.resourcemanager.webpubsub.models.WebPubSubRequestType; @@ -392,7 +398,7 @@ import java.util.Map; /** Samples for WebPubSub Update. */ public final class WebPubSubUpdateSamples { /* - * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2021-10-01/examples/WebPubSub_Update.json + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/preview/2022-08-01-preview/examples/WebPubSub_Update.json */ /** * Sample code: WebPubSub_Update. @@ -408,7 +414,7 @@ public final class WebPubSubUpdateSamples { resource .update() .withTags(mapOf("key1", "value1")) - .withSku(new ResourceSku().withName("Standard_S1").withTier(WebPubSubSkuTier.STANDARD).withCapacity(1)) + .withSku(new ResourceSku().withName("Premium_P1").withTier(WebPubSubSkuTier.PREMIUM).withCapacity(1)) .withIdentity(new ManagedIdentity().withType(ManagedIdentityType.SYSTEM_ASSIGNED)) .withTls(new WebPubSubTlsSettings().withClientCertEnabled(false)) .withLiveTraceConfiguration( @@ -420,13 +426,7 @@ public final class WebPubSubUpdateSamples { 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")))) + new NetworkAcl().withAllow(Arrays.asList(WebPubSubRequestType.CLIENT_CONNECTION)))) .withPublicNetworkAccess("Enabled") .withDisableLocalAuth(false) .withDisableAadAuth(false) @@ -446,10 +446,203 @@ public final class WebPubSubUpdateSamples { } ``` +### WebPubSubCustomCertificates_CreateOrUpdate + +```java +/** Samples for WebPubSubCustomCertificates CreateOrUpdate. */ +public final class WebPubSubCustomCertificatesCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/preview/2022-08-01-preview/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() + .define("myCert") + .withExistingWebPubSub("myResourceGroup", "myWebPubSubService") + .withKeyVaultBaseUri("https://myvault.keyvault.azure.net/") + .withKeyVaultSecretName("mycert") + .withKeyVaultSecretVersion("bb6a44b2743f47f68dad0d6cc9756432") + .create(); + } +} +``` + +### WebPubSubCustomCertificates_Delete + +```java +import com.azure.core.util.Context; + +/** Samples for WebPubSubCustomCertificates Delete. */ +public final class WebPubSubCustomCertificatesDeleteSamples { + /* + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/preview/2022-08-01-preview/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() + .deleteWithResponse("myResourceGroup", "myWebPubSubService", "myCert", Context.NONE); + } +} +``` + +### WebPubSubCustomCertificates_Get + +```java +import com.azure.core.util.Context; + +/** Samples for WebPubSubCustomCertificates Get. */ +public final class WebPubSubCustomCertificatesGetSamples { + /* + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/preview/2022-08-01-preview/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() + .getWithResponse("myResourceGroup", "myWebPubSubService", "myCert", Context.NONE); + } +} +``` + +### WebPubSubCustomCertificates_List + +```java +import com.azure.core.util.Context; + +/** Samples for WebPubSubCustomCertificates List. */ +public final class WebPubSubCustomCertificatesListSamples { + /* + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/preview/2022-08-01-preview/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().list("myResourceGroup", "myWebPubSubService", Context.NONE); + } +} +``` + +### WebPubSubCustomDomains_CreateOrUpdate + +```java +import com.azure.resourcemanager.webpubsub.models.ResourceReference; + +/** Samples for WebPubSubCustomDomains CreateOrUpdate. */ +public final class WebPubSubCustomDomainsCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/preview/2022-08-01-preview/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() + .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")) + .create(); + } +} +``` + +### WebPubSubCustomDomains_Delete + +```java +import com.azure.core.util.Context; + +/** Samples for WebPubSubCustomDomains Delete. */ +public final class WebPubSubCustomDomainsDeleteSamples { + /* + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/preview/2022-08-01-preview/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().delete("myResourceGroup", "myWebPubSubService", "example", Context.NONE); + } +} +``` + +### WebPubSubCustomDomains_Get + +```java +import com.azure.core.util.Context; + +/** Samples for WebPubSubCustomDomains Get. */ +public final class WebPubSubCustomDomainsGetSamples { + /* + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/preview/2022-08-01-preview/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() + .getWithResponse("myResourceGroup", "myWebPubSubService", "example", Context.NONE); + } +} +``` + +### WebPubSubCustomDomains_List + +```java +import com.azure.core.util.Context; + +/** Samples for WebPubSubCustomDomains List. */ +public final class WebPubSubCustomDomainsListSamples { + /* + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/preview/2022-08-01-preview/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().list("myResourceGroup", "myWebPubSubService", Context.NONE); + } +} +``` + ### WebPubSubHubs_CreateOrUpdate ```java import com.azure.resourcemanager.webpubsub.models.EventHandler; +import com.azure.resourcemanager.webpubsub.models.EventHubEndpoint; +import com.azure.resourcemanager.webpubsub.models.EventListener; +import com.azure.resourcemanager.webpubsub.models.EventNameFilter; import com.azure.resourcemanager.webpubsub.models.ManagedIdentitySettings; import com.azure.resourcemanager.webpubsub.models.UpstreamAuthSettings; import com.azure.resourcemanager.webpubsub.models.UpstreamAuthType; @@ -459,7 +652,7 @@ import java.util.Arrays; /** Samples for WebPubSubHubs CreateOrUpdate. */ public final class WebPubSubHubsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2021-10-01/examples/WebPubSubHubs_CreateOrUpdate.json + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/preview/2022-08-01-preview/examples/WebPubSubHubs_CreateOrUpdate.json */ /** * Sample code: WebPubSubHubs_CreateOrUpdate. @@ -483,7 +676,20 @@ public final class WebPubSubHubsCreateOrUpdateSamples { .withAuth( new UpstreamAuthSettings() .withType(UpstreamAuthType.MANAGED_IDENTITY) - .withManagedIdentity(new ManagedIdentitySettings().withResource("abc")))))) + .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")) .create(); } } @@ -497,7 +703,7 @@ import com.azure.core.util.Context; /** Samples for WebPubSubHubs Delete. */ public final class WebPubSubHubsDeleteSamples { /* - * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2021-10-01/examples/WebPubSubHubs_Delete.json + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/preview/2022-08-01-preview/examples/WebPubSubHubs_Delete.json */ /** * Sample code: WebPubSubHubs_Delete. @@ -518,7 +724,7 @@ import com.azure.core.util.Context; /** Samples for WebPubSubHubs Get. */ public final class WebPubSubHubsGetSamples { /* - * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2021-10-01/examples/WebPubSubHubs_Get.json + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/preview/2022-08-01-preview/examples/WebPubSubHubs_Get.json */ /** * Sample code: WebPubSubHubs_Get. @@ -539,7 +745,7 @@ import com.azure.core.util.Context; /** Samples for WebPubSubHubs List. */ public final class WebPubSubHubsListSamples { /* - * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2021-10-01/examples/WebPubSubHubs_List.json + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/preview/2022-08-01-preview/examples/WebPubSubHubs_List.json */ /** * Sample code: WebPubSubHubs_List. @@ -560,7 +766,7 @@ import com.azure.core.util.Context; /** Samples for WebPubSubPrivateEndpointConnections Delete. */ public final class WebPubSubPrivateEndpointConnectionsDeleteSamples { /* - * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2021-10-01/examples/WebPubSubPrivateEndpointConnections_Delete.json + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/preview/2022-08-01-preview/examples/WebPubSubPrivateEndpointConnections_Delete.json */ /** * Sample code: WebPubSubPrivateEndpointConnections_Delete. @@ -588,7 +794,7 @@ import com.azure.core.util.Context; /** Samples for WebPubSubPrivateEndpointConnections Get. */ public final class WebPubSubPrivateEndpointConnectionsGetSamples { /* - * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2021-10-01/examples/WebPubSubPrivateEndpointConnections_Get.json + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/preview/2022-08-01-preview/examples/WebPubSubPrivateEndpointConnections_Get.json */ /** * Sample code: WebPubSubPrivateEndpointConnections_Get. @@ -616,7 +822,7 @@ import com.azure.core.util.Context; /** Samples for WebPubSubPrivateEndpointConnections List. */ public final class WebPubSubPrivateEndpointConnectionsListSamples { /* - * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2021-10-01/examples/WebPubSubPrivateEndpointConnections_List.json + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/preview/2022-08-01-preview/examples/WebPubSubPrivateEndpointConnections_List.json */ /** * Sample code: WebPubSubPrivateEndpointConnections_List. @@ -642,7 +848,7 @@ import com.azure.resourcemanager.webpubsub.models.PrivateLinkServiceConnectionSt /** Samples for WebPubSubPrivateEndpointConnections Update. */ public final class WebPubSubPrivateEndpointConnectionsUpdateSamples { /* - * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2021-10-01/examples/WebPubSubPrivateEndpointConnections_Update.json + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/preview/2022-08-01-preview/examples/WebPubSubPrivateEndpointConnections_Update.json */ /** * Sample code: WebPubSubPrivateEndpointConnections_Update. @@ -679,7 +885,7 @@ import com.azure.core.util.Context; /** Samples for WebPubSubPrivateLinkResources List. */ public final class WebPubSubPrivateLinkResourcesListSamples { /* - * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2021-10-01/examples/WebPubSubPrivateLinkResources_List.json + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/preview/2022-08-01-preview/examples/WebPubSubPrivateLinkResources_List.json */ /** * Sample code: WebPubSubPrivateLinkResources_List. @@ -698,7 +904,7 @@ public final class WebPubSubPrivateLinkResourcesListSamples { /** Samples for WebPubSubSharedPrivateLinkResources CreateOrUpdate. */ public final class WebPubSubSharedPrivateLinkResourcesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2021-10-01/examples/WebPubSubSharedPrivateLinkResources_CreateOrUpdate.json + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/preview/2022-08-01-preview/examples/WebPubSubSharedPrivateLinkResources_CreateOrUpdate.json */ /** * Sample code: WebPubSubSharedPrivateLinkResources_CreateOrUpdate. @@ -728,7 +934,7 @@ import com.azure.core.util.Context; /** Samples for WebPubSubSharedPrivateLinkResources Delete. */ public final class WebPubSubSharedPrivateLinkResourcesDeleteSamples { /* - * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2021-10-01/examples/WebPubSubSharedPrivateLinkResources_Delete.json + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/preview/2022-08-01-preview/examples/WebPubSubSharedPrivateLinkResources_Delete.json */ /** * Sample code: WebPubSubSharedPrivateLinkResources_Delete. @@ -752,7 +958,7 @@ import com.azure.core.util.Context; /** Samples for WebPubSubSharedPrivateLinkResources Get. */ public final class WebPubSubSharedPrivateLinkResourcesGetSamples { /* - * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2021-10-01/examples/WebPubSubSharedPrivateLinkResources_Get.json + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/preview/2022-08-01-preview/examples/WebPubSubSharedPrivateLinkResources_Get.json */ /** * Sample code: WebPubSubSharedPrivateLinkResources_Get. @@ -776,7 +982,7 @@ import com.azure.core.util.Context; /** Samples for WebPubSubSharedPrivateLinkResources List. */ public final class WebPubSubSharedPrivateLinkResourcesListSamples { /* - * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2021-10-01/examples/WebPubSubSharedPrivateLinkResources_List.json + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/preview/2022-08-01-preview/examples/WebPubSubSharedPrivateLinkResources_List.json */ /** * Sample code: WebPubSubSharedPrivateLinkResources_List. diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/pom.xml b/sdk/webpubsub/azure-resourcemanager-webpubsub/pom.xml index 2f6662c6ebe1..3d5e8d01e33c 100644 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/pom.xml +++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/pom.xml @@ -13,7 +13,7 @@ jar Microsoft Azure SDK for WebPubSub Management - This package contains Microsoft Azure SDK for WebPubSub Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. REST API for Azure WebPubSub Service. Package tag package-2021-10-01. + This package contains Microsoft Azure SDK for WebPubSub Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. REST API for Azure WebPubSub Service. Package tag package-2022-08-01-preview. https://github.com/Azure/azure-sdk-for-java diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/WebPubSubManager.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/WebPubSubManager.java index 26f61ee4e121..f0e16ef0ae4a 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 @@ -8,12 +8,15 @@ import com.azure.core.http.HttpClient; import com.azure.core.http.HttpPipeline; import com.azure.core.http.HttpPipelineBuilder; +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.HttpPipelinePolicy; import com.azure.core.http.policy.HttpPolicyProviders; import com.azure.core.http.policy.RequestIdPolicy; +import com.azure.core.http.policy.RetryOptions; import com.azure.core.http.policy.RetryPolicy; import com.azure.core.http.policy.UserAgentPolicy; import com.azure.core.management.http.policy.ArmChallengeAuthenticationPolicy; @@ -23,6 +26,8 @@ import com.azure.resourcemanager.webpubsub.fluent.WebPubSubManagementClient; import com.azure.resourcemanager.webpubsub.implementation.OperationsImpl; import com.azure.resourcemanager.webpubsub.implementation.UsagesImpl; +import com.azure.resourcemanager.webpubsub.implementation.WebPubSubCustomCertificatesImpl; +import com.azure.resourcemanager.webpubsub.implementation.WebPubSubCustomDomainsImpl; import com.azure.resourcemanager.webpubsub.implementation.WebPubSubHubsImpl; import com.azure.resourcemanager.webpubsub.implementation.WebPubSubManagementClientBuilder; import com.azure.resourcemanager.webpubsub.implementation.WebPubSubPrivateEndpointConnectionsImpl; @@ -31,6 +36,8 @@ import com.azure.resourcemanager.webpubsub.implementation.WebPubSubsImpl; import com.azure.resourcemanager.webpubsub.models.Operations; import com.azure.resourcemanager.webpubsub.models.Usages; +import com.azure.resourcemanager.webpubsub.models.WebPubSubCustomCertificates; +import com.azure.resourcemanager.webpubsub.models.WebPubSubCustomDomains; import com.azure.resourcemanager.webpubsub.models.WebPubSubHubs; import com.azure.resourcemanager.webpubsub.models.WebPubSubPrivateEndpointConnections; import com.azure.resourcemanager.webpubsub.models.WebPubSubPrivateLinkResources; @@ -41,6 +48,7 @@ import java.util.ArrayList; import java.util.List; import java.util.Objects; +import java.util.stream.Collectors; /** Entry point to WebPubSubManager. REST API for Azure WebPubSub Service. */ public final class WebPubSubManager { @@ -50,6 +58,10 @@ public final class WebPubSubManager { private Usages usages; + private WebPubSubCustomCertificates webPubSubCustomCertificates; + + private WebPubSubCustomDomains webPubSubCustomDomains; + private WebPubSubHubs webPubSubHubs; private WebPubSubPrivateEndpointConnections webPubSubPrivateEndpointConnections; @@ -85,6 +97,19 @@ public static WebPubSubManager authenticate(TokenCredential credential, AzurePro return configure().authenticate(credential, profile); } + /** + * 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. + */ + public static WebPubSubManager authenticate(HttpPipeline httpPipeline, AzureProfile profile) { + Objects.requireNonNull(httpPipeline, "'httpPipeline' cannot be null."); + Objects.requireNonNull(profile, "'profile' cannot be null."); + return new WebPubSubManager(httpPipeline, profile, null); + } + /** * Gets a Configurable instance that can be used to create WebPubSubManager with optional configuration. * @@ -96,13 +121,14 @@ public static Configurable configure() { /** The Configurable allowing configurations to be set. */ public static final class Configurable { - private final ClientLogger logger = new ClientLogger(Configurable.class); + private static final ClientLogger LOGGER = new ClientLogger(Configurable.class); private HttpClient httpClient; private HttpLogOptions httpLogOptions; private final List policies = new ArrayList<>(); private final List scopes = new ArrayList<>(); private RetryPolicy retryPolicy; + private RetryOptions retryOptions; private Duration defaultPollInterval; private Configurable() { @@ -163,6 +189,19 @@ public Configurable withRetryPolicy(RetryPolicy retryPolicy) { return this; } + /** + * Sets the retry options for the HTTP pipeline retry policy. + * + *

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. + */ + public Configurable withRetryOptions(RetryOptions retryOptions) { + this.retryOptions = Objects.requireNonNull(retryOptions, "'retryOptions' cannot be null."); + return this; + } + /** * Sets the default poll interval, used when service does not provide "Retry-After" header. * @@ -170,9 +209,11 @@ public Configurable withRetryPolicy(RetryPolicy retryPolicy) { * @return the configurable object itself. */ public Configurable withDefaultPollInterval(Duration defaultPollInterval) { - this.defaultPollInterval = Objects.requireNonNull(defaultPollInterval, "'retryPolicy' cannot be null."); + this.defaultPollInterval = + Objects.requireNonNull(defaultPollInterval, "'defaultPollInterval' cannot be null."); if (this.defaultPollInterval.isNegative()) { - throw logger.logExceptionAsError(new IllegalArgumentException("'httpPipeline' cannot be negative")); + throw LOGGER + .logExceptionAsError(new IllegalArgumentException("'defaultPollInterval' cannot be negative")); } return this; } @@ -194,7 +235,7 @@ public WebPubSubManager authenticate(TokenCredential credential, AzureProfile pr .append("-") .append("com.azure.resourcemanager.webpubsub") .append("/") - .append("1.0.0-beta.2"); + .append("1.0.0-beta.1"); if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) { userAgentBuilder .append(" (") @@ -212,16 +253,34 @@ public WebPubSubManager authenticate(TokenCredential credential, AzureProfile pr scopes.add(profile.getEnvironment().getManagementEndpoint() + "/.default"); } if (retryPolicy == null) { - retryPolicy = new RetryPolicy("Retry-After", ChronoUnit.SECONDS); + if (retryOptions != null) { + retryPolicy = new RetryPolicy(retryOptions); + } else { + retryPolicy = new RetryPolicy("Retry-After", ChronoUnit.SECONDS); + } } List policies = new ArrayList<>(); 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())); HttpPolicyProviders.addBeforeRetryPolicies(policies); policies.add(retryPolicy); policies.add(new AddDatePolicy()); policies.add(new ArmChallengeAuthenticationPolicy(credential, scopes.toArray(new String[0]))); - policies.addAll(this.policies); + 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 = @@ -233,7 +292,11 @@ public WebPubSubManager authenticate(TokenCredential credential, AzureProfile pr } } - /** @return Resource collection API of Operations. */ + /** + * Gets the resource collection API of Operations. + * + * @return Resource collection API of Operations. + */ public Operations operations() { if (this.operations == null) { this.operations = new OperationsImpl(clientObject.getOperations(), this); @@ -241,7 +304,11 @@ public Operations operations() { return operations; } - /** @return Resource collection API of WebPubSubs. */ + /** + * Gets the resource collection API of WebPubSubs. It manages WebPubSubResource. + * + * @return Resource collection API of WebPubSubs. + */ public WebPubSubs webPubSubs() { if (this.webPubSubs == null) { this.webPubSubs = new WebPubSubsImpl(clientObject.getWebPubSubs(), this); @@ -249,7 +316,11 @@ public WebPubSubs webPubSubs() { return webPubSubs; } - /** @return Resource collection API of Usages. */ + /** + * Gets the resource collection API of Usages. + * + * @return Resource collection API of Usages. + */ public Usages usages() { if (this.usages == null) { this.usages = new UsagesImpl(clientObject.getUsages(), this); @@ -257,7 +328,37 @@ public Usages usages() { return usages; } - /** @return Resource collection API of WebPubSubHubs. */ + /** + * 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); + } + 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); + } + return webPubSubCustomDomains; + } + + /** + * Gets the resource collection API of WebPubSubHubs. It manages WebPubSubHub. + * + * @return Resource collection API of WebPubSubHubs. + */ public WebPubSubHubs webPubSubHubs() { if (this.webPubSubHubs == null) { this.webPubSubHubs = new WebPubSubHubsImpl(clientObject.getWebPubSubHubs(), this); @@ -265,7 +366,11 @@ public WebPubSubHubs webPubSubHubs() { return webPubSubHubs; } - /** @return Resource collection API of WebPubSubPrivateEndpointConnections. */ + /** + * Gets the resource collection API of WebPubSubPrivateEndpointConnections. + * + * @return Resource collection API of WebPubSubPrivateEndpointConnections. + */ public WebPubSubPrivateEndpointConnections webPubSubPrivateEndpointConnections() { if (this.webPubSubPrivateEndpointConnections == null) { this.webPubSubPrivateEndpointConnections = @@ -275,7 +380,11 @@ public WebPubSubPrivateEndpointConnections webPubSubPrivateEndpointConnections() return webPubSubPrivateEndpointConnections; } - /** @return Resource collection API of WebPubSubPrivateLinkResources. */ + /** + * Gets the resource collection API of WebPubSubPrivateLinkResources. + * + * @return Resource collection API of WebPubSubPrivateLinkResources. + */ public WebPubSubPrivateLinkResources webPubSubPrivateLinkResources() { if (this.webPubSubPrivateLinkResources == null) { this.webPubSubPrivateLinkResources = @@ -284,7 +393,11 @@ public WebPubSubPrivateLinkResources webPubSubPrivateLinkResources() { return webPubSubPrivateLinkResources; } - /** @return Resource collection API of WebPubSubSharedPrivateLinkResources. */ + /** + * Gets the resource collection API of WebPubSubSharedPrivateLinkResources. It manages SharedPrivateLinkResource. + * + * @return Resource collection API of WebPubSubSharedPrivateLinkResources. + */ public WebPubSubSharedPrivateLinkResources webPubSubSharedPrivateLinkResources() { if (this.webPubSubSharedPrivateLinkResources == null) { this.webPubSubSharedPrivateLinkResources = 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 2bf28393f266..90bdf89c2ba2 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 @@ -17,7 +17,7 @@ public interface OperationsClient { * * @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. + * @return result of the request to list REST API operations as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(); @@ -29,7 +29,7 @@ public interface OperationsClient { * @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 result of the request to list REST API operations. + * @return result of the request to list REST API operations as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(Context context); 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 24d05754f932..b3518388b313 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 @@ -19,7 +19,8 @@ public interface UsagesClient { * @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. + * @return object that includes an array of the resource usages and a possible link for next set as paginated + * response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String location); @@ -32,7 +33,8 @@ public interface UsagesClient { * @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. + * @return object that includes an array of the resource usages and a possible link for next set as paginated + * 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 new file mode 100644 index 000000000000..c0cd71249b75 --- /dev/null +++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/fluent/WebPubSubCustomCertificatesClient.java @@ -0,0 +1,187 @@ +// 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.CustomCertificateInner; + +/** 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 that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param resourceName The name of the resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return custom certificates list as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String resourceName); + + /** + * List all custom certificates. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param 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 custom certificates list as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String resourceName, Context context); + + /** + * Get a custom certificate. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param resourceName The name of the resource. + * @param certificateName Custom certificate name. + * @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 custom certificate along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse( + String resourceGroupName, String resourceName, String certificateName, Context context); + + /** + * Get a custom certificate. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param resourceName The name of the resource. + * @param certificateName Custom certificate name. + * @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 custom certificate. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + CustomCertificateInner get(String resourceGroupName, String resourceName, String certificateName); + + /** + * Create or update a custom certificate. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param resourceName The name of the resource. + * @param certificateName Custom certificate name. + * @param parameters A custom certificate. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of a custom certificate. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + 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 that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param resourceName The name of the resource. + * @param certificateName Custom certificate name. + * @param parameters A custom certificate. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of a custom certificate. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + 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 that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param resourceName The name of the resource. + * @param certificateName Custom certificate name. + * @param parameters A custom certificate. + * @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 custom certificate. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + CustomCertificateInner createOrUpdate( + String resourceGroupName, String resourceName, String certificateName, CustomCertificateInner parameters); + + /** + * Create or update a custom certificate. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param resourceName The name of the resource. + * @param certificateName Custom certificate name. + * @param parameters A custom certificate. + * @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 custom certificate. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + CustomCertificateInner createOrUpdate( + String resourceGroupName, + String resourceName, + String certificateName, + CustomCertificateInner parameters, + Context context); + + /** + * Delete a custom certificate. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param resourceName The name of the resource. + * @param certificateName Custom certificate name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response deleteWithResponse( + String resourceGroupName, String resourceName, String certificateName, Context context); + + /** + * Delete a custom certificate. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param resourceName The name of the resource. + * @param certificateName Custom certificate name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String resourceName, String certificateName); +} 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 new file mode 100644 index 000000000000..af355e4264c5 --- /dev/null +++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/fluent/WebPubSubCustomDomainsClient.java @@ -0,0 +1,209 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.webpubsub.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.webpubsub.fluent.models.CustomDomainInner; + +/** 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 that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param resourceName The name of the resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return custom domains list as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String resourceName); + + /** + * List all custom domains. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param 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 custom domains list as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String resourceName, Context context); + + /** + * Get a custom domain. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param resourceName The name of the resource. + * @param name Custom domain name. + * @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 custom domain along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse( + String resourceGroupName, String resourceName, String name, Context context); + + /** + * Get a custom domain. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param resourceName The name of the resource. + * @param name Custom domain name. + * @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 custom domain. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + CustomDomainInner get(String resourceGroupName, String resourceName, String name); + + /** + * Create or update a custom domain. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param resourceName The name of the resource. + * @param name Custom domain name. + * @param parameters A custom domain. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of a custom domain. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + 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 that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param resourceName The name of the resource. + * @param name Custom domain name. + * @param parameters A custom domain. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of a custom domain. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + 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 that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param resourceName The name of the resource. + * @param name Custom domain name. + * @param parameters A custom domain. + * @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 custom domain. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + CustomDomainInner createOrUpdate( + String resourceGroupName, String resourceName, String name, CustomDomainInner parameters); + + /** + * Create or update a custom domain. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param resourceName The name of the resource. + * @param name Custom domain name. + * @param parameters A custom domain. + * @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 custom domain. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + CustomDomainInner createOrUpdate( + String resourceGroupName, String resourceName, String name, CustomDomainInner parameters, Context context); + + /** + * Delete a custom domain. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param resourceName The name of the resource. + * @param name Custom domain name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String resourceName, String name); + + /** + * Delete a custom domain. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param resourceName The name of the resource. + * @param name Custom domain name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete( + String resourceGroupName, String resourceName, String name, Context context); + + /** + * Delete a custom domain. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param resourceName The name of the resource. + * @param name Custom domain name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String resourceName, String name); + + /** + * Delete a custom domain. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param resourceName The name of the resource. + * @param name Custom domain name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String resourceName, String name, Context context); +} diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/fluent/WebPubSubHubsClient.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/fluent/WebPubSubHubsClient.java index f8e7854da67d..52526a9e58d9 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 @@ -24,7 +24,7 @@ public interface WebPubSubHubsClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return hub setting list. + * @return hub setting list as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String resourceGroupName, String resourceName); @@ -39,7 +39,7 @@ public interface WebPubSubHubsClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return hub setting list. + * @return hub setting list as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String resourceGroupName, String resourceName, Context context); @@ -51,13 +51,15 @@ public interface WebPubSubHubsClient { * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value * from the Azure Resource Manager API or the portal. * @param resourceName The name of the resource. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a hub setting. + * @return a hub setting along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - WebPubSubHubInner get(String hubName, String resourceGroupName, String resourceName); + Response getWithResponse( + String hubName, String resourceGroupName, String resourceName, Context context); /** * Get a hub setting. @@ -66,15 +68,13 @@ public interface WebPubSubHubsClient { * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value * from the Azure Resource Manager API or the portal. * @param resourceName The name of the resource. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a hub setting. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String hubName, String resourceGroupName, String resourceName, Context context); + WebPubSubHubInner get(String hubName, String resourceGroupName, String resourceName); /** * Create or update a hub setting. @@ -87,7 +87,7 @@ Response getWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a hub setting. + * @return the {@link SyncPoller} for polling of a hub setting. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, WebPubSubHubInner> beginCreateOrUpdate( @@ -105,7 +105,7 @@ SyncPoller, WebPubSubHubInner> beginCreateOrUpdate * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a hub setting. + * @return the {@link SyncPoller} for polling of a hub setting. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, WebPubSubHubInner> beginCreateOrUpdate( @@ -156,7 +156,7 @@ WebPubSubHubInner createOrUpdate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @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); @@ -172,7 +172,7 @@ WebPubSubHubInner createOrUpdate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginDelete( 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 01d0fcbb818a..df4372194707 100644 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/fluent/WebPubSubManagementClient.java +++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/fluent/WebPubSubManagementClient.java @@ -66,6 +66,20 @@ public interface WebPubSubManagementClient { */ UsagesClient getUsages(); + /** + * Gets the 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. * 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 90c7bd4627bc..cdfa308ba81f 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 @@ -26,7 +26,7 @@ public interface WebPubSubPrivateEndpointConnectionsClient { * @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 private endpoint connections. + * @return a list of private endpoint connections as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String resourceGroupName, String resourceName); @@ -41,7 +41,7 @@ public interface WebPubSubPrivateEndpointConnectionsClient { * @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 private endpoint connections. + * @return a list of private endpoint connections as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String resourceGroupName, String resourceName, Context context); @@ -53,14 +53,15 @@ public interface WebPubSubPrivateEndpointConnectionsClient { * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value * from the Azure Resource Manager API or the portal. * @param resourceName The name of the resource. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the specified private endpoint connection. + * @return the specified private endpoint connection along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - PrivateEndpointConnectionInner get( - String privateEndpointConnectionName, String resourceGroupName, String resourceName); + Response getWithResponse( + String privateEndpointConnectionName, String resourceGroupName, String resourceName, Context context); /** * Get the specified private endpoint connection. @@ -69,15 +70,14 @@ PrivateEndpointConnectionInner get( * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value * from the Azure Resource Manager API or the portal. * @param resourceName The name of the resource. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the specified private endpoint connection. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String privateEndpointConnectionName, String resourceGroupName, String resourceName, Context context); + PrivateEndpointConnectionInner get( + String privateEndpointConnectionName, String resourceGroupName, String resourceName); /** * Update the state of specified private endpoint connection. @@ -87,17 +87,19 @@ Response getWithResponse( * from the Azure Resource Manager API or the portal. * @param resourceName The name of the resource. * @param parameters The resource of private endpoint and its properties. + * @param context The context to associate with this operation. * @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 private endpoint connection to an azure resource. + * @return a private endpoint connection to an azure resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - PrivateEndpointConnectionInner update( + Response updateWithResponse( String privateEndpointConnectionName, String resourceGroupName, String resourceName, - PrivateEndpointConnectionInner parameters); + PrivateEndpointConnectionInner parameters, + Context context); /** * Update the state of specified private endpoint connection. @@ -107,19 +109,17 @@ PrivateEndpointConnectionInner update( * from the Azure Resource Manager API or the portal. * @param resourceName The name of the resource. * @param parameters The resource of private endpoint and its properties. - * @param context The context to associate with this operation. * @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 private endpoint connection to an azure resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response updateWithResponse( + PrivateEndpointConnectionInner update( String privateEndpointConnectionName, String resourceGroupName, String resourceName, - PrivateEndpointConnectionInner parameters, - Context context); + PrivateEndpointConnectionInner parameters); /** * Delete the specified private endpoint connection. @@ -131,7 +131,7 @@ Response updateWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginDelete( @@ -148,7 +148,7 @@ SyncPoller, Void> beginDelete( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginDelete( 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 fcfe02f01c62..c013fef721e1 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 @@ -21,7 +21,8 @@ public interface WebPubSubPrivateLinkResourcesClient { * @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. + * @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); @@ -36,7 +37,8 @@ public interface WebPubSubPrivateLinkResourcesClient { * @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. + * @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/WebPubSubSharedPrivateLinkResourcesClient.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/fluent/WebPubSubSharedPrivateLinkResourcesClient.java index c4cf4da62d89..5e97253d9b1d 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 @@ -26,7 +26,7 @@ public interface WebPubSubSharedPrivateLinkResourcesClient { * @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. + * @return a list of shared private link resources as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String resourceGroupName, String resourceName); @@ -41,7 +41,7 @@ public interface WebPubSubSharedPrivateLinkResourcesClient { * @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. + * @return a list of shared private link resources as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String resourceGroupName, String resourceName, Context context); @@ -53,14 +53,15 @@ public interface WebPubSubSharedPrivateLinkResourcesClient { * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value * from the Azure Resource Manager API or the portal. * @param resourceName The name of the resource. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the specified shared private link resource. + * @return the specified shared private link resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - SharedPrivateLinkResourceInner get( - String sharedPrivateLinkResourceName, String resourceGroupName, String resourceName); + Response getWithResponse( + String sharedPrivateLinkResourceName, String resourceGroupName, String resourceName, Context context); /** * Get the specified shared private link resource. @@ -69,15 +70,14 @@ SharedPrivateLinkResourceInner get( * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value * from the Azure Resource Manager API or the portal. * @param resourceName The name of the resource. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the specified shared private link resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String sharedPrivateLinkResourceName, String resourceGroupName, String resourceName, Context context); + SharedPrivateLinkResourceInner get( + String sharedPrivateLinkResourceName, String resourceGroupName, String resourceName); /** * Create or update a shared private link resource. @@ -90,7 +90,7 @@ Response getWithResponse( * @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. + * @return the {@link SyncPoller} for polling of describes a Shared Private Link Resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, SharedPrivateLinkResourceInner> beginCreateOrUpdate( @@ -111,7 +111,7 @@ SyncPoller, SharedPrivateLinkResource * @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. + * @return the {@link SyncPoller} for polling of describes a Shared Private Link Resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, SharedPrivateLinkResourceInner> beginCreateOrUpdate( @@ -173,7 +173,7 @@ SharedPrivateLinkResourceInner createOrUpdate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginDelete( @@ -190,7 +190,7 @@ SyncPoller, Void> beginDelete( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginDelete( 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 85eafd680a71..be637643697f 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 @@ -25,35 +25,36 @@ public interface WebPubSubsClient { * * @param location the region. * @param parameters Parameters supplied to the operation. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the request to check name availability. + * @return result of the request to check name availability along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - NameAvailabilityInner checkNameAvailability(String location, NameAvailabilityParameters parameters); + 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. - * @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 result of the request to check name availability. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response checkNameAvailabilityWithResponse( - String location, NameAvailabilityParameters parameters, Context context); + NameAvailabilityInner checkNameAvailability(String location, NameAvailabilityParameters parameters); /** * 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. + * @return object that includes an array of resources and a possible link for next set as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(); @@ -65,7 +66,8 @@ Response checkNameAvailabilityWithResponse( * @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. + * @return object that includes an array of resources and a possible link for next set as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(Context context); @@ -78,7 +80,8 @@ Response checkNameAvailabilityWithResponse( * @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. + * @return object that includes an array of resources and a possible link for next set as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByResourceGroup(String resourceGroupName); @@ -92,7 +95,8 @@ Response checkNameAvailabilityWithResponse( * @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. + * @return object that includes an array of resources and a possible link for next set as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByResourceGroup(String resourceGroupName, Context context); @@ -103,13 +107,15 @@ Response checkNameAvailabilityWithResponse( * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value * from the Azure Resource Manager API or the portal. * @param resourceName The name of the resource. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the resource and its properties. + * @return the resource and its properties along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - WebPubSubResourceInner getByResourceGroup(String resourceGroupName, String resourceName); + Response getByResourceGroupWithResponse( + String resourceGroupName, String resourceName, Context context); /** * Get the resource and its properties. @@ -117,15 +123,13 @@ Response checkNameAvailabilityWithResponse( * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value * from the Azure Resource Manager API or the portal. * @param resourceName The name of the resource. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the resource and its properties. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getByResourceGroupWithResponse( - String resourceGroupName, String resourceName, Context context); + WebPubSubResourceInner getByResourceGroup(String resourceGroupName, String resourceName); /** * Create or update a resource. @@ -137,7 +141,7 @@ Response getByResourceGroupWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a class represent a resource. + * @return the {@link SyncPoller} for polling of a class represent a resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, WebPubSubResourceInner> beginCreateOrUpdate( @@ -154,7 +158,7 @@ SyncPoller, WebPubSubResourceInner> beginCrea * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a class represent a resource. + * @return the {@link SyncPoller} for polling of a class represent a resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, WebPubSubResourceInner> beginCreateOrUpdate( @@ -202,7 +206,7 @@ WebPubSubResourceInner createOrUpdate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginDelete(String resourceGroupName, String resourceName); @@ -217,7 +221,7 @@ WebPubSubResourceInner createOrUpdate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginDelete(String resourceGroupName, String resourceName, Context context); @@ -259,7 +263,7 @@ WebPubSubResourceInner createOrUpdate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a class represent a resource. + * @return the {@link SyncPoller} for polling of a class represent a resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, WebPubSubResourceInner> beginUpdate( @@ -276,7 +280,7 @@ SyncPoller, WebPubSubResourceInner> beginUpda * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a class represent a resource. + * @return the {@link SyncPoller} for polling of a class represent a resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, WebPubSubResourceInner> beginUpdate( @@ -320,13 +324,14 @@ WebPubSubResourceInner update( * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value * from the Azure Resource Manager API or the portal. * @param resourceName The name of the resource. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the access keys of the resource. + * @return the access keys of the resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - WebPubSubKeysInner listKeys(String resourceGroupName, String resourceName); + Response listKeysWithResponse(String resourceGroupName, String resourceName, Context context); /** * Get the access keys of the resource. @@ -334,14 +339,13 @@ WebPubSubResourceInner update( * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value * from the Azure Resource Manager API or the portal. * @param resourceName The name of the resource. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the access keys of the resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response listKeysWithResponse(String resourceGroupName, String resourceName, Context context); + WebPubSubKeysInner listKeys(String resourceGroupName, String resourceName); /** * Regenerate the access key for the resource. PrimaryKey and SecondaryKey cannot be regenerated at the same time. @@ -353,7 +357,7 @@ WebPubSubResourceInner update( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a class represents the access keys of the resource. + * @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( @@ -370,7 +374,7 @@ SyncPoller, WebPubSubKeysInner> beginRegenerateKe * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a class represents the access keys of the resource. + * @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( @@ -417,7 +421,7 @@ WebPubSubKeysInner regenerateKey( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginRestart(String resourceGroupName, String resourceName); @@ -432,7 +436,7 @@ WebPubSubKeysInner regenerateKey( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginRestart(String resourceGroupName, String resourceName, Context context); @@ -470,13 +474,14 @@ WebPubSubKeysInner regenerateKey( * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value * from the Azure Resource Manager API or the portal. * @param resourceName The name of the resource. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list skus operation response. + * @return the list skus operation response along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - SkuListInner listSkus(String resourceGroupName, String resourceName); + Response listSkusWithResponse(String resourceGroupName, String resourceName, Context context); /** * List all available skus of the resource. @@ -484,12 +489,11 @@ WebPubSubKeysInner regenerateKey( * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value * from the Azure Resource Manager API or the portal. * @param resourceName The name of the resource. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the list skus operation response. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response listSkusWithResponse(String resourceGroupName, String resourceName, Context context); + SkuListInner listSkus(String resourceGroupName, String resourceName); } 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 new file mode 100644 index 000000000000..6212dbe5bafb --- /dev/null +++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/fluent/models/CustomCertificateInner.java @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.webpubsub.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.webpubsub.models.ProvisioningState; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** A custom certificate. */ +@Fluent +public final class CustomCertificateInner extends ProxyResource { + /* + * Metadata pertaining to creation and last modification of the resource. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /* + * Custom certificate properties. + */ + @JsonProperty(value = "properties", required = true) + private CustomCertificateProperties innerProperties = new CustomCertificateProperties(); + + /** Creates an instance of CustomCertificateInner class. */ + public CustomCertificateInner() { + } + + /** + * Get the systemData property: Metadata pertaining to creation and last modification of the resource. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the innerProperties property: Custom certificate properties. + * + * @return the innerProperties value. + */ + private CustomCertificateProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the provisioningState property: Provisioning state of the resource. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + } + + /** + * Get the keyVaultBaseUri property: Base uri of the KeyVault that stores certificate. + * + * @return the keyVaultBaseUri value. + */ + public String keyVaultBaseUri() { + return this.innerProperties() == null ? null : this.innerProperties().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. + */ + public CustomCertificateInner withKeyVaultBaseUri(String keyVaultBaseUri) { + if (this.innerProperties() == null) { + this.innerProperties = new CustomCertificateProperties(); + } + this.innerProperties().withKeyVaultBaseUri(keyVaultBaseUri); + return this; + } + + /** + * Get the keyVaultSecretName property: Certificate secret name. + * + * @return the keyVaultSecretName value. + */ + public String keyVaultSecretName() { + return this.innerProperties() == null ? null : this.innerProperties().keyVaultSecretName(); + } + + /** + * Set the keyVaultSecretName property: Certificate secret name. + * + * @param keyVaultSecretName the keyVaultSecretName value to set. + * @return the CustomCertificateInner object itself. + */ + public CustomCertificateInner withKeyVaultSecretName(String keyVaultSecretName) { + if (this.innerProperties() == null) { + this.innerProperties = new CustomCertificateProperties(); + } + this.innerProperties().withKeyVaultSecretName(keyVaultSecretName); + return this; + } + + /** + * Get the keyVaultSecretVersion property: Certificate secret version. + * + * @return the keyVaultSecretVersion value. + */ + public String keyVaultSecretVersion() { + return this.innerProperties() == null ? null : this.innerProperties().keyVaultSecretVersion(); + } + + /** + * Set the keyVaultSecretVersion property: Certificate secret version. + * + * @param keyVaultSecretVersion the keyVaultSecretVersion value to set. + * @return the CustomCertificateInner object itself. + */ + public CustomCertificateInner withKeyVaultSecretVersion(String keyVaultSecretVersion) { + if (this.innerProperties() == null) { + this.innerProperties = new CustomCertificateProperties(); + } + this.innerProperties().withKeyVaultSecretVersion(keyVaultSecretVersion); + return this; + } + + /** + * 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")); + } else { + innerProperties().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(CustomCertificateInner.class); +} 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 new file mode 100644 index 000000000000..1c6383c0f669 --- /dev/null +++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/fluent/models/CustomCertificateProperties.java @@ -0,0 +1,133 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.webpubsub.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.webpubsub.models.ProvisioningState; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Custom certificate properties. */ +@Fluent +public final class CustomCertificateProperties { + /* + * Provisioning state of the resource. + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ProvisioningState provisioningState; + + /* + * Base uri of the KeyVault that stores certificate. + */ + @JsonProperty(value = "keyVaultBaseUri", required = true) + private String keyVaultBaseUri; + + /* + * Certificate secret name. + */ + @JsonProperty(value = "keyVaultSecretName", required = true) + private String keyVaultSecretName; + + /* + * Certificate secret version. + */ + @JsonProperty(value = "keyVaultSecretVersion") + private String keyVaultSecretVersion; + + /** Creates an instance of CustomCertificateProperties class. */ + public CustomCertificateProperties() { + } + + /** + * Get the provisioningState property: Provisioning state of the resource. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the keyVaultBaseUri property: Base uri of the KeyVault that stores certificate. + * + * @return the keyVaultBaseUri value. + */ + public String keyVaultBaseUri() { + return this.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. + */ + public CustomCertificateProperties withKeyVaultBaseUri(String keyVaultBaseUri) { + this.keyVaultBaseUri = keyVaultBaseUri; + return this; + } + + /** + * Get the keyVaultSecretName property: Certificate secret name. + * + * @return the keyVaultSecretName value. + */ + public String keyVaultSecretName() { + return this.keyVaultSecretName; + } + + /** + * Set the keyVaultSecretName property: Certificate secret name. + * + * @param keyVaultSecretName the keyVaultSecretName value to set. + * @return the CustomCertificateProperties object itself. + */ + public CustomCertificateProperties withKeyVaultSecretName(String keyVaultSecretName) { + this.keyVaultSecretName = keyVaultSecretName; + return this; + } + + /** + * Get the keyVaultSecretVersion property: Certificate secret version. + * + * @return the keyVaultSecretVersion value. + */ + public String keyVaultSecretVersion() { + return this.keyVaultSecretVersion; + } + + /** + * Set the keyVaultSecretVersion property: Certificate secret version. + * + * @param keyVaultSecretVersion the keyVaultSecretVersion value to set. + * @return the CustomCertificateProperties object itself. + */ + public CustomCertificateProperties withKeyVaultSecretVersion(String keyVaultSecretVersion) { + this.keyVaultSecretVersion = keyVaultSecretVersion; + return this; + } + + /** + * 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")); + } + if (keyVaultSecretName() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property keyVaultSecretName in model CustomCertificateProperties")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(CustomCertificateProperties.class); +} 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 new file mode 100644 index 000000000000..35f984be24c9 --- /dev/null +++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/fluent/models/CustomDomainInner.java @@ -0,0 +1,124 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.webpubsub.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.webpubsub.models.ProvisioningState; +import com.azure.resourcemanager.webpubsub.models.ResourceReference; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** A custom domain. */ +@Fluent +public final class CustomDomainInner extends ProxyResource { + /* + * Metadata pertaining to creation and last modification of the resource. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /* + * Properties of a custom domain. + */ + @JsonProperty(value = "properties", required = true) + private CustomDomainProperties innerProperties = new CustomDomainProperties(); + + /** Creates an instance of CustomDomainInner class. */ + public CustomDomainInner() { + } + + /** + * Get the systemData property: Metadata pertaining to creation and last modification of the resource. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the innerProperties property: Properties of a custom domain. + * + * @return the innerProperties value. + */ + private CustomDomainProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the provisioningState property: Provisioning state of the resource. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + } + + /** + * Get the domainName property: The custom domain name. + * + * @return the domainName value. + */ + public String domainName() { + return this.innerProperties() == null ? null : this.innerProperties().domainName(); + } + + /** + * Set the domainName property: The custom domain name. + * + * @param domainName the domainName value to set. + * @return the CustomDomainInner object itself. + */ + public CustomDomainInner withDomainName(String domainName) { + if (this.innerProperties() == null) { + this.innerProperties = new CustomDomainProperties(); + } + this.innerProperties().withDomainName(domainName); + return this; + } + + /** + * Get the customCertificate property: Reference to a resource. + * + * @return the customCertificate value. + */ + public ResourceReference customCertificate() { + return this.innerProperties() == null ? null : this.innerProperties().customCertificate(); + } + + /** + * Set the customCertificate property: Reference to a resource. + * + * @param customCertificate the customCertificate value to set. + * @return the CustomDomainInner object itself. + */ + public CustomDomainInner withCustomCertificate(ResourceReference customCertificate) { + if (this.innerProperties() == null) { + this.innerProperties = new CustomDomainProperties(); + } + this.innerProperties().withCustomCertificate(customCertificate); + return this; + } + + /** + * 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")); + } else { + innerProperties().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(CustomDomainInner.class); +} 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 new file mode 100644 index 000000000000..99ee6115c780 --- /dev/null +++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/fluent/models/CustomDomainProperties.java @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.webpubsub.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.webpubsub.models.ProvisioningState; +import com.azure.resourcemanager.webpubsub.models.ResourceReference; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Properties of a custom domain. */ +@Fluent +public final class CustomDomainProperties { + /* + * Provisioning state of the resource. + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ProvisioningState provisioningState; + + /* + * The custom domain name. + */ + @JsonProperty(value = "domainName", required = true) + private String domainName; + + /* + * Reference to a resource. + */ + @JsonProperty(value = "customCertificate", required = true) + private ResourceReference customCertificate; + + /** Creates an instance of CustomDomainProperties class. */ + public CustomDomainProperties() { + } + + /** + * Get the provisioningState property: Provisioning state of the resource. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the domainName property: The custom domain name. + * + * @return the domainName value. + */ + public String domainName() { + return this.domainName; + } + + /** + * Set the domainName property: The custom domain name. + * + * @param domainName the domainName value to set. + * @return the CustomDomainProperties object itself. + */ + public CustomDomainProperties withDomainName(String domainName) { + this.domainName = domainName; + return this; + } + + /** + * Get the customCertificate property: Reference to a resource. + * + * @return the customCertificate value. + */ + public ResourceReference customCertificate() { + return this.customCertificate; + } + + /** + * Set the customCertificate property: Reference to a resource. + * + * @param customCertificate the customCertificate value to set. + * @return the CustomDomainProperties object itself. + */ + public CustomDomainProperties withCustomCertificate(ResourceReference customCertificate) { + this.customCertificate = customCertificate; + return this; + } + + /** + * 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")); + } + if (customCertificate() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property customCertificate in model CustomDomainProperties")); + } else { + customCertificate().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(CustomDomainProperties.class); +} 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 43d21ac1c6ee..997c2f3acbfb 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 @@ -5,15 +5,11 @@ package com.azure.resourcemanager.webpubsub.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Result of the request to check name availability. It contains a flag and possible reason of failure. */ @Fluent public final class NameAvailabilityInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(NameAvailabilityInner.class); - /* * Indicates whether the name is available or not. */ @@ -32,6 +28,10 @@ public final class NameAvailabilityInner { @JsonProperty(value = "message") private String message; + /** Creates an instance of NameAvailabilityInner class. */ + public NameAvailabilityInner() { + } + /** * Get the nameAvailable property: Indicates whether the name is available or not. * 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 279b6ec5c29a..a9c61ee4fdf7 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 @@ -5,17 +5,13 @@ package com.azure.resourcemanager.webpubsub.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.webpubsub.models.OperationDisplay; import com.azure.resourcemanager.webpubsub.models.OperationProperties; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** REST API operation supported by resource provider. */ @Fluent public final class OperationInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(OperationInner.class); - /* * Name of the operation with format: {provider}/{resource}/{operation} */ @@ -29,24 +25,28 @@ public final class OperationInner { private Boolean isDataAction; /* - * The object that describes the operation. + * The object that describes a operation. */ @JsonProperty(value = "display") 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; /* - * Extra properties for the operation. + * Extra Operation properties. */ @JsonProperty(value = "properties") private OperationProperties properties; + /** Creates an instance of OperationInner class. */ + public OperationInner() { + } + /** * Get the name property: Name of the operation with format: {provider}/{resource}/{operation}. * @@ -88,7 +88,7 @@ public OperationInner withIsDataAction(Boolean isDataAction) { } /** - * Get the display property: The object that describes the operation. + * Get the display property: The object that describes a operation. * * @return the display value. */ @@ -97,7 +97,7 @@ public OperationDisplay display() { } /** - * Set the display property: The object that describes the operation. + * Set the display property: The object that describes a operation. * * @param display the display value to set. * @return the OperationInner object itself. @@ -130,7 +130,7 @@ public OperationInner withOrigin(String origin) { } /** - * Get the properties property: Extra properties for the operation. + * Get the properties property: Extra Operation properties. * * @return the properties value. */ @@ -139,7 +139,7 @@ public OperationProperties properties() { } /** - * Set the properties property: Extra properties for the operation. + * Set the properties property: Extra Operation properties. * * @param properties the properties value to set. * @return the OperationInner object itself. 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 2a5cd55fba9c..794c183afb8f 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 @@ -7,19 +7,15 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; import com.azure.core.management.SystemData; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.webpubsub.models.PrivateEndpoint; import com.azure.resourcemanager.webpubsub.models.PrivateLinkServiceConnectionState; import com.azure.resourcemanager.webpubsub.models.ProvisioningState; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** A private endpoint connection to an azure resource. */ @Fluent public final class PrivateEndpointConnectionInner extends ProxyResource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(PrivateEndpointConnectionInner.class); - /* * Metadata pertaining to creation and last modification of the resource. */ @@ -27,11 +23,15 @@ public final class PrivateEndpointConnectionInner extends ProxyResource { private SystemData systemData; /* - * Properties of the private endpoint connection + * Private endpoint connection properties */ @JsonProperty(value = "properties") private PrivateEndpointConnectionProperties innerProperties; + /** Creates an instance of PrivateEndpointConnectionInner class. */ + public PrivateEndpointConnectionInner() { + } + /** * Get the systemData property: Metadata pertaining to creation and last modification of the resource. * @@ -42,7 +42,7 @@ public SystemData systemData() { } /** - * Get the innerProperties property: Properties of the private endpoint connection. + * Get the innerProperties property: Private endpoint connection properties. * * @return the innerProperties value. */ @@ -51,7 +51,7 @@ private PrivateEndpointConnectionProperties innerProperties() { } /** - * Get the provisioningState property: Provisioning state of the private endpoint connection. + * Get the provisioningState property: Provisioning state of the resource. * * @return the provisioningState value. */ @@ -60,7 +60,7 @@ public ProvisioningState provisioningState() { } /** - * Get the privateEndpoint property: Private endpoint associated with the private endpoint connection. + * Get the privateEndpoint property: Private endpoint. * * @return the privateEndpoint value. */ @@ -69,7 +69,7 @@ public PrivateEndpoint privateEndpoint() { } /** - * Set the privateEndpoint property: Private endpoint associated with the private endpoint connection. + * Set the privateEndpoint property: Private endpoint. * * @param privateEndpoint the privateEndpoint value to set. * @return the PrivateEndpointConnectionInner object itself. @@ -92,7 +92,7 @@ public List groupIds() { } /** - * Get the privateLinkServiceConnectionState property: Connection state. + * Get the privateLinkServiceConnectionState property: Connection state of the private endpoint connection. * * @return the privateLinkServiceConnectionState value. */ @@ -101,7 +101,7 @@ public PrivateLinkServiceConnectionState privateLinkServiceConnectionState() { } /** - * Set the privateLinkServiceConnectionState property: Connection state. + * Set the privateLinkServiceConnectionState property: Connection state of the private endpoint connection. * * @param privateLinkServiceConnectionState the privateLinkServiceConnectionState value to set. * @return the PrivateEndpointConnectionInner object itself. 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 26300d518a99..a9347af361b3 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 @@ -5,27 +5,23 @@ package com.azure.resourcemanager.webpubsub.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.webpubsub.models.PrivateEndpoint; import com.azure.resourcemanager.webpubsub.models.PrivateLinkServiceConnectionState; import com.azure.resourcemanager.webpubsub.models.ProvisioningState; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** Private endpoint connection properties. */ @Fluent public final class PrivateEndpointConnectionProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(PrivateEndpointConnectionProperties.class); - /* - * Provisioning state of the private endpoint connection + * Provisioning state of the resource. */ @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) private ProvisioningState provisioningState; /* - * Private endpoint associated with the private endpoint connection + * Private endpoint */ @JsonProperty(value = "privateEndpoint") private PrivateEndpoint privateEndpoint; @@ -37,13 +33,17 @@ public final class PrivateEndpointConnectionProperties { private List groupIds; /* - * Connection state + * Connection state of the private endpoint connection */ @JsonProperty(value = "privateLinkServiceConnectionState") private PrivateLinkServiceConnectionState privateLinkServiceConnectionState; + /** Creates an instance of PrivateEndpointConnectionProperties class. */ + public PrivateEndpointConnectionProperties() { + } + /** - * Get the provisioningState property: Provisioning state of the private endpoint connection. + * Get the provisioningState property: Provisioning state of the resource. * * @return the provisioningState value. */ @@ -52,7 +52,7 @@ public ProvisioningState provisioningState() { } /** - * Get the privateEndpoint property: Private endpoint associated with the private endpoint connection. + * Get the privateEndpoint property: Private endpoint. * * @return the privateEndpoint value. */ @@ -61,7 +61,7 @@ public PrivateEndpoint privateEndpoint() { } /** - * Set the privateEndpoint property: Private endpoint associated with the private endpoint connection. + * Set the privateEndpoint property: Private endpoint. * * @param privateEndpoint the privateEndpoint value to set. * @return the PrivateEndpointConnectionProperties object itself. @@ -81,7 +81,7 @@ public List groupIds() { } /** - * Get the privateLinkServiceConnectionState property: Connection state. + * Get the privateLinkServiceConnectionState property: Connection state of the private endpoint connection. * * @return the privateLinkServiceConnectionState value. */ @@ -90,7 +90,7 @@ public PrivateLinkServiceConnectionState privateLinkServiceConnectionState() { } /** - * Set the privateLinkServiceConnectionState property: Connection state. + * Set the privateLinkServiceConnectionState property: Connection state of the private endpoint connection. * * @param privateLinkServiceConnectionState the privateLinkServiceConnectionState value to set. * @return the PrivateEndpointConnectionProperties object itself. 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 e3d4589d8af4..79297011189c 100644 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/fluent/models/PrivateLinkResourceInner.java +++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/fluent/models/PrivateLinkResourceInner.java @@ -6,25 +6,25 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.webpubsub.models.ShareablePrivateLinkResourceType; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** Private link resource. */ @Fluent public final class PrivateLinkResourceInner extends ProxyResource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(PrivateLinkResourceInner.class); - /* - * Properties of a private link resource + * Private link resource properties */ @JsonProperty(value = "properties") private PrivateLinkResourceProperties innerProperties; + /** Creates an instance of PrivateLinkResourceInner class. */ + public PrivateLinkResourceInner() { + } + /** - * Get the innerProperties property: Properties of a private link resource. + * Get the innerProperties property: Private link resource properties. * * @return the innerProperties value. */ 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 197a7ece2d1e..d4c97c5c6d11 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 @@ -5,17 +5,13 @@ package com.azure.resourcemanager.webpubsub.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.webpubsub.models.ShareablePrivateLinkResourceType; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** Private link resource properties. */ @Fluent public final class PrivateLinkResourceProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(PrivateLinkResourceProperties.class); - /* * Group Id of the private link resource */ @@ -40,6 +36,10 @@ public final class PrivateLinkResourceProperties { @JsonProperty(value = "shareablePrivateLinkResourceTypes") private List shareablePrivateLinkResourceTypes; + /** Creates an instance of PrivateLinkResourceProperties class. */ + public PrivateLinkResourceProperties() { + } + /** * Get the groupId property: Group Id of the private link resource. * diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/fluent/models/SharedPrivateLinkResourceInner.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/fluent/models/SharedPrivateLinkResourceInner.java index 1e92d03b4f19..4782dea17814 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 @@ -7,17 +7,13 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; import com.azure.core.management.SystemData; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.webpubsub.models.ProvisioningState; import com.azure.resourcemanager.webpubsub.models.SharedPrivateLinkResourceStatus; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Describes a Shared Private Link Resource. */ @Fluent public final class SharedPrivateLinkResourceInner extends ProxyResource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(SharedPrivateLinkResourceInner.class); - /* * Metadata pertaining to creation and last modification of the resource. */ @@ -25,11 +21,15 @@ public final class SharedPrivateLinkResourceInner extends ProxyResource { private SystemData systemData; /* - * Describes the properties of a Shared Private Link Resource + * Describes the properties of an existing Shared Private Link Resource */ @JsonProperty(value = "properties") private SharedPrivateLinkResourceProperties innerProperties; + /** Creates an instance of SharedPrivateLinkResourceInner class. */ + public SharedPrivateLinkResourceInner() { + } + /** * Get the systemData property: Metadata pertaining to creation and last modification of the resource. * @@ -40,7 +40,7 @@ public SystemData systemData() { } /** - * Get the innerProperties property: Describes the properties of a Shared Private Link Resource. + * Get the innerProperties property: Describes the properties of an existing Shared Private Link Resource. * * @return the innerProperties value. */ @@ -95,7 +95,7 @@ public SharedPrivateLinkResourceInner withPrivateLinkResourceId(String privateLi } /** - * Get the provisioningState property: Provisioning state of the shared private link resource. + * Get the provisioningState property: Provisioning state of the resource. * * @return the provisioningState value. */ 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 34fe5dbcbdfd..8bbd5c6dab1a 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 @@ -8,17 +8,13 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.webpubsub.models.ProvisioningState; import com.azure.resourcemanager.webpubsub.models.SharedPrivateLinkResourceStatus; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Describes the properties of an existing Shared Private Link Resource. */ @Fluent public final class SharedPrivateLinkResourceProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(SharedPrivateLinkResourceProperties.class); - /* - * The group id from the provider of resource the shared private link - * resource is for + * The group id from the provider of resource the shared private link resource is for */ @JsonProperty(value = "groupId", required = true) private String groupId; @@ -30,14 +26,13 @@ public final class SharedPrivateLinkResourceProperties { private String privateLinkResourceId; /* - * Provisioning state of the shared private link resource + * Provisioning state of the resource. */ @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) private ProvisioningState provisioningState; /* - * The request message for requesting approval of the shared private link - * resource + * The request message for requesting approval of the shared private link resource */ @JsonProperty(value = "requestMessage") private String requestMessage; @@ -48,6 +43,10 @@ public final class SharedPrivateLinkResourceProperties { @JsonProperty(value = "status", access = JsonProperty.Access.WRITE_ONLY) private SharedPrivateLinkResourceStatus status; + /** 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. * @@ -89,7 +88,7 @@ public SharedPrivateLinkResourceProperties withPrivateLinkResourceId(String priv } /** - * Get the provisioningState property: Provisioning state of the shared private link resource. + * Get the provisioningState property: Provisioning state of the resource. * * @return the provisioningState value. */ @@ -133,17 +132,19 @@ public SharedPrivateLinkResourceStatus status() { */ public void validate() { if (groupId() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property groupId in model SharedPrivateLinkResourceProperties")); } if (privateLinkResourceId() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property privateLinkResourceId in model" + " SharedPrivateLinkResourceProperties")); } } + + private static final ClientLogger LOGGER = new ClientLogger(SharedPrivateLinkResourceProperties.class); } 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 5301e9d9d0e0..f4986e30167f 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 @@ -5,16 +5,12 @@ package com.azure.resourcemanager.webpubsub.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.webpubsub.models.SignalRServiceUsageName; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Object that describes a specific usage of the resources. */ @Fluent public final class SignalRServiceUsageInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(SignalRServiceUsageInner.class); - /* * Fully qualified ARM resource id */ @@ -28,8 +24,7 @@ public final class SignalRServiceUsageInner { private Long currentValue; /* - * The maximum permitted value for the usage quota. If there is no limit, - * this value will be -1. + * The maximum permitted value for the usage quota. If there is no limit, this value will be -1. */ @JsonProperty(value = "limit") private Long limit; @@ -41,12 +36,16 @@ 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. */ + public SignalRServiceUsageInner() { + } + /** * Get the id property: Fully qualified ARM resource id. * 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 813099f28052..203915dc1e28 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 @@ -5,17 +5,13 @@ package com.azure.resourcemanager.webpubsub.fluent.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.webpubsub.models.Sku; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** The list skus operation response. */ @Immutable public final class SkuListInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(SkuListInner.class); - /* * The list of skus available for the resource. */ @@ -23,13 +19,16 @@ public final class SkuListInner { private List value; /* - * The URL the client should use to fetch the next page (per server side - * paging). + * The URL the client should use to fetch the next page (per server side paging). * It's null for now, added for future use. */ @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; + /** Creates an instance of SkuListInner class. */ + public SkuListInner() { + } + /** * Get the value property: The list of skus available for the resource. * 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 b215c9b9132f..54a397691b6d 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 @@ -9,14 +9,11 @@ import com.azure.core.management.SystemData; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.webpubsub.models.WebPubSubHubProperties; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** A hub setting. */ @Fluent public final class WebPubSubHubInner extends ProxyResource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(WebPubSubHubInner.class); - /* * Metadata pertaining to creation and last modification of the resource. */ @@ -24,11 +21,15 @@ public final class WebPubSubHubInner extends ProxyResource { private SystemData systemData; /* - * Properties of the hub setting. + * Properties of a hub. */ @JsonProperty(value = "properties", required = true) private WebPubSubHubProperties properties; + /** Creates an instance of WebPubSubHubInner class. */ + public WebPubSubHubInner() { + } + /** * Get the systemData property: Metadata pertaining to creation and last modification of the resource. * @@ -39,7 +40,7 @@ public SystemData systemData() { } /** - * Get the properties property: Properties of the hub setting. + * Get the properties property: Properties of a hub. * * @return the properties value. */ @@ -48,7 +49,7 @@ public WebPubSubHubProperties properties() { } /** - * Set the properties property: Properties of the hub setting. + * Set the properties property: Properties of a hub. * * @param properties the properties value to set. * @return the WebPubSubHubInner object itself. @@ -65,11 +66,13 @@ public WebPubSubHubInner withProperties(WebPubSubHubProperties properties) { */ public void validate() { if (properties() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException("Missing required property properties in model WebPubSubHubInner")); } else { properties().validate(); } } + + private static final ClientLogger LOGGER = new ClientLogger(WebPubSubHubInner.class); } 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 87c17313f8a9..f41c4a121e67 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 @@ -5,15 +5,11 @@ package com.azure.resourcemanager.webpubsub.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** A class represents the access keys of the resource. */ @Fluent public final class WebPubSubKeysInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(WebPubSubKeysInner.class); - /* * The primary access key. */ @@ -38,6 +34,10 @@ public final class WebPubSubKeysInner { @JsonProperty(value = "secondaryConnectionString") private String secondaryConnectionString; + /** Creates an instance of WebPubSubKeysInner class. */ + public WebPubSubKeysInner() { + } + /** * Get the primaryKey property: The primary access key. * 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 a814d7ef99a2..98204ba28a23 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 @@ -5,21 +5,17 @@ package com.azure.resourcemanager.webpubsub.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.webpubsub.models.LiveTraceConfiguration; 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.WebPubSubTlsSettings; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** A class that describes the properties of the resource. */ @Fluent public final class WebPubSubProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(WebPubSubProperties.class); - /* * Provisioning state of the resource. */ @@ -39,22 +35,19 @@ public final class WebPubSubProperties { private String hostname; /* - * The publicly accessible port of the resource which is designed for - * browser/client side usage. + * The publicly accessible port of the resource which is designed for browser/client side usage. */ @JsonProperty(value = "publicPort", access = JsonProperty.Access.WRITE_ONLY) private Integer publicPort; /* - * The publicly accessible port of the resource which is designed for - * customer server side usage. + * The publicly accessible port of the resource which is designed for customer server side usage. */ @JsonProperty(value = "serverPort", access = JsonProperty.Access.WRITE_ONLY) private Integer serverPort; /* - * Version of the resource. Probably you need the same or higher version of - * client SDKs. + * Version of the resource. Probably you need the same or higher version of client SDKs. */ @JsonProperty(value = "version", access = JsonProperty.Access.WRITE_ONLY) private String version; @@ -72,7 +65,7 @@ public final class WebPubSubProperties { private List sharedPrivateLinkResources; /* - * TLS settings. + * TLS settings for the resource */ @JsonProperty(value = "tls") private WebPubSubTlsSettings tls; @@ -91,16 +84,12 @@ public final class WebPubSubProperties { /* * Resource log configuration of a Microsoft.SignalRService resource. - * If resourceLogConfiguration isn't null or empty, it will override - * options "EnableConnectivityLog" and "EnableMessagingLogs" in features. - * Otherwise, use options "EnableConnectivityLog" and "EnableMessagingLogs" - * in features. */ @JsonProperty(value = "resourceLogConfiguration") private ResourceLogConfiguration resourceLogConfiguration; /* - * Network ACLs + * Network ACLs for the resource */ @JsonProperty(value = "networkACLs") private WebPubSubNetworkACLs networkACLs; @@ -108,8 +97,7 @@ public final class WebPubSubProperties { /* * 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. + * When it's Disabled, public network access is always disabled no matter what you set in network ACLs. */ @JsonProperty(value = "publicNetworkAccess") private String publicNetworkAccess; @@ -130,6 +118,10 @@ public final class WebPubSubProperties { @JsonProperty(value = "disableAadAuth") private Boolean disableAadAuth; + /** Creates an instance of WebPubSubProperties class. */ + public WebPubSubProperties() { + } + /** * Get the provisioningState property: Provisioning state of the resource. * @@ -205,7 +197,7 @@ public List sharedPrivateLinkResources() { } /** - * Get the tls property: TLS settings. + * Get the tls property: TLS settings for the resource. * * @return the tls value. */ @@ -214,7 +206,7 @@ public WebPubSubTlsSettings tls() { } /** - * Set the tls property: TLS settings. + * Set the tls property: TLS settings for the resource. * * @param tls the tls value to set. * @return the WebPubSubProperties object itself. @@ -254,10 +246,7 @@ public WebPubSubProperties withLiveTraceConfiguration(LiveTraceConfiguration liv } /** - * Get the resourceLogConfiguration property: Resource log configuration of a Microsoft.SignalRService resource. If - * resourceLogConfiguration isn't null or empty, it will override options "EnableConnectivityLog" and - * "EnableMessagingLogs" in features. Otherwise, use options "EnableConnectivityLog" and "EnableMessagingLogs" in - * features. + * Get the resourceLogConfiguration property: Resource log configuration of a Microsoft.SignalRService resource. * * @return the resourceLogConfiguration value. */ @@ -266,10 +255,7 @@ public ResourceLogConfiguration resourceLogConfiguration() { } /** - * Set the resourceLogConfiguration property: Resource log configuration of a Microsoft.SignalRService resource. If - * resourceLogConfiguration isn't null or empty, it will override options "EnableConnectivityLog" and - * "EnableMessagingLogs" in features. Otherwise, use options "EnableConnectivityLog" and "EnableMessagingLogs" in - * features. + * Set the resourceLogConfiguration property: Resource log configuration of a Microsoft.SignalRService resource. * * @param resourceLogConfiguration the resourceLogConfiguration value to set. * @return the WebPubSubProperties object itself. @@ -280,7 +266,7 @@ public WebPubSubProperties withResourceLogConfiguration(ResourceLogConfiguration } /** - * Get the networkACLs property: Network ACLs. + * Get the networkACLs property: Network ACLs for the resource. * * @return the networkACLs value. */ @@ -289,7 +275,7 @@ public WebPubSubNetworkACLs networkACLs() { } /** - * Set the networkACLs property: Network ACLs. + * Set the networkACLs property: Network ACLs for the resource. * * @param networkACLs the networkACLs value to set. * @return the WebPubSubProperties object itself. 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 484195d25907..23e8bbcac758 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 @@ -7,7 +7,6 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.Resource; import com.azure.core.management.SystemData; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.webpubsub.models.LiveTraceConfiguration; import com.azure.resourcemanager.webpubsub.models.ManagedIdentity; import com.azure.resourcemanager.webpubsub.models.ProvisioningState; @@ -15,7 +14,6 @@ import com.azure.resourcemanager.webpubsub.models.ResourceSku; import com.azure.resourcemanager.webpubsub.models.WebPubSubNetworkACLs; import com.azure.resourcemanager.webpubsub.models.WebPubSubTlsSettings; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; import java.util.Map; @@ -23,22 +21,20 @@ /** A class represent a resource. */ @Fluent public final class WebPubSubResourceInner extends Resource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(WebPubSubResourceInner.class); - /* - * The billing information of the resource.(e.g. Free, Standard) + * The billing information of the resource. */ @JsonProperty(value = "sku") private ResourceSku sku; /* - * Settings used to provision or configure the resource + * A class that describes the properties of the resource */ @JsonProperty(value = "properties") private WebPubSubProperties innerProperties; /* - * The managed identity response + * A class represent managed identities used for request and response */ @JsonProperty(value = "identity") private ManagedIdentity identity; @@ -49,8 +45,12 @@ public final class WebPubSubResourceInner extends Resource { @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) private SystemData systemData; + /** Creates an instance of WebPubSubResourceInner class. */ + public WebPubSubResourceInner() { + } + /** - * Get the sku property: The billing information of the resource.(e.g. Free, Standard). + * Get the sku property: The billing information of the resource. * * @return the sku value. */ @@ -59,7 +59,7 @@ public ResourceSku sku() { } /** - * Set the sku property: The billing information of the resource.(e.g. Free, Standard). + * Set the sku property: The billing information of the resource. * * @param sku the sku value to set. * @return the WebPubSubResourceInner object itself. @@ -70,7 +70,7 @@ public WebPubSubResourceInner withSku(ResourceSku sku) { } /** - * Get the innerProperties property: Settings used to provision or configure the resource. + * Get the innerProperties property: A class that describes the properties of the resource. * * @return the innerProperties value. */ @@ -79,7 +79,7 @@ private WebPubSubProperties innerProperties() { } /** - * Get the identity property: The managed identity response. + * Get the identity property: A class represent managed identities used for request and response. * * @return the identity value. */ @@ -88,7 +88,7 @@ public ManagedIdentity identity() { } /** - * Set the identity property: The managed identity response. + * 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. @@ -196,7 +196,7 @@ public List sharedPrivateLinkResources() { } /** - * Get the tls property: TLS settings. + * Get the tls property: TLS settings for the resource. * * @return the tls value. */ @@ -205,7 +205,7 @@ public WebPubSubTlsSettings tls() { } /** - * Set the tls property: TLS settings. + * Set the tls property: TLS settings for the resource. * * @param tls the tls value to set. * @return the WebPubSubResourceInner object itself. @@ -251,10 +251,7 @@ public WebPubSubResourceInner withLiveTraceConfiguration(LiveTraceConfiguration } /** - * Get the resourceLogConfiguration property: Resource log configuration of a Microsoft.SignalRService resource. If - * resourceLogConfiguration isn't null or empty, it will override options "EnableConnectivityLog" and - * "EnableMessagingLogs" in features. Otherwise, use options "EnableConnectivityLog" and "EnableMessagingLogs" in - * features. + * Get the resourceLogConfiguration property: Resource log configuration of a Microsoft.SignalRService resource. * * @return the resourceLogConfiguration value. */ @@ -263,10 +260,7 @@ public ResourceLogConfiguration resourceLogConfiguration() { } /** - * Set the resourceLogConfiguration property: Resource log configuration of a Microsoft.SignalRService resource. If - * resourceLogConfiguration isn't null or empty, it will override options "EnableConnectivityLog" and - * "EnableMessagingLogs" in features. Otherwise, use options "EnableConnectivityLog" and "EnableMessagingLogs" in - * features. + * Set the resourceLogConfiguration property: Resource log configuration of a Microsoft.SignalRService resource. * * @param resourceLogConfiguration the resourceLogConfiguration value to set. * @return the WebPubSubResourceInner object itself. @@ -280,7 +274,7 @@ public WebPubSubResourceInner withResourceLogConfiguration(ResourceLogConfigurat } /** - * Get the networkACLs property: Network ACLs. + * Get the networkACLs property: Network ACLs for the resource. * * @return the networkACLs value. */ @@ -289,7 +283,7 @@ public WebPubSubNetworkACLs networkACLs() { } /** - * Set the networkACLs property: Network ACLs. + * Set the networkACLs property: Network ACLs for the resource. * * @param networkACLs the networkACLs value to set. * @return the WebPubSubResourceInner object itself. 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 new file mode 100644 index 000000000000..8624ba526594 --- /dev/null +++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/implementation/CustomCertificateImpl.java @@ -0,0 +1,164 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.webpubsub.implementation; + +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.webpubsub.fluent.models.CustomCertificateInner; +import com.azure.resourcemanager.webpubsub.models.CustomCertificate; +import com.azure.resourcemanager.webpubsub.models.ProvisioningState; + +public final class CustomCertificateImpl + implements CustomCertificate, CustomCertificate.Definition, CustomCertificate.Update { + private CustomCertificateInner innerObject; + + private final com.azure.resourcemanager.webpubsub.WebPubSubManager serviceManager; + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public ProvisioningState provisioningState() { + return this.innerModel().provisioningState(); + } + + public String keyVaultBaseUri() { + return this.innerModel().keyVaultBaseUri(); + } + + public String keyVaultSecretName() { + return this.innerModel().keyVaultSecretName(); + } + + public String keyVaultSecretVersion() { + return this.innerModel().keyVaultSecretVersion(); + } + + public String resourceGroupName() { + return resourceGroupName; + } + + public CustomCertificateInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.webpubsub.WebPubSubManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String resourceName; + + private String certificateName; + + public CustomCertificateImpl withExistingWebPubSub(String resourceGroupName, String resourceName) { + this.resourceGroupName = resourceGroupName; + this.resourceName = resourceName; + return this; + } + + public CustomCertificate create() { + 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); + return this; + } + + CustomCertificateImpl(String name, com.azure.resourcemanager.webpubsub.WebPubSubManager serviceManager) { + this.innerObject = new CustomCertificateInner(); + this.serviceManager = serviceManager; + this.certificateName = name; + } + + public CustomCertificateImpl update() { + return this; + } + + public CustomCertificate apply() { + 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); + return this; + } + + 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"); + } + + public CustomCertificate refresh() { + 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(); + return this; + } + + public CustomCertificateImpl withKeyVaultBaseUri(String keyVaultBaseUri) { + this.innerModel().withKeyVaultBaseUri(keyVaultBaseUri); + return this; + } + + public CustomCertificateImpl withKeyVaultSecretName(String keyVaultSecretName) { + this.innerModel().withKeyVaultSecretName(keyVaultSecretName); + return this; + } + + public CustomCertificateImpl withKeyVaultSecretVersion(String keyVaultSecretVersion) { + this.innerModel().withKeyVaultSecretVersion(keyVaultSecretVersion); + 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 new file mode 100644 index 000000000000..dbdf288a4a62 --- /dev/null +++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/implementation/CustomDomainImpl.java @@ -0,0 +1,155 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.webpubsub.implementation; + +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.webpubsub.fluent.models.CustomDomainInner; +import com.azure.resourcemanager.webpubsub.models.CustomDomain; +import com.azure.resourcemanager.webpubsub.models.ProvisioningState; +import com.azure.resourcemanager.webpubsub.models.ResourceReference; + +public final class CustomDomainImpl implements CustomDomain, CustomDomain.Definition, CustomDomain.Update { + private CustomDomainInner innerObject; + + private final com.azure.resourcemanager.webpubsub.WebPubSubManager serviceManager; + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public ProvisioningState provisioningState() { + return this.innerModel().provisioningState(); + } + + public String domainName() { + return this.innerModel().domainName(); + } + + public ResourceReference customCertificate() { + return this.innerModel().customCertificate(); + } + + public String resourceGroupName() { + return resourceGroupName; + } + + public CustomDomainInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.webpubsub.WebPubSubManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String resourceName; + + private String name; + + public CustomDomainImpl withExistingWebPubSub(String resourceGroupName, String resourceName) { + this.resourceGroupName = resourceGroupName; + this.resourceName = resourceName; + return this; + } + + public CustomDomain create() { + 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); + return this; + } + + CustomDomainImpl(String name, com.azure.resourcemanager.webpubsub.WebPubSubManager serviceManager) { + this.innerObject = new CustomDomainInner(); + this.serviceManager = serviceManager; + this.name = name; + } + + public CustomDomainImpl update() { + return this; + } + + public CustomDomain apply() { + 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); + return this; + } + + 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"); + } + + public CustomDomain refresh() { + 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(); + return this; + } + + public CustomDomainImpl withDomainName(String domainName) { + this.innerModel().withDomainName(domainName); + return this; + } + + public CustomDomainImpl withCustomCertificate(ResourceReference customCertificate) { + this.innerModel().withCustomCertificate(customCertificate); + return this; + } +} 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 c320fe3ea2d4..b6e6495e340f 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 @@ -25,7 +25,6 @@ import com.azure.core.management.exception.ManagementException; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.webpubsub.fluent.OperationsClient; import com.azure.resourcemanager.webpubsub.fluent.models.OperationInner; import com.azure.resourcemanager.webpubsub.models.OperationList; @@ -33,8 +32,6 @@ /** An instance of this class provides access to all the operations defined in OperationsClient. */ public final class OperationsClientImpl implements OperationsClient { - private final ClientLogger logger = new ClientLogger(OperationsClientImpl.class); - /** The proxy service used to perform REST calls. */ private final OperationsService service; @@ -85,7 +82,8 @@ Mono> listNext( * * @throws 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. + * @return result of the request to list REST API operations along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync() { @@ -118,7 +116,8 @@ private Mono> listSinglePageAsync() { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return result of the request to list REST API operations along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(Context context) { @@ -148,7 +147,7 @@ private Mono> listSinglePageAsync(Context context) * * @throws 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. + * @return result of the request to list REST API operations as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync() { @@ -162,7 +161,7 @@ private PagedFlux listAsync() { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return result of the request to list REST API operations as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(Context context) { @@ -175,7 +174,7 @@ private PagedFlux listAsync(Context context) { * * @throws 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. + * @return result of the request to list REST API operations as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list() { @@ -189,7 +188,7 @@ public PagedIterable list() { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return result of the request to list REST API operations as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(Context context) { @@ -199,11 +198,13 @@ public PagedIterable list(Context context) { /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @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 result of the request to list REST API operations. + * @return result of the request to list REST API operations along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -234,12 +235,14 @@ private Mono> listNextSinglePageAsync(String nextL /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @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 result of the request to list REST API operations. + * @return result of the request to list REST API operations along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink, Context context) { 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 34d4e47ccaa3..46923b4dc029 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 @@ -11,10 +11,9 @@ import com.azure.resourcemanager.webpubsub.fluent.models.OperationInner; import com.azure.resourcemanager.webpubsub.models.Operation; import com.azure.resourcemanager.webpubsub.models.Operations; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class OperationsImpl implements Operations { - @JsonIgnore private final ClientLogger logger = new ClientLogger(OperationsImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(OperationsImpl.class); private final OperationsClient innerClient; 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 fb15fc4f63cc..bd566baa3f2c 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 @@ -53,6 +53,10 @@ public SharedPrivateLinkResourceStatus status() { return this.innerModel().status(); } + public String resourceGroupName() { + return resourceGroupName; + } + public SharedPrivateLinkResourceInner innerModel() { return this.innerObject; } 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 a624f960b579..330fb890858c 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 @@ -25,7 +25,6 @@ import com.azure.core.management.exception.ManagementException; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.webpubsub.fluent.UsagesClient; import com.azure.resourcemanager.webpubsub.fluent.models.SignalRServiceUsageInner; import com.azure.resourcemanager.webpubsub.models.SignalRServiceUsageList; @@ -33,8 +32,6 @@ /** An instance of this class provides access to all the operations defined in UsagesClient. */ public final class UsagesClientImpl implements UsagesClient { - private final ClientLogger logger = new ClientLogger(UsagesClientImpl.class); - /** The proxy service used to perform REST calls. */ private final UsagesService service; @@ -88,7 +85,8 @@ Mono> listNext( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @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) { @@ -139,7 +137,8 @@ private Mono> listSinglePageAsync(String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @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) { @@ -186,7 +185,8 @@ private Mono> listSinglePageAsync(String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return object that includes an array of the resource usages and a possible link for next set as paginated + * response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String location) { @@ -201,7 +201,8 @@ private PagedFlux listAsync(String location) { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return object that includes an array of the resource usages and a possible link for next set as paginated + * response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String location, Context context) { @@ -216,7 +217,8 @@ private PagedFlux listAsync(String location, Context c * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return object that includes an array of the resource usages and a possible link for next set as paginated + * response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String location) { @@ -231,7 +233,8 @@ public PagedIterable list(String location) { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return object that includes an array of the resource usages and a possible link for next set as paginated + * response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String location, Context context) { @@ -241,11 +244,13 @@ public PagedIterable list(String location, Context con /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @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 object that includes an array of the resource usages and a possible link for next set. + * @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) { @@ -276,12 +281,14 @@ private Mono> listNextSinglePageAsync(St /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @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 object that includes an array of the resource usages and a possible link for next set. + * @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) { 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 dd445e8415c0..b7754d560819 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 @@ -11,10 +11,9 @@ import com.azure.resourcemanager.webpubsub.fluent.models.SignalRServiceUsageInner; import com.azure.resourcemanager.webpubsub.models.SignalRServiceUsage; import com.azure.resourcemanager.webpubsub.models.Usages; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class UsagesImpl implements Usages { - @JsonIgnore private final ClientLogger logger = new ClientLogger(UsagesImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(UsagesImpl.class); private final UsagesClient innerClient; 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 new file mode 100644 index 000000000000..6e26a6cacdfc --- /dev/null +++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/implementation/WebPubSubCustomCertificatesClientImpl.java @@ -0,0 +1,1046 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.webpubsub.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.Delete; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.webpubsub.fluent.WebPubSubCustomCertificatesClient; +import com.azure.resourcemanager.webpubsub.fluent.models.CustomCertificateInner; +import com.azure.resourcemanager.webpubsub.models.CustomCertificateList; +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 WebPubSubCustomCertificatesClient. */ +public final class WebPubSubCustomCertificatesClientImpl implements WebPubSubCustomCertificatesClient { + /** The proxy service used to perform REST calls. */ + private final WebPubSubCustomCertificatesService service; + + /** 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.client = client; + } + + /** + * The interface defining all the services for WebPubSubManagementClientWebPubSubCustomCertificates to be used by + * the proxy service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "WebPubSubManagementC") + private interface WebPubSubCustomCertificatesService { + @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, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("resourceName") String resourceName, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService" + + "/webPubSub/{resourceName}/customCertificates/{certificateName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + 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); + + @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, + @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, + Context context); + + @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, + @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); + + @Headers({"Content-Type: application/json"}) + @Get("{nextLink}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, + Context context); + } + + /** + * List all custom certificates. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param 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 custom certificates list along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync( + String resourceGroupName, String resourceName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .list( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + resourceName, + this.client.getApiVersion(), + accept, + context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List all custom certificates. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param 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 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) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .list( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + resourceName, + this.client.getApiVersion(), + accept, + context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * List all custom certificates. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param 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 custom certificates list 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)); + } + + /** + * List all custom certificates. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param 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 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), + nextLink -> listNextSinglePageAsync(nextLink, context)); + } + + /** + * List all custom certificates. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param 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 custom certificates list as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String resourceName) { + return new PagedIterable<>(listAsync(resourceGroupName, resourceName)); + } + + /** + * List all custom certificates. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param 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 custom certificates list as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String resourceName, Context context) { + return new PagedIterable<>(listAsync(resourceGroupName, resourceName, context)); + } + + /** + * Get a custom certificate. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param resourceName The name of the resource. + * @param certificateName Custom certificate name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 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) { + 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 (certificateName == null) { + return Mono + .error(new IllegalArgumentException("Parameter certificateName 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, + 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 that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param resourceName The name of the resource. + * @param certificateName Custom certificate name. + * @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 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) { + 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 (certificateName == null) { + return Mono + .error(new IllegalArgumentException("Parameter certificateName 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, + certificateName, + this.client.getApiVersion(), + accept, + context); + } + + /** + * Get a custom certificate. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param resourceName The name of the resource. + * @param certificateName Custom certificate name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 custom certificate on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + 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 that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param resourceName The name of the resource. + * @param certificateName Custom certificate name. + * @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 custom certificate along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + 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 that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param resourceName The name of the resource. + * @param certificateName Custom certificate name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 custom certificate. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public CustomCertificateInner get(String resourceGroupName, String resourceName, String certificateName) { + return getWithResponse(resourceGroupName, resourceName, certificateName, Context.NONE).getValue(); + } + + /** + * Create or update a custom certificate. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param resourceName The name of the resource. + * @param certificateName Custom certificate name. + * @param parameters A custom certificate. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 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) { + 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 (certificateName == null) { + return Mono + .error(new IllegalArgumentException("Parameter certificateName 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, + 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 that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param resourceName The name of the resource. + * @param certificateName Custom certificate name. + * @param parameters A custom certificate. + * @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 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) { + 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 (certificateName == null) { + return Mono + .error(new IllegalArgumentException("Parameter certificateName 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, + certificateName, + this.client.getApiVersion(), + parameters, + accept, + context); + } + + /** + * Create or update a custom certificate. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param resourceName The name of the resource. + * @param certificateName Custom certificate name. + * @param parameters A custom certificate. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of a custom certificate. + */ + @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()); + } + + /** + * Create or update a custom certificate. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param resourceName The name of the resource. + * @param certificateName Custom certificate name. + * @param parameters A custom certificate. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of a custom certificate. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, CustomCertificateInner> beginCreateOrUpdateAsync( + 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); + } + + /** + * Create or update a custom certificate. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param resourceName The name of the resource. + * @param certificateName Custom certificate name. + * @param parameters A custom certificate. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of a custom certificate. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, CustomCertificateInner> beginCreateOrUpdate( + String resourceGroupName, String resourceName, String certificateName, CustomCertificateInner parameters) { + return beginCreateOrUpdateAsync(resourceGroupName, resourceName, certificateName, parameters).getSyncPoller(); + } + + /** + * Create or update a custom certificate. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param resourceName The name of the resource. + * @param certificateName Custom certificate name. + * @param parameters A custom certificate. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of a custom certificate. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, CustomCertificateInner> beginCreateOrUpdate( + String resourceGroupName, + String resourceName, + String certificateName, + CustomCertificateInner parameters, + Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, resourceName, certificateName, parameters, context) + .getSyncPoller(); + } + + /** + * Create or update a custom certificate. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param resourceName The name of the resource. + * @param certificateName Custom certificate name. + * @param parameters A custom certificate. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 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() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create or update a custom certificate. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param resourceName The name of the resource. + * @param certificateName Custom certificate name. + * @param parameters A custom certificate. + * @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 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() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create or update a custom certificate. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param resourceName The name of the resource. + * @param certificateName Custom certificate name. + * @param parameters A custom certificate. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 custom certificate. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + 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 that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param resourceName The name of the resource. + * @param certificateName Custom certificate name. + * @param parameters A custom certificate. + * @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 custom certificate. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + 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 that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param resourceName The name of the resource. + * @param certificateName Custom certificate name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> deleteWithResponseAsync( + String resourceGroupName, String resourceName, String certificateName) { + 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 (certificateName == null) { + return Mono + .error(new IllegalArgumentException("Parameter certificateName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .delete( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + resourceName, + 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 that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param resourceName The name of the resource. + * @param certificateName Custom certificate name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> deleteWithResponseAsync( + String resourceGroupName, String resourceName, String certificateName, 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 (certificateName == null) { + return Mono + .error(new IllegalArgumentException("Parameter certificateName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .delete( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + resourceName, + certificateName, + this.client.getApiVersion(), + accept, + context); + } + + /** + * Delete a custom certificate. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param resourceName The name of the resource. + * @param certificateName Custom certificate name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String resourceName, String certificateName) { + return deleteWithResponseAsync(resourceGroupName, resourceName, certificateName) + .flatMap(ignored -> Mono.empty()); + } + + /** + * Delete a custom certificate. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param resourceName The name of the resource. + * @param certificateName Custom certificate name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response deleteWithResponse( + String resourceGroupName, String resourceName, String certificateName, Context context) { + return deleteWithResponseAsync(resourceGroupName, resourceName, certificateName, context).block(); + } + + /** + * Delete a custom certificate. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param resourceName The name of the resource. + * @param certificateName Custom certificate name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String resourceName, String certificateName) { + deleteWithResponse(resourceGroupName, resourceName, certificateName, Context.NONE); + } + + /** + * 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 custom certificates list 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 custom certificates list 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/WebPubSubCustomCertificatesImpl.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/implementation/WebPubSubCustomCertificatesImpl.java new file mode 100644 index 000000000000..153c1478ac6b --- /dev/null +++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/implementation/WebPubSubCustomCertificatesImpl.java @@ -0,0 +1,198 @@ +// 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.WebPubSubCustomCertificatesClient; +import com.azure.resourcemanager.webpubsub.fluent.models.CustomCertificateInner; +import com.azure.resourcemanager.webpubsub.models.CustomCertificate; +import com.azure.resourcemanager.webpubsub.models.WebPubSubCustomCertificates; + +public final class WebPubSubCustomCertificatesImpl implements WebPubSubCustomCertificates { + private static final ClientLogger LOGGER = new ClientLogger(WebPubSubCustomCertificatesImpl.class); + + private final WebPubSubCustomCertificatesClient innerClient; + + private final com.azure.resourcemanager.webpubsub.WebPubSubManager serviceManager; + + public WebPubSubCustomCertificatesImpl( + WebPubSubCustomCertificatesClient 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 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())); + } + + 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(), + new CustomCertificateImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public CustomCertificate get(String resourceGroupName, String resourceName, String certificateName) { + CustomCertificateInner inner = this.serviceClient().get(resourceGroupName, resourceName, certificateName); + if (inner != null) { + return new CustomCertificateImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response deleteWithResponse( + String resourceGroupName, String resourceName, String certificateName, Context context) { + return this.serviceClient().deleteWithResponse(resourceGroupName, resourceName, certificateName, context); + } + + public void delete(String resourceGroupName, String resourceName, String certificateName) { + this.serviceClient().delete(resourceGroupName, resourceName, certificateName); + } + + public CustomCertificate getById(String id) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String resourceName = Utils.getValueFromIdByName(id, "webPubSub"); + if (resourceName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'webPubSub'.", id))); + } + String certificateName = Utils.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))); + } + return this.getWithResponse(resourceGroupName, resourceName, certificateName, Context.NONE).getValue(); + } + + public Response getByIdWithResponse(String id, Context context) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String resourceName = Utils.getValueFromIdByName(id, "webPubSub"); + if (resourceName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'webPubSub'.", id))); + } + String certificateName = Utils.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))); + } + return this.getWithResponse(resourceGroupName, resourceName, certificateName, context); + } + + public void deleteById(String id) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String resourceName = Utils.getValueFromIdByName(id, "webPubSub"); + if (resourceName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'webPubSub'.", id))); + } + String certificateName = Utils.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))); + } + this.deleteWithResponse(resourceGroupName, resourceName, certificateName, Context.NONE); + } + + public Response deleteByIdWithResponse(String id, Context context) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String resourceName = Utils.getValueFromIdByName(id, "webPubSub"); + if (resourceName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'webPubSub'.", id))); + } + String certificateName = Utils.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))); + } + return this.deleteWithResponse(resourceGroupName, resourceName, certificateName, context); + } + + private WebPubSubCustomCertificatesClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.webpubsub.WebPubSubManager manager() { + return this.serviceManager; + } + + public CustomCertificateImpl define(String name) { + return new CustomCertificateImpl(name, this.manager()); + } +} 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 new file mode 100644 index 000000000000..5509ba3429cf --- /dev/null +++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/implementation/WebPubSubCustomDomainsClientImpl.java @@ -0,0 +1,1111 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.webpubsub.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.Delete; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.webpubsub.fluent.WebPubSubCustomDomainsClient; +import com.azure.resourcemanager.webpubsub.fluent.models.CustomDomainInner; +import com.azure.resourcemanager.webpubsub.models.CustomDomainList; +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 WebPubSubCustomDomainsClient. */ +public final class WebPubSubCustomDomainsClientImpl implements WebPubSubCustomDomainsClient { + /** The proxy service used to perform REST calls. */ + private final WebPubSubCustomDomainsService service; + + /** 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.client = client; + } + + /** + * The interface defining all the services for WebPubSubManagementClientWebPubSubCustomDomains to be used by the + * proxy service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "WebPubSubManagementC") + private interface WebPubSubCustomDomainsService { + @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, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("resourceName") String resourceName, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService" + + "/webPubSub/{resourceName}/customDomains/{name}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + 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); + + @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, + @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, + Context context); + + @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, + @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); + + @Headers({"Content-Type: application/json"}) + @Get("{nextLink}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, + Context context); + } + + /** + * List all custom domains. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param 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 custom domains list along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(String resourceGroupName, String resourceName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .list( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + resourceName, + this.client.getApiVersion(), + accept, + context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List all custom domains. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param 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 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) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .list( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + resourceName, + this.client.getApiVersion(), + accept, + context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * List all custom domains. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param 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 custom domains list 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)); + } + + /** + * List all custom domains. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param 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 custom domains 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), + nextLink -> listNextSinglePageAsync(nextLink, context)); + } + + /** + * List all custom domains. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param 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 custom domains list as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String resourceName) { + return new PagedIterable<>(listAsync(resourceGroupName, resourceName)); + } + + /** + * List all custom domains. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param 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 custom domains list as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String resourceName, Context context) { + return new PagedIterable<>(listAsync(resourceGroupName, resourceName, context)); + } + + /** + * Get a custom domain. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param resourceName The name of the resource. + * @param name Custom domain name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 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) { + 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 (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name 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, + 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 that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param resourceName The name of the resource. + * @param name Custom domain name. + * @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 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) { + 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 (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name 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, + name, + this.client.getApiVersion(), + accept, + context); + } + + /** + * Get a custom domain. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param resourceName The name of the resource. + * @param name Custom domain name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 custom domain on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String resourceGroupName, String resourceName, String name) { + return getWithResponseAsync(resourceGroupName, resourceName, name) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get a custom domain. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param resourceName The name of the resource. + * @param name Custom domain name. + * @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 custom domain along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + 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 that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param resourceName The name of the resource. + * @param name Custom domain name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 custom domain. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public CustomDomainInner get(String resourceGroupName, String resourceName, String name) { + return getWithResponse(resourceGroupName, resourceName, name, Context.NONE).getValue(); + } + + /** + * Create or update a custom domain. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param resourceName The name of the resource. + * @param name Custom domain name. + * @param parameters A custom domain. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 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) { + 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 (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name 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, + 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 that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param resourceName The name of the resource. + * @param name Custom domain name. + * @param parameters A custom domain. + * @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 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) { + 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 (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name 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, + name, + this.client.getApiVersion(), + parameters, + accept, + context); + } + + /** + * Create or update a custom domain. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param resourceName The name of the resource. + * @param name Custom domain name. + * @param parameters A custom domain. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of a custom domain. + */ + @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()); + } + + /** + * Create or update a custom domain. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param resourceName The name of the resource. + * @param name Custom domain name. + * @param parameters A custom domain. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of a custom domain. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + 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); + } + + /** + * Create or update a custom domain. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param resourceName The name of the resource. + * @param name Custom domain name. + * @param parameters A custom domain. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of a custom domain. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, CustomDomainInner> beginCreateOrUpdate( + String resourceGroupName, String resourceName, String name, CustomDomainInner parameters) { + return beginCreateOrUpdateAsync(resourceGroupName, resourceName, name, parameters).getSyncPoller(); + } + + /** + * Create or update a custom domain. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param resourceName The name of the resource. + * @param name Custom domain name. + * @param parameters A custom domain. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of a custom domain. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, CustomDomainInner> beginCreateOrUpdate( + String resourceGroupName, String resourceName, String name, CustomDomainInner parameters, Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, resourceName, name, parameters, context).getSyncPoller(); + } + + /** + * Create or update a custom domain. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param resourceName The name of the resource. + * @param name Custom domain name. + * @param parameters A custom domain. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 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() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create or update a custom domain. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param resourceName The name of the resource. + * @param name Custom domain name. + * @param parameters A custom domain. + * @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 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() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create or update a custom domain. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param resourceName The name of the resource. + * @param name Custom domain name. + * @param parameters A custom domain. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 custom domain. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + 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 that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param resourceName The name of the resource. + * @param name Custom domain name. + * @param parameters A custom domain. + * @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 custom domain. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + 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 that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param resourceName The name of the resource. + * @param name Custom domain name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync( + String resourceGroupName, String resourceName, String name) { + 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 (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .delete( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + resourceName, + 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 that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param resourceName The name of the resource. + * @param name Custom domain name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync( + String resourceGroupName, String resourceName, String name, 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 (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .delete( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + resourceName, + name, + this.client.getApiVersion(), + accept, + context); + } + + /** + * Delete a custom domain. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param resourceName The name of the resource. + * @param name Custom domain name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync( + String resourceGroupName, String resourceName, String name) { + Mono>> mono = deleteWithResponseAsync(resourceGroupName, resourceName, name); + 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 that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param resourceName The name of the resource. + * @param name Custom domain name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync( + String resourceGroupName, String 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); + } + + /** + * Delete a custom domain. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param resourceName The name of the resource. + * @param name Custom domain name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String resourceName, String name) { + return beginDeleteAsync(resourceGroupName, resourceName, name).getSyncPoller(); + } + + /** + * Delete a custom domain. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param resourceName The name of the resource. + * @param name Custom domain name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete( + String resourceGroupName, String resourceName, String name, Context context) { + return beginDeleteAsync(resourceGroupName, resourceName, name, context).getSyncPoller(); + } + + /** + * Delete a custom domain. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param resourceName The name of the resource. + * @param name Custom domain name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String resourceName, String name) { + return beginDeleteAsync(resourceGroupName, resourceName, name) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete a custom domain. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param resourceName The name of the resource. + * @param name Custom domain name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String resourceName, String name, Context context) { + return beginDeleteAsync(resourceGroupName, resourceName, name, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete a custom domain. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param resourceName The name of the resource. + * @param name Custom domain name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String resourceName, String name) { + deleteAsync(resourceGroupName, resourceName, name).block(); + } + + /** + * Delete a custom domain. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param resourceName The name of the resource. + * @param name Custom domain name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String resourceName, String name, Context context) { + deleteAsync(resourceGroupName, resourceName, name, 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 custom domains list 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 custom domains list 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/WebPubSubCustomDomainsImpl.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/implementation/WebPubSubCustomDomainsImpl.java new file mode 100644 index 000000000000..905763af1bf7 --- /dev/null +++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/implementation/WebPubSubCustomDomainsImpl.java @@ -0,0 +1,187 @@ +// 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.WebPubSubCustomDomainsClient; +import com.azure.resourcemanager.webpubsub.fluent.models.CustomDomainInner; +import com.azure.resourcemanager.webpubsub.models.CustomDomain; +import com.azure.resourcemanager.webpubsub.models.WebPubSubCustomDomains; + +public final class WebPubSubCustomDomainsImpl implements WebPubSubCustomDomains { + private static final ClientLogger LOGGER = new ClientLogger(WebPubSubCustomDomainsImpl.class); + + private final WebPubSubCustomDomainsClient innerClient; + + private final 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())); + } + + 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())); + } + + 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(), + new CustomDomainImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public CustomDomain get(String resourceGroupName, String resourceName, String name) { + CustomDomainInner inner = this.serviceClient().get(resourceGroupName, resourceName, name); + if (inner != null) { + return new CustomDomainImpl(inner, this.manager()); + } else { + return null; + } + } + + public void delete(String resourceGroupName, String resourceName, String name) { + this.serviceClient().delete(resourceGroupName, resourceName, name); + } + + public void delete(String resourceGroupName, String resourceName, String name, Context context) { + this.serviceClient().delete(resourceGroupName, resourceName, name, context); + } + + public CustomDomain getById(String id) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String resourceName = Utils.getValueFromIdByName(id, "webPubSub"); + if (resourceName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'webPubSub'.", id))); + } + String name = Utils.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))); + } + return this.getWithResponse(resourceGroupName, resourceName, name, Context.NONE).getValue(); + } + + public Response getByIdWithResponse(String id, Context context) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String resourceName = Utils.getValueFromIdByName(id, "webPubSub"); + if (resourceName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'webPubSub'.", id))); + } + String name = Utils.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))); + } + return this.getWithResponse(resourceGroupName, resourceName, name, context); + } + + public void deleteById(String id) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String resourceName = Utils.getValueFromIdByName(id, "webPubSub"); + if (resourceName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'webPubSub'.", id))); + } + String name = Utils.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))); + } + this.delete(resourceGroupName, resourceName, name, Context.NONE); + } + + public void deleteByIdWithResponse(String id, Context context) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String resourceName = Utils.getValueFromIdByName(id, "webPubSub"); + if (resourceName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'webPubSub'.", id))); + } + String name = Utils.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))); + } + this.delete(resourceGroupName, resourceName, name, context); + } + + private WebPubSubCustomDomainsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.webpubsub.WebPubSubManager manager() { + return this.serviceManager; + } + + public CustomDomainImpl define(String name) { + return new CustomDomainImpl(name, this.manager()); + } +} diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/implementation/WebPubSubHubImpl.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/implementation/WebPubSubHubImpl.java index d5a4ef696a7f..60c986f32ed5 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 @@ -35,6 +35,10 @@ public WebPubSubHubProperties properties() { return this.innerModel().properties(); } + public String resourceGroupName() { + return resourceGroupName; + } + public WebPubSubHubInner innerModel() { return this.innerObject; } 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 a10875455e57..65c9d1bed94d 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 @@ -29,7 +29,6 @@ import com.azure.core.management.polling.PollResult; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.webpubsub.fluent.WebPubSubHubsClient; @@ -41,8 +40,6 @@ /** An instance of this class provides access to all the operations defined in WebPubSubHubsClient. */ public final class WebPubSubHubsClientImpl implements WebPubSubHubsClient { - private final ClientLogger logger = new ClientLogger(WebPubSubHubsClientImpl.class); - /** The proxy service used to perform REST calls. */ private final WebPubSubHubsService service; @@ -151,7 +148,7 @@ Mono> listNext( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return hub setting list. + * @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) { @@ -209,7 +206,7 @@ private Mono> listSinglePageAsync(String resour * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return hub setting list. + * @return hub setting list along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync( @@ -264,7 +261,7 @@ private Mono> listSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return hub setting list. + * @return hub setting list as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String resourceGroupName, String resourceName) { @@ -282,7 +279,7 @@ private PagedFlux listAsync(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return hub setting list. + * @return hub setting list as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String resourceGroupName, String resourceName, Context context) { @@ -300,7 +297,7 @@ private PagedFlux listAsync(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return hub setting list. + * @return hub setting list as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String resourceGroupName, String resourceName) { @@ -317,7 +314,7 @@ public PagedIterable list(String resourceGroupName, 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 hub setting list. + * @return hub setting list as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String resourceGroupName, String resourceName, Context context) { @@ -334,7 +331,7 @@ public PagedIterable list(String resourceGroupName, 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 hub setting. + * @return a hub setting along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -389,7 +386,7 @@ 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 a hub setting. + * @return a hub setting along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -440,19 +437,12 @@ 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 a hub setting. + * @return a hub setting on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync(String hubName, String resourceGroupName, String resourceName) { return getWithResponseAsync(hubName, resourceGroupName, resourceName) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -462,14 +452,16 @@ private Mono getAsync(String hubName, String resourceGroupNam * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value * from the Azure Resource Manager API or the portal. * @param resourceName The name of the resource. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a hub setting. + * @return a hub setting along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public WebPubSubHubInner get(String hubName, String resourceGroupName, String resourceName) { - return getAsync(hubName, resourceGroupName, resourceName).block(); + public Response getWithResponse( + String hubName, String resourceGroupName, String resourceName, Context context) { + return getWithResponseAsync(hubName, resourceGroupName, resourceName, context).block(); } /** @@ -479,16 +471,14 @@ public WebPubSubHubInner get(String hubName, String resourceGroupName, String re * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value * from the Azure Resource Manager API or the portal. * @param resourceName The name of the resource. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a hub setting. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String hubName, String resourceGroupName, String resourceName, Context context) { - return getWithResponseAsync(hubName, resourceGroupName, resourceName, context).block(); + public WebPubSubHubInner get(String hubName, String resourceGroupName, String resourceName) { + return getWithResponse(hubName, resourceGroupName, resourceName, Context.NONE).getValue(); } /** @@ -502,7 +492,7 @@ public Response getWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a hub setting. + * @return a hub setting along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createOrUpdateWithResponseAsync( @@ -564,7 +554,7 @@ 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 hub setting. + * @return a hub setting along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createOrUpdateWithResponseAsync( @@ -622,7 +612,7 @@ 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 hub setting. + * @return the {@link PollerFlux} for polling of a hub setting. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, WebPubSubHubInner> beginCreateOrUpdateAsync( @@ -632,7 +622,11 @@ private PollerFlux, WebPubSubHubInner> beginCreate return this .client .getLroResult( - mono, this.client.getHttpPipeline(), WebPubSubHubInner.class, WebPubSubHubInner.class, Context.NONE); + mono, + this.client.getHttpPipeline(), + WebPubSubHubInner.class, + WebPubSubHubInner.class, + this.client.getContext()); } /** @@ -647,7 +641,7 @@ private PollerFlux, WebPubSubHubInner> beginCreate * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a hub setting. + * @return the {@link PollerFlux} for polling of a hub setting. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, WebPubSubHubInner> beginCreateOrUpdateAsync( @@ -672,7 +666,7 @@ private PollerFlux, WebPubSubHubInner> beginCreate * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a hub setting. + * @return the {@link SyncPoller} for polling of a hub setting. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, WebPubSubHubInner> beginCreateOrUpdate( @@ -692,7 +686,7 @@ public SyncPoller, WebPubSubHubInner> beginCreateO * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a hub setting. + * @return the {@link SyncPoller} for polling of a hub setting. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, WebPubSubHubInner> beginCreateOrUpdate( @@ -711,7 +705,7 @@ public SyncPoller, WebPubSubHubInner> beginCreateO * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a hub setting. + * @return a hub setting on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createOrUpdateAsync( @@ -733,7 +727,7 @@ private Mono createOrUpdateAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a hub setting. + * @return a hub setting on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createOrUpdateAsync( @@ -792,7 +786,7 @@ public WebPubSubHubInner createOrUpdate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync( @@ -847,7 +841,7 @@ private Mono>> deleteWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync( @@ -898,7 +892,7 @@ private Mono>> deleteWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteAsync( @@ -906,7 +900,8 @@ private PollerFlux, Void> beginDeleteAsync( Mono>> mono = deleteWithResponseAsync(hubName, resourceGroupName, resourceName); return this .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, Context.NONE); + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); } /** @@ -920,7 +915,7 @@ private PollerFlux, Void> beginDeleteAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteAsync( @@ -943,7 +938,7 @@ private PollerFlux, Void> beginDeleteAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete( @@ -962,7 +957,7 @@ public SyncPoller, Void> beginDelete( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete( @@ -980,7 +975,7 @@ public SyncPoller, Void> beginDelete( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync(String hubName, String resourceGroupName, String resourceName) { @@ -1000,7 +995,7 @@ private Mono deleteAsync(String hubName, String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync(String hubName, String resourceGroupName, String resourceName, Context context) { @@ -1045,11 +1040,12 @@ public void delete(String hubName, String resourceGroupName, String resourceName /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @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 hub setting list. + * @return hub setting list along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -1080,12 +1076,13 @@ private Mono> listNextSinglePageAsync(String ne /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @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 hub setting list. + * @return hub setting list along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink, Context context) { 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 9393dc6c6a9e..61d85f10f8ac 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 @@ -13,10 +13,9 @@ import com.azure.resourcemanager.webpubsub.fluent.models.WebPubSubHubInner; import com.azure.resourcemanager.webpubsub.models.WebPubSubHub; import com.azure.resourcemanager.webpubsub.models.WebPubSubHubs; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class WebPubSubHubsImpl implements WebPubSubHubs { - @JsonIgnore private final ClientLogger logger = new ClientLogger(WebPubSubHubsImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(WebPubSubHubsImpl.class); private final WebPubSubHubsClient innerClient; @@ -38,15 +37,6 @@ public PagedIterable list(String resourceGroupName, String resourc return Utils.mapPage(inner, inner1 -> new WebPubSubHubImpl(inner1, this.manager())); } - public WebPubSubHub get(String hubName, String resourceGroupName, String resourceName) { - WebPubSubHubInner inner = this.serviceClient().get(hubName, resourceGroupName, resourceName); - if (inner != null) { - return new WebPubSubHubImpl(inner, this.manager()); - } else { - return null; - } - } - public Response getWithResponse( String hubName, String resourceGroupName, String resourceName, Context context) { Response inner = @@ -62,6 +52,15 @@ public Response getWithResponse( } } + public WebPubSubHub get(String hubName, String resourceGroupName, String resourceName) { + WebPubSubHubInner inner = this.serviceClient().get(hubName, resourceGroupName, resourceName); + if (inner != null) { + return new WebPubSubHubImpl(inner, this.manager()); + } else { + return null; + } + } + public void delete(String hubName, String resourceGroupName, String resourceName) { this.serviceClient().delete(hubName, resourceGroupName, resourceName); } @@ -73,14 +72,14 @@ public void delete(String hubName, String resourceGroupName, String resourceName public WebPubSubHub getById(String id) { String hubName = Utils.getValueFromIdByName(id, "hubs"); if (hubName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'hubs'.", id))); } String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -88,7 +87,7 @@ public WebPubSubHub getById(String id) { } String resourceName = Utils.getValueFromIdByName(id, "webPubSub"); if (resourceName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'webPubSub'.", id))); @@ -99,14 +98,14 @@ public WebPubSubHub getById(String id) { public Response getByIdWithResponse(String id, Context context) { String hubName = Utils.getValueFromIdByName(id, "hubs"); if (hubName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'hubs'.", id))); } String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -114,7 +113,7 @@ public Response getByIdWithResponse(String id, Context context) { } String resourceName = Utils.getValueFromIdByName(id, "webPubSub"); if (resourceName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'webPubSub'.", id))); @@ -125,14 +124,14 @@ public Response getByIdWithResponse(String id, Context context) { public void deleteById(String id) { String hubName = Utils.getValueFromIdByName(id, "hubs"); if (hubName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'hubs'.", id))); } String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -140,7 +139,7 @@ public void deleteById(String id) { } String resourceName = Utils.getValueFromIdByName(id, "webPubSub"); if (resourceName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'webPubSub'.", id))); @@ -151,14 +150,14 @@ public void deleteById(String id) { public void deleteByIdWithResponse(String id, Context context) { String hubName = Utils.getValueFromIdByName(id, "hubs"); if (hubName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'hubs'.", id))); } String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -166,7 +165,7 @@ public void deleteByIdWithResponse(String id, Context context) { } String resourceName = Utils.getValueFromIdByName(id, "webPubSub"); if (resourceName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'webPubSub'.", id))); 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 a37b842eb0fa..219af2ba33a1 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 @@ -7,7 +7,6 @@ import com.azure.core.annotation.ServiceClientBuilder; import com.azure.core.http.HttpPipeline; import com.azure.core.http.HttpPipelineBuilder; -import com.azure.core.http.policy.CookiePolicy; import com.azure.core.http.policy.RetryPolicy; import com.azure.core.http.policy.UserAgentPolicy; import com.azure.core.management.AzureEnvironment; @@ -19,9 +18,8 @@ @ServiceClientBuilder(serviceClients = {WebPubSubManagementClientImpl.class}) public final class WebPubSubManagementClientBuilder { /* - * Gets subscription Id which uniquely identify the Microsoft Azure - * subscription. The subscription ID forms part of the URI for every - * service call. + * Gets subscription Id which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of + * the URI for every service call. */ private String subscriptionId; @@ -70,34 +68,34 @@ public WebPubSubManagementClientBuilder environment(AzureEnvironment environment } /* - * The default poll interval for long-running operation + * The HTTP pipeline to send requests through */ - private Duration defaultPollInterval; + private HttpPipeline pipeline; /** - * Sets The default poll interval for long-running operation. + * Sets The HTTP pipeline to send requests through. * - * @param defaultPollInterval the defaultPollInterval value. + * @param pipeline the pipeline value. * @return the WebPubSubManagementClientBuilder. */ - public WebPubSubManagementClientBuilder defaultPollInterval(Duration defaultPollInterval) { - this.defaultPollInterval = defaultPollInterval; + public WebPubSubManagementClientBuilder pipeline(HttpPipeline pipeline) { + this.pipeline = pipeline; return this; } /* - * The HTTP pipeline to send requests through + * The default poll interval for long-running operation */ - private HttpPipeline pipeline; + private Duration defaultPollInterval; /** - * Sets The HTTP pipeline to send requests through. + * Sets The default poll interval for long-running operation. * - * @param pipeline the pipeline value. + * @param defaultPollInterval the defaultPollInterval value. * @return the WebPubSubManagementClientBuilder. */ - public WebPubSubManagementClientBuilder pipeline(HttpPipeline pipeline) { - this.pipeline = pipeline; + public WebPubSubManagementClientBuilder defaultPollInterval(Duration defaultPollInterval) { + this.defaultPollInterval = defaultPollInterval; return this; } @@ -123,27 +121,26 @@ public WebPubSubManagementClientBuilder serializerAdapter(SerializerAdapter seri * @return an instance of WebPubSubManagementClientImpl. */ public WebPubSubManagementClientImpl buildClient() { - if (endpoint == null) { - this.endpoint = "https://management.azure.com"; - } - if (environment == null) { - this.environment = AzureEnvironment.AZURE; - } - if (defaultPollInterval == null) { - this.defaultPollInterval = Duration.ofSeconds(30); - } - if (pipeline == null) { - this.pipeline = - new HttpPipelineBuilder() - .policies(new UserAgentPolicy(), new RetryPolicy(), new CookiePolicy()) - .build(); - } - if (serializerAdapter == null) { - this.serializerAdapter = SerializerFactory.createDefaultManagementSerializerAdapter(); - } + 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( - pipeline, serializerAdapter, defaultPollInterval, environment, subscriptionId, endpoint); + localPipeline, + localSerializerAdapter, + localDefaultPollInterval, + localEnvironment, + 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 2fd3f70fd0f1..8be084a6f018 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 @@ -15,6 +15,7 @@ import com.azure.core.management.polling.PollResult; import com.azure.core.management.polling.PollerFactory; import com.azure.core.util.Context; +import com.azure.core.util.CoreUtils; import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.AsyncPollResponse; import com.azure.core.util.polling.LongRunningOperationStatus; @@ -23,6 +24,8 @@ import com.azure.core.util.serializer.SerializerEncoding; import com.azure.resourcemanager.webpubsub.fluent.OperationsClient; import com.azure.resourcemanager.webpubsub.fluent.UsagesClient; +import com.azure.resourcemanager.webpubsub.fluent.WebPubSubCustomCertificatesClient; +import com.azure.resourcemanager.webpubsub.fluent.WebPubSubCustomDomainsClient; import com.azure.resourcemanager.webpubsub.fluent.WebPubSubHubsClient; import com.azure.resourcemanager.webpubsub.fluent.WebPubSubManagementClient; import com.azure.resourcemanager.webpubsub.fluent.WebPubSubPrivateEndpointConnectionsClient; @@ -35,15 +38,12 @@ import java.nio.charset.Charset; import java.nio.charset.StandardCharsets; import java.time.Duration; -import java.util.Map; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; /** Initializes a new instance of the WebPubSubManagementClientImpl type. */ @ServiceClient(builder = WebPubSubManagementClientBuilder.class) public final class WebPubSubManagementClientImpl implements WebPubSubManagementClient { - private final ClientLogger logger = new ClientLogger(WebPubSubManagementClientImpl.class); - /** * Gets subscription Id which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of * the URI for every service call. @@ -156,6 +156,30 @@ public UsagesClient getUsages() { return this.usages; } + /** 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. */ + 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. */ private final WebPubSubHubsClient webPubSubHubs; @@ -227,10 +251,12 @@ public WebPubSubSharedPrivateLinkResourcesClient getWebPubSubSharedPrivateLinkRe this.defaultPollInterval = defaultPollInterval; this.subscriptionId = subscriptionId; this.endpoint = endpoint; - this.apiVersion = "2021-10-01"; + this.apiVersion = "2022-08-01-preview"; this.operations = new OperationsClientImpl(this); this.webPubSubs = new WebPubSubsClientImpl(this); this.usages = new UsagesClientImpl(this); + this.webPubSubCustomCertificates = new WebPubSubCustomCertificatesClientImpl(this); + this.webPubSubCustomDomains = new WebPubSubCustomDomainsClientImpl(this); this.webPubSubHubs = new WebPubSubHubsClientImpl(this); this.webPubSubPrivateEndpointConnections = new WebPubSubPrivateEndpointConnectionsClientImpl(this); this.webPubSubPrivateLinkResources = new WebPubSubPrivateLinkResourcesClientImpl(this); @@ -253,10 +279,7 @@ public Context getContext() { * @return the merged context. */ public Context mergeContext(Context context) { - for (Map.Entry entry : this.getContext().getValues().entrySet()) { - context = context.addData(entry.getKey(), entry.getValue()); - } - return context; + return CoreUtils.mergeContexts(this.getContext(), context); } /** @@ -320,7 +343,7 @@ public Mono getLroFinalResultOrError(AsyncPollResponse, managementError = null; } } catch (IOException | RuntimeException ioe) { - logger.logThrowableAsWarning(ioe); + LOGGER.logThrowableAsWarning(ioe); } } } else { @@ -379,4 +402,6 @@ public Mono getBodyAsString(Charset charset) { return Mono.just(new String(responseBody, charset)); } } + + private static final ClientLogger LOGGER = new ClientLogger(WebPubSubManagementClientImpl.class); } 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 3e592fe99eb1..d5c1e07f5a46 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 @@ -29,7 +29,6 @@ import com.azure.core.management.polling.PollResult; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.webpubsub.fluent.WebPubSubPrivateEndpointConnectionsClient; @@ -43,8 +42,6 @@ * An instance of this class provides access to all the operations defined in WebPubSubPrivateEndpointConnectionsClient. */ public final class WebPubSubPrivateEndpointConnectionsClientImpl implements WebPubSubPrivateEndpointConnectionsClient { - private final ClientLogger logger = new ClientLogger(WebPubSubPrivateEndpointConnectionsClientImpl.class); - /** The proxy service used to perform REST calls. */ private final WebPubSubPrivateEndpointConnectionsService service; @@ -157,7 +154,8 @@ Mono> listNext( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return a list of private endpoint connections along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync( @@ -216,7 +214,8 @@ private Mono> listSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return a list of private endpoint connections along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync( @@ -271,7 +270,7 @@ private Mono> listSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return a list of private endpoint connections as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String resourceGroupName, String resourceName) { @@ -289,7 +288,7 @@ private PagedFlux listAsync(String resourceGroup * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return a list of private endpoint connections as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync( @@ -308,7 +307,7 @@ private PagedFlux listAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return a list of private endpoint connections as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String resourceGroupName, String resourceName) { @@ -325,7 +324,7 @@ public PagedIterable list(String resourceGroupNa * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return a list of private endpoint connections as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list( @@ -343,7 +342,8 @@ public PagedIterable list( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return the specified private endpoint connection along with {@link Response} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -401,7 +401,8 @@ 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 private endpoint connection. + * @return the specified private endpoint connection along with {@link Response} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -455,20 +456,13 @@ 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 private endpoint connection. + * @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) { return getWithResponseAsync(privateEndpointConnectionName, resourceGroupName, resourceName) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -478,15 +472,16 @@ private Mono getAsync( * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value * from the Azure Resource Manager API or the portal. * @param resourceName The name of the resource. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the specified private endpoint connection. + * @return the specified private endpoint connection along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public PrivateEndpointConnectionInner get( - String privateEndpointConnectionName, String resourceGroupName, String resourceName) { - return getAsync(privateEndpointConnectionName, resourceGroupName, resourceName).block(); + public Response getWithResponse( + String privateEndpointConnectionName, String resourceGroupName, String resourceName, Context context) { + return getWithResponseAsync(privateEndpointConnectionName, resourceGroupName, resourceName, context).block(); } /** @@ -496,16 +491,15 @@ public PrivateEndpointConnectionInner get( * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value * from the Azure Resource Manager API or the portal. * @param resourceName The name of the resource. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the specified private endpoint connection. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String privateEndpointConnectionName, String resourceGroupName, String resourceName, Context context) { - return getWithResponseAsync(privateEndpointConnectionName, resourceGroupName, resourceName, context).block(); + public PrivateEndpointConnectionInner get( + String privateEndpointConnectionName, String resourceGroupName, String resourceName) { + return getWithResponse(privateEndpointConnectionName, resourceGroupName, resourceName, Context.NONE).getValue(); } /** @@ -519,7 +513,8 @@ public Response getWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return a private endpoint connection to an azure resource along with {@link Response} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> updateWithResponseAsync( @@ -587,7 +582,8 @@ 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 private endpoint connection to an azure resource. + * @return a private endpoint connection to an azure resource along with {@link Response} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> updateWithResponseAsync( @@ -652,7 +648,7 @@ 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 private endpoint connection to an azure resource. + * @return a private endpoint connection to an azure resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateAsync( @@ -661,14 +657,7 @@ private Mono updateAsync( String resourceName, PrivateEndpointConnectionInner parameters) { return updateWithResponseAsync(privateEndpointConnectionName, resourceGroupName, resourceName, parameters) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -679,18 +668,22 @@ private Mono updateAsync( * from the Azure Resource Manager API or the portal. * @param resourceName The name of the resource. * @param parameters The resource of private endpoint and its properties. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return a private endpoint connection to an azure resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public PrivateEndpointConnectionInner update( + public Response updateWithResponse( String privateEndpointConnectionName, String resourceGroupName, String resourceName, - PrivateEndpointConnectionInner parameters) { - return updateAsync(privateEndpointConnectionName, resourceGroupName, resourceName, parameters).block(); + PrivateEndpointConnectionInner parameters, + Context context) { + return updateWithResponseAsync( + privateEndpointConnectionName, resourceGroupName, resourceName, parameters, context) + .block(); } /** @@ -701,22 +694,20 @@ public PrivateEndpointConnectionInner update( * from the Azure Resource Manager API or the portal. * @param resourceName The name of the resource. * @param parameters The resource of private endpoint and its properties. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response updateWithResponse( + public PrivateEndpointConnectionInner update( String privateEndpointConnectionName, String resourceGroupName, String resourceName, - PrivateEndpointConnectionInner parameters, - Context context) { - return updateWithResponseAsync( - privateEndpointConnectionName, resourceGroupName, resourceName, parameters, context) - .block(); + PrivateEndpointConnectionInner parameters) { + return updateWithResponse( + privateEndpointConnectionName, resourceGroupName, resourceName, parameters, Context.NONE) + .getValue(); } /** @@ -729,7 +720,7 @@ public Response updateWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync( @@ -787,7 +778,7 @@ private Mono>> deleteWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync( @@ -841,7 +832,7 @@ private Mono>> deleteWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteAsync( @@ -850,7 +841,8 @@ private PollerFlux, Void> beginDeleteAsync( deleteWithResponseAsync(privateEndpointConnectionName, resourceGroupName, resourceName); return this .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, Context.NONE); + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); } /** @@ -864,7 +856,7 @@ private PollerFlux, Void> beginDeleteAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteAsync( @@ -887,7 +879,7 @@ private PollerFlux, Void> beginDeleteAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete( @@ -906,7 +898,7 @@ public SyncPoller, Void> beginDelete( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete( @@ -925,7 +917,7 @@ public SyncPoller, Void> beginDelete( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync( @@ -946,7 +938,7 @@ private Mono deleteAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync( @@ -993,11 +985,13 @@ public void delete( /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of private endpoint connections. + * @return a list of private endpoint connections along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -1028,12 +1022,14 @@ private Mono> listNextSinglePageAs /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of private endpoint connections. + * @return a list of private endpoint connections along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync( 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 a8cbc0985e90..771ea5813a46 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 @@ -13,10 +13,9 @@ import com.azure.resourcemanager.webpubsub.fluent.models.PrivateEndpointConnectionInner; import com.azure.resourcemanager.webpubsub.models.PrivateEndpointConnection; import com.azure.resourcemanager.webpubsub.models.WebPubSubPrivateEndpointConnections; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class WebPubSubPrivateEndpointConnectionsImpl implements WebPubSubPrivateEndpointConnections { - @JsonIgnore private final ClientLogger logger = new ClientLogger(WebPubSubPrivateEndpointConnectionsImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(WebPubSubPrivateEndpointConnectionsImpl.class); private final WebPubSubPrivateEndpointConnectionsClient innerClient; @@ -42,17 +41,6 @@ public PagedIterable list( return Utils.mapPage(inner, inner1 -> new PrivateEndpointConnectionImpl(inner1, this.manager())); } - 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 { - return null; - } - } - public Response getWithResponse( String privateEndpointConnectionName, String resourceGroupName, String resourceName, Context context) { Response inner = @@ -70,13 +58,10 @@ public Response getWithResponse( } } - public PrivateEndpointConnection update( - String privateEndpointConnectionName, - String resourceGroupName, - String resourceName, - PrivateEndpointConnectionInner parameters) { + public PrivateEndpointConnection get( + String privateEndpointConnectionName, String resourceGroupName, String resourceName) { PrivateEndpointConnectionInner inner = - this.serviceClient().update(privateEndpointConnectionName, resourceGroupName, resourceName, parameters); + this.serviceClient().get(privateEndpointConnectionName, resourceGroupName, resourceName); if (inner != null) { return new PrivateEndpointConnectionImpl(inner, this.manager()); } else { @@ -106,6 +91,20 @@ public Response updateWithResponse( } } + 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 { + return null; + } + } + public void delete(String privateEndpointConnectionName, String resourceGroupName, String resourceName) { this.serviceClient().delete(privateEndpointConnectionName, resourceGroupName, resourceName); } 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 765ec89c8997..992941ff52d9 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 @@ -25,7 +25,6 @@ import com.azure.core.management.exception.ManagementException; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.webpubsub.fluent.WebPubSubPrivateLinkResourcesClient; import com.azure.resourcemanager.webpubsub.fluent.models.PrivateLinkResourceInner; import com.azure.resourcemanager.webpubsub.models.PrivateLinkResourceList; @@ -33,8 +32,6 @@ /** An instance of this class provides access to all the operations defined in WebPubSubPrivateLinkResourcesClient. */ public final class WebPubSubPrivateLinkResourcesClientImpl implements WebPubSubPrivateLinkResourcesClient { - private final ClientLogger logger = new ClientLogger(WebPubSubPrivateLinkResourcesClientImpl.class); - /** The proxy service used to perform REST calls. */ private final WebPubSubPrivateLinkResourcesService service; @@ -98,7 +95,8 @@ Mono> listNext( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return the private link resources that need to be created for a resource along with {@link PagedResponse} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync( @@ -157,7 +155,8 @@ private Mono> listSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return the private link resources that need to be created for a resource along with {@link PagedResponse} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync( @@ -212,7 +211,8 @@ private Mono> listSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @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) { @@ -230,7 +230,8 @@ private PagedFlux listAsync(String resourceGroupName, * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @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( @@ -249,7 +250,8 @@ private PagedFlux listAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @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) { @@ -266,7 +268,8 @@ public PagedIterable list(String resourceGroupName, St * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @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( @@ -277,11 +280,13 @@ public PagedIterable list( /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @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 contains a list of PrivateLinkResource and a possible link to query more results. + * @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) { @@ -312,12 +317,14 @@ private Mono> listNextSinglePageAsync(St /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @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 contains a list of PrivateLinkResource and a possible link to query more results. + * @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) { 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 b1e12ec79967..7ad3ec92806f 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 @@ -11,10 +11,9 @@ import com.azure.resourcemanager.webpubsub.fluent.models.PrivateLinkResourceInner; import com.azure.resourcemanager.webpubsub.models.PrivateLinkResource; import com.azure.resourcemanager.webpubsub.models.WebPubSubPrivateLinkResources; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class WebPubSubPrivateLinkResourcesImpl implements WebPubSubPrivateLinkResources { - @JsonIgnore private final ClientLogger logger = new ClientLogger(WebPubSubPrivateLinkResourcesImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(WebPubSubPrivateLinkResourcesImpl.class); private final WebPubSubPrivateLinkResourcesClient innerClient; 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 0e088dd561bf..c587d21c607d 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 @@ -163,6 +163,10 @@ public String regionName() { return this.location(); } + public String resourceGroupName() { + return resourceGroupName; + } + public WebPubSubResourceInner innerModel() { return this.innerObject; } @@ -254,14 +258,14 @@ public WebPubSubResource refresh(Context context) { return this; } - public WebPubSubKeys listKeys() { - return serviceManager.webPubSubs().listKeys(resourceGroupName, resourceName); - } - public Response listKeysWithResponse(Context context) { return serviceManager.webPubSubs().listKeysWithResponse(resourceGroupName, resourceName, context); } + public WebPubSubKeys listKeys() { + return serviceManager.webPubSubs().listKeys(resourceGroupName, resourceName); + } + public WebPubSubKeys regenerateKey(RegenerateKeyParameters parameters) { return serviceManager.webPubSubs().regenerateKey(resourceGroupName, resourceName, parameters); } 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 931051e5fbc4..a3b5209af931 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 @@ -29,7 +29,6 @@ import com.azure.core.management.polling.PollResult; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.webpubsub.fluent.WebPubSubSharedPrivateLinkResourcesClient; @@ -43,8 +42,6 @@ * An instance of this class provides access to all the operations defined in WebPubSubSharedPrivateLinkResourcesClient. */ public final class WebPubSubSharedPrivateLinkResourcesClientImpl implements WebPubSubSharedPrivateLinkResourcesClient { - private final ClientLogger logger = new ClientLogger(WebPubSubSharedPrivateLinkResourcesClientImpl.class); - /** The proxy service used to perform REST calls. */ private final WebPubSubSharedPrivateLinkResourcesService service; @@ -157,7 +154,8 @@ Mono> listNext( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @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( @@ -216,7 +214,8 @@ private Mono> listSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @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( @@ -271,7 +270,7 @@ private Mono> listSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @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) { @@ -289,7 +288,7 @@ private PagedFlux listAsync(String resourceGroup * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return a list of shared private link resources as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync( @@ -308,7 +307,7 @@ private PagedFlux listAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @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) { @@ -325,7 +324,7 @@ public PagedIterable list(String resourceGroupNa * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return a list of shared private link resources as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list( @@ -343,7 +342,8 @@ public PagedIterable list( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return the specified shared private link resource along with {@link Response} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -401,7 +401,8 @@ 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. + * @return the specified shared private link resource along with {@link Response} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -455,20 +456,13 @@ 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. + * @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) { return getWithResponseAsync(sharedPrivateLinkResourceName, resourceGroupName, resourceName) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -478,15 +472,16 @@ private Mono getAsync( * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value * from the Azure Resource Manager API or the portal. * @param resourceName The name of the resource. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the specified shared private link resource. + * @return the specified shared private link resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public SharedPrivateLinkResourceInner get( - String sharedPrivateLinkResourceName, String resourceGroupName, String resourceName) { - return getAsync(sharedPrivateLinkResourceName, resourceGroupName, resourceName).block(); + public Response getWithResponse( + String sharedPrivateLinkResourceName, String resourceGroupName, String resourceName, Context context) { + return getWithResponseAsync(sharedPrivateLinkResourceName, resourceGroupName, resourceName, context).block(); } /** @@ -496,16 +491,15 @@ public SharedPrivateLinkResourceInner get( * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value * from the Azure Resource Manager API or the portal. * @param resourceName The name of the resource. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the specified shared private link resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String sharedPrivateLinkResourceName, String resourceGroupName, String resourceName, Context context) { - return getWithResponseAsync(sharedPrivateLinkResourceName, resourceGroupName, resourceName, context).block(); + public SharedPrivateLinkResourceInner get( + String sharedPrivateLinkResourceName, String resourceGroupName, String resourceName) { + return getWithResponse(sharedPrivateLinkResourceName, resourceGroupName, resourceName, Context.NONE).getValue(); } /** @@ -519,7 +513,8 @@ public Response getWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return describes a Shared Private Link Resource along with {@link Response} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createOrUpdateWithResponseAsync( @@ -587,7 +582,8 @@ 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. + * @return describes a Shared Private Link Resource along with {@link Response} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createOrUpdateWithResponseAsync( @@ -652,7 +648,7 @@ 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. + * @return the {@link PollerFlux} for polling of describes a Shared Private Link Resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, SharedPrivateLinkResourceInner> @@ -670,7 +666,7 @@ private Mono>> createOrUpdateWithResponseAsync( this.client.getHttpPipeline(), SharedPrivateLinkResourceInner.class, SharedPrivateLinkResourceInner.class, - Context.NONE); + this.client.getContext()); } /** @@ -685,7 +681,7 @@ 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. + * @return the {@link PollerFlux} for polling of describes a Shared Private Link Resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, SharedPrivateLinkResourceInner> @@ -720,7 +716,7 @@ 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. + * @return the {@link SyncPoller} for polling of describes a Shared Private Link Resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, SharedPrivateLinkResourceInner> beginCreateOrUpdate( @@ -744,7 +740,7 @@ public SyncPoller, SharedPrivateLinkR * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return the {@link SyncPoller} for polling of describes a Shared Private Link Resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, SharedPrivateLinkResourceInner> beginCreateOrUpdate( @@ -769,7 +765,7 @@ public SyncPoller, SharedPrivateLinkR * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return describes a Shared Private Link Resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createOrUpdateAsync( @@ -794,7 +790,7 @@ private Mono createOrUpdateAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return describes a Shared Private Link Resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createOrUpdateAsync( @@ -866,7 +862,7 @@ public SharedPrivateLinkResourceInner createOrUpdate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync( @@ -924,7 +920,7 @@ private Mono>> deleteWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync( @@ -978,7 +974,7 @@ private Mono>> deleteWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteAsync( @@ -987,7 +983,8 @@ private PollerFlux, Void> beginDeleteAsync( deleteWithResponseAsync(sharedPrivateLinkResourceName, resourceGroupName, resourceName); return this .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, Context.NONE); + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); } /** @@ -1001,7 +998,7 @@ private PollerFlux, Void> beginDeleteAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteAsync( @@ -1024,7 +1021,7 @@ private PollerFlux, Void> beginDeleteAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete( @@ -1043,7 +1040,7 @@ public SyncPoller, Void> beginDelete( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete( @@ -1062,7 +1059,7 @@ public SyncPoller, Void> beginDelete( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync( @@ -1083,7 +1080,7 @@ private Mono deleteAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync( @@ -1130,11 +1127,13 @@ public void delete( /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @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. + * @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) { @@ -1165,12 +1164,14 @@ private Mono> listNextSinglePageAs /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @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. + * @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( 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 04115f32a738..05bf3b30cffa 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 @@ -13,10 +13,9 @@ import com.azure.resourcemanager.webpubsub.fluent.models.SharedPrivateLinkResourceInner; import com.azure.resourcemanager.webpubsub.models.SharedPrivateLinkResource; import com.azure.resourcemanager.webpubsub.models.WebPubSubSharedPrivateLinkResources; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class WebPubSubSharedPrivateLinkResourcesImpl implements WebPubSubSharedPrivateLinkResources { - @JsonIgnore private final ClientLogger logger = new ClientLogger(WebPubSubSharedPrivateLinkResourcesImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(WebPubSubSharedPrivateLinkResourcesImpl.class); private final WebPubSubSharedPrivateLinkResourcesClient innerClient; @@ -42,17 +41,6 @@ public PagedIterable list( return Utils.mapPage(inner, inner1 -> new SharedPrivateLinkResourceImpl(inner1, this.manager())); } - 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 { - return null; - } - } - public Response getWithResponse( String sharedPrivateLinkResourceName, String resourceGroupName, String resourceName, Context context) { Response inner = @@ -70,6 +58,17 @@ public Response getWithResponse( } } + 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 { + return null; + } + } + public void delete(String sharedPrivateLinkResourceName, String resourceGroupName, String resourceName) { this.serviceClient().delete(sharedPrivateLinkResourceName, resourceGroupName, resourceName); } @@ -82,7 +81,7 @@ public void delete( public SharedPrivateLinkResource getById(String id) { String sharedPrivateLinkResourceName = Utils.getValueFromIdByName(id, "sharedPrivateLinkResources"); if (sharedPrivateLinkResourceName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -92,7 +91,7 @@ public SharedPrivateLinkResource getById(String id) { } String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -100,7 +99,7 @@ public SharedPrivateLinkResource getById(String id) { } String resourceName = Utils.getValueFromIdByName(id, "webPubSub"); if (resourceName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'webPubSub'.", id))); @@ -113,7 +112,7 @@ public SharedPrivateLinkResource getById(String id) { public Response getByIdWithResponse(String id, Context context) { String sharedPrivateLinkResourceName = Utils.getValueFromIdByName(id, "sharedPrivateLinkResources"); if (sharedPrivateLinkResourceName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -123,7 +122,7 @@ public Response getByIdWithResponse(String id, Contex } String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -131,7 +130,7 @@ public Response getByIdWithResponse(String id, Contex } String resourceName = Utils.getValueFromIdByName(id, "webPubSub"); if (resourceName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'webPubSub'.", id))); @@ -142,7 +141,7 @@ public Response getByIdWithResponse(String id, Contex public void deleteById(String id) { String sharedPrivateLinkResourceName = Utils.getValueFromIdByName(id, "sharedPrivateLinkResources"); if (sharedPrivateLinkResourceName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -152,7 +151,7 @@ public void deleteById(String id) { } String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -160,7 +159,7 @@ public void deleteById(String id) { } String resourceName = Utils.getValueFromIdByName(id, "webPubSub"); if (resourceName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'webPubSub'.", id))); @@ -171,7 +170,7 @@ public void deleteById(String id) { public void deleteByIdWithResponse(String id, Context context) { String sharedPrivateLinkResourceName = Utils.getValueFromIdByName(id, "sharedPrivateLinkResources"); if (sharedPrivateLinkResourceName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -181,7 +180,7 @@ public void deleteByIdWithResponse(String id, Context context) { } String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -189,7 +188,7 @@ public void deleteByIdWithResponse(String id, Context context) { } String resourceName = Utils.getValueFromIdByName(id, "webPubSub"); if (resourceName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'webPubSub'.", id))); 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 e1e370a1914a..0f4b8362cf49 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 @@ -31,7 +31,6 @@ import com.azure.core.management.polling.PollResult; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.webpubsub.fluent.WebPubSubsClient; @@ -48,8 +47,6 @@ /** An instance of this class provides access to all the operations defined in WebPubSubsClient. */ public final class WebPubSubsClientImpl implements WebPubSubsClient { - private final ClientLogger logger = new ClientLogger(WebPubSubsClientImpl.class); - /** The proxy service used to perform REST calls. */ private final WebPubSubsService service; @@ -266,7 +263,8 @@ Mono> listByResourceGroupNext( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return result of the request to check name availability along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> checkNameAvailabilityWithResponseAsync( @@ -316,7 +314,8 @@ private Mono> checkNameAvailabilityWithResponseA * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return result of the request to check name availability along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> checkNameAvailabilityWithResponseAsync( @@ -362,20 +361,13 @@ private Mono> checkNameAvailabilityWithResponseA * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @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) { return checkNameAvailabilityWithResponseAsync(location, parameters) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -383,14 +375,16 @@ private Mono checkNameAvailabilityAsync( * * @param location the region. * @param parameters Parameters supplied to the operation. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the request to check name availability. + * @return result of the request to check name availability along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public NameAvailabilityInner checkNameAvailability(String location, NameAvailabilityParameters parameters) { - return checkNameAvailabilityAsync(location, parameters).block(); + public Response checkNameAvailabilityWithResponse( + String location, NameAvailabilityParameters parameters, Context context) { + return checkNameAvailabilityWithResponseAsync(location, parameters, context).block(); } /** @@ -398,16 +392,14 @@ public NameAvailabilityInner checkNameAvailability(String location, NameAvailabi * * @param location the region. * @param parameters Parameters supplied to the operation. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return result of the request to check name availability. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response checkNameAvailabilityWithResponse( - String location, NameAvailabilityParameters parameters, Context context) { - return checkNameAvailabilityWithResponseAsync(location, parameters, context).block(); + public NameAvailabilityInner checkNameAvailability(String location, NameAvailabilityParameters parameters) { + return checkNameAvailabilityWithResponse(location, parameters, Context.NONE).getValue(); } /** @@ -415,7 +407,8 @@ public Response checkNameAvailabilityWithResponse( * * @throws 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. + * @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() { @@ -461,7 +454,8 @@ private Mono> listSinglePageAsync() { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @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) { @@ -502,7 +496,8 @@ private Mono> listSinglePageAsync(Context * * @throws 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. + * @return object that includes an array of resources and a possible link for next set as paginated response with + * {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync() { @@ -517,7 +512,8 @@ private PagedFlux listAsync() { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return object that includes an array of resources and a possible link for next set as paginated response with + * {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(Context context) { @@ -530,7 +526,8 @@ private PagedFlux listAsync(Context context) { * * @throws 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. + * @return object that includes an array of resources and a possible link for next set as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list() { @@ -544,7 +541,8 @@ public PagedIterable list() { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return object that includes an array of resources and a possible link for next set as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(Context context) { @@ -559,7 +557,8 @@ public PagedIterable list(Context context) { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @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) { @@ -612,7 +611,8 @@ private Mono> listByResourceGroupSinglePag * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @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( @@ -662,7 +662,8 @@ private Mono> listByResourceGroupSinglePag * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return object that includes an array of resources and a possible link for next set as paginated response with + * {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByResourceGroupAsync(String resourceGroupName) { @@ -680,7 +681,8 @@ private PagedFlux listByResourceGroupAsync(String resour * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return object that includes an array of resources and a possible link for next set as paginated response with + * {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) { @@ -697,7 +699,8 @@ private PagedFlux listByResourceGroupAsync(String resour * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return object that includes an array of resources and a possible link for next set as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByResourceGroup(String resourceGroupName) { @@ -713,7 +716,8 @@ public PagedIterable listByResourceGroup(String 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 object that includes an array of resources and a possible link for next set. + * @return object that includes an array of resources and a possible link for next set as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { @@ -729,7 +733,7 @@ public PagedIterable listByResourceGroup(String 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 resource and its properties. + * @return the resource and its properties along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getByResourceGroupWithResponseAsync( @@ -779,7 +783,7 @@ private Mono> getByResourceGroupWithResponseAsy * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 resource and its properties. + * @return the resource and its properties along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getByResourceGroupWithResponseAsync( @@ -825,19 +829,12 @@ private Mono> getByResourceGroupWithResponseAsy * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 resource and its properties. + * @return the resource and its properties on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getByResourceGroupAsync(String resourceGroupName, String resourceName) { return getByResourceGroupWithResponseAsync(resourceGroupName, resourceName) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -846,14 +843,16 @@ private Mono getByResourceGroupAsync(String resourceGrou * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value * from the Azure Resource Manager API or the portal. * @param resourceName The name of the resource. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the resource and its properties. + * @return the resource and its properties along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public WebPubSubResourceInner getByResourceGroup(String resourceGroupName, String resourceName) { - return getByResourceGroupAsync(resourceGroupName, resourceName).block(); + public Response getByResourceGroupWithResponse( + String resourceGroupName, String resourceName, Context context) { + return getByResourceGroupWithResponseAsync(resourceGroupName, resourceName, context).block(); } /** @@ -862,16 +861,14 @@ public WebPubSubResourceInner getByResourceGroup(String resourceGroupName, Strin * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value * from the Azure Resource Manager API or the portal. * @param resourceName The name of the resource. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the resource and its properties. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getByResourceGroupWithResponse( - String resourceGroupName, String resourceName, Context context) { - return getByResourceGroupWithResponseAsync(resourceGroupName, resourceName, context).block(); + public WebPubSubResourceInner getByResourceGroup(String resourceGroupName, String resourceName) { + return getByResourceGroupWithResponse(resourceGroupName, resourceName, Context.NONE).getValue(); } /** @@ -884,7 +881,7 @@ public Response getByResourceGroupWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 resource. + * @return a class represent a resource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createOrUpdateWithResponseAsync( @@ -941,7 +938,7 @@ 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 resource. + * @return a class represent a resource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createOrUpdateWithResponseAsync( @@ -994,7 +991,7 @@ 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 resource. + * @return the {@link PollerFlux} for polling of a class represent a resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, WebPubSubResourceInner> beginCreateOrUpdateAsync( @@ -1008,7 +1005,7 @@ private PollerFlux, WebPubSubResourceInner> b this.client.getHttpPipeline(), WebPubSubResourceInner.class, WebPubSubResourceInner.class, - Context.NONE); + this.client.getContext()); } /** @@ -1022,7 +1019,7 @@ private PollerFlux, WebPubSubResourceInner> b * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 resource. + * @return the {@link PollerFlux} for polling of a class represent a resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, WebPubSubResourceInner> beginCreateOrUpdateAsync( @@ -1050,7 +1047,7 @@ private PollerFlux, WebPubSubResourceInner> b * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 resource. + * @return the {@link SyncPoller} for polling of a class represent a resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, WebPubSubResourceInner> beginCreateOrUpdate( @@ -1069,7 +1066,7 @@ public SyncPoller, WebPubSubResourceInner> be * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 resource. + * @return the {@link SyncPoller} for polling of a class represent a resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, WebPubSubResourceInner> beginCreateOrUpdate( @@ -1087,7 +1084,7 @@ public SyncPoller, WebPubSubResourceInner> be * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 resource. + * @return a class represent a resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createOrUpdateAsync( @@ -1108,7 +1105,7 @@ private Mono createOrUpdateAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 resource. + * @return a class represent a resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createOrUpdateAsync( @@ -1164,7 +1161,7 @@ public WebPubSubResourceInner createOrUpdate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync(String resourceGroupName, String resourceName) { @@ -1213,7 +1210,7 @@ private Mono>> deleteWithResponseAsync(String resource * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync( @@ -1259,14 +1256,15 @@ private Mono>> deleteWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link PollerFlux} for polling of long-running operation. */ @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, Context.NONE); + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); } /** @@ -1279,7 +1277,7 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteAsync( @@ -1300,7 +1298,7 @@ private PollerFlux, Void> beginDeleteAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String resourceName) { @@ -1317,7 +1315,7 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete( @@ -1334,7 +1332,7 @@ public SyncPoller, Void> beginDelete( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync(String resourceGroupName, String resourceName) { @@ -1351,7 +1349,7 @@ private Mono deleteAsync(String resourceGroupName, String resourceName) { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync(String resourceGroupName, String resourceName, Context context) { @@ -1401,7 +1399,7 @@ public void delete(String resourceGroupName, String resourceName, Context contex * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 resource. + * @return a class represent a resource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> updateWithResponseAsync( @@ -1458,7 +1456,7 @@ 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 resource. + * @return a class represent a resource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> updateWithResponseAsync( @@ -1511,7 +1509,7 @@ 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 resource. + * @return the {@link PollerFlux} for polling of a class represent a resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, WebPubSubResourceInner> beginUpdateAsync( @@ -1524,7 +1522,7 @@ private PollerFlux, WebPubSubResourceInner> b this.client.getHttpPipeline(), WebPubSubResourceInner.class, WebPubSubResourceInner.class, - Context.NONE); + this.client.getContext()); } /** @@ -1538,7 +1536,7 @@ private PollerFlux, WebPubSubResourceInner> b * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 resource. + * @return the {@link PollerFlux} for polling of a class represent a resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, WebPubSubResourceInner> beginUpdateAsync( @@ -1566,7 +1564,7 @@ private PollerFlux, WebPubSubResourceInner> b * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 resource. + * @return the {@link SyncPoller} for polling of a class represent a resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, WebPubSubResourceInner> beginUpdate( @@ -1585,7 +1583,7 @@ public SyncPoller, WebPubSubResourceInner> be * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 resource. + * @return the {@link SyncPoller} for polling of a class represent a resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, WebPubSubResourceInner> beginUpdate( @@ -1603,7 +1601,7 @@ public SyncPoller, WebPubSubResourceInner> be * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 resource. + * @return a class represent a resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateAsync( @@ -1624,7 +1622,7 @@ private Mono updateAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 resource. + * @return a class represent a resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateAsync( @@ -1680,7 +1678,7 @@ public WebPubSubResourceInner update( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return the access keys of the resource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listKeysWithResponseAsync( @@ -1730,7 +1728,7 @@ private Mono> listKeysWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return the access keys of the resource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listKeysWithResponseAsync( @@ -1776,19 +1774,12 @@ private Mono> listKeysWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return the access keys of the resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono listKeysAsync(String resourceGroupName, String resourceName) { return listKeysWithResponseAsync(resourceGroupName, resourceName) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -1797,14 +1788,16 @@ private Mono listKeysAsync(String resourceGroupName, String * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value * from the Azure Resource Manager API or the portal. * @param resourceName The name of the resource. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the access keys of the resource. + * @return the access keys of the resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public WebPubSubKeysInner listKeys(String resourceGroupName, String resourceName) { - return listKeysAsync(resourceGroupName, resourceName).block(); + public Response listKeysWithResponse( + String resourceGroupName, String resourceName, Context context) { + return listKeysWithResponseAsync(resourceGroupName, resourceName, context).block(); } /** @@ -1813,16 +1806,14 @@ public WebPubSubKeysInner listKeys(String resourceGroupName, String resourceName * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value * from the Azure Resource Manager API or the portal. * @param resourceName The name of the resource. - * @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 access keys of the resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response listKeysWithResponse( - String resourceGroupName, String resourceName, Context context) { - return listKeysWithResponseAsync(resourceGroupName, resourceName, context).block(); + public WebPubSubKeysInner listKeys(String resourceGroupName, String resourceName) { + return listKeysWithResponse(resourceGroupName, resourceName, Context.NONE).getValue(); } /** @@ -1835,7 +1826,8 @@ public Response listKeysWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return a class represents the access keys of the resource along with {@link Response} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> regenerateKeyWithResponseAsync( @@ -1892,7 +1884,8 @@ private Mono>> regenerateKeyWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return a class represents the access keys of the resource along with {@link Response} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> regenerateKeyWithResponseAsync( @@ -1945,7 +1938,7 @@ private Mono>> regenerateKeyWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @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( @@ -1955,7 +1948,11 @@ private PollerFlux, WebPubSubKeysInner> beginRege return this .client .getLroResult( - mono, this.client.getHttpPipeline(), WebPubSubKeysInner.class, WebPubSubKeysInner.class, Context.NONE); + mono, + this.client.getHttpPipeline(), + WebPubSubKeysInner.class, + WebPubSubKeysInner.class, + this.client.getContext()); } /** @@ -1969,7 +1966,7 @@ private PollerFlux, WebPubSubKeysInner> beginRege * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @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( @@ -1993,7 +1990,7 @@ private PollerFlux, WebPubSubKeysInner> beginRege * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @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( @@ -2012,7 +2009,7 @@ public SyncPoller, WebPubSubKeysInner> beginRegen * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @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( @@ -2030,7 +2027,7 @@ public SyncPoller, WebPubSubKeysInner> beginRegen * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return a class represents the access keys of the resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono regenerateKeyAsync( @@ -2051,7 +2048,7 @@ private Mono regenerateKeyAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return a class represents the access keys of the resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono regenerateKeyAsync( @@ -2107,7 +2104,7 @@ public WebPubSubKeysInner regenerateKey( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> restartWithResponseAsync(String resourceGroupName, String resourceName) { @@ -2156,7 +2153,7 @@ private Mono>> restartWithResponseAsync(String resourc * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> restartWithResponseAsync( @@ -2202,14 +2199,15 @@ private Mono>> restartWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link PollerFlux} for polling of long-running operation. */ @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, Context.NONE); + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); } /** @@ -2222,7 +2220,7 @@ private PollerFlux, Void> beginRestartAsync(String resourceGrou * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginRestartAsync( @@ -2243,7 +2241,7 @@ private PollerFlux, Void> beginRestartAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginRestart(String resourceGroupName, String resourceName) { @@ -2260,7 +2258,7 @@ public SyncPoller, Void> beginRestart(String resourceGroupName, * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginRestart( @@ -2277,7 +2275,7 @@ public SyncPoller, Void> beginRestart( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono restartAsync(String resourceGroupName, String resourceName) { @@ -2294,7 +2292,7 @@ private Mono restartAsync(String resourceGroupName, String resourceName) { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono restartAsync(String resourceGroupName, String resourceName, Context context) { @@ -2343,7 +2341,7 @@ public void restart(String resourceGroupName, String resourceName, Context conte * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list skus operation response. + * @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) { @@ -2392,7 +2390,7 @@ private Mono> listSkusWithResponseAsync(String resourceGr * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list skus operation response. + * @return the list skus operation response along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSkusWithResponseAsync( @@ -2438,19 +2436,12 @@ private Mono> listSkusWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list skus operation response. + * @return the list skus operation response on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono listSkusAsync(String resourceGroupName, String resourceName) { return listSkusWithResponseAsync(resourceGroupName, resourceName) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -2459,14 +2450,15 @@ private Mono listSkusAsync(String resourceGroupName, String resour * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value * from the Azure Resource Manager API or the portal. * @param resourceName The name of the resource. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list skus operation response. + * @return the list skus operation response along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public SkuListInner listSkus(String resourceGroupName, String resourceName) { - return listSkusAsync(resourceGroupName, resourceName).block(); + public Response listSkusWithResponse(String resourceGroupName, String resourceName, Context context) { + return listSkusWithResponseAsync(resourceGroupName, resourceName, context).block(); } /** @@ -2475,25 +2467,26 @@ public SkuListInner listSkus(String resourceGroupName, String resourceName) { * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value * from the Azure Resource Manager API or the portal. * @param resourceName The name of the resource. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the list skus operation response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response listSkusWithResponse(String resourceGroupName, String resourceName, Context context) { - return listSkusWithResponseAsync(resourceGroupName, resourceName, context).block(); + public SkuListInner listSkus(String resourceGroupName, String resourceName) { + return listSkusWithResponse(resourceGroupName, resourceName, Context.NONE).getValue(); } /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @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 object that includes an array of resources and a possible link for next set. + * @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) { @@ -2525,12 +2518,14 @@ private Mono> listBySubscriptionNextSingle /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @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 object that includes an array of resources and a possible link for next set. + * @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( @@ -2562,11 +2557,13 @@ private Mono> listBySubscriptionNextSingle /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @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 object that includes an array of resources and a possible link for next set. + * @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) { @@ -2598,12 +2595,14 @@ private Mono> listByResourceGroupNextSingl /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @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 object that includes an array of resources and a possible link for next set. + * @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( 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 5ebeb7dad1b3..7d4c70cdec7a 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 @@ -21,10 +21,9 @@ import com.azure.resourcemanager.webpubsub.models.WebPubSubKeys; import com.azure.resourcemanager.webpubsub.models.WebPubSubResource; import com.azure.resourcemanager.webpubsub.models.WebPubSubs; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class WebPubSubsImpl implements WebPubSubs { - @JsonIgnore private final ClientLogger logger = new ClientLogger(WebPubSubsImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(WebPubSubsImpl.class); private final WebPubSubsClient innerClient; @@ -36,15 +35,6 @@ public WebPubSubsImpl( this.serviceManager = serviceManager; } - public NameAvailability checkNameAvailability(String location, NameAvailabilityParameters parameters) { - NameAvailabilityInner inner = this.serviceClient().checkNameAvailability(location, parameters); - if (inner != null) { - return new NameAvailabilityImpl(inner, this.manager()); - } else { - return null; - } - } - public Response checkNameAvailabilityWithResponse( String location, NameAvailabilityParameters parameters, Context context) { Response inner = @@ -60,6 +50,15 @@ public Response checkNameAvailabilityWithResponse( } } + public NameAvailability checkNameAvailability(String location, NameAvailabilityParameters parameters) { + NameAvailabilityInner inner = this.serviceClient().checkNameAvailability(location, parameters); + if (inner != null) { + return new NameAvailabilityImpl(inner, this.manager()); + } else { + return null; + } + } + public PagedIterable list() { PagedIterable inner = this.serviceClient().list(); return Utils.mapPage(inner, inner1 -> new WebPubSubResourceImpl(inner1, this.manager())); @@ -81,15 +80,6 @@ public PagedIterable listByResourceGroup(String resourceGroup return Utils.mapPage(inner, inner1 -> new WebPubSubResourceImpl(inner1, this.manager())); } - public WebPubSubResource getByResourceGroup(String resourceGroupName, String resourceName) { - WebPubSubResourceInner inner = this.serviceClient().getByResourceGroup(resourceGroupName, resourceName); - if (inner != null) { - return new WebPubSubResourceImpl(inner, this.manager()); - } else { - return null; - } - } - public Response getByResourceGroupWithResponse( String resourceGroupName, String resourceName, Context context) { Response inner = @@ -105,6 +95,15 @@ public Response getByResourceGroupWithResponse( } } + public WebPubSubResource getByResourceGroup(String resourceGroupName, String resourceName) { + WebPubSubResourceInner inner = this.serviceClient().getByResourceGroup(resourceGroupName, resourceName); + if (inner != null) { + return new WebPubSubResourceImpl(inner, this.manager()); + } else { + return null; + } + } + public void deleteByResourceGroup(String resourceGroupName, String resourceName) { this.serviceClient().delete(resourceGroupName, resourceName); } @@ -113,15 +112,6 @@ public void delete(String resourceGroupName, String resourceName, Context contex this.serviceClient().delete(resourceGroupName, resourceName, context); } - public WebPubSubKeys listKeys(String resourceGroupName, String resourceName) { - WebPubSubKeysInner inner = this.serviceClient().listKeys(resourceGroupName, resourceName); - if (inner != null) { - return new WebPubSubKeysImpl(inner, this.manager()); - } else { - return null; - } - } - public Response listKeysWithResponse( String resourceGroupName, String resourceName, Context context) { Response inner = @@ -137,6 +127,15 @@ public Response listKeysWithResponse( } } + public WebPubSubKeys listKeys(String resourceGroupName, String resourceName) { + WebPubSubKeysInner inner = this.serviceClient().listKeys(resourceGroupName, resourceName); + if (inner != null) { + return new WebPubSubKeysImpl(inner, this.manager()); + } else { + return null; + } + } + public WebPubSubKeys regenerateKey( String resourceGroupName, String resourceName, RegenerateKeyParameters parameters) { WebPubSubKeysInner inner = this.serviceClient().regenerateKey(resourceGroupName, resourceName, parameters); @@ -166,15 +165,6 @@ public void restart(String resourceGroupName, String resourceName, Context conte this.serviceClient().restart(resourceGroupName, resourceName, context); } - public SkuList listSkus(String resourceGroupName, String resourceName) { - SkuListInner inner = this.serviceClient().listSkus(resourceGroupName, resourceName); - if (inner != null) { - return new SkuListImpl(inner, this.manager()); - } else { - return null; - } - } - public Response listSkusWithResponse(String resourceGroupName, String resourceName, Context context) { Response inner = this.serviceClient().listSkusWithResponse(resourceGroupName, resourceName, context); @@ -189,10 +179,19 @@ public Response listSkusWithResponse(String resourceGroupName, String r } } + public SkuList listSkus(String resourceGroupName, String resourceName) { + SkuListInner inner = this.serviceClient().listSkus(resourceGroupName, resourceName); + if (inner != null) { + return new SkuListImpl(inner, this.manager()); + } else { + return null; + } + } + public WebPubSubResource getById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -200,7 +199,7 @@ public WebPubSubResource getById(String id) { } String resourceName = Utils.getValueFromIdByName(id, "webPubSub"); if (resourceName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'webPubSub'.", id))); @@ -211,7 +210,7 @@ public WebPubSubResource getById(String id) { public Response getByIdWithResponse(String id, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -219,7 +218,7 @@ public Response getByIdWithResponse(String id, Context contex } String resourceName = Utils.getValueFromIdByName(id, "webPubSub"); if (resourceName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'webPubSub'.", id))); @@ -230,7 +229,7 @@ public Response getByIdWithResponse(String id, Context contex public void deleteById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -238,7 +237,7 @@ public void deleteById(String id) { } String resourceName = Utils.getValueFromIdByName(id, "webPubSub"); if (resourceName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'webPubSub'.", id))); @@ -249,7 +248,7 @@ public void deleteById(String id) { public void deleteByIdWithResponse(String id, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -257,7 +256,7 @@ public void deleteByIdWithResponse(String id, Context context) { } String resourceName = Utils.getValueFromIdByName(id, "webPubSub"); if (resourceName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'webPubSub'.", id))); 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 49097440adc6..9dab9e4aff4b 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,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for AclAction. */ +/** Azure Networking ACL Action. */ public final class AclAction extends ExpandableStringEnum { /** Static value Allow for AclAction. */ public static final AclAction ALLOW = fromString("Allow"); @@ -27,7 +27,11 @@ public static AclAction fromString(String name) { return fromString(name, AclAction.class); } - /** @return known AclAction values. */ + /** + * Gets known AclAction values. + * + * @return known AclAction values. + */ public static Collection values() { return values(AclAction.class); } 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 new file mode 100644 index 000000000000..07bf938d8db0 --- /dev/null +++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/CustomCertificate.java @@ -0,0 +1,200 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.webpubsub.models; + +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.webpubsub.fluent.models.CustomCertificateInner; + +/** 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: Metadata pertaining to creation and last modification of the resource. + * + * @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 CustomCertificate definition stages. */ + interface DefinitionStages { + /** The first stage of the CustomCertificate definition. */ + interface Blank extends WithParentResource { + } + /** The stage of the CustomCertificate definition allowing to specify parent resource. */ + interface WithParentResource { + /** + * Specifies resourceGroupName, resourceName. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this + * value from the Azure Resource Manager API or the portal. + * @param resourceName The name of the resource. + * @return the next definition stage. + */ + WithKeyVaultBaseUri withExistingWebPubSub(String resourceGroupName, String resourceName); + } + /** 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. */ + interface WithKeyVaultSecretName { + /** + * Specifies the keyVaultSecretName property: Certificate secret name.. + * + * @param keyVaultSecretName Certificate secret name. + * @return the next definition stage. + */ + WithCreate withKeyVaultSecretName(String keyVaultSecretName); + } + /** + * The stage of the CustomCertificate 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.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. */ + interface WithKeyVaultSecretVersion { + /** + * Specifies the keyVaultSecretVersion property: Certificate secret version.. + * + * @param keyVaultSecretVersion Certificate secret version. + * @return the next definition stage. + */ + WithCreate withKeyVaultSecretVersion(String keyVaultSecretVersion); + } + } + /** + * Begins update for the CustomCertificate resource. + * + * @return the stage of resource update. + */ + CustomCertificate.Update 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. */ + 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. + */ + CustomCertificate refresh(Context context); +} 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 new file mode 100644 index 000000000000..f50a7fab356b --- /dev/null +++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/CustomCertificateList.java @@ -0,0 +1,84 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.webpubsub.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.webpubsub.fluent.models.CustomCertificateInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Custom certificates list. */ +@Fluent +public final class CustomCertificateList { + /* + * List of custom certificates of this resource. + */ + @JsonProperty(value = "value") + private List value; + + /* + * The URL the client should use to fetch the next page (per server side paging). + * It's null for now, added for future use. + */ + @JsonProperty(value = "nextLink") + private String nextLink; + + /** 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() { + return this.value; + } + + /** + * Set the value property: List of custom certificates of this resource. + * + * @param value the value value to set. + * @return the CustomCertificateList object itself. + */ + public CustomCertificateList withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: The URL the client should use to fetch the next page (per server side paging). It's + * null for now, added for future use. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Set the nextLink property: The URL the client should use to fetch the next page (per server side paging). It's + * null for now, added for future use. + * + * @param nextLink the nextLink value to set. + * @return the CustomCertificateList object itself. + */ + public CustomCertificateList withNextLink(String nextLink) { + this.nextLink = nextLink; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() != null) { + value().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/CustomDomain.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/CustomDomain.java new file mode 100644 index 000000000000..36edc99b482d --- /dev/null +++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/CustomDomain.java @@ -0,0 +1,203 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.webpubsub.models; + +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.webpubsub.fluent.models.CustomDomainInner; + +/** 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: Metadata pertaining to creation and last modification of the resource. + * + * @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 CustomDomain definition stages. */ + interface DefinitionStages { + /** The first stage of the CustomDomain definition. */ + interface Blank extends WithParentResource { + } + /** The stage of the CustomDomain definition allowing to specify parent resource. */ + interface WithParentResource { + /** + * Specifies resourceGroupName, resourceName. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this + * value from the Azure Resource Manager API or the portal. + * @param resourceName The name of the resource. + * @return the next definition stage. + */ + WithDomainName withExistingWebPubSub(String resourceGroupName, String resourceName); + } + /** 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. */ + interface WithCustomCertificate { + /** + * Specifies the customCertificate property: Reference to a resource.. + * + * @param customCertificate Reference to a resource. + * @return the next definition stage. + */ + WithCreate withCustomCertificate(ResourceReference customCertificate); + } + /** + * The stage of the CustomDomain definition which contains all the minimum required properties for the resource + * to be created, but also allows for any other optional properties to be specified. + */ + interface WithCreate { + /** + * Executes the create request. + * + * @return the created resource. + */ + CustomDomain create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + CustomDomain create(Context context); + } + } + /** + * Begins update for the CustomDomain resource. + * + * @return the stage of resource update. + */ + CustomDomain.Update 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. */ + interface UpdateStages { + /** 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. */ + interface WithCustomCertificate { + /** + * Specifies the customCertificate property: Reference to a resource.. + * + * @param customCertificate Reference to a resource. + * @return the next definition stage. + */ + Update withCustomCertificate(ResourceReference customCertificate); + } + } + /** + * 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. + */ + CustomDomain refresh(Context context); +} 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 new file mode 100644 index 000000000000..64993b405210 --- /dev/null +++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/CustomDomainList.java @@ -0,0 +1,84 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.webpubsub.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.webpubsub.fluent.models.CustomDomainInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Custom domains list. */ +@Fluent +public final class CustomDomainList { + /* + * List of custom domains that bind to this resource. + */ + @JsonProperty(value = "value") + private List value; + + /* + * The URL the client should use to fetch the next page (per server side paging). + * It's null for now, added for future use. + */ + @JsonProperty(value = "nextLink") + private String nextLink; + + /** 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() { + return this.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. + */ + public CustomDomainList withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: The URL the client should use to fetch the next page (per server side paging). It's + * null for now, added for future use. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Set the nextLink property: The URL the client should use to fetch the next page (per server side paging). It's + * null for now, added for future use. + * + * @param nextLink the nextLink value to set. + * @return the CustomDomainList object itself. + */ + public CustomDomainList withNextLink(String nextLink) { + this.nextLink = nextLink; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() != null) { + value().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/Dimension.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/Dimension.java index 964a86b6ff19..3146d5272e8e 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 @@ -5,15 +5,11 @@ package com.azure.resourcemanager.webpubsub.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Specifications of the Dimension of metrics. */ @Fluent public final class Dimension { - @JsonIgnore private final ClientLogger logger = new ClientLogger(Dimension.class); - /* * The public facing name of the dimension. */ @@ -33,12 +29,15 @@ public final class Dimension { private String internalName; /* - * A Boolean flag indicating whether this dimension should be included for - * the shoebox export scenario. + * A Boolean flag indicating whether this dimension should be included for the shoebox export scenario. */ @JsonProperty(value = "toBeExportedForShoebox") private Boolean toBeExportedForShoebox; + /** Creates an instance of Dimension class. */ + public Dimension() { + } + /** * Get the name property: The public facing name of the dimension. * 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 30aa31166814..26926efa09c8 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 @@ -6,50 +6,46 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** Properties of event handler. */ @Fluent public final class EventHandler { - @JsonIgnore private final ClientLogger logger = new ClientLogger(EventHandler.class); - /* - * 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. + * 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) private String urlTemplate; /* * Gets or sets the matching pattern for event names. - * There are 3 kind of patterns supported: - * 1. "*", it to matches any event name - * 2. Combine multiple events with ",", for example "event1,event2", it - * matches event "event1" and "event2" - * 3. The single event name, for example, "event1", it matches "event1" + * 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" */ @JsonProperty(value = "userEventPattern") private String userEventPattern; /* - * Gets ot sets the list of system events. + * Gets or sets the list of system events. */ @JsonProperty(value = "systemEvents") private List systemEvents; /* - * Gets or sets the auth settings for an event handler. If not set, no auth - * is used. + * Upstream auth settings. If not set, no auth is used for upstream messages. */ @JsonProperty(value = "auth") private UpstreamAuthSettings auth; + /** 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 @@ -77,10 +73,10 @@ public EventHandler withUrlTemplate(String urlTemplate) { } /** - * Get the userEventPattern property: Gets or sets the matching pattern for event names. There are 3 kind of - * patterns supported: 1. "*", it to matches any event name 2. Combine multiple events with ",", for example - * "event1,event2", it matches event "event1" and "event2" 3. The 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. */ @@ -89,10 +85,10 @@ public String userEventPattern() { } /** - * Set the userEventPattern property: Gets or sets the matching pattern for event names. There are 3 kind of - * patterns supported: 1. "*", it to matches any event name 2. Combine multiple events with ",", for example - * "event1,event2", it matches event "event1" and "event2" 3. The 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. @@ -103,7 +99,7 @@ public EventHandler withUserEventPattern(String userEventPattern) { } /** - * Get the systemEvents property: Gets ot sets the list of system events. + * Get the systemEvents property: Gets or sets the list of system events. * * @return the systemEvents value. */ @@ -112,7 +108,7 @@ public List systemEvents() { } /** - * Set the systemEvents property: Gets ot sets the list of system events. + * Set the systemEvents property: Gets or sets the list of system events. * * @param systemEvents the systemEvents value to set. * @return the EventHandler object itself. @@ -123,7 +119,7 @@ public EventHandler withSystemEvents(List systemEvents) { } /** - * Get the auth property: Gets or sets the auth settings for an event handler. If not set, no auth is used. + * Get the auth property: Upstream auth settings. If not set, no auth is used for upstream messages. * * @return the auth value. */ @@ -132,7 +128,7 @@ public UpstreamAuthSettings auth() { } /** - * Set the auth property: Gets or sets the auth settings for an event handler. If not set, no auth is used. + * 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. @@ -149,7 +145,7 @@ public EventHandler withAuth(UpstreamAuthSettings auth) { */ public void validate() { if (urlTemplate() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException("Missing required property urlTemplate in model EventHandler")); } @@ -157,4 +153,6 @@ public void validate() { auth().validate(); } } + + private static final ClientLogger LOGGER = new ClientLogger(EventHandler.class); } 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 new file mode 100644 index 000000000000..30e6a9398c7b --- /dev/null +++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/EventHubEndpoint.java @@ -0,0 +1,101 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.webpubsub.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; +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. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type") +@JsonTypeName("EventHub") +@Fluent +public final class EventHubEndpoint extends EventListenerEndpoint { + /* + * The fully qualified namespace name of the Event Hub resource. For example, "example.servicebus.windows.net". + */ + @JsonProperty(value = "fullyQualifiedNamespace", required = true) + private String fullyQualifiedNamespace; + + /* + * The name of the Event Hub. + */ + @JsonProperty(value = "eventHubName", required = true) + private String eventHubName; + + /** Creates an instance of EventHubEndpoint class. */ + public EventHubEndpoint() { + } + + /** + * 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() { + return this.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. + */ + public EventHubEndpoint withFullyQualifiedNamespace(String fullyQualifiedNamespace) { + this.fullyQualifiedNamespace = fullyQualifiedNamespace; + return this; + } + + /** + * Get the eventHubName property: The name of the Event Hub. + * + * @return the eventHubName value. + */ + public String eventHubName() { + return this.eventHubName; + } + + /** + * Set the eventHubName property: The name of the Event Hub. + * + * @param eventHubName the eventHubName value to set. + * @return the EventHubEndpoint object itself. + */ + public EventHubEndpoint withEventHubName(String eventHubName) { + this.eventHubName = eventHubName; + return this; + } + + /** + * 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")); + } + if (eventHubName() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException("Missing required property eventHubName in model EventHubEndpoint")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(EventHubEndpoint.class); +} 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 new file mode 100644 index 000000000000..808b03a13fb2 --- /dev/null +++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/EventListener.java @@ -0,0 +1,95 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.webpubsub.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** A setting defines which kinds of events should be sent to which endpoint. */ +@Fluent +public final class EventListener { + /* + * A base class for event filter which determines whether an event should be sent to an event listener. + */ + @JsonProperty(value = "filter", required = true) + private EventListenerFilter filter; + + /* + * An endpoint specifying where Web PubSub should send events to. + */ + @JsonProperty(value = "endpoint", required = true) + private EventListenerEndpoint endpoint; + + /** 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() { + return this.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. + */ + public EventListener withFilter(EventListenerFilter filter) { + this.filter = filter; + return this; + } + + /** + * Get the endpoint property: An endpoint specifying where Web PubSub should send events to. + * + * @return the endpoint value. + */ + public EventListenerEndpoint endpoint() { + return this.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. + */ + public EventListener withEndpoint(EventListenerEndpoint endpoint) { + this.endpoint = endpoint; + return this; + } + + /** + * 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")); + } else { + filter().validate(); + } + if (endpoint() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException("Missing required property endpoint in model EventListener")); + } else { + endpoint().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(EventListener.class); +} 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 new file mode 100644 index 000000000000..d143d0e5dc45 --- /dev/null +++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/EventListenerEndpoint.java @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.webpubsub.models; + +import com.azure.core.annotation.Immutable; +import com.fasterxml.jackson.annotation.JsonSubTypes; +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) +@JsonTypeName("EventListenerEndpoint") +@JsonSubTypes({@JsonSubTypes.Type(name = "EventHub", value = EventHubEndpoint.class)}) +@Immutable +public class EventListenerEndpoint { + /** Creates an instance of EventListenerEndpoint class. */ + public EventListenerEndpoint() { + } + + /** + * 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 new file mode 100644 index 000000000000..e92dc8ca7a12 --- /dev/null +++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/EventListenerEndpointDiscriminator.java @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.webpubsub.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for EventListenerEndpointDiscriminator. */ +public final class EventListenerEndpointDiscriminator extends ExpandableStringEnum { + /** Static value EventHub for EventListenerEndpointDiscriminator. */ + public static final EventListenerEndpointDiscriminator EVENT_HUB = fromString("EventHub"); + + /** + * Creates or finds a EventListenerEndpointDiscriminator from its string representation. + * + * @param name a name to look for. + * @return the corresponding EventListenerEndpointDiscriminator. + */ + @JsonCreator + public static EventListenerEndpointDiscriminator fromString(String name) { + return fromString(name, EventListenerEndpointDiscriminator.class); + } + + /** + * Gets known EventListenerEndpointDiscriminator values. + * + * @return known EventListenerEndpointDiscriminator values. + */ + public static Collection values() { + return values(EventListenerEndpointDiscriminator.class); + } +} 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 new file mode 100644 index 000000000000..ce1ea931d7b8 --- /dev/null +++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/EventListenerFilter.java @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.webpubsub.models; + +import com.azure.core.annotation.Immutable; +import com.fasterxml.jackson.annotation.JsonSubTypes; +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) +@JsonTypeName("EventListenerFilter") +@JsonSubTypes({@JsonSubTypes.Type(name = "EventName", value = EventNameFilter.class)}) +@Immutable +public class EventListenerFilter { + /** Creates an instance of EventListenerFilter class. */ + public EventListenerFilter() { + } + + /** + * 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 new file mode 100644 index 000000000000..3d3fa24b0bf8 --- /dev/null +++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/EventListenerFilterDiscriminator.java @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.webpubsub.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for EventListenerFilterDiscriminator. */ +public final class EventListenerFilterDiscriminator extends ExpandableStringEnum { + /** Static value EventName for EventListenerFilterDiscriminator. */ + public static final EventListenerFilterDiscriminator EVENT_NAME = fromString("EventName"); + + /** + * Creates or finds a EventListenerFilterDiscriminator from its string representation. + * + * @param name a name to look for. + * @return the corresponding EventListenerFilterDiscriminator. + */ + @JsonCreator + public static EventListenerFilterDiscriminator fromString(String name) { + return fromString(name, EventListenerFilterDiscriminator.class); + } + + /** + * Gets known EventListenerFilterDiscriminator values. + * + * @return known EventListenerFilterDiscriminator values. + */ + public static Collection values() { + return values(EventListenerFilterDiscriminator.class); + } +} 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 new file mode 100644 index 000000000000..ac686ad60376 --- /dev/null +++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/EventNameFilter.java @@ -0,0 +1,94 @@ +// 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; +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") +@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. + */ + @JsonProperty(value = "systemEvents") + private List systemEvents; + + /* + * 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" + */ + @JsonProperty(value = "userEventPattern") + private String userEventPattern; + + /** Creates an instance of EventNameFilter class. */ + public EventNameFilter() { + } + + /** + * 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() { + return this.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. + */ + public EventNameFilter withSystemEvents(List systemEvents) { + this.systemEvents = systemEvents; + return this; + } + + /** + * 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() { + return this.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". + * + * @param userEventPattern the userEventPattern value to set. + * @return the EventNameFilter object itself. + */ + public EventNameFilter withUserEventPattern(String userEventPattern) { + this.userEventPattern = userEventPattern; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.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 7856f700522c..c56c53a02bf7 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,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for KeyType. */ +/** The type of access key. */ public final class KeyType extends ExpandableStringEnum { /** Static value Primary for KeyType. */ public static final KeyType PRIMARY = fromString("Primary"); @@ -30,7 +30,11 @@ public static KeyType fromString(String name) { return fromString(name, KeyType.class); } - /** @return known KeyType values. */ + /** + * Gets known KeyType values. + * + * @return known KeyType values. + */ public static Collection values() { return values(KeyType.class); } 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 6aa46f03bff6..2c0a2f27c12f 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 @@ -5,15 +5,11 @@ package com.azure.resourcemanager.webpubsub.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Live trace category configuration of a Microsoft.SignalRService resource. */ @Fluent public final class LiveTraceCategory { - @JsonIgnore private final ClientLogger logger = new ClientLogger(LiveTraceCategory.class); - /* * Gets or sets the live trace category's name. * Available values: ConnectivityLogs, MessagingLogs. @@ -30,6 +26,10 @@ public final class LiveTraceCategory { @JsonProperty(value = "enabled") private String enabled; + /** 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. 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 1516641fc160..c864aaa9a3d7 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 @@ -5,22 +5,17 @@ package com.azure.resourcemanager.webpubsub.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** Live trace configuration of a Microsoft.SignalRService resource. */ @Fluent public final class LiveTraceConfiguration { - @JsonIgnore private final ClientLogger logger = new ClientLogger(LiveTraceConfiguration.class); - /* * Indicates whether or not enable live trace. * When it's set to true, live trace client can connect to the service. - * Otherwise, live trace client can't connect to the service, so that you - * are unable to receive any log, no matter what you configure in - * "categories". + * 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. */ @@ -33,6 +28,10 @@ public final class LiveTraceConfiguration { @JsonProperty(value = "categories") private List categories; + /** 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 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 b2134c5726a2..1f715c0ad193 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 @@ -5,15 +5,11 @@ package com.azure.resourcemanager.webpubsub.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Specifications of the Logs for Azure Monitoring. */ @Fluent public final class LogSpecification { - @JsonIgnore private final ClientLogger logger = new ClientLogger(LogSpecification.class); - /* * Name of the log. */ @@ -26,6 +22,10 @@ public final class LogSpecification { @JsonProperty(value = "displayName") private String displayName; + /** Creates an instance of LogSpecification class. */ + public LogSpecification() { + } + /** * Get the name property: Name of the log. * 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 a05fdad2fcf6..1d06dac8f35f 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 @@ -5,8 +5,6 @@ package com.azure.resourcemanager.webpubsub.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Map; @@ -14,10 +12,8 @@ /** A class represent managed identities used for request and response. */ @Fluent public class ManagedIdentity { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ManagedIdentity.class); - /* - * Represent the identity type: systemAssigned, userAssigned, None + * Represents the identity type: systemAssigned, userAssigned, None */ @JsonProperty(value = "type") private ManagedIdentityType type; @@ -43,8 +39,12 @@ public class ManagedIdentity { @JsonProperty(value = "tenantId", access = JsonProperty.Access.WRITE_ONLY) private String tenantId; + /** Creates an instance of ManagedIdentity class. */ + public ManagedIdentity() { + } + /** - * Get the type property: Represent the identity type: systemAssigned, userAssigned, None. + * Get the type property: Represents the identity type: systemAssigned, userAssigned, None. * * @return the type value. */ @@ -53,7 +53,7 @@ public ManagedIdentityType type() { } /** - * Set the type property: Represent the identity type: systemAssigned, userAssigned, None. + * Set the type property: Represents the identity type: systemAssigned, userAssigned, None. * * @param type the type value to set. * @return the ManagedIdentity object itself. 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 a87424e1a60b..777089f1ad94 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 @@ -5,15 +5,11 @@ package com.azure.resourcemanager.webpubsub.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Managed identity settings for upstream. */ @Fluent public final class ManagedIdentitySettings { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ManagedIdentitySettings.class); - /* * The Resource indicating the App ID URI of the target resource. * It also appears in the aud (audience) claim of the issued token. @@ -21,6 +17,10 @@ public final class ManagedIdentitySettings { @JsonProperty(value = "resource") private String resource; + /** 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. 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 62e53df21768..4f7642ccde6d 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,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for ManagedIdentityType. */ +/** Represents the identity type: systemAssigned, userAssigned, None. */ public final class ManagedIdentityType extends ExpandableStringEnum { /** Static value None for ManagedIdentityType. */ public static final ManagedIdentityType NONE = fromString("None"); @@ -30,7 +30,11 @@ public static ManagedIdentityType fromString(String name) { return fromString(name, ManagedIdentityType.class); } - /** @return known ManagedIdentityType values. */ + /** + * Gets known ManagedIdentityType values. + * + * @return known ManagedIdentityType values. + */ public static Collection values() { return values(ManagedIdentityType.class); } 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 3b9e0612cca5..3d7e37d55a4d 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 @@ -5,16 +5,12 @@ package com.azure.resourcemanager.webpubsub.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** Specifications of the Metrics for Azure Monitoring. */ @Fluent public final class MetricSpecification { - @JsonIgnore private final ClientLogger logger = new ClientLogger(MetricSpecification.class); - /* * Name of the metric. */ @@ -40,26 +36,21 @@ public final class MetricSpecification { private String unit; /* - * Only provide one value for this field. Valid values: Average, Minimum, - * Maximum, Total, Count. + * Only provide one value for this field. Valid values: Average, Minimum, Maximum, Total, Count. */ @JsonProperty(value = "aggregationType") 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 - * often, instead of the RP publishing 0, Shoebox can auto fill in 0s for - * time periods where nothing was emitted. + * 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") private String fillGapWithZero; /* - * The name of the metric category that the metric belongs to. A metric can - * only belong to a single category. + * The name of the metric category that the metric belongs to. A metric can only belong to a single category. */ @JsonProperty(value = "category") private String category; @@ -70,6 +61,10 @@ public final class MetricSpecification { @JsonProperty(value = "dimensions") private List dimensions; + /** Creates an instance of MetricSpecification class. */ + public MetricSpecification() { + } + /** * Get the name property: Name of the metric. * 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 db3a9033b31e..7f2cbaa976e5 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 @@ -6,17 +6,13 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Data POST-ed to the nameAvailability action. */ @Fluent public final class NameAvailabilityParameters { - @JsonIgnore private final ClientLogger logger = new ClientLogger(NameAvailabilityParameters.class); - /* - * The resource type. Can be "Microsoft.SignalRService/SignalR" or - * "Microsoft.SignalRService/webPubSub" + * The resource type. Can be "Microsoft.SignalRService/SignalR" or "Microsoft.SignalRService/webPubSub" */ @JsonProperty(value = "type", required = true) private String type; @@ -27,6 +23,10 @@ public final class NameAvailabilityParameters { @JsonProperty(value = "name", required = true) private String name; + /** Creates an instance of NameAvailabilityParameters class. */ + public NameAvailabilityParameters() { + } + /** * Get the type property: The resource type. Can be "Microsoft.SignalRService/SignalR" or * "Microsoft.SignalRService/webPubSub". @@ -76,14 +76,16 @@ public NameAvailabilityParameters withName(String name) { */ public void validate() { if (type() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException("Missing required property type in model NameAvailabilityParameters")); } if (name() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException("Missing required property name in model NameAvailabilityParameters")); } } + + private static final ClientLogger LOGGER = new ClientLogger(NameAvailabilityParameters.class); } 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 15516ffd4a45..a4cecbcf7698 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 @@ -5,30 +5,28 @@ package com.azure.resourcemanager.webpubsub.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** Network ACL. */ @Fluent public class NetworkAcl { - @JsonIgnore private final ClientLogger logger = new ClientLogger(NetworkAcl.class); - /* - * Allowed request types. The value can be one or more of: - * ClientConnection, ServerConnection, RESTAPI. + * Allowed request types. The value can be one or more of: ClientConnection, ServerConnection, RESTAPI. */ @JsonProperty(value = "allow") private List allow; /* - * Denied request types. The value can be one or more of: ClientConnection, - * ServerConnection, RESTAPI. + * Denied request types. The value can be one or more of: ClientConnection, ServerConnection, RESTAPI. */ @JsonProperty(value = "deny") private List deny; + /** 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. 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 cbcd019d1460..ff42de3760f6 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 @@ -23,7 +23,7 @@ public interface Operation { Boolean isDataAction(); /** - * Gets the display property: The object that describes the operation. + * Gets the display property: The object that describes a operation. * * @return the display value. */ @@ -38,7 +38,7 @@ public interface Operation { String origin(); /** - * Gets the properties property: Extra properties for the operation. + * Gets the properties property: Extra Operation properties. * * @return the properties value. */ 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 88c200777285..85485cfb3df0 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 @@ -5,15 +5,11 @@ package com.azure.resourcemanager.webpubsub.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** The object that describes a operation. */ @Fluent public final class OperationDisplay { - @JsonIgnore private final ClientLogger logger = new ClientLogger(OperationDisplay.class); - /* * Friendly name of the resource provider */ @@ -38,6 +34,10 @@ public final class OperationDisplay { @JsonProperty(value = "description") private String description; + /** Creates an instance of OperationDisplay class. */ + public OperationDisplay() { + } + /** * Get the provider property: Friendly name of the resource provider. * 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 487387f37196..6353ab1d3ef5 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 @@ -5,17 +5,13 @@ package com.azure.resourcemanager.webpubsub.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.webpubsub.fluent.models.OperationInner; -import com.fasterxml.jackson.annotation.JsonIgnore; 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. */ @Fluent public final class OperationList { - @JsonIgnore private final ClientLogger logger = new ClientLogger(OperationList.class); - /* * List of operations supported by the resource provider. */ @@ -23,13 +19,16 @@ public final class OperationList { private List value; /* - * The URL the client should use to fetch the next page (per server side - * paging). + * The URL the client should use to fetch the next page (per server side paging). * It's null for now, added for future use. */ @JsonProperty(value = "nextLink") private String nextLink; + /** Creates an instance of OperationList class. */ + public OperationList() { + } + /** * Get the value property: List of operations supported by the resource provider. * 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 100e1d699117..6fc7c704a717 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 @@ -5,23 +5,23 @@ package com.azure.resourcemanager.webpubsub.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Extra Operation properties. */ @Fluent public final class OperationProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(OperationProperties.class); - /* - * The service specifications. + * An object that describes a specification. */ @JsonProperty(value = "serviceSpecification") private ServiceSpecification serviceSpecification; + /** Creates an instance of OperationProperties class. */ + public OperationProperties() { + } + /** - * Get the serviceSpecification property: The service specifications. + * Get the serviceSpecification property: An object that describes a specification. * * @return the serviceSpecification value. */ @@ -30,7 +30,7 @@ public ServiceSpecification serviceSpecification() { } /** - * Set the serviceSpecification property: The service specifications. + * Set the serviceSpecification property: An object that describes a specification. * * @param serviceSpecification the serviceSpecification value to set. * @return the OperationProperties object itself. 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 18bd61263b55..fc85fac2d773 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 @@ -14,7 +14,7 @@ public interface Operations { * * @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. + * @return result of the request to list REST API operations as paginated response with {@link PagedIterable}. */ PagedIterable list(); @@ -25,7 +25,7 @@ public interface Operations { * @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 result of the request to list REST API operations. + * @return result of the request to list REST API operations as paginated response with {@link PagedIterable}. */ PagedIterable list(Context context); } 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 10a1a3963484..b2fffe71b2b7 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 @@ -5,21 +5,21 @@ package com.azure.resourcemanager.webpubsub.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Private endpoint. */ @Fluent public final class PrivateEndpoint { - @JsonIgnore private final ClientLogger logger = new ClientLogger(PrivateEndpoint.class); - /* * Full qualified Id of the private endpoint */ @JsonProperty(value = "id") private String id; + /** Creates an instance of PrivateEndpoint class. */ + public PrivateEndpoint() { + } + /** * Get the id property: Full qualified Id of the private endpoint. * 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 2f0fb3b61727..51169813d6d6 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 @@ -6,21 +6,22 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** ACL for a private endpoint. */ @Fluent public final class PrivateEndpointAcl extends NetworkAcl { - @JsonIgnore private final ClientLogger logger = new ClientLogger(PrivateEndpointAcl.class); - /* * Name of the private endpoint connection */ @JsonProperty(value = "name", required = true) private String name; + /** Creates an instance of PrivateEndpointAcl class. */ + public PrivateEndpointAcl() { + } + /** * Get the name property: Name of the private endpoint connection. * @@ -64,9 +65,11 @@ public PrivateEndpointAcl withDeny(List deny) { public void validate() { super.validate(); if (name() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException("Missing required property name in model PrivateEndpointAcl")); } } + + private static final ClientLogger LOGGER = new ClientLogger(PrivateEndpointAcl.class); } 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 8343c0515da7..28bb0cdeaa29 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 @@ -39,14 +39,14 @@ public interface PrivateEndpointConnection { SystemData systemData(); /** - * Gets the provisioningState property: Provisioning state of the private endpoint connection. + * Gets the provisioningState property: Provisioning state of the resource. * * @return the provisioningState value. */ ProvisioningState provisioningState(); /** - * Gets the privateEndpoint property: Private endpoint associated with the private endpoint connection. + * Gets the privateEndpoint property: Private endpoint. * * @return the privateEndpoint value. */ @@ -60,7 +60,7 @@ public interface PrivateEndpointConnection { List groupIds(); /** - * Gets the privateLinkServiceConnectionState property: Connection state. + * Gets the privateLinkServiceConnectionState property: Connection state of the private endpoint connection. * * @return the privateLinkServiceConnectionState value. */ 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 5663c4b8d710..2392a94c20ed 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 @@ -5,17 +5,13 @@ package com.azure.resourcemanager.webpubsub.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.webpubsub.fluent.models.PrivateEndpointConnectionInner; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** A list of private endpoint connections. */ @Fluent public final class PrivateEndpointConnectionList { - @JsonIgnore private final ClientLogger logger = new ClientLogger(PrivateEndpointConnectionList.class); - /* * The list of the private endpoint connections */ @@ -23,13 +19,16 @@ 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. */ + public PrivateEndpointConnectionList() { + } + /** * Get the value property: The list of the private endpoint connections. * 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 642609532ec5..0b11254b0d22 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 @@ -5,17 +5,13 @@ package com.azure.resourcemanager.webpubsub.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.webpubsub.fluent.models.PrivateLinkResourceInner; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** Contains a list of PrivateLinkResource and a possible link to query more results. */ @Fluent public final class PrivateLinkResourceList { - @JsonIgnore private final ClientLogger logger = new ClientLogger(PrivateLinkResourceList.class); - /* * List of PrivateLinkResource */ @@ -23,13 +19,16 @@ public final class PrivateLinkResourceList { private List value; /* - * The URL the client should use to fetch the next page (per server side - * paging). + * The URL the client should use to fetch the next page (per server side paging). * It's null for now, added for future use. */ @JsonProperty(value = "nextLink") private String nextLink; + /** Creates an instance of PrivateLinkResourceList class. */ + public PrivateLinkResourceList() { + } + /** * Get the value property: List of PrivateLinkResource. * 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 1390a4cc256f..86f1a39afc89 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 @@ -5,18 +5,13 @@ package com.azure.resourcemanager.webpubsub.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Connection state of the private endpoint connection. */ @Fluent public final class PrivateLinkServiceConnectionState { - @JsonIgnore private final ClientLogger logger = new ClientLogger(PrivateLinkServiceConnectionState.class); - /* - * 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. */ @JsonProperty(value = "status") private PrivateLinkServiceConnectionStatus status; @@ -28,12 +23,15 @@ public final class PrivateLinkServiceConnectionState { private String description; /* - * A message indicating if changes on the service provider require any - * updates on the consumer. + * A message indicating if changes on the service provider require any updates on the consumer. */ @JsonProperty(value = "actionsRequired") private String actionsRequired; + /** 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. 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 ac22d16ab28c..82e36e353224 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,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for PrivateLinkServiceConnectionStatus. */ +/** 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. */ public static final PrivateLinkServiceConnectionStatus PENDING = fromString("Pending"); @@ -33,7 +33,11 @@ public static PrivateLinkServiceConnectionStatus fromString(String name) { return fromString(name, PrivateLinkServiceConnectionStatus.class); } - /** @return known PrivateLinkServiceConnectionStatus values. */ + /** + * Gets known PrivateLinkServiceConnectionStatus values. + * + * @return known PrivateLinkServiceConnectionStatus values. + */ public static Collection values() { return values(PrivateLinkServiceConnectionStatus.class); } 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 4d7d9dececbf..931daf946938 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,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for ProvisioningState. */ +/** Provisioning state of the resource. */ public final class ProvisioningState extends ExpandableStringEnum { /** Static value Unknown for ProvisioningState. */ public static final ProvisioningState UNKNOWN = fromString("Unknown"); @@ -48,7 +48,11 @@ public static ProvisioningState fromString(String name) { return fromString(name, ProvisioningState.class); } - /** @return known ProvisioningState values. */ + /** + * Gets known ProvisioningState values. + * + * @return known ProvisioningState values. + */ public static Collection values() { return values(ProvisioningState.class); } 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 cefc6d4d3fa5..2d6fbac39093 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 @@ -5,24 +5,23 @@ package com.azure.resourcemanager.webpubsub.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Parameters describes the request to regenerate access keys. */ @Fluent public final class RegenerateKeyParameters { - @JsonIgnore private final ClientLogger logger = new ClientLogger(RegenerateKeyParameters.class); - /* - * The keyType to regenerate. Must be either 'primary' or - * 'secondary'(case-insensitive). + * The type of access key. */ @JsonProperty(value = "keyType") private KeyType keyType; + /** Creates an instance of RegenerateKeyParameters class. */ + public RegenerateKeyParameters() { + } + /** - * Get the keyType property: The keyType to regenerate. Must be either 'primary' or 'secondary'(case-insensitive). + * Get the keyType property: The type of access key. * * @return the keyType value. */ @@ -31,7 +30,7 @@ public KeyType keyType() { } /** - * Set the keyType property: The keyType to regenerate. Must be either 'primary' or 'secondary'(case-insensitive). + * Set the keyType property: The type of access key. * * @param keyType the keyType value to set. * @return the RegenerateKeyParameters object itself. 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 93928b7ae0ec..5444de0dd8c2 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 @@ -5,15 +5,11 @@ package com.azure.resourcemanager.webpubsub.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Resource log category configuration of a Microsoft.SignalRService resource. */ @Fluent public final class ResourceLogCategory { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ResourceLogCategory.class); - /* * Gets or sets the resource log category's name. * Available values: ConnectivityLogs, MessagingLogs. @@ -30,6 +26,10 @@ public final class ResourceLogCategory { @JsonProperty(value = "enabled") private String enabled; + /** 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. 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 86042f56fb4f..761cb73c22a7 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 @@ -5,22 +5,22 @@ package com.azure.resourcemanager.webpubsub.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** Resource log configuration of a Microsoft.SignalRService resource. */ @Fluent public final class ResourceLogConfiguration { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ResourceLogConfiguration.class); - /* * Gets or sets the list of category configurations. */ @JsonProperty(value = "categories") private List categories; + /** Creates an instance of ResourceLogConfiguration class. */ + public ResourceLogConfiguration() { + } + /** * Get the categories property: Gets or sets the list of category configurations. * 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 new file mode 100644 index 000000000000..67335bf2c72c --- /dev/null +++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/ResourceReference.java @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.webpubsub.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Reference to a resource. */ +@Fluent +public final class ResourceReference { + /* + * Resource ID. + */ + @JsonProperty(value = "id") + private String id; + + /** Creates an instance of ResourceReference class. */ + public ResourceReference() { + } + + /** + * Get the id property: Resource ID. + * + * @return the id value. + */ + public String id() { + return this.id; + } + + /** + * Set the id property: Resource ID. + * + * @param id the id value to set. + * @return the ResourceReference object itself. + */ + public ResourceReference withId(String id) { + this.id = id; + 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/ResourceSku.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/ResourceSku.java index 7544fe5ffe4c..5f45056f0cd2 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 @@ -6,18 +6,15 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** The billing information of the resource. */ @Fluent public final class ResourceSku { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ResourceSku.class); - /* * The name of the SKU. Required. * - * Allowed values: Standard_S1, Free_F1 + * Allowed values: Standard_S1, Free_F1, Premium_P1 */ @JsonProperty(value = "name", required = true) private String name; @@ -46,16 +43,21 @@ public final class ResourceSku { * Optional, integer. The unit count of the resource. 1 by default. * * If present, following values are allowed: - * Free: 1 - * Standard: 1,2,5,10,20,50,100 + * 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; */ @JsonProperty(value = "capacity") private Integer capacity; + /** Creates an instance of ResourceSku class. */ + public ResourceSku() { + } + /** * Get the name property: The name of the SKU. Required. * - *

Allowed values: Standard_S1, Free_F1. + *

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

Allowed values: Standard_S1, Free_F1. + *

Allowed values: Standard_S1, Free_F1, Premium_P1. * * @param name the name value to set. * @return the ResourceSku object itself. @@ -121,7 +123,8 @@ 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,5,10,20,50,100. + *

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;. * * @return the capacity value. */ @@ -132,7 +135,8 @@ 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,5,10,20,50,100. + *

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;. * * @param capacity the capacity value to set. * @return the ResourceSku object itself. @@ -149,9 +153,11 @@ public ResourceSku withCapacity(Integer capacity) { */ public void validate() { if (name() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException("Missing required property name in model ResourceSku")); } } + + private static final ClientLogger LOGGER = new ClientLogger(ResourceSku.class); } 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 a4254c8dd62d..2172087e1b9a 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,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for ScaleType. */ +/** The scale type applicable to the sku. */ public final class ScaleType extends ExpandableStringEnum { /** Static value None for ScaleType. */ public static final ScaleType NONE = fromString("None"); @@ -30,7 +30,11 @@ public static ScaleType fromString(String name) { return fromString(name, ScaleType.class); } - /** @return known ScaleType values. */ + /** + * Gets known ScaleType values. + * + * @return known ScaleType values. + */ public static Collection values() { return values(ScaleType.class); } diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/ServiceSpecification.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/ServiceSpecification.java index 6d22f6e48511..16666540e9bb 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 @@ -5,16 +5,12 @@ package com.azure.resourcemanager.webpubsub.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** An object that describes a specification. */ @Fluent public final class ServiceSpecification { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ServiceSpecification.class); - /* * Specifications of the Metrics for Azure Monitoring. */ @@ -27,6 +23,10 @@ public final class ServiceSpecification { @JsonProperty(value = "logSpecifications") private List logSpecifications; + /** Creates an instance of ServiceSpecification class. */ + public ServiceSpecification() { + } + /** * Get the metricSpecifications property: Specifications of the Metrics for Azure Monitoring. * 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 e423a68df4ad..cf3240cb9bfd 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 @@ -5,36 +5,33 @@ package com.azure.resourcemanager.webpubsub.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Describes the properties of a resource type that has been onboarded to private link service. */ @Fluent public final class ShareablePrivateLinkResourceProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ShareablePrivateLinkResourceProperties.class); - /* - * The description of the resource type that has been onboarded to private - * link service + * The description of the resource type that has been onboarded to private link service */ @JsonProperty(value = "description") private String description; /* - * The resource provider group id for the resource that has been onboarded - * to private link service + * The resource provider group id for the resource that has been onboarded to private link service */ @JsonProperty(value = "groupId") private String groupId; /* - * The resource provider type for the resource that has been onboarded to - * private link service + * The resource provider type for the resource that has been onboarded to private link service */ @JsonProperty(value = "type") private String type; + /** 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. 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 eca156f8b5d2..8059a7b041a5 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 @@ -5,29 +5,27 @@ package com.azure.resourcemanager.webpubsub.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Describes a resource type that has been onboarded to private link service. */ @Fluent public final class ShareablePrivateLinkResourceType { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ShareablePrivateLinkResourceType.class); - /* - * The name of the resource type that has been onboarded to private link - * service + * The name of the resource type that has been onboarded to private link service */ @JsonProperty(value = "name") private String name; /* - * 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 */ @JsonProperty(value = "properties") private ShareablePrivateLinkResourceProperties properties; + /** 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. * 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 10d62ed2b39f..059631955fd0 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 @@ -53,7 +53,7 @@ public interface SharedPrivateLinkResource { String privateLinkResourceId(); /** - * Gets the provisioningState property: Provisioning state of the shared private link resource. + * Gets the provisioningState property: Provisioning state of the resource. * * @return the provisioningState value. */ @@ -74,6 +74,13 @@ public interface SharedPrivateLinkResource { */ 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. * 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 ebd1438351ce..285564469460 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 @@ -5,17 +5,13 @@ package com.azure.resourcemanager.webpubsub.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.webpubsub.fluent.models.SharedPrivateLinkResourceInner; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** A list of shared private link resources. */ @Fluent public final class SharedPrivateLinkResourceList { - @JsonIgnore private final ClientLogger logger = new ClientLogger(SharedPrivateLinkResourceList.class); - /* * The list of the shared private link resources */ @@ -23,13 +19,16 @@ 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. */ + public SharedPrivateLinkResourceList() { + } + /** * Get the value property: The list of the shared private link resources. * diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/SharedPrivateLinkResourceStatus.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/SharedPrivateLinkResourceStatus.java index 865ef68bc82f..34079a891c8b 100644 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/SharedPrivateLinkResourceStatus.java +++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/SharedPrivateLinkResourceStatus.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for SharedPrivateLinkResourceStatus. */ +/** Status of the shared private link resource. */ public final class SharedPrivateLinkResourceStatus extends ExpandableStringEnum { /** Static value Pending for SharedPrivateLinkResourceStatus. */ public static final SharedPrivateLinkResourceStatus PENDING = fromString("Pending"); @@ -36,7 +36,11 @@ public static SharedPrivateLinkResourceStatus fromString(String name) { return fromString(name, SharedPrivateLinkResourceStatus.class); } - /** @return known SharedPrivateLinkResourceStatus values. */ + /** + * Gets known SharedPrivateLinkResourceStatus values. + * + * @return known SharedPrivateLinkResourceStatus values. + */ public static Collection values() { return values(SharedPrivateLinkResourceStatus.class); } 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 1b8759c977d3..717349f4dbf6 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 @@ -5,17 +5,13 @@ package com.azure.resourcemanager.webpubsub.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.webpubsub.fluent.models.SignalRServiceUsageInner; -import com.fasterxml.jackson.annotation.JsonIgnore; 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. */ @Fluent public final class SignalRServiceUsageList { - @JsonIgnore private final ClientLogger logger = new ClientLogger(SignalRServiceUsageList.class); - /* * List of the resource usages */ @@ -23,13 +19,16 @@ public final class SignalRServiceUsageList { private List value; /* - * The URL the client should use to fetch the next page (per server side - * paging). + * The URL the client should use to fetch the next page (per server side paging). * It's null for now, added for future use. */ @JsonProperty(value = "nextLink") private String nextLink; + /** Creates an instance of SignalRServiceUsageList class. */ + public SignalRServiceUsageList() { + } + /** * Get the value property: List of the resource usages. * 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 2627b9856392..2ecf56041da7 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 @@ -5,15 +5,11 @@ package com.azure.resourcemanager.webpubsub.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Localizable String object containing the name and a localized value. */ @Fluent public final class SignalRServiceUsageName { - @JsonIgnore private final ClientLogger logger = new ClientLogger(SignalRServiceUsageName.class); - /* * The identifier of the usage. */ @@ -26,6 +22,10 @@ public final class SignalRServiceUsageName { @JsonProperty(value = "localizedValue") private String localizedValue; + /** Creates an instance of SignalRServiceUsageName class. */ + public SignalRServiceUsageName() { + } + /** * Get the value property: The identifier of the usage. * 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 af3d5893653a..6bccc848777e 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 @@ -5,15 +5,11 @@ package com.azure.resourcemanager.webpubsub.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Describes an available sku.". */ @Immutable public final class Sku { - @JsonIgnore private final ClientLogger logger = new ClientLogger(Sku.class); - /* * The resource type that this object applies to */ @@ -21,17 +17,21 @@ public final class Sku { private String resourceType; /* - * The exact set of keys that define this sku. + * The billing information of the resource. */ @JsonProperty(value = "sku", access = JsonProperty.Access.WRITE_ONLY) private ResourceSku sku; /* - * Specifies the unit of the resource. + * Describes scaling information of a sku. */ @JsonProperty(value = "capacity", access = JsonProperty.Access.WRITE_ONLY) private SkuCapacity capacity; + /** Creates an instance of Sku class. */ + public Sku() { + } + /** * Get the resourceType property: The resource type that this object applies to. * @@ -42,7 +42,7 @@ public String resourceType() { } /** - * Get the sku property: The exact set of keys that define this sku. + * Get the sku property: The billing information of the resource. * * @return the sku value. */ @@ -51,7 +51,7 @@ public ResourceSku sku() { } /** - * Get the capacity property: Specifies the unit of the resource. + * Get the capacity property: Describes scaling information of a sku. * * @return the capacity value. */ 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 29666a6b3a78..35c6f457206c 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 @@ -5,16 +5,12 @@ package com.azure.resourcemanager.webpubsub.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** Describes scaling information of a sku. */ @Immutable public final class SkuCapacity { - @JsonIgnore private final ClientLogger logger = new ClientLogger(SkuCapacity.class); - /* * The lowest permitted capacity for this resource */ @@ -45,6 +41,10 @@ public final class SkuCapacity { @JsonProperty(value = "scaleType", access = JsonProperty.Access.WRITE_ONLY) private ScaleType scaleType; + /** Creates an instance of SkuCapacity class. */ + public SkuCapacity() { + } + /** * Get the minimum property: The lowest permitted capacity for this resource. * 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 c5657e1902eb..0d230110f47e 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 @@ -5,30 +5,29 @@ package com.azure.resourcemanager.webpubsub.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; -/** Upstream auth settings. */ +/** Upstream auth settings. If not set, no auth is used for upstream messages. */ @Fluent public final class UpstreamAuthSettings { - @JsonIgnore private final ClientLogger logger = new ClientLogger(UpstreamAuthSettings.class); - /* - * Gets or sets the type of auth. None or ManagedIdentity is supported now. + * Upstream auth type enum. */ @JsonProperty(value = "type") private UpstreamAuthType type; /* - * Gets or sets the managed identity settings. It's required if the auth - * type is set to ManagedIdentity. + * Managed identity settings for upstream. */ @JsonProperty(value = "managedIdentity") private ManagedIdentitySettings managedIdentity; + /** Creates an instance of UpstreamAuthSettings class. */ + public UpstreamAuthSettings() { + } + /** - * Get the type property: Gets or sets the type of auth. None or ManagedIdentity is supported now. + * Get the type property: Upstream auth type enum. * * @return the type value. */ @@ -37,7 +36,7 @@ public UpstreamAuthType type() { } /** - * Set the type property: Gets or sets the type of auth. None or ManagedIdentity is supported now. + * Set the type property: Upstream auth type enum. * * @param type the type value to set. * @return the UpstreamAuthSettings object itself. @@ -48,8 +47,7 @@ public UpstreamAuthSettings withType(UpstreamAuthType type) { } /** - * Get the managedIdentity property: Gets or sets the managed identity settings. It's required if the auth type is - * set to ManagedIdentity. + * Get the managedIdentity property: Managed identity settings for upstream. * * @return the managedIdentity value. */ @@ -58,8 +56,7 @@ public ManagedIdentitySettings managedIdentity() { } /** - * Set the managedIdentity property: Gets or sets the managed identity settings. It's required if the auth type is - * set to ManagedIdentity. + * Set the managedIdentity property: Managed identity settings for upstream. * * @param managedIdentity the managedIdentity value to set. * @return the UpstreamAuthSettings object itself. 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 373149c1b02a..54af3b54b990 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,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for UpstreamAuthType. */ +/** Upstream auth type enum. */ public final class UpstreamAuthType extends ExpandableStringEnum { /** Static value None for UpstreamAuthType. */ public static final UpstreamAuthType NONE = fromString("None"); @@ -27,7 +27,11 @@ public static UpstreamAuthType fromString(String name) { return fromString(name, UpstreamAuthType.class); } - /** @return known UpstreamAuthType values. */ + /** + * Gets known UpstreamAuthType values. + * + * @return known UpstreamAuthType values. + */ public static Collection values() { return values(UpstreamAuthType.class); } 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 84983796084a..7edee1218a36 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 @@ -16,7 +16,8 @@ public interface Usages { * @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. + * @return object that includes an array of the resource usages and a possible link for next set as paginated + * response with {@link PagedIterable}. */ PagedIterable list(String location); @@ -28,7 +29,8 @@ public interface Usages { * @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. + * @return object that includes an array of the resource usages and a possible link for next set as paginated + * 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 9f190dec71ca..4ad41a3ee67f 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 @@ -5,15 +5,11 @@ package com.azure.resourcemanager.webpubsub.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Properties of user assigned identity. */ @Immutable public final class UserAssignedIdentityProperty { - @JsonIgnore private final ClientLogger logger = new ClientLogger(UserAssignedIdentityProperty.class); - /* * Get the principal id for the user assigned identity */ @@ -26,6 +22,10 @@ public final class UserAssignedIdentityProperty { @JsonProperty(value = "clientId", access = JsonProperty.Access.WRITE_ONLY) private String clientId; + /** Creates an instance of UserAssignedIdentityProperty class. */ + public UserAssignedIdentityProperty() { + } + /** * Get the principalId property: Get the principal id for the user assigned identity. * 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 new file mode 100644 index 000000000000..58db8d19c280 --- /dev/null +++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/WebPubSubCustomCertificates.java @@ -0,0 +1,151 @@ +// 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 WebPubSubCustomCertificates. */ +public interface WebPubSubCustomCertificates { + /** + * List all custom certificates. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param 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 custom certificates list as paginated response with {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String resourceName); + + /** + * List all custom certificates. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param 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 custom certificates list as paginated response with {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String resourceName, Context context); + + /** + * Get a custom certificate. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param resourceName The name of the resource. + * @param certificateName Custom certificate name. + * @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 custom certificate along with {@link Response}. + */ + Response getWithResponse( + String resourceGroupName, String resourceName, String certificateName, Context context); + + /** + * Get a custom certificate. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param resourceName The name of the resource. + * @param certificateName Custom certificate name. + * @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 custom certificate. + */ + CustomCertificate get(String resourceGroupName, String resourceName, String certificateName); + + /** + * Delete a custom certificate. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param resourceName The name of the resource. + * @param certificateName Custom certificate name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + Response deleteWithResponse( + String resourceGroupName, String resourceName, String certificateName, Context context); + + /** + * Delete a custom certificate. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param resourceName The name of the resource. + * @param certificateName Custom certificate name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, String resourceName, String certificateName); + + /** + * 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. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a custom certificate along with {@link Response}. + */ + CustomCertificate getById(String id); + + /** + * 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. + * @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 custom certificate along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * 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. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteById(String id); + + /** + * 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. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + Response deleteByIdWithResponse(String id, Context context); + + /** + * Begins definition for a new CustomCertificate resource. + * + * @param name resource name. + * @return the first stage of the new CustomCertificate definition. + */ + CustomCertificate.DefinitionStages.Blank define(String name); +} 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 new file mode 100644 index 000000000000..4bcb90b59690 --- /dev/null +++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/WebPubSubCustomDomains.java @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.webpubsub.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +/** Resource collection API of WebPubSubCustomDomains. */ +public interface WebPubSubCustomDomains { + /** + * List all custom domains. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param 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 custom domains list as paginated response with {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String resourceName); + + /** + * List all custom domains. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param 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 custom domains list as paginated response with {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String resourceName, Context context); + + /** + * Get a custom domain. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param resourceName The name of the resource. + * @param name Custom domain name. + * @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 custom domain along with {@link Response}. + */ + Response getWithResponse(String resourceGroupName, String resourceName, String name, Context context); + + /** + * Get a custom domain. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param resourceName The name of the resource. + * @param name Custom domain name. + * @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 custom domain. + */ + CustomDomain get(String resourceGroupName, String resourceName, String name); + + /** + * Delete a custom domain. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param resourceName The name of the resource. + * @param name Custom domain name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, String resourceName, String name); + + /** + * Delete a custom domain. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value + * from the Azure Resource Manager API or the portal. + * @param resourceName The name of the resource. + * @param name Custom domain name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, String resourceName, String name, Context context); + + /** + * 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. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a custom domain along with {@link Response}. + */ + CustomDomain getById(String id); + + /** + * 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. + * @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 custom domain along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * 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. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteById(String id); + + /** + * 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. + * @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 CustomDomain resource. + * + * @param name resource name. + * @return the first stage of the new CustomDomain definition. + */ + CustomDomain.DefinitionStages.Blank define(String name); +} diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/WebPubSubHub.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/WebPubSubHub.java index 25850cc0c6b0..ef815947c3dd 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 @@ -39,12 +39,19 @@ public interface WebPubSubHub { SystemData systemData(); /** - * Gets the properties property: Properties of the hub setting. + * Gets the properties property: Properties of a hub. * * @return the properties value. */ WebPubSubHubProperties properties(); + /** + * 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. * @@ -79,9 +86,9 @@ interface WithParentResource { /** The stage of the WebPubSubHub definition allowing to specify properties. */ interface WithProperties { /** - * Specifies the properties property: Properties of the hub setting.. + * Specifies the properties property: Properties of a hub.. * - * @param properties Properties of the hub setting. + * @param properties Properties of a hub. * @return the next definition stage. */ WithCreate withProperties(WebPubSubHubProperties properties); @@ -136,9 +143,9 @@ interface UpdateStages { /** The stage of the WebPubSubHub update allowing to specify properties. */ interface WithProperties { /** - * Specifies the properties property: Properties of the hub setting.. + * Specifies the properties property: Properties of a hub.. * - * @param properties Properties of the hub setting. + * @param properties Properties of a hub. * @return the next definition stage. */ Update withProperties(WebPubSubHubProperties properties); diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/WebPubSubHubList.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/WebPubSubHubList.java index 709277747b16..8b10a1a8e49c 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 @@ -5,17 +5,13 @@ package com.azure.resourcemanager.webpubsub.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.webpubsub.fluent.models.WebPubSubHubInner; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** Hub setting list. */ @Fluent public final class WebPubSubHubList { - @JsonIgnore private final ClientLogger logger = new ClientLogger(WebPubSubHubList.class); - /* * List of hub settings to this resource. */ @@ -23,13 +19,16 @@ public final class WebPubSubHubList { private List value; /* - * The URL the client should use to fetch the next page (per server side - * paging). + * The URL the client should use to fetch the next page (per server side paging). * It's null for now, added for future use. */ @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; + /** Creates an instance of WebPubSubHubList class. */ + public WebPubSubHubList() { + } + /** * Get the value property: List of hub settings to this resource. * 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 ae2b6d2bcd93..880278dc85be 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 @@ -5,16 +5,12 @@ package com.azure.resourcemanager.webpubsub.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** Properties of a hub. */ @Fluent public final class WebPubSubHubProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(WebPubSubHubProperties.class); - /* * Event handler of a hub. */ @@ -22,12 +18,27 @@ public final class WebPubSubHubProperties { private List eventHandlers; /* - * The settings for configuring if anonymous connections are allowed for - * this hub: "allow" or "deny". Default to "deny". + * 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. + */ + @JsonProperty(value = "eventListeners") + private List eventListeners; + + /* + * 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. */ + public WebPubSubHubProperties() { + } + /** * Get the eventHandlers property: Event handler of a hub. * @@ -48,6 +59,32 @@ public WebPubSubHubProperties withEventHandlers(List eventHandlers return this; } + /** + * 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() { + return this.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. + * + * @param eventListeners the eventListeners value to set. + * @return the WebPubSubHubProperties object itself. + */ + public WebPubSubHubProperties withEventListeners(List eventListeners) { + this.eventListeners = eventListeners; + return this; + } + /** * Get the anonymousConnectPolicy property: The settings for configuring if anonymous connections are allowed for * this hub: "allow" or "deny". Default to "deny". @@ -79,5 +116,8 @@ public void validate() { if (eventHandlers() != null) { eventHandlers().forEach(e -> e.validate()); } + if (eventListeners() != null) { + eventListeners().forEach(e -> e.validate()); + } } } diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/WebPubSubHubs.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/WebPubSubHubs.java index 8ba35f6fb36b..3a5262283a11 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 @@ -19,7 +19,7 @@ public interface WebPubSubHubs { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return hub setting list. + * @return hub setting list as paginated response with {@link PagedIterable}. */ PagedIterable list(String resourceGroupName, String resourceName); @@ -33,7 +33,7 @@ public interface WebPubSubHubs { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return hub setting list. + * @return hub setting list as paginated response with {@link PagedIterable}. */ PagedIterable list(String resourceGroupName, String resourceName, Context context); @@ -44,12 +44,14 @@ public interface WebPubSubHubs { * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value * from the Azure Resource Manager API or the portal. * @param resourceName The name of the resource. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a hub setting. + * @return a hub setting along with {@link Response}. */ - WebPubSubHub get(String hubName, String resourceGroupName, String resourceName); + Response getWithResponse( + String hubName, String resourceGroupName, String resourceName, Context context); /** * Get a hub setting. @@ -58,14 +60,12 @@ public interface WebPubSubHubs { * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value * from the Azure Resource Manager API or the portal. * @param resourceName The name of the resource. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a hub setting. */ - Response getWithResponse( - String hubName, String resourceGroupName, String resourceName, Context context); + WebPubSubHub get(String hubName, String resourceGroupName, String resourceName); /** * Delete a hub setting. @@ -101,7 +101,7 @@ Response getWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a hub setting. + * @return a hub setting along with {@link Response}. */ WebPubSubHub getById(String id); @@ -113,7 +113,7 @@ Response getWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a hub setting. + * @return a hub setting along with {@link Response}. */ Response getByIdWithResponse(String id, Context context); 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 f25999a1d547..c1e84fb95031 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 @@ -5,24 +5,20 @@ package com.azure.resourcemanager.webpubsub.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** Network ACLs for the resource. */ @Fluent public final class WebPubSubNetworkACLs { - @JsonIgnore private final ClientLogger logger = new ClientLogger(WebPubSubNetworkACLs.class); - /* - * Default action when no other rule matches + * Azure Networking ACL Action. */ @JsonProperty(value = "defaultAction") private AclAction defaultAction; /* - * ACL for requests from public network + * Network ACL */ @JsonProperty(value = "publicNetwork") private NetworkAcl publicNetwork; @@ -33,8 +29,12 @@ public final class WebPubSubNetworkACLs { @JsonProperty(value = "privateEndpoints") private List privateEndpoints; + /** Creates an instance of WebPubSubNetworkACLs class. */ + public WebPubSubNetworkACLs() { + } + /** - * Get the defaultAction property: Default action when no other rule matches. + * Get the defaultAction property: Azure Networking ACL Action. * * @return the defaultAction value. */ @@ -43,7 +43,7 @@ public AclAction defaultAction() { } /** - * Set the defaultAction property: Default action when no other rule matches. + * Set the defaultAction property: Azure Networking ACL Action. * * @param defaultAction the defaultAction value to set. * @return the WebPubSubNetworkACLs object itself. @@ -54,7 +54,7 @@ public WebPubSubNetworkACLs withDefaultAction(AclAction defaultAction) { } /** - * Get the publicNetwork property: ACL for requests from public network. + * Get the publicNetwork property: Network ACL. * * @return the publicNetwork value. */ @@ -63,7 +63,7 @@ public NetworkAcl publicNetwork() { } /** - * Set the publicNetwork property: ACL for requests from public network. + * Set the publicNetwork property: Network ACL. * * @param publicNetwork the publicNetwork value to set. * @return the WebPubSubNetworkACLs object itself. 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 66d331344b99..b82480538142 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 @@ -20,7 +20,7 @@ public interface WebPubSubPrivateEndpointConnections { * @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 private endpoint connections. + * @return a list of private endpoint connections as paginated response with {@link PagedIterable}. */ PagedIterable list(String resourceGroupName, String resourceName); @@ -34,7 +34,7 @@ public interface WebPubSubPrivateEndpointConnections { * @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 private endpoint connections. + * @return a list of private endpoint connections as paginated response with {@link PagedIterable}. */ PagedIterable list(String resourceGroupName, String resourceName, Context context); @@ -45,12 +45,14 @@ public interface WebPubSubPrivateEndpointConnections { * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value * from the Azure Resource Manager API or the portal. * @param resourceName The name of the resource. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the specified private endpoint connection. + * @return the specified private endpoint connection along with {@link Response}. */ - PrivateEndpointConnection get(String privateEndpointConnectionName, String resourceGroupName, String resourceName); + Response getWithResponse( + String privateEndpointConnectionName, String resourceGroupName, String resourceName, Context context); /** * Get the specified private endpoint connection. @@ -59,14 +61,12 @@ public interface WebPubSubPrivateEndpointConnections { * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value * from the Azure Resource Manager API or the portal. * @param resourceName The name of the resource. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the specified private endpoint connection. */ - Response getWithResponse( - String privateEndpointConnectionName, String resourceGroupName, String resourceName, Context context); + PrivateEndpointConnection get(String privateEndpointConnectionName, String resourceGroupName, String resourceName); /** * Update the state of specified private endpoint connection. @@ -76,16 +76,18 @@ Response getWithResponse( * from the Azure Resource Manager API or the portal. * @param resourceName The name of the resource. * @param parameters The resource of private endpoint and its properties. + * @param context The context to associate with this operation. * @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 private endpoint connection to an azure resource. + * @return a private endpoint connection to an azure resource along with {@link Response}. */ - PrivateEndpointConnection update( + Response updateWithResponse( String privateEndpointConnectionName, String resourceGroupName, String resourceName, - PrivateEndpointConnectionInner parameters); + PrivateEndpointConnectionInner parameters, + Context context); /** * Update the state of specified private endpoint connection. @@ -95,18 +97,16 @@ PrivateEndpointConnection update( * from the Azure Resource Manager API or the portal. * @param resourceName The name of the resource. * @param parameters The resource of private endpoint and its properties. - * @param context The context to associate with this operation. * @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 private endpoint connection to an azure resource. */ - Response updateWithResponse( + PrivateEndpointConnection update( String privateEndpointConnectionName, String resourceGroupName, String resourceName, - PrivateEndpointConnectionInner parameters, - Context context); + PrivateEndpointConnectionInner parameters); /** * Delete the specified private endpoint connection. 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 9b29a4c60619..3384d177874f 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 @@ -18,7 +18,8 @@ public interface WebPubSubPrivateLinkResources { * @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. + * @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); @@ -32,7 +33,8 @@ public interface WebPubSubPrivateLinkResources { * @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. + * @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/WebPubSubRequestType.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/main/java/com/azure/resourcemanager/webpubsub/models/WebPubSubRequestType.java index be5d25bc755e..6b95bbfb1be3 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,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for WebPubSubRequestType. */ +/** The incoming request type to the service. */ public final class WebPubSubRequestType extends ExpandableStringEnum { /** Static value ClientConnection for WebPubSubRequestType. */ public static final WebPubSubRequestType CLIENT_CONNECTION = fromString("ClientConnection"); @@ -33,7 +33,11 @@ public static WebPubSubRequestType fromString(String name) { return fromString(name, WebPubSubRequestType.class); } - /** @return known WebPubSubRequestType values. */ + /** + * Gets known WebPubSubRequestType values. + * + * @return known WebPubSubRequestType values. + */ public static Collection values() { return values(WebPubSubRequestType.class); } 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 bcb704a905f5..c5a8c61aa57a 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 @@ -50,14 +50,14 @@ public interface WebPubSubResource { Map tags(); /** - * Gets the sku property: The billing information of the resource.(e.g. Free, Standard). + * Gets the sku property: The billing information of the resource. * * @return the sku value. */ ResourceSku sku(); /** - * Gets the identity property: The managed identity response. + * Gets the identity property: A class represent managed identities used for request and response. * * @return the identity value. */ @@ -129,7 +129,7 @@ public interface WebPubSubResource { List sharedPrivateLinkResources(); /** - * Gets the tls property: TLS settings. + * Gets the tls property: TLS settings for the resource. * * @return the tls value. */ @@ -150,17 +150,14 @@ public interface WebPubSubResource { LiveTraceConfiguration liveTraceConfiguration(); /** - * Gets the resourceLogConfiguration property: Resource log configuration of a Microsoft.SignalRService resource. If - * resourceLogConfiguration isn't null or empty, it will override options "EnableConnectivityLog" and - * "EnableMessagingLogs" in features. Otherwise, use options "EnableConnectivityLog" and "EnableMessagingLogs" in - * features. + * Gets the resourceLogConfiguration property: Resource log configuration of a Microsoft.SignalRService resource. * * @return the resourceLogConfiguration value. */ ResourceLogConfiguration resourceLogConfiguration(); /** - * Gets the networkACLs property: Network ACLs. + * Gets the networkACLs property: Network ACLs for the resource. * * @return the networkACLs value. */ @@ -205,6 +202,13 @@ public interface WebPubSubResource { */ 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. * @@ -296,9 +300,9 @@ interface WithTags { /** The stage of the WebPubSubResource definition allowing to specify sku. */ interface WithSku { /** - * Specifies the sku property: The billing information of the resource.(e.g. Free, Standard). + * Specifies the sku property: The billing information of the resource.. * - * @param sku The billing information of the resource.(e.g. Free, Standard). + * @param sku The billing information of the resource. * @return the next definition stage. */ WithCreate withSku(ResourceSku sku); @@ -306,9 +310,9 @@ interface WithSku { /** The stage of the WebPubSubResource definition allowing to specify identity. */ interface WithIdentity { /** - * Specifies the identity property: The managed identity response. + * Specifies the identity property: A class represent managed identities used for request and response. * - * @param identity The managed identity response. + * @param identity A class represent managed identities used for request and response. * @return the next definition stage. */ WithCreate withIdentity(ManagedIdentity identity); @@ -316,9 +320,9 @@ interface WithIdentity { /** The stage of the WebPubSubResource definition allowing to specify tls. */ interface WithTls { /** - * Specifies the tls property: TLS settings.. + * Specifies the tls property: TLS settings for the resource. * - * @param tls TLS settings. + * @param tls TLS settings for the resource. * @return the next definition stage. */ WithCreate withTls(WebPubSubTlsSettings tls); @@ -338,14 +342,9 @@ interface WithLiveTraceConfiguration { interface WithResourceLogConfiguration { /** * Specifies the resourceLogConfiguration property: Resource log configuration of a Microsoft.SignalRService - * resource. If resourceLogConfiguration isn't null or empty, it will override options - * "EnableConnectivityLog" and "EnableMessagingLogs" in features. Otherwise, use options - * "EnableConnectivityLog" and "EnableMessagingLogs" in features.. + * resource.. * - * @param resourceLogConfiguration Resource log configuration of a Microsoft.SignalRService resource. If - * resourceLogConfiguration isn't null or empty, it will override options "EnableConnectivityLog" and - * "EnableMessagingLogs" in features. Otherwise, use options "EnableConnectivityLog" and - * "EnableMessagingLogs" in features. + * @param resourceLogConfiguration Resource log configuration of a Microsoft.SignalRService resource. * @return the next definition stage. */ WithCreate withResourceLogConfiguration(ResourceLogConfiguration resourceLogConfiguration); @@ -353,9 +352,9 @@ interface WithResourceLogConfiguration { /** The stage of the WebPubSubResource definition allowing to specify networkACLs. */ interface WithNetworkACLs { /** - * Specifies the networkACLs property: Network ACLs. + * Specifies the networkACLs property: Network ACLs for the resource. * - * @param networkACLs Network ACLs. + * @param networkACLs Network ACLs for the resource. * @return the next definition stage. */ WithCreate withNetworkACLs(WebPubSubNetworkACLs networkACLs); @@ -448,9 +447,9 @@ interface WithTags { /** The stage of the WebPubSubResource update allowing to specify sku. */ interface WithSku { /** - * Specifies the sku property: The billing information of the resource.(e.g. Free, Standard). + * Specifies the sku property: The billing information of the resource.. * - * @param sku The billing information of the resource.(e.g. Free, Standard). + * @param sku The billing information of the resource. * @return the next definition stage. */ Update withSku(ResourceSku sku); @@ -458,9 +457,9 @@ interface WithSku { /** The stage of the WebPubSubResource update allowing to specify identity. */ interface WithIdentity { /** - * Specifies the identity property: The managed identity response. + * Specifies the identity property: A class represent managed identities used for request and response. * - * @param identity The managed identity response. + * @param identity A class represent managed identities used for request and response. * @return the next definition stage. */ Update withIdentity(ManagedIdentity identity); @@ -468,9 +467,9 @@ interface WithIdentity { /** The stage of the WebPubSubResource update allowing to specify tls. */ interface WithTls { /** - * Specifies the tls property: TLS settings.. + * Specifies the tls property: TLS settings for the resource. * - * @param tls TLS settings. + * @param tls TLS settings for the resource. * @return the next definition stage. */ Update withTls(WebPubSubTlsSettings tls); @@ -490,14 +489,9 @@ interface WithLiveTraceConfiguration { interface WithResourceLogConfiguration { /** * Specifies the resourceLogConfiguration property: Resource log configuration of a Microsoft.SignalRService - * resource. If resourceLogConfiguration isn't null or empty, it will override options - * "EnableConnectivityLog" and "EnableMessagingLogs" in features. Otherwise, use options - * "EnableConnectivityLog" and "EnableMessagingLogs" in features.. + * resource.. * - * @param resourceLogConfiguration Resource log configuration of a Microsoft.SignalRService resource. If - * resourceLogConfiguration isn't null or empty, it will override options "EnableConnectivityLog" and - * "EnableMessagingLogs" in features. Otherwise, use options "EnableConnectivityLog" and - * "EnableMessagingLogs" in features. + * @param resourceLogConfiguration Resource log configuration of a Microsoft.SignalRService resource. * @return the next definition stage. */ Update withResourceLogConfiguration(ResourceLogConfiguration resourceLogConfiguration); @@ -505,9 +499,9 @@ interface WithResourceLogConfiguration { /** The stage of the WebPubSubResource update allowing to specify networkACLs. */ interface WithNetworkACLs { /** - * Specifies the networkACLs property: Network ACLs. + * Specifies the networkACLs property: Network ACLs for the resource. * - * @param networkACLs Network ACLs. + * @param networkACLs Network ACLs for the resource. * @return the next definition stage. */ Update withNetworkACLs(WebPubSubNetworkACLs networkACLs); @@ -569,22 +563,22 @@ interface WithDisableAadAuth { /** * 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. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the access keys of the resource. + * @return the access keys of the resource along with {@link Response}. */ - WebPubSubKeys listKeys(); + Response listKeysWithResponse(Context context); /** * 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. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the access keys of the resource. */ - Response listKeysWithResponse(Context context); + WebPubSubKeys listKeys(); /** * Regenerate the access key for the resource. PrimaryKey and SecondaryKey cannot be regenerated at the same time. 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 c492df9c5eb7..b8968f71283c 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 @@ -5,17 +5,13 @@ package com.azure.resourcemanager.webpubsub.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.webpubsub.fluent.models.WebPubSubResourceInner; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** Object that includes an array of resources and a possible link for next set. */ @Fluent public final class WebPubSubResourceList { - @JsonIgnore private final ClientLogger logger = new ClientLogger(WebPubSubResourceList.class); - /* * List of the resources */ @@ -23,13 +19,16 @@ public final class WebPubSubResourceList { private List value; /* - * The URL the client should use to fetch the next page (per server side - * paging). + * The URL the client should use to fetch the next page (per server side paging). * It's null for now, added for future use. */ @JsonProperty(value = "nextLink") private String nextLink; + /** Creates an instance of WebPubSubResourceList class. */ + public WebPubSubResourceList() { + } + /** * Get the value property: List of the resources. * 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 c8fe46497006..c23a66e8cbf1 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 @@ -19,7 +19,7 @@ public interface WebPubSubSharedPrivateLinkResources { * @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. + * @return a list of shared private link resources as paginated response with {@link PagedIterable}. */ PagedIterable list(String resourceGroupName, String resourceName); @@ -33,7 +33,7 @@ public interface WebPubSubSharedPrivateLinkResources { * @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. + * @return a list of shared private link resources as paginated response with {@link PagedIterable}. */ PagedIterable list(String resourceGroupName, String resourceName, Context context); @@ -44,12 +44,14 @@ public interface WebPubSubSharedPrivateLinkResources { * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value * from the Azure Resource Manager API or the portal. * @param resourceName The name of the resource. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the specified shared private link resource. + * @return the specified shared private link resource along with {@link Response}. */ - SharedPrivateLinkResource get(String sharedPrivateLinkResourceName, String resourceGroupName, String resourceName); + Response getWithResponse( + String sharedPrivateLinkResourceName, String resourceGroupName, String resourceName, Context context); /** * Get the specified shared private link resource. @@ -58,14 +60,12 @@ public interface WebPubSubSharedPrivateLinkResources { * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value * from the Azure Resource Manager API or the portal. * @param resourceName The name of the resource. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the specified shared private link resource. */ - Response getWithResponse( - String sharedPrivateLinkResourceName, String resourceGroupName, String resourceName, Context context); + SharedPrivateLinkResource get(String sharedPrivateLinkResourceName, String resourceGroupName, String resourceName); /** * Delete the specified shared private link resource. @@ -101,7 +101,7 @@ Response getWithResponse( * @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. + * @return the specified shared private link resource along with {@link Response}. */ SharedPrivateLinkResource getById(String id); @@ -113,7 +113,7 @@ Response getWithResponse( * @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. + * @return the specified shared private link resource along with {@link Response}. */ Response getByIdWithResponse(String id, 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 f0fced00899f..9e5c0fb80c24 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 @@ -8,7 +8,11 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for WebPubSubSkuTier. */ +/** + * Optional tier of this particular SKU. 'Standard' or 'Free'. + * + *

`Basic` is deprecated, use `Standard` instead. + */ public final class WebPubSubSkuTier extends ExpandableStringEnum { /** Static value Free for WebPubSubSkuTier. */ public static final WebPubSubSkuTier FREE = fromString("Free"); @@ -33,7 +37,11 @@ public static WebPubSubSkuTier fromString(String name) { return fromString(name, WebPubSubSkuTier.class); } - /** @return known WebPubSubSkuTier values. */ + /** + * Gets known WebPubSubSkuTier values. + * + * @return known WebPubSubSkuTier values. + */ public static Collection values() { return values(WebPubSubSkuTier.class); } 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 fa04288c8223..5fc2ce0d61a1 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 @@ -5,21 +5,21 @@ package com.azure.resourcemanager.webpubsub.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** TLS settings for the resource. */ @Fluent public final class WebPubSubTlsSettings { - @JsonIgnore private final ClientLogger logger = new ClientLogger(WebPubSubTlsSettings.class); - /* * Request client certificate during TLS handshake if enabled */ @JsonProperty(value = "clientCertEnabled") private Boolean clientCertEnabled; + /** Creates an instance of WebPubSubTlsSettings class. */ + public WebPubSubTlsSettings() { + } + /** * Get the clientCertEnabled property: Request client certificate during TLS handshake if enabled. * 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 b4d18322ac0b..8a598410b6f8 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 @@ -15,33 +15,34 @@ public interface WebPubSubs { * * @param location the region. * @param parameters Parameters supplied to the operation. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the request to check name availability. + * @return result of the request to check name availability along with {@link Response}. */ - NameAvailability checkNameAvailability(String location, NameAvailabilityParameters parameters); + 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. - * @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 result of the request to check name availability. */ - Response checkNameAvailabilityWithResponse( - String location, NameAvailabilityParameters parameters, Context context); + NameAvailability checkNameAvailability(String location, NameAvailabilityParameters parameters); /** * 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. + * @return object that includes an array of resources and a possible link for next set as paginated response with + * {@link PagedIterable}. */ PagedIterable list(); @@ -52,7 +53,8 @@ Response checkNameAvailabilityWithResponse( * @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. + * @return object that includes an array of resources and a possible link for next set as paginated response with + * {@link PagedIterable}. */ PagedIterable list(Context context); @@ -64,7 +66,8 @@ Response checkNameAvailabilityWithResponse( * @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. + * @return object that includes an array of resources and a possible link for next set as paginated response with + * {@link PagedIterable}. */ PagedIterable listByResourceGroup(String resourceGroupName); @@ -77,7 +80,8 @@ Response checkNameAvailabilityWithResponse( * @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. + * @return object that includes an array of resources and a possible link for next set as paginated response with + * {@link PagedIterable}. */ PagedIterable listByResourceGroup(String resourceGroupName, Context context); @@ -87,12 +91,14 @@ Response checkNameAvailabilityWithResponse( * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value * from the Azure Resource Manager API or the portal. * @param resourceName The name of the resource. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the resource and its properties. + * @return the resource and its properties along with {@link Response}. */ - WebPubSubResource getByResourceGroup(String resourceGroupName, String resourceName); + Response getByResourceGroupWithResponse( + String resourceGroupName, String resourceName, Context context); /** * Get the resource and its properties. @@ -100,14 +106,12 @@ Response checkNameAvailabilityWithResponse( * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value * from the Azure Resource Manager API or the portal. * @param resourceName The name of the resource. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the resource and its properties. */ - Response getByResourceGroupWithResponse( - String resourceGroupName, String resourceName, Context context); + WebPubSubResource getByResourceGroup(String resourceGroupName, String resourceName); /** * Operation to delete a resource. @@ -140,12 +144,13 @@ Response getByResourceGroupWithResponse( * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value * from the Azure Resource Manager API or the portal. * @param resourceName The name of the resource. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the access keys of the resource. + * @return the access keys of the resource along with {@link Response}. */ - WebPubSubKeys listKeys(String resourceGroupName, String resourceName); + Response listKeysWithResponse(String resourceGroupName, String resourceName, Context context); /** * Get the access keys of the resource. @@ -153,13 +158,12 @@ Response getByResourceGroupWithResponse( * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value * from the Azure Resource Manager API or the portal. * @param resourceName The name of the resource. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the access keys of the resource. */ - Response listKeysWithResponse(String resourceGroupName, String resourceName, Context context); + WebPubSubKeys listKeys(String resourceGroupName, String resourceName); /** * Regenerate the access key for the resource. PrimaryKey and SecondaryKey cannot be regenerated at the same time. @@ -222,12 +226,13 @@ WebPubSubKeys regenerateKey( * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value * from the Azure Resource Manager API or the portal. * @param resourceName The name of the resource. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list skus operation response. + * @return the list skus operation response along with {@link Response}. */ - SkuList listSkus(String resourceGroupName, String resourceName); + Response listSkusWithResponse(String resourceGroupName, String resourceName, Context context); /** * List all available skus of the resource. @@ -235,13 +240,12 @@ WebPubSubKeys regenerateKey( * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value * from the Azure Resource Manager API or the portal. * @param resourceName The name of the resource. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the list skus operation response. */ - Response listSkusWithResponse(String resourceGroupName, String resourceName, Context context); + SkuList listSkus(String resourceGroupName, String resourceName); /** * Get the resource and its properties. @@ -250,7 +254,7 @@ WebPubSubKeys regenerateKey( * @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 resource and its properties. + * @return the resource and its properties along with {@link Response}. */ WebPubSubResource getById(String id); @@ -262,7 +266,7 @@ WebPubSubKeys regenerateKey( * @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 resource and its properties. + * @return the resource and its properties along with {@link Response}. */ Response getByIdWithResponse(String id, Context context); 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 d7695501cace..266ac814e962 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 @@ -9,7 +9,7 @@ /** Samples for Operations List. */ public final class OperationsListSamples { /* - * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2021-10-01/examples/Operations_List.json + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/preview/2022-08-01-preview/examples/Operations_List.json */ /** * Sample code: Operations_List. diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/generated/UsagesListSamples.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/generated/UsagesListSamples.java index c8f4b7885b81..2851f253b82a 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 @@ -9,7 +9,7 @@ /** Samples for Usages List. */ public final class UsagesListSamples { /* - * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2021-10-01/examples/Usages_List.json + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/preview/2022-08-01-preview/examples/Usages_List.json */ /** * Sample code: Usages_List. diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubCheckNameAvailabilitySamples.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubCheckNameAvailabilitySamples.java index 5a2423df8d61..583fcec03ceb 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 @@ -10,7 +10,7 @@ /** Samples for WebPubSub CheckNameAvailability. */ public final class WebPubSubCheckNameAvailabilitySamples { /* - * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2021-10-01/examples/WebPubSub_CheckNameAvailability.json + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/preview/2022-08-01-preview/examples/WebPubSub_CheckNameAvailability.json */ /** * Sample code: WebPubSub_CheckNameAvailability. diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubCreateOrUpdateSamples.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubCreateOrUpdateSamples.java index 1f71714dfba0..c3d709d47fea 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 @@ -10,7 +10,6 @@ import com.azure.resourcemanager.webpubsub.models.ManagedIdentity; import com.azure.resourcemanager.webpubsub.models.ManagedIdentityType; import com.azure.resourcemanager.webpubsub.models.NetworkAcl; -import com.azure.resourcemanager.webpubsub.models.PrivateEndpointAcl; import com.azure.resourcemanager.webpubsub.models.ResourceSku; import com.azure.resourcemanager.webpubsub.models.WebPubSubNetworkACLs; import com.azure.resourcemanager.webpubsub.models.WebPubSubRequestType; @@ -23,7 +22,7 @@ /** Samples for WebPubSub CreateOrUpdate. */ public final class WebPubSubCreateOrUpdateSamples { /* - * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2021-10-01/examples/WebPubSub_CreateOrUpdate.json + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/preview/2022-08-01-preview/examples/WebPubSub_CreateOrUpdate.json */ /** * Sample code: WebPubSub_CreateOrUpdate. @@ -37,7 +36,7 @@ public static void webPubSubCreateOrUpdate(com.azure.resourcemanager.webpubsub.W .withRegion("eastus") .withExistingResourceGroup("myResourceGroup") .withTags(mapOf("key1", "value1")) - .withSku(new ResourceSku().withName("Standard_S1").withTier(WebPubSubSkuTier.STANDARD).withCapacity(1)) + .withSku(new ResourceSku().withName("Premium_P1").withTier(WebPubSubSkuTier.PREMIUM).withCapacity(1)) .withIdentity(new ManagedIdentity().withType(ManagedIdentityType.SYSTEM_ASSIGNED)) .withTls(new WebPubSubTlsSettings().withClientCertEnabled(false)) .withLiveTraceConfiguration( @@ -49,13 +48,7 @@ public static void webPubSubCreateOrUpdate(com.azure.resourcemanager.webpubsub.W 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")))) + new NetworkAcl().withAllow(Arrays.asList(WebPubSubRequestType.CLIENT_CONNECTION)))) .withPublicNetworkAccess("Enabled") .withDisableLocalAuth(false) .withDisableAadAuth(false) 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 new file mode 100644 index 000000000000..b6e729ad161a --- /dev/null +++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubCustomCertificatesCreateOrUpdateSamples.java @@ -0,0 +1,28 @@ +// 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 WebPubSubCustomCertificates CreateOrUpdate. */ +public final class WebPubSubCustomCertificatesCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/preview/2022-08-01-preview/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() + .define("myCert") + .withExistingWebPubSub("myResourceGroup", "myWebPubSubService") + .withKeyVaultBaseUri("https://myvault.keyvault.azure.net/") + .withKeyVaultSecretName("mycert") + .withKeyVaultSecretVersion("bb6a44b2743f47f68dad0d6cc9756432") + .create(); + } +} 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 new file mode 100644 index 000000000000..043ee35b932e --- /dev/null +++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubCustomCertificatesDeleteSamples.java @@ -0,0 +1,24 @@ +// 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.Context; + +/** Samples for WebPubSubCustomCertificates Delete. */ +public final class WebPubSubCustomCertificatesDeleteSamples { + /* + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/preview/2022-08-01-preview/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() + .deleteWithResponse("myResourceGroup", "myWebPubSubService", "myCert", 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 new file mode 100644 index 000000000000..8eba17d36ddf --- /dev/null +++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubCustomCertificatesGetSamples.java @@ -0,0 +1,24 @@ +// 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.Context; + +/** Samples for WebPubSubCustomCertificates Get. */ +public final class WebPubSubCustomCertificatesGetSamples { + /* + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/preview/2022-08-01-preview/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() + .getWithResponse("myResourceGroup", "myWebPubSubService", "myCert", 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 new file mode 100644 index 000000000000..1019e29e7b39 --- /dev/null +++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubCustomCertificatesListSamples.java @@ -0,0 +1,22 @@ +// 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.Context; + +/** Samples for WebPubSubCustomCertificates List. */ +public final class WebPubSubCustomCertificatesListSamples { + /* + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/preview/2022-08-01-preview/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().list("myResourceGroup", "myWebPubSubService", 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 new file mode 100644 index 000000000000..601ca8441430 --- /dev/null +++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubCustomDomainsCreateOrUpdateSamples.java @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.webpubsub.generated; + +import com.azure.resourcemanager.webpubsub.models.ResourceReference; + +/** Samples for WebPubSubCustomDomains CreateOrUpdate. */ +public final class WebPubSubCustomDomainsCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/preview/2022-08-01-preview/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() + .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")) + .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 new file mode 100644 index 000000000000..6f8cd6e5c1a5 --- /dev/null +++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubCustomDomainsDeleteSamples.java @@ -0,0 +1,22 @@ +// 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.Context; + +/** Samples for WebPubSubCustomDomains Delete. */ +public final class WebPubSubCustomDomainsDeleteSamples { + /* + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/preview/2022-08-01-preview/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().delete("myResourceGroup", "myWebPubSubService", "example", 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 new file mode 100644 index 000000000000..dfaacf79b320 --- /dev/null +++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubCustomDomainsGetSamples.java @@ -0,0 +1,24 @@ +// 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.Context; + +/** Samples for WebPubSubCustomDomains Get. */ +public final class WebPubSubCustomDomainsGetSamples { + /* + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/preview/2022-08-01-preview/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() + .getWithResponse("myResourceGroup", "myWebPubSubService", "example", 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 new file mode 100644 index 000000000000..161ee6262572 --- /dev/null +++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubCustomDomainsListSamples.java @@ -0,0 +1,22 @@ +// 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.Context; + +/** Samples for WebPubSubCustomDomains List. */ +public final class WebPubSubCustomDomainsListSamples { + /* + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/preview/2022-08-01-preview/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().list("myResourceGroup", "myWebPubSubService", 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 51e65490d752..465dae857e93 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 @@ -9,7 +9,7 @@ /** Samples for WebPubSub Delete. */ public final class WebPubSubDeleteSamples { /* - * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2021-10-01/examples/WebPubSub_Delete.json + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/preview/2022-08-01-preview/examples/WebPubSub_Delete.json */ /** * Sample code: WebPubSub_Delete. diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubGetByResourceGroupSamples.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubGetByResourceGroupSamples.java index 425e51af8b43..da2618a74467 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 @@ -9,7 +9,7 @@ /** Samples for WebPubSub GetByResourceGroup. */ public final class WebPubSubGetByResourceGroupSamples { /* - * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2021-10-01/examples/WebPubSub_Get.json + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/preview/2022-08-01-preview/examples/WebPubSub_Get.json */ /** * Sample code: WebPubSub_Get. diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubHubsCreateOrUpdateSamples.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubHubsCreateOrUpdateSamples.java index 247b4f8ba3dc..97ed4f5574e2 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 @@ -5,6 +5,9 @@ package com.azure.resourcemanager.webpubsub.generated; import com.azure.resourcemanager.webpubsub.models.EventHandler; +import com.azure.resourcemanager.webpubsub.models.EventHubEndpoint; +import com.azure.resourcemanager.webpubsub.models.EventListener; +import com.azure.resourcemanager.webpubsub.models.EventNameFilter; import com.azure.resourcemanager.webpubsub.models.ManagedIdentitySettings; import com.azure.resourcemanager.webpubsub.models.UpstreamAuthSettings; import com.azure.resourcemanager.webpubsub.models.UpstreamAuthType; @@ -14,7 +17,7 @@ /** Samples for WebPubSubHubs CreateOrUpdate. */ public final class WebPubSubHubsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2021-10-01/examples/WebPubSubHubs_CreateOrUpdate.json + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/preview/2022-08-01-preview/examples/WebPubSubHubs_CreateOrUpdate.json */ /** * Sample code: WebPubSubHubs_CreateOrUpdate. @@ -38,7 +41,20 @@ public static void webPubSubHubsCreateOrUpdate(com.azure.resourcemanager.webpubs .withAuth( new UpstreamAuthSettings() .withType(UpstreamAuthType.MANAGED_IDENTITY) - .withManagedIdentity(new ManagedIdentitySettings().withResource("abc")))))) + .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")) .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 25c3cff60bd8..fe6ddac165c1 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 @@ -9,7 +9,7 @@ /** Samples for WebPubSubHubs Delete. */ public final class WebPubSubHubsDeleteSamples { /* - * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2021-10-01/examples/WebPubSubHubs_Delete.json + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/preview/2022-08-01-preview/examples/WebPubSubHubs_Delete.json */ /** * Sample code: WebPubSubHubs_Delete. diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubHubsGetSamples.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubHubsGetSamples.java index c6521236a4c6..d1bb633c30df 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 @@ -9,7 +9,7 @@ /** Samples for WebPubSubHubs Get. */ public final class WebPubSubHubsGetSamples { /* - * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2021-10-01/examples/WebPubSubHubs_Get.json + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/preview/2022-08-01-preview/examples/WebPubSubHubs_Get.json */ /** * Sample code: WebPubSubHubs_Get. diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubHubsListSamples.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubHubsListSamples.java index da03b59e625c..9a763355bbb6 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 @@ -9,7 +9,7 @@ /** Samples for WebPubSubHubs List. */ public final class WebPubSubHubsListSamples { /* - * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2021-10-01/examples/WebPubSubHubs_List.json + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/preview/2022-08-01-preview/examples/WebPubSubHubs_List.json */ /** * Sample code: WebPubSubHubs_List. diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubListByResourceGroupSamples.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubListByResourceGroupSamples.java index e052800c5430..2d64e331e18a 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 @@ -9,7 +9,7 @@ /** Samples for WebPubSub ListByResourceGroup. */ public final class WebPubSubListByResourceGroupSamples { /* - * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2021-10-01/examples/WebPubSub_ListByResourceGroup.json + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/preview/2022-08-01-preview/examples/WebPubSub_ListByResourceGroup.json */ /** * Sample code: WebPubSub_ListByResourceGroup. diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubListKeysSamples.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubListKeysSamples.java index bff933d4db06..cce0450462af 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 @@ -9,7 +9,7 @@ /** Samples for WebPubSub ListKeys. */ public final class WebPubSubListKeysSamples { /* - * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2021-10-01/examples/WebPubSub_ListKeys.json + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/preview/2022-08-01-preview/examples/WebPubSub_ListKeys.json */ /** * Sample code: WebPubSub_ListKeys. diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubListSamples.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubListSamples.java index 270764caab41..a9c2673052c3 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 @@ -9,7 +9,7 @@ /** Samples for WebPubSub List. */ public final class WebPubSubListSamples { /* - * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2021-10-01/examples/WebPubSub_ListBySubscription.json + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/preview/2022-08-01-preview/examples/WebPubSub_ListBySubscription.json */ /** * Sample code: WebPubSub_ListBySubscription. diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubListSkusSamples.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubListSkusSamples.java index 28ea668e05a7..d5fe38619fa8 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 @@ -9,7 +9,7 @@ /** Samples for WebPubSub ListSkus. */ public final class WebPubSubListSkusSamples { /* - * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2021-10-01/examples/WebPubSub_ListSkus.json + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/preview/2022-08-01-preview/examples/WebPubSub_ListSkus.json */ /** * Sample code: WebPubSub_ListSkus. diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubPrivateEndpointConnectionsDeleteSamples.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubPrivateEndpointConnectionsDeleteSamples.java index 92a77cb5e8bc..3c51d22d3647 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 @@ -9,7 +9,7 @@ /** Samples for WebPubSubPrivateEndpointConnections Delete. */ public final class WebPubSubPrivateEndpointConnectionsDeleteSamples { /* - * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2021-10-01/examples/WebPubSubPrivateEndpointConnections_Delete.json + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/preview/2022-08-01-preview/examples/WebPubSubPrivateEndpointConnections_Delete.json */ /** * Sample code: WebPubSubPrivateEndpointConnections_Delete. diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubPrivateEndpointConnectionsGetSamples.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubPrivateEndpointConnectionsGetSamples.java index c5d9d0870fb4..a2164cc07b8d 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 @@ -9,7 +9,7 @@ /** Samples for WebPubSubPrivateEndpointConnections Get. */ public final class WebPubSubPrivateEndpointConnectionsGetSamples { /* - * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2021-10-01/examples/WebPubSubPrivateEndpointConnections_Get.json + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/preview/2022-08-01-preview/examples/WebPubSubPrivateEndpointConnections_Get.json */ /** * Sample code: WebPubSubPrivateEndpointConnections_Get. diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubPrivateEndpointConnectionsListSamples.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubPrivateEndpointConnectionsListSamples.java index 69260f5637e0..7a43f98981bd 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 @@ -9,7 +9,7 @@ /** Samples for WebPubSubPrivateEndpointConnections List. */ public final class WebPubSubPrivateEndpointConnectionsListSamples { /* - * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2021-10-01/examples/WebPubSubPrivateEndpointConnections_List.json + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/preview/2022-08-01-preview/examples/WebPubSubPrivateEndpointConnections_List.json */ /** * Sample code: WebPubSubPrivateEndpointConnections_List. diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubPrivateEndpointConnectionsUpdateSamples.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubPrivateEndpointConnectionsUpdateSamples.java index b7b584b71819..c4edbfd7b463 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 @@ -13,7 +13,7 @@ /** Samples for WebPubSubPrivateEndpointConnections Update. */ public final class WebPubSubPrivateEndpointConnectionsUpdateSamples { /* - * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2021-10-01/examples/WebPubSubPrivateEndpointConnections_Update.json + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/preview/2022-08-01-preview/examples/WebPubSubPrivateEndpointConnections_Update.json */ /** * Sample code: WebPubSubPrivateEndpointConnections_Update. 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 2635861ab585..e8164036fd65 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 @@ -9,7 +9,7 @@ /** Samples for WebPubSubPrivateLinkResources List. */ public final class WebPubSubPrivateLinkResourcesListSamples { /* - * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2021-10-01/examples/WebPubSubPrivateLinkResources_List.json + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/preview/2022-08-01-preview/examples/WebPubSubPrivateLinkResources_List.json */ /** * Sample code: WebPubSubPrivateLinkResources_List. diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubRegenerateKeySamples.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubRegenerateKeySamples.java index 738a688cef9b..9078679d2464 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 @@ -11,7 +11,7 @@ /** Samples for WebPubSub RegenerateKey. */ public final class WebPubSubRegenerateKeySamples { /* - * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2021-10-01/examples/WebPubSub_RegenerateKey.json + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/preview/2022-08-01-preview/examples/WebPubSub_RegenerateKey.json */ /** * Sample code: WebPubSub_RegenerateKey. diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubRestartSamples.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubRestartSamples.java index 83e125033071..5b5ed9b69bf2 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 @@ -9,7 +9,7 @@ /** Samples for WebPubSub Restart. */ public final class WebPubSubRestartSamples { /* - * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2021-10-01/examples/WebPubSub_Restart.json + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/preview/2022-08-01-preview/examples/WebPubSub_Restart.json */ /** * Sample code: WebPubSub_Restart. diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubSharedPrivateLinkResourcesCreateOrUpdateSamples.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubSharedPrivateLinkResourcesCreateOrUpdateSamples.java index ec1d89617c4d..16bfeed98743 100644 --- a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubSharedPrivateLinkResourcesCreateOrUpdateSamples.java +++ b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubSharedPrivateLinkResourcesCreateOrUpdateSamples.java @@ -7,7 +7,7 @@ /** Samples for WebPubSubSharedPrivateLinkResources CreateOrUpdate. */ public final class WebPubSubSharedPrivateLinkResourcesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2021-10-01/examples/WebPubSubSharedPrivateLinkResources_CreateOrUpdate.json + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/preview/2022-08-01-preview/examples/WebPubSubSharedPrivateLinkResources_CreateOrUpdate.json */ /** * Sample code: WebPubSubSharedPrivateLinkResources_CreateOrUpdate. diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubSharedPrivateLinkResourcesDeleteSamples.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubSharedPrivateLinkResourcesDeleteSamples.java index 631085247701..92d0220de5d6 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 @@ -9,7 +9,7 @@ /** Samples for WebPubSubSharedPrivateLinkResources Delete. */ public final class WebPubSubSharedPrivateLinkResourcesDeleteSamples { /* - * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2021-10-01/examples/WebPubSubSharedPrivateLinkResources_Delete.json + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/preview/2022-08-01-preview/examples/WebPubSubSharedPrivateLinkResources_Delete.json */ /** * Sample code: WebPubSubSharedPrivateLinkResources_Delete. diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubSharedPrivateLinkResourcesGetSamples.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubSharedPrivateLinkResourcesGetSamples.java index cba664541743..b539fe5fe2c3 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 @@ -9,7 +9,7 @@ /** Samples for WebPubSubSharedPrivateLinkResources Get. */ public final class WebPubSubSharedPrivateLinkResourcesGetSamples { /* - * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2021-10-01/examples/WebPubSubSharedPrivateLinkResources_Get.json + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/preview/2022-08-01-preview/examples/WebPubSubSharedPrivateLinkResources_Get.json */ /** * Sample code: WebPubSubSharedPrivateLinkResources_Get. diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubSharedPrivateLinkResourcesListSamples.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubSharedPrivateLinkResourcesListSamples.java index e585d2118eba..40407c7bebc0 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 @@ -9,7 +9,7 @@ /** Samples for WebPubSubSharedPrivateLinkResources List. */ public final class WebPubSubSharedPrivateLinkResourcesListSamples { /* - * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2021-10-01/examples/WebPubSubSharedPrivateLinkResources_List.json + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/preview/2022-08-01-preview/examples/WebPubSubSharedPrivateLinkResources_List.json */ /** * Sample code: WebPubSubSharedPrivateLinkResources_List. diff --git a/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubUpdateSamples.java b/sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubUpdateSamples.java index e5a40b64834e..3448090ec8c4 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 @@ -11,7 +11,6 @@ import com.azure.resourcemanager.webpubsub.models.ManagedIdentity; import com.azure.resourcemanager.webpubsub.models.ManagedIdentityType; import com.azure.resourcemanager.webpubsub.models.NetworkAcl; -import com.azure.resourcemanager.webpubsub.models.PrivateEndpointAcl; import com.azure.resourcemanager.webpubsub.models.ResourceSku; import com.azure.resourcemanager.webpubsub.models.WebPubSubNetworkACLs; import com.azure.resourcemanager.webpubsub.models.WebPubSubRequestType; @@ -25,7 +24,7 @@ /** Samples for WebPubSub Update. */ public final class WebPubSubUpdateSamples { /* - * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/stable/2021-10-01/examples/WebPubSub_Update.json + * x-ms-original-file: specification/webpubsub/resource-manager/Microsoft.SignalRService/preview/2022-08-01-preview/examples/WebPubSub_Update.json */ /** * Sample code: WebPubSub_Update. @@ -41,7 +40,7 @@ public static void webPubSubUpdate(com.azure.resourcemanager.webpubsub.WebPubSub resource .update() .withTags(mapOf("key1", "value1")) - .withSku(new ResourceSku().withName("Standard_S1").withTier(WebPubSubSkuTier.STANDARD).withCapacity(1)) + .withSku(new ResourceSku().withName("Premium_P1").withTier(WebPubSubSkuTier.PREMIUM).withCapacity(1)) .withIdentity(new ManagedIdentity().withType(ManagedIdentityType.SYSTEM_ASSIGNED)) .withTls(new WebPubSubTlsSettings().withClientCertEnabled(false)) .withLiveTraceConfiguration( @@ -53,13 +52,7 @@ public static void webPubSubUpdate(com.azure.resourcemanager.webpubsub.WebPubSub 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")))) + new NetworkAcl().withAllow(Arrays.asList(WebPubSubRequestType.CLIENT_CONNECTION)))) .withPublicNetworkAccess("Enabled") .withDisableLocalAuth(false) .withDisableAadAuth(false)