diff --git a/eng/versioning/version_client.txt b/eng/versioning/version_client.txt
index 83a1758d6b01..ae7fbd1c16ff 100644
--- a/eng/versioning/version_client.txt
+++ b/eng/versioning/version_client.txt
@@ -320,7 +320,7 @@ com.azure.resourcemanager:azure-resourcemanager-redisenterprise;2.1.0;2.2.0-beta
com.azure.resourcemanager:azure-resourcemanager-hybridkubernetes;1.0.0;1.1.0-beta.2
com.azure.resourcemanager:azure-resourcemanager-iothub;1.3.0;1.4.0-beta.2
com.azure.resourcemanager:azure-resourcemanager-datadog;1.1.0;1.2.0-beta.1
-com.azure.resourcemanager:azure-resourcemanager-communication;2.2.0;2.3.0-beta.1
+com.azure.resourcemanager:azure-resourcemanager-communication;2.2.0;2.3.0
com.azure.resourcemanager:azure-resourcemanager-apimanagement;2.0.0;2.1.0-beta.1
com.azure.resourcemanager:azure-resourcemanager-kubernetesconfiguration;1.1.0;1.2.0-beta.1
com.azure.resourcemanager:azure-resourcemanager-changeanalysis;1.1.0;1.2.0-beta.1
diff --git a/sdk/communication/azure-resourcemanager-communication/CHANGELOG.md b/sdk/communication/azure-resourcemanager-communication/CHANGELOG.md
index acbe57e074c6..f7de09706b6b 100644
--- a/sdk/communication/azure-resourcemanager-communication/CHANGELOG.md
+++ b/sdk/communication/azure-resourcemanager-communication/CHANGELOG.md
@@ -1,14 +1,82 @@
# Release History
-## 2.3.0-beta.1 (Unreleased)
+## 2.3.0 (2026-01-22)
+
+- Azure Resource Manager Communication client library for Java. This package contains Microsoft Azure SDK for Communication Management SDK. REST API for Azure Communication Services. Package tag package-2025-09-01. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
### Features Added
-### Breaking Changes
+* `models.SuppressionListAddressResourceCollection` was added
+
+* `models.SuppressionListAddressResource` was added
+
+* `models.SmtpUsernameResource$Update` was added
+
+* `models.SmtpUsernameResource` was added
+
+* `models.SmtpUsernameResource$Definition` was added
+
+* `models.SuppressionListResource$UpdateStages` was added
+
+* `models.SuppressionListResource$Update` was added
+
+* `models.PublicNetworkAccess` was added
+
+* `models.SmtpUsernameResource$UpdateStages` was added
+
+* `models.SmtpUsernameResourceCollection` was added
+
+* `models.SuppressionListAddressResource$Update` was added
+
+* `models.SuppressionListAddressResource$Definition` was added
+
+* `models.SuppressionListAddresses` was added
+
+* `models.SuppressionListAddressResource$DefinitionStages` was added
+
+* `models.SuppressionListResource$Definition` was added
+
+* `models.SuppressionListResource` was added
+
+* `models.SuppressionLists` was added
+
+* `models.SmtpUsernames` was added
+
+* `models.SuppressionListResourceCollection` was added
+
+* `models.SuppressionListResource$DefinitionStages` was added
+
+* `models.SmtpUsernameResource$DefinitionStages` was added
+
+* `models.SuppressionListAddressResource$UpdateStages` was added
+
+#### `models.CommunicationServiceResource$Update` was modified
-### Bugs Fixed
+* `withDisableLocalAuth(java.lang.Boolean)` was added
+* `withPublicNetworkAccess(models.PublicNetworkAccess)` was added
-### Other Changes
+#### `models.CommunicationServiceResource$Definition` was modified
+
+* `withPublicNetworkAccess(models.PublicNetworkAccess)` was added
+* `withDisableLocalAuth(java.lang.Boolean)` was added
+
+#### `models.CommunicationServiceResourceUpdate` was modified
+
+* `withDisableLocalAuth(java.lang.Boolean)` was added
+* `publicNetworkAccess()` was added
+* `disableLocalAuth()` was added
+* `withPublicNetworkAccess(models.PublicNetworkAccess)` was added
+
+#### `models.CommunicationServiceResource` was modified
+
+* `publicNetworkAccess()` was added
+* `disableLocalAuth()` was added
+
+#### `CommunicationManager` was modified
+
+* `suppressionListAddresses()` was added
+* `suppressionLists()` was added
+* `smtpUsernames()` was added
## 2.2.0 (2024-12-19)
diff --git a/sdk/communication/azure-resourcemanager-communication/README.md b/sdk/communication/azure-resourcemanager-communication/README.md
index 858ec6b5709b..064def553430 100644
--- a/sdk/communication/azure-resourcemanager-communication/README.md
+++ b/sdk/communication/azure-resourcemanager-communication/README.md
@@ -2,7 +2,7 @@
Azure Resource Manager Communication client library for Java.
-This package contains Microsoft Azure SDK for Communication Management SDK. REST API for Azure Communication Services. Package tag package-2023-04. 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 Communication Management SDK. REST API for Azure Communication Services. Package tag package-2025-09-01. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
## We'd love to hear your feedback
@@ -32,7 +32,7 @@ Various documentation is available to help you get started
com.azure.resourcemanager
azure-resourcemanager-communication
- 2.3.0-beta.1
+ 2.3.0
```
[//]: # ({x-version-update-end})
@@ -52,7 +52,7 @@ Azure subscription ID can be configured via `AZURE_SUBSCRIPTION_ID` environment
Assuming the use of the `DefaultAzureCredential` credential class, the client can be authenticated using the following code:
```java
-AzureProfile profile = new AzureProfile(AzureEnvironment.AZURE);
+AzureProfile profile = new AzureProfile(AzureCloud.AZURE_PUBLIC_CLOUD);
TokenCredential credential = new DefaultAzureCredentialBuilder()
.authorityHost(profile.getEnvironment().getActiveDirectoryEndpoint())
.build();
@@ -60,7 +60,7 @@ CommunicationManager manager = CommunicationManager
.authenticate(credential, profile);
```
-The sample code assumes global Azure. Please change `AzureEnvironment.AZURE` variable if otherwise.
+The sample code assumes global Azure. Please change the `AzureCloud.AZURE_PUBLIC_CLOUD` variable if otherwise.
See [Authentication][authenticate] for more options.
@@ -100,5 +100,3 @@ This project has adopted the [Microsoft Open Source Code of Conduct][coc]. For m
[cg]: https://github.com/Azure/azure-sdk-for-java/blob/main/CONTRIBUTING.md
[coc]: https://opensource.microsoft.com/codeofconduct/
[coc_faq]: https://opensource.microsoft.com/codeofconduct/faq/
-
-
diff --git a/sdk/communication/azure-resourcemanager-communication/SAMPLE.md b/sdk/communication/azure-resourcemanager-communication/SAMPLE.md
index 64998b7f73e6..03395273747d 100644
--- a/sdk/communication/azure-resourcemanager-communication/SAMPLE.md
+++ b/sdk/communication/azure-resourcemanager-communication/SAMPLE.md
@@ -44,6 +44,27 @@
- [Delete](#senderusernames_delete)
- [Get](#senderusernames_get)
- [ListByDomains](#senderusernames_listbydomains)
+
+## SmtpUsernames
+
+- [CreateOrUpdate](#smtpusernames_createorupdate)
+- [Delete](#smtpusernames_delete)
+- [Get](#smtpusernames_get)
+- [List](#smtpusernames_list)
+
+## SuppressionListAddresses
+
+- [CreateOrUpdate](#suppressionlistaddresses_createorupdate)
+- [Delete](#suppressionlistaddresses_delete)
+- [Get](#suppressionlistaddresses_get)
+- [List](#suppressionlistaddresses_list)
+
+## SuppressionLists
+
+- [CreateOrUpdate](#suppressionlists_createorupdate)
+- [Delete](#suppressionlists_delete)
+- [Get](#suppressionlists_get)
+- [ListByDomain](#suppressionlists_listbydomain)
### CommunicationServices_CheckNameAvailability
```java
@@ -55,7 +76,7 @@ import com.azure.resourcemanager.communication.models.NameAvailabilityParameters
public final class CommunicationServicesCheckNameAvailabilitySamples {
/*
* x-ms-original-file:
- * specification/communication/resource-manager/Microsoft.Communication/stable/2023-04-01/examples/
+ * specification/communication/resource-manager/Microsoft.Communication/stable/2025-09-01/examples/
* communicationServices/checkNameAvailabilityAvailable.json
*/
/**
@@ -72,7 +93,7 @@ public final class CommunicationServicesCheckNameAvailabilitySamples {
/*
* x-ms-original-file:
- * specification/communication/resource-manager/Microsoft.Communication/stable/2023-04-01/examples/
+ * specification/communication/resource-manager/Microsoft.Communication/stable/2025-09-01/examples/
* communicationServices/checkNameAvailabilityUnavailable.json
*/
/**
@@ -94,6 +115,7 @@ public final class CommunicationServicesCheckNameAvailabilitySamples {
```java
import com.azure.resourcemanager.communication.models.ManagedServiceIdentity;
import com.azure.resourcemanager.communication.models.ManagedServiceIdentityType;
+import com.azure.resourcemanager.communication.models.PublicNetworkAccess;
/**
* Samples for CommunicationServices CreateOrUpdate.
@@ -101,7 +123,7 @@ import com.azure.resourcemanager.communication.models.ManagedServiceIdentityType
public final class CommunicationServicesCreateOrUpdateSamples {
/*
* x-ms-original-file:
- * specification/communication/resource-manager/Microsoft.Communication/stable/2023-04-01/examples/
+ * specification/communication/resource-manager/Microsoft.Communication/stable/2025-09-01/examples/
* communicationServices/createOrUpdate.json
*/
/**
@@ -120,7 +142,28 @@ public final class CommunicationServicesCreateOrUpdateSamples {
/*
* x-ms-original-file:
- * specification/communication/resource-manager/Microsoft.Communication/stable/2023-04-01/examples/
+ * specification/communication/resource-manager/Microsoft.Communication/stable/2025-09-01/examples/
+ * communicationServices/createOrUpdateWithPublicNetworkAccess.json
+ */
+ /**
+ * Sample code: Create or update resource with PublicNetworkAccess.
+ *
+ * @param manager Entry point to CommunicationManager.
+ */
+ public static void createOrUpdateResourceWithPublicNetworkAccess(
+ com.azure.resourcemanager.communication.CommunicationManager manager) {
+ manager.communicationServices()
+ .define("MyCommunicationResource")
+ .withRegion("Global")
+ .withExistingResourceGroup("MyResourceGroup")
+ .withDataLocation("United States")
+ .withPublicNetworkAccess(PublicNetworkAccess.ENABLED)
+ .create();
+ }
+
+ /*
+ * x-ms-original-file:
+ * specification/communication/resource-manager/Microsoft.Communication/stable/2025-09-01/examples/
* communicationServices/createOrUpdateWithSystemAssignedIdentity.json
*/
/**
@@ -138,6 +181,27 @@ public final class CommunicationServicesCreateOrUpdateSamples {
.withDataLocation("United States")
.create();
}
+
+ /*
+ * x-ms-original-file:
+ * specification/communication/resource-manager/Microsoft.Communication/stable/2025-09-01/examples/
+ * communicationServices/createOrUpdateWithDisableLocalAuth.json
+ */
+ /**
+ * Sample code: Create or update resource with DisableLocalAuth.
+ *
+ * @param manager Entry point to CommunicationManager.
+ */
+ public static void createOrUpdateResourceWithDisableLocalAuth(
+ com.azure.resourcemanager.communication.CommunicationManager manager) {
+ manager.communicationServices()
+ .define("MyCommunicationResource")
+ .withRegion("Global")
+ .withExistingResourceGroup("MyResourceGroup")
+ .withDataLocation("United States")
+ .withDisableLocalAuth(true)
+ .create();
+ }
}
```
@@ -150,7 +214,7 @@ public final class CommunicationServicesCreateOrUpdateSamples {
public final class CommunicationServicesDeleteSamples {
/*
* x-ms-original-file:
- * specification/communication/resource-manager/Microsoft.Communication/stable/2023-04-01/examples/
+ * specification/communication/resource-manager/Microsoft.Communication/stable/2025-09-01/examples/
* communicationServices/delete.json
*/
/**
@@ -174,7 +238,7 @@ public final class CommunicationServicesDeleteSamples {
public final class CommunicationServicesGetByResourceGroupSamples {
/*
* x-ms-original-file:
- * specification/communication/resource-manager/Microsoft.Communication/stable/2023-04-01/examples/
+ * specification/communication/resource-manager/Microsoft.Communication/stable/2025-09-01/examples/
* communicationServices/get.json
*/
/**
@@ -201,7 +265,7 @@ import com.azure.resourcemanager.communication.models.LinkNotificationHubParamet
public final class CommunicationServicesLinkNotificationHubSamples {
/*
* x-ms-original-file:
- * specification/communication/resource-manager/Microsoft.Communication/stable/2023-04-01/examples/
+ * specification/communication/resource-manager/Microsoft.Communication/stable/2025-09-01/examples/
* communicationServices/linkNotificationHub.json
*/
/**
@@ -229,7 +293,7 @@ public final class CommunicationServicesLinkNotificationHubSamples {
public final class CommunicationServicesListSamples {
/*
* x-ms-original-file:
- * specification/communication/resource-manager/Microsoft.Communication/stable/2023-04-01/examples/
+ * specification/communication/resource-manager/Microsoft.Communication/stable/2025-09-01/examples/
* communicationServices/listBySubscription.json
*/
/**
@@ -252,7 +316,7 @@ public final class CommunicationServicesListSamples {
public final class CommunicationServicesListByResourceGroupSamples {
/*
* x-ms-original-file:
- * specification/communication/resource-manager/Microsoft.Communication/stable/2023-04-01/examples/
+ * specification/communication/resource-manager/Microsoft.Communication/stable/2025-09-01/examples/
* communicationServices/listByResourceGroup.json
*/
/**
@@ -275,7 +339,7 @@ public final class CommunicationServicesListByResourceGroupSamples {
public final class CommunicationServicesListKeysSamples {
/*
* x-ms-original-file:
- * specification/communication/resource-manager/Microsoft.Communication/stable/2023-04-01/examples/
+ * specification/communication/resource-manager/Microsoft.Communication/stable/2025-09-01/examples/
* communicationServices/listKeys.json
*/
/**
@@ -302,7 +366,7 @@ import com.azure.resourcemanager.communication.models.RegenerateKeyParameters;
public final class CommunicationServicesRegenerateKeySamples {
/*
* x-ms-original-file:
- * specification/communication/resource-manager/Microsoft.Communication/stable/2023-04-01/examples/
+ * specification/communication/resource-manager/Microsoft.Communication/stable/2025-09-01/examples/
* communicationServices/regenerateKey.json
*/
/**
@@ -324,6 +388,7 @@ public final class CommunicationServicesRegenerateKeySamples {
import com.azure.resourcemanager.communication.models.CommunicationServiceResource;
import com.azure.resourcemanager.communication.models.ManagedServiceIdentity;
import com.azure.resourcemanager.communication.models.ManagedServiceIdentityType;
+import com.azure.resourcemanager.communication.models.PublicNetworkAccess;
import com.azure.resourcemanager.communication.models.UserAssignedIdentity;
import java.util.HashMap;
import java.util.Map;
@@ -334,7 +399,7 @@ import java.util.Map;
public final class CommunicationServicesUpdateSamples {
/*
* x-ms-original-file:
- * specification/communication/resource-manager/Microsoft.Communication/stable/2023-04-01/examples/
+ * specification/communication/resource-manager/Microsoft.Communication/stable/2025-09-01/examples/
* communicationServices/update.json
*/
/**
@@ -352,7 +417,7 @@ public final class CommunicationServicesUpdateSamples {
/*
* x-ms-original-file:
- * specification/communication/resource-manager/Microsoft.Communication/stable/2023-04-01/examples/
+ * specification/communication/resource-manager/Microsoft.Communication/stable/2025-09-01/examples/
* communicationServices/updateWithUserAssignedIdentity.json
*/
/**
@@ -375,7 +440,48 @@ public final class CommunicationServicesUpdateSamples {
/*
* x-ms-original-file:
- * specification/communication/resource-manager/Microsoft.Communication/stable/2023-04-01/examples/
+ * specification/communication/resource-manager/Microsoft.Communication/stable/2025-09-01/examples/
+ * communicationServices/updateWithPublicNetworkAccess.json
+ */
+ /**
+ * Sample code: Update resource to add PublicNetworkAccess.
+ *
+ * @param manager Entry point to CommunicationManager.
+ */
+ public static void
+ updateResourceToAddPublicNetworkAccess(com.azure.resourcemanager.communication.CommunicationManager manager) {
+ CommunicationServiceResource resource = manager.communicationServices()
+ .getByResourceGroupWithResponse("MyResourceGroup", "MyCommunicationResource",
+ com.azure.core.util.Context.NONE)
+ .getValue();
+ resource.update()
+ .withTags(mapOf("newTag", "newVal"))
+ .withPublicNetworkAccess(PublicNetworkAccess.ENABLED)
+ .apply();
+ }
+
+ /*
+ * x-ms-original-file:
+ * specification/communication/resource-manager/Microsoft.Communication/stable/2025-09-01/examples/
+ * communicationServices/updateWithDisableLocalAuth.json
+ */
+ /**
+ * Sample code: Update resource to add DisableLocalAuth.
+ *
+ * @param manager Entry point to CommunicationManager.
+ */
+ public static void
+ updateResourceToAddDisableLocalAuth(com.azure.resourcemanager.communication.CommunicationManager manager) {
+ CommunicationServiceResource resource = manager.communicationServices()
+ .getByResourceGroupWithResponse("MyResourceGroup", "MyCommunicationResource",
+ com.azure.core.util.Context.NONE)
+ .getValue();
+ resource.update().withTags(mapOf("newTag", "newVal")).withDisableLocalAuth(true).apply();
+ }
+
+ /*
+ * x-ms-original-file:
+ * specification/communication/resource-manager/Microsoft.Communication/stable/2025-09-01/examples/
* communicationServices/updateWithSystemAssignedIdentity.json
*/
/**
@@ -397,7 +503,7 @@ public final class CommunicationServicesUpdateSamples {
/*
* x-ms-original-file:
- * specification/communication/resource-manager/Microsoft.Communication/stable/2023-04-01/examples/
+ * specification/communication/resource-manager/Microsoft.Communication/stable/2025-09-01/examples/
* communicationServices/updateRemoveSystemIdentity.json
*/
/**
@@ -419,7 +525,7 @@ public final class CommunicationServicesUpdateSamples {
/*
* x-ms-original-file:
- * specification/communication/resource-manager/Microsoft.Communication/stable/2023-04-01/examples/
+ * specification/communication/resource-manager/Microsoft.Communication/stable/2025-09-01/examples/
* communicationServices/updateWithSystemAndUserIdentity.json
*/
/**
@@ -467,7 +573,7 @@ import com.azure.resourcemanager.communication.models.VerificationType;
public final class DomainsCancelVerificationSamples {
/*
* x-ms-original-file:
- * specification/communication/resource-manager/Microsoft.Communication/stable/2023-04-01/examples/domains/
+ * specification/communication/resource-manager/Microsoft.Communication/stable/2025-09-01/examples/domains/
* cancelVerification.json
*/
/**
@@ -495,7 +601,7 @@ import com.azure.resourcemanager.communication.models.DomainManagement;
public final class DomainsCreateOrUpdateSamples {
/*
* x-ms-original-file:
- * specification/communication/resource-manager/Microsoft.Communication/stable/2023-04-01/examples/domains/
+ * specification/communication/resource-manager/Microsoft.Communication/stable/2025-09-01/examples/domains/
* createOrUpdate.json
*/
/**
@@ -524,7 +630,7 @@ public final class DomainsCreateOrUpdateSamples {
public final class DomainsDeleteSamples {
/*
* x-ms-original-file:
- * specification/communication/resource-manager/Microsoft.Communication/stable/2023-04-01/examples/domains/delete.
+ * specification/communication/resource-manager/Microsoft.Communication/stable/2025-09-01/examples/domains/delete.
* json
*/
/**
@@ -548,7 +654,7 @@ public final class DomainsDeleteSamples {
public final class DomainsGetSamples {
/*
* x-ms-original-file:
- * specification/communication/resource-manager/Microsoft.Communication/stable/2023-04-01/examples/domains/get.json
+ * specification/communication/resource-manager/Microsoft.Communication/stable/2025-09-01/examples/domains/get.json
*/
/**
* Sample code: Get Domains resource.
@@ -575,7 +681,7 @@ import com.azure.resourcemanager.communication.models.VerificationType;
public final class DomainsInitiateVerificationSamples {
/*
* x-ms-original-file:
- * specification/communication/resource-manager/Microsoft.Communication/stable/2023-04-01/examples/domains/
+ * specification/communication/resource-manager/Microsoft.Communication/stable/2025-09-01/examples/domains/
* initiateVerification.json
*/
/**
@@ -601,7 +707,7 @@ public final class DomainsInitiateVerificationSamples {
public final class DomainsListByEmailServiceResourceSamples {
/*
* x-ms-original-file:
- * specification/communication/resource-manager/Microsoft.Communication/stable/2023-04-01/examples/domains/
+ * specification/communication/resource-manager/Microsoft.Communication/stable/2025-09-01/examples/domains/
* listByEmailService.json
*/
/**
@@ -629,7 +735,7 @@ import com.azure.resourcemanager.communication.models.UserEngagementTracking;
public final class DomainsUpdateSamples {
/*
* x-ms-original-file:
- * specification/communication/resource-manager/Microsoft.Communication/stable/2023-04-01/examples/domains/update.
+ * specification/communication/resource-manager/Microsoft.Communication/stable/2025-09-01/examples/domains/update.
* json
*/
/**
@@ -656,7 +762,7 @@ public final class DomainsUpdateSamples {
public final class EmailServicesCreateOrUpdateSamples {
/*
* x-ms-original-file:
- * specification/communication/resource-manager/Microsoft.Communication/stable/2023-04-01/examples/emailServices/
+ * specification/communication/resource-manager/Microsoft.Communication/stable/2025-09-01/examples/emailServices/
* createOrUpdate.json
*/
/**
@@ -685,7 +791,7 @@ public final class EmailServicesCreateOrUpdateSamples {
public final class EmailServicesDeleteSamples {
/*
* x-ms-original-file:
- * specification/communication/resource-manager/Microsoft.Communication/stable/2023-04-01/examples/emailServices/
+ * specification/communication/resource-manager/Microsoft.Communication/stable/2025-09-01/examples/emailServices/
* delete.json
*/
/**
@@ -709,7 +815,7 @@ public final class EmailServicesDeleteSamples {
public final class EmailServicesGetByResourceGroupSamples {
/*
* x-ms-original-file:
- * specification/communication/resource-manager/Microsoft.Communication/stable/2023-04-01/examples/emailServices/get
+ * specification/communication/resource-manager/Microsoft.Communication/stable/2025-09-01/examples/emailServices/get
* .json
*/
/**
@@ -734,7 +840,7 @@ public final class EmailServicesGetByResourceGroupSamples {
public final class EmailServicesListSamples {
/*
* x-ms-original-file:
- * specification/communication/resource-manager/Microsoft.Communication/stable/2023-04-01/examples/emailServices/
+ * specification/communication/resource-manager/Microsoft.Communication/stable/2025-09-01/examples/emailServices/
* listBySubscription.json
*/
/**
@@ -758,7 +864,7 @@ public final class EmailServicesListSamples {
public final class EmailServicesListByResourceGroupSamples {
/*
* x-ms-original-file:
- * specification/communication/resource-manager/Microsoft.Communication/stable/2023-04-01/examples/emailServices/
+ * specification/communication/resource-manager/Microsoft.Communication/stable/2025-09-01/examples/emailServices/
* listByResourceGroup.json
*/
/**
@@ -782,7 +888,7 @@ public final class EmailServicesListByResourceGroupSamples {
public final class EmailServicesListVerifiedExchangeOnlineDomainsSamples {
/*
* x-ms-original-file:
- * specification/communication/resource-manager/Microsoft.Communication/stable/2023-04-01/examples/emailServices/
+ * specification/communication/resource-manager/Microsoft.Communication/stable/2025-09-01/examples/emailServices/
* getVerifiedExchangeOnlineDomains.json
*/
/**
@@ -810,7 +916,7 @@ import java.util.Map;
public final class EmailServicesUpdateSamples {
/*
* x-ms-original-file:
- * specification/communication/resource-manager/Microsoft.Communication/stable/2023-04-01/examples/emailServices/
+ * specification/communication/resource-manager/Microsoft.Communication/stable/2025-09-01/examples/emailServices/
* update.json
*/
/**
@@ -850,7 +956,7 @@ public final class EmailServicesUpdateSamples {
public final class OperationsListSamples {
/*
* x-ms-original-file:
- * specification/communication/resource-manager/Microsoft.Communication/stable/2023-04-01/examples/
+ * specification/communication/resource-manager/Microsoft.Communication/stable/2025-09-01/examples/
* communicationServices/operationsList.json
*/
/**
@@ -873,7 +979,7 @@ public final class OperationsListSamples {
public final class SenderUsernamesCreateOrUpdateSamples {
/*
* x-ms-original-file:
- * specification/communication/resource-manager/Microsoft.Communication/stable/2023-04-01/examples/senderUsernames/
+ * specification/communication/resource-manager/Microsoft.Communication/stable/2025-09-01/examples/senderUsernames/
* createOrUpdate.json
*/
/**
@@ -902,7 +1008,7 @@ public final class SenderUsernamesCreateOrUpdateSamples {
public final class SenderUsernamesDeleteSamples {
/*
* x-ms-original-file:
- * specification/communication/resource-manager/Microsoft.Communication/stable/2023-04-01/examples/senderUsernames/
+ * specification/communication/resource-manager/Microsoft.Communication/stable/2025-09-01/examples/senderUsernames/
* delete.json
*/
/**
@@ -928,7 +1034,7 @@ public final class SenderUsernamesDeleteSamples {
public final class SenderUsernamesGetSamples {
/*
* x-ms-original-file:
- * specification/communication/resource-manager/Microsoft.Communication/stable/2023-04-01/examples/senderUsernames/
+ * specification/communication/resource-manager/Microsoft.Communication/stable/2025-09-01/examples/senderUsernames/
* get.json
*/
/**
@@ -954,7 +1060,7 @@ public final class SenderUsernamesGetSamples {
public final class SenderUsernamesListByDomainsSamples {
/*
* x-ms-original-file:
- * specification/communication/resource-manager/Microsoft.Communication/stable/2023-04-01/examples/senderUsernames/
+ * specification/communication/resource-manager/Microsoft.Communication/stable/2025-09-01/examples/senderUsernames/
* listByDomain.json
*/
/**
@@ -971,3 +1077,324 @@ public final class SenderUsernamesListByDomainsSamples {
}
```
+### SmtpUsernames_CreateOrUpdate
+
+```java
+/**
+ * Samples for SmtpUsernames CreateOrUpdate.
+ */
+public final class SmtpUsernamesCreateOrUpdateSamples {
+ /*
+ * x-ms-original-file:
+ * specification/communication/resource-manager/Microsoft.Communication/stable/2025-09-01/examples/smtpUsername/
+ * createOrUpdate.json
+ */
+ /**
+ * Sample code: CreateOrUpdate SmtpUsername resource.
+ *
+ * @param manager Entry point to CommunicationManager.
+ */
+ public static void
+ createOrUpdateSmtpUsernameResource(com.azure.resourcemanager.communication.CommunicationManager manager) {
+ manager.smtpUsernames()
+ .define("smtpusername1")
+ .withExistingCommunicationService("contosoResourceGroup", "contosoACSService")
+ .withUsername("newuser1@contoso.com")
+ .withEntraApplicationId("aaaa1111-bbbb-2222-3333-aaaa111122bb")
+ .withTenantId("aaaa1111-bbbb-2222-3333-aaaa11112222")
+ .create();
+ }
+}
+```
+
+### SmtpUsernames_Delete
+
+```java
+/**
+ * Samples for SmtpUsernames Delete.
+ */
+public final class SmtpUsernamesDeleteSamples {
+ /*
+ * x-ms-original-file:
+ * specification/communication/resource-manager/Microsoft.Communication/stable/2025-09-01/examples/smtpUsername/
+ * delete.json
+ */
+ /**
+ * Sample code: Delete a SmtpUsername resource.
+ *
+ * @param manager Entry point to CommunicationManager.
+ */
+ public static void
+ deleteASmtpUsernameResource(com.azure.resourcemanager.communication.CommunicationManager manager) {
+ manager.smtpUsernames()
+ .deleteWithResponse("MyResourceGroup", "contosoACSService", "smtpusername1",
+ com.azure.core.util.Context.NONE);
+ }
+}
+```
+
+### SmtpUsernames_Get
+
+```java
+/**
+ * Samples for SmtpUsernames Get.
+ */
+public final class SmtpUsernamesGetSamples {
+ /*
+ * x-ms-original-file:
+ * specification/communication/resource-manager/Microsoft.Communication/stable/2025-09-01/examples/smtpUsername/get.
+ * json
+ */
+ /**
+ * Sample code: Get a SmtpUsername resource.
+ *
+ * @param manager Entry point to CommunicationManager.
+ */
+ public static void getASmtpUsernameResource(com.azure.resourcemanager.communication.CommunicationManager manager) {
+ manager.smtpUsernames()
+ .getWithResponse("contosoResourceGroup", "contosoACSService", "smtpusername1",
+ com.azure.core.util.Context.NONE);
+ }
+}
+```
+
+### SmtpUsernames_List
+
+```java
+/**
+ * Samples for SmtpUsernames List.
+ */
+public final class SmtpUsernamesListSamples {
+ /*
+ * x-ms-original-file:
+ * specification/communication/resource-manager/Microsoft.Communication/stable/2025-09-01/examples/smtpUsername/
+ * getAll.json
+ */
+ /**
+ * Sample code: Get all SmtpUsername resources for a CommunicationService resource.
+ *
+ * @param manager Entry point to CommunicationManager.
+ */
+ public static void getAllSmtpUsernameResourcesForACommunicationServiceResource(
+ com.azure.resourcemanager.communication.CommunicationManager manager) {
+ manager.smtpUsernames().list("contosoResourceGroup", "contosoACSService", com.azure.core.util.Context.NONE);
+ }
+}
+```
+
+### SuppressionListAddresses_CreateOrUpdate
+
+```java
+/**
+ * Samples for SuppressionListAddresses CreateOrUpdate.
+ */
+public final class SuppressionListAddressesCreateOrUpdateSamples {
+ /*
+ * x-ms-original-file:
+ * specification/communication/resource-manager/Microsoft.Communication/stable/2025-09-01/examples/suppressionLists/
+ * createOrUpdateAddress.json
+ */
+ /**
+ * Sample code: CreateOrUpdate SuppressionListAddress resource.
+ *
+ * @param manager Entry point to CommunicationManager.
+ */
+ public static void createOrUpdateSuppressionListAddressResource(
+ com.azure.resourcemanager.communication.CommunicationManager manager) {
+ manager.suppressionListAddresses()
+ .define("11112222-3333-4444-5555-aaaabbbbcccc")
+ .withExistingSuppressionList("contosoResourceGroup", "contosoEmailService", "contoso.com",
+ "aaaa1111-bbbb-2222-3333-aaaa11112222")
+ .withEmail("newuser1@fabrikam.com")
+ .withFirstName("updatedFirstName")
+ .create();
+ }
+}
+```
+
+### SuppressionListAddresses_Delete
+
+```java
+/**
+ * Samples for SuppressionListAddresses Delete.
+ */
+public final class SuppressionListAddressesDeleteSamples {
+ /*
+ * x-ms-original-file:
+ * specification/communication/resource-manager/Microsoft.Communication/stable/2025-09-01/examples/suppressionLists/
+ * deleteAddress.json
+ */
+ /**
+ * Sample code: Delete a SuppressionListAddress resource.
+ *
+ * @param manager Entry point to CommunicationManager.
+ */
+ public static void
+ deleteASuppressionListAddressResource(com.azure.resourcemanager.communication.CommunicationManager manager) {
+ manager.suppressionListAddresses()
+ .deleteWithResponse("MyResourceGroup", "MyEmailServiceResource", "mydomain.com",
+ "aaaa1111-bbbb-2222-3333-aaaa11112222", "11112222-3333-4444-5555-999999999999",
+ com.azure.core.util.Context.NONE);
+ }
+}
+```
+
+### SuppressionListAddresses_Get
+
+```java
+/**
+ * Samples for SuppressionListAddresses Get.
+ */
+public final class SuppressionListAddressesGetSamples {
+ /*
+ * x-ms-original-file:
+ * specification/communication/resource-manager/Microsoft.Communication/stable/2025-09-01/examples/suppressionLists/
+ * getAddress.json
+ */
+ /**
+ * Sample code: Get a SuppressionListAddress resource.
+ *
+ * @param manager Entry point to CommunicationManager.
+ */
+ public static void
+ getASuppressionListAddressResource(com.azure.resourcemanager.communication.CommunicationManager manager) {
+ manager.suppressionListAddresses()
+ .getWithResponse("contosoResourceGroup", "contosoEmailService", "contoso.com",
+ "aaaa1111-bbbb-2222-3333-aaaa11112222", "11112222-3333-4444-5555-aaaabbbbcccc",
+ com.azure.core.util.Context.NONE);
+ }
+}
+```
+
+### SuppressionListAddresses_List
+
+```java
+/**
+ * Samples for SuppressionListAddresses List.
+ */
+public final class SuppressionListAddressesListSamples {
+ /*
+ * x-ms-original-file:
+ * specification/communication/resource-manager/Microsoft.Communication/stable/2025-09-01/examples/suppressionLists/
+ * getAddresses.json
+ */
+ /**
+ * Sample code: Get all SuppressionListAddresses resources for a SuppressionList resource.
+ *
+ * @param manager Entry point to CommunicationManager.
+ */
+ public static void getAllSuppressionListAddressesResourcesForASuppressionListResource(
+ com.azure.resourcemanager.communication.CommunicationManager manager) {
+ manager.suppressionListAddresses()
+ .list("contosoResourceGroup", "contosoEmailService", "contoso.com", "aaaa1111-bbbb-2222-3333-aaaa11112222",
+ com.azure.core.util.Context.NONE);
+ }
+}
+```
+
+### SuppressionLists_CreateOrUpdate
+
+```java
+/**
+ * Samples for SuppressionLists CreateOrUpdate.
+ */
+public final class SuppressionListsCreateOrUpdateSamples {
+ /*
+ * x-ms-original-file:
+ * specification/communication/resource-manager/Microsoft.Communication/stable/2025-09-01/examples/suppressionLists/
+ * createOrUpdateSuppressionList.json
+ */
+ /**
+ * Sample code: CreateOrUpdate SuppressionLists resource.
+ *
+ * @param manager Entry point to CommunicationManager.
+ */
+ public static void
+ createOrUpdateSuppressionListsResource(com.azure.resourcemanager.communication.CommunicationManager manager) {
+ manager.suppressionLists()
+ .define("aaaa1111-bbbb-2222-3333-aaaa11112222")
+ .withExistingDomain("contosoResourceGroup", "contosoEmailService", "contoso.com")
+ .withListName("contosoNewsAlerts")
+ .create();
+ }
+}
+```
+
+### SuppressionLists_Delete
+
+```java
+/**
+ * Samples for SuppressionLists Delete.
+ */
+public final class SuppressionListsDeleteSamples {
+ /*
+ * x-ms-original-file:
+ * specification/communication/resource-manager/Microsoft.Communication/stable/2025-09-01/examples/suppressionLists/
+ * deleteSuppressionList.json
+ */
+ /**
+ * Sample code: Delete a SuppressionLists resource.
+ *
+ * @param manager Entry point to CommunicationManager.
+ */
+ public static void
+ deleteASuppressionListsResource(com.azure.resourcemanager.communication.CommunicationManager manager) {
+ manager.suppressionLists()
+ .deleteWithResponse("MyResourceGroup", "MyEmailServiceResource", "mydomain.com",
+ "aaaa1111-bbbb-2222-3333-aaaa11112222", com.azure.core.util.Context.NONE);
+ }
+}
+```
+
+### SuppressionLists_Get
+
+```java
+/**
+ * Samples for SuppressionLists Get.
+ */
+public final class SuppressionListsGetSamples {
+ /*
+ * x-ms-original-file:
+ * specification/communication/resource-manager/Microsoft.Communication/stable/2025-09-01/examples/suppressionLists/
+ * getSuppressionList.json
+ */
+ /**
+ * Sample code: Get a SuppressionList resource.
+ *
+ * @param manager Entry point to CommunicationManager.
+ */
+ public static void
+ getASuppressionListResource(com.azure.resourcemanager.communication.CommunicationManager manager) {
+ manager.suppressionLists()
+ .getWithResponse("contosoResourceGroup", "contosoEmailService", "contoso.com",
+ "aaaa1111-bbbb-2222-3333-aaaa11112222", com.azure.core.util.Context.NONE);
+ }
+}
+```
+
+### SuppressionLists_ListByDomain
+
+```java
+/**
+ * Samples for SuppressionLists ListByDomain.
+ */
+public final class SuppressionListsListByDomainSamples {
+ /*
+ * x-ms-original-file:
+ * specification/communication/resource-manager/Microsoft.Communication/stable/2025-09-01/examples/suppressionLists/
+ * getSuppressionLists.json
+ */
+ /**
+ * Sample code: Get all SuppressionLists resources.
+ *
+ * @param manager Entry point to CommunicationManager.
+ */
+ public static void
+ getAllSuppressionListsResources(com.azure.resourcemanager.communication.CommunicationManager manager) {
+ manager.suppressionLists()
+ .listByDomain("contosoResourceGroup", "contosoEmailService", "contoso.com",
+ com.azure.core.util.Context.NONE);
+ }
+}
+```
+
diff --git a/sdk/communication/azure-resourcemanager-communication/pom.xml b/sdk/communication/azure-resourcemanager-communication/pom.xml
index 5e068904d425..51b19f74e12f 100644
--- a/sdk/communication/azure-resourcemanager-communication/pom.xml
+++ b/sdk/communication/azure-resourcemanager-communication/pom.xml
@@ -14,11 +14,11 @@
com.azure.resourcemanager
azure-resourcemanager-communication
- 2.3.0-beta.1
+ 2.3.0
jar
Microsoft Azure SDK for Communication Management
- This package contains Microsoft Azure SDK for Communication Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. REST API for Azure Communication Services. Package tag package-2023-04.
+ This package contains Microsoft Azure SDK for Communication Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. REST API for Azure Communication Services. Package tag package-2025-09-01.
https://github.com/Azure/azure-sdk-for-java
@@ -45,7 +45,6 @@
UTF-8
0
0
- false
diff --git a/sdk/communication/azure-resourcemanager-communication/src/main/java/com/azure/resourcemanager/communication/CommunicationManager.java b/sdk/communication/azure-resourcemanager-communication/src/main/java/com/azure/resourcemanager/communication/CommunicationManager.java
index d39d141f3e31..148d86e3c378 100644
--- a/sdk/communication/azure-resourcemanager-communication/src/main/java/com/azure/resourcemanager/communication/CommunicationManager.java
+++ b/sdk/communication/azure-resourcemanager-communication/src/main/java/com/azure/resourcemanager/communication/CommunicationManager.java
@@ -22,6 +22,7 @@
import com.azure.core.http.policy.UserAgentPolicy;
import com.azure.core.management.profile.AzureProfile;
import com.azure.core.util.Configuration;
+import com.azure.core.util.CoreUtils;
import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.communication.fluent.CommunicationServiceManagementClient;
import com.azure.resourcemanager.communication.implementation.CommunicationServiceManagementClientBuilder;
@@ -30,15 +31,22 @@
import com.azure.resourcemanager.communication.implementation.EmailServicesImpl;
import com.azure.resourcemanager.communication.implementation.OperationsImpl;
import com.azure.resourcemanager.communication.implementation.SenderUsernamesImpl;
+import com.azure.resourcemanager.communication.implementation.SmtpUsernamesImpl;
+import com.azure.resourcemanager.communication.implementation.SuppressionListAddressesImpl;
+import com.azure.resourcemanager.communication.implementation.SuppressionListsImpl;
import com.azure.resourcemanager.communication.models.CommunicationServices;
import com.azure.resourcemanager.communication.models.Domains;
import com.azure.resourcemanager.communication.models.EmailServices;
import com.azure.resourcemanager.communication.models.Operations;
import com.azure.resourcemanager.communication.models.SenderUsernames;
+import com.azure.resourcemanager.communication.models.SmtpUsernames;
+import com.azure.resourcemanager.communication.models.SuppressionListAddresses;
+import com.azure.resourcemanager.communication.models.SuppressionLists;
import java.time.Duration;
import java.time.temporal.ChronoUnit;
import java.util.ArrayList;
import java.util.List;
+import java.util.Map;
import java.util.Objects;
import java.util.stream.Collectors;
@@ -57,6 +65,12 @@ public final class CommunicationManager {
private SenderUsernames senderUsernames;
+ private SmtpUsernames smtpUsernames;
+
+ private SuppressionLists suppressionLists;
+
+ private SuppressionListAddresses suppressionListAddresses;
+
private final CommunicationServiceManagementClient clientObject;
private CommunicationManager(HttpPipeline httpPipeline, AzureProfile profile, Duration defaultPollInterval) {
@@ -109,6 +123,9 @@ public static Configurable configure() {
*/
public static final class Configurable {
private static final ClientLogger LOGGER = new ClientLogger(Configurable.class);
+ private static final String SDK_VERSION = "version";
+ private static final Map PROPERTIES
+ = CoreUtils.getProperties("azure-resourcemanager-communication.properties");
private HttpClient httpClient;
private HttpLogOptions httpLogOptions;
@@ -216,12 +233,14 @@ public CommunicationManager authenticate(TokenCredential credential, AzureProfil
Objects.requireNonNull(credential, "'credential' cannot be null.");
Objects.requireNonNull(profile, "'profile' cannot be null.");
+ String clientVersion = PROPERTIES.getOrDefault(SDK_VERSION, "UnknownVersion");
+
StringBuilder userAgentBuilder = new StringBuilder();
userAgentBuilder.append("azsdk-java")
.append("-")
.append("com.azure.resourcemanager.communication")
.append("/")
- .append("2.2.0");
+ .append(clientVersion);
if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) {
userAgentBuilder.append(" (")
.append(Configuration.getGlobalConfiguration().get("java.version"))
@@ -327,6 +346,43 @@ public SenderUsernames senderUsernames() {
return senderUsernames;
}
+ /**
+ * Gets the resource collection API of SmtpUsernames. It manages SmtpUsernameResource.
+ *
+ * @return Resource collection API of SmtpUsernames.
+ */
+ public SmtpUsernames smtpUsernames() {
+ if (this.smtpUsernames == null) {
+ this.smtpUsernames = new SmtpUsernamesImpl(clientObject.getSmtpUsernames(), this);
+ }
+ return smtpUsernames;
+ }
+
+ /**
+ * Gets the resource collection API of SuppressionLists. It manages SuppressionListResource.
+ *
+ * @return Resource collection API of SuppressionLists.
+ */
+ public SuppressionLists suppressionLists() {
+ if (this.suppressionLists == null) {
+ this.suppressionLists = new SuppressionListsImpl(clientObject.getSuppressionLists(), this);
+ }
+ return suppressionLists;
+ }
+
+ /**
+ * Gets the resource collection API of SuppressionListAddresses. It manages SuppressionListAddressResource.
+ *
+ * @return Resource collection API of SuppressionListAddresses.
+ */
+ public SuppressionListAddresses suppressionListAddresses() {
+ if (this.suppressionListAddresses == null) {
+ this.suppressionListAddresses
+ = new SuppressionListAddressesImpl(clientObject.getSuppressionListAddresses(), this);
+ }
+ return suppressionListAddresses;
+ }
+
/**
* Gets wrapped service client CommunicationServiceManagementClient providing direct access to the underlying
* auto-generated API implementation, based on Azure REST API.
diff --git a/sdk/communication/azure-resourcemanager-communication/src/main/java/com/azure/resourcemanager/communication/fluent/CommunicationServiceManagementClient.java b/sdk/communication/azure-resourcemanager-communication/src/main/java/com/azure/resourcemanager/communication/fluent/CommunicationServiceManagementClient.java
index d24e14239ffe..3ede2630ac80 100644
--- a/sdk/communication/azure-resourcemanager-communication/src/main/java/com/azure/resourcemanager/communication/fluent/CommunicationServiceManagementClient.java
+++ b/sdk/communication/azure-resourcemanager-communication/src/main/java/com/azure/resourcemanager/communication/fluent/CommunicationServiceManagementClient.java
@@ -80,4 +80,25 @@ public interface CommunicationServiceManagementClient {
* @return the SenderUsernamesClient object.
*/
SenderUsernamesClient getSenderUsernames();
+
+ /**
+ * Gets the SmtpUsernamesClient object to access its operations.
+ *
+ * @return the SmtpUsernamesClient object.
+ */
+ SmtpUsernamesClient getSmtpUsernames();
+
+ /**
+ * Gets the SuppressionListsClient object to access its operations.
+ *
+ * @return the SuppressionListsClient object.
+ */
+ SuppressionListsClient getSuppressionLists();
+
+ /**
+ * Gets the SuppressionListAddressesClient object to access its operations.
+ *
+ * @return the SuppressionListAddressesClient object.
+ */
+ SuppressionListAddressesClient getSuppressionListAddresses();
}
diff --git a/sdk/communication/azure-resourcemanager-communication/src/main/java/com/azure/resourcemanager/communication/fluent/SmtpUsernamesClient.java b/sdk/communication/azure-resourcemanager-communication/src/main/java/com/azure/resourcemanager/communication/fluent/SmtpUsernamesClient.java
new file mode 100644
index 000000000000..d7e76951471e
--- /dev/null
+++ b/sdk/communication/azure-resourcemanager-communication/src/main/java/com/azure/resourcemanager/communication/fluent/SmtpUsernamesClient.java
@@ -0,0 +1,153 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.communication.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.util.Context;
+import com.azure.resourcemanager.communication.fluent.models.SmtpUsernameResourceInner;
+
+/**
+ * An instance of this class provides access to all the operations defined in SmtpUsernamesClient.
+ */
+public interface SmtpUsernamesClient {
+ /**
+ * Get
+ *
+ * Get all SmtpUsernameResources for a Communication resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param communicationServiceName The name of the CommunicationService 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 all SmtpUsernameResources for a Communication resource as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(String resourceGroupName, String communicationServiceName);
+
+ /**
+ * Get
+ *
+ * Get all SmtpUsernameResources for a Communication resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param communicationServiceName The name of the CommunicationService 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 all SmtpUsernameResources for a Communication resource as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(String resourceGroupName, String communicationServiceName,
+ Context context);
+
+ /**
+ * Get
+ *
+ * Get a SmtpUsernameResource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param communicationServiceName The name of the CommunicationService resource.
+ * @param smtpUsername The name of the SmtpUsernameResource.
+ * @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 SmtpUsernameResource along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(String resourceGroupName, String communicationServiceName,
+ String smtpUsername, Context context);
+
+ /**
+ * Get
+ *
+ * Get a SmtpUsernameResource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param communicationServiceName The name of the CommunicationService resource.
+ * @param smtpUsername The name of the SmtpUsernameResource.
+ * @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 SmtpUsernameResource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SmtpUsernameResourceInner get(String resourceGroupName, String communicationServiceName, String smtpUsername);
+
+ /**
+ * Create Or Update
+ *
+ * Create or update an SmtpUsernameResource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param communicationServiceName The name of the CommunicationService resource.
+ * @param smtpUsername The name of the SmtpUsernameResource.
+ * @param parameters Parameters for the create or update operation.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the object describing the smtp username resource along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response createOrUpdateWithResponse(String resourceGroupName,
+ String communicationServiceName, String smtpUsername, SmtpUsernameResourceInner parameters, Context context);
+
+ /**
+ * Create Or Update
+ *
+ * Create or update an SmtpUsernameResource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param communicationServiceName The name of the CommunicationService resource.
+ * @param smtpUsername The name of the SmtpUsernameResource.
+ * @param parameters Parameters for the create or update operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the object describing the smtp username resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SmtpUsernameResourceInner createOrUpdate(String resourceGroupName, String communicationServiceName,
+ String smtpUsername, SmtpUsernameResourceInner parameters);
+
+ /**
+ * Delete
+ *
+ * Operation to delete a single SmtpUsername resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param communicationServiceName The name of the CommunicationService resource.
+ * @param smtpUsername The name of the SmtpUsernameResource.
+ * @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 communicationServiceName, String smtpUsername,
+ Context context);
+
+ /**
+ * Delete
+ *
+ * Operation to delete a single SmtpUsername resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param communicationServiceName The name of the CommunicationService resource.
+ * @param smtpUsername The name of the SmtpUsernameResource.
+ * @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 communicationServiceName, String smtpUsername);
+}
diff --git a/sdk/communication/azure-resourcemanager-communication/src/main/java/com/azure/resourcemanager/communication/fluent/SuppressionListAddressesClient.java b/sdk/communication/azure-resourcemanager-communication/src/main/java/com/azure/resourcemanager/communication/fluent/SuppressionListAddressesClient.java
new file mode 100644
index 000000000000..869f0e4239d4
--- /dev/null
+++ b/sdk/communication/azure-resourcemanager-communication/src/main/java/com/azure/resourcemanager/communication/fluent/SuppressionListAddressesClient.java
@@ -0,0 +1,174 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.communication.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.util.Context;
+import com.azure.resourcemanager.communication.fluent.models.SuppressionListAddressResourceInner;
+
+/**
+ * An instance of this class provides access to all the operations defined in SuppressionListAddressesClient.
+ */
+public interface SuppressionListAddressesClient {
+ /**
+ * Get
+ *
+ * Get all the addresses in a suppression list.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param emailServiceName The name of the EmailService resource.
+ * @param domainName The name of the Domains resource.
+ * @param suppressionListName The name of the suppression list.
+ * @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 all the addresses in a suppression list as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(String resourceGroupName, String emailServiceName,
+ String domainName, String suppressionListName);
+
+ /**
+ * Get
+ *
+ * Get all the addresses in a suppression list.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param emailServiceName The name of the EmailService resource.
+ * @param domainName The name of the Domains resource.
+ * @param suppressionListName The name of the suppression list.
+ * @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 all the addresses in a suppression list as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(String resourceGroupName, String emailServiceName,
+ String domainName, String suppressionListName, Context context);
+
+ /**
+ * Get
+ *
+ * Get a SuppressionListAddress.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param emailServiceName The name of the EmailService resource.
+ * @param domainName The name of the Domains resource.
+ * @param suppressionListName The name of the suppression list.
+ * @param addressId The id of the address in a suppression list.
+ * @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 SuppressionListAddress along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(String resourceGroupName, String emailServiceName,
+ String domainName, String suppressionListName, String addressId, Context context);
+
+ /**
+ * Get
+ *
+ * Get a SuppressionListAddress.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param emailServiceName The name of the EmailService resource.
+ * @param domainName The name of the Domains resource.
+ * @param suppressionListName The name of the suppression list.
+ * @param addressId The id of the address in a suppression list.
+ * @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 SuppressionListAddress.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SuppressionListAddressResourceInner get(String resourceGroupName, String emailServiceName, String domainName,
+ String suppressionListName, String addressId);
+
+ /**
+ * Create Or Update
+ *
+ * Create or update a SuppressionListAddress.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param emailServiceName The name of the EmailService resource.
+ * @param domainName The name of the Domains resource.
+ * @param suppressionListName The name of the suppression list.
+ * @param addressId The id of the address in a suppression list.
+ * @param parameters Parameters for the create or update operation.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a object that represents a SuppressionList record along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response createOrUpdateWithResponse(String resourceGroupName,
+ String emailServiceName, String domainName, String suppressionListName, String addressId,
+ SuppressionListAddressResourceInner parameters, Context context);
+
+ /**
+ * Create Or Update
+ *
+ * Create or update a SuppressionListAddress.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param emailServiceName The name of the EmailService resource.
+ * @param domainName The name of the Domains resource.
+ * @param suppressionListName The name of the suppression list.
+ * @param addressId The id of the address in a suppression list.
+ * @param parameters Parameters for the create or update operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a object that represents a SuppressionList record.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SuppressionListAddressResourceInner createOrUpdate(String resourceGroupName, String emailServiceName,
+ String domainName, String suppressionListName, String addressId,
+ SuppressionListAddressResourceInner parameters);
+
+ /**
+ * Delete
+ *
+ * Operation to delete a single address from a suppression list.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param emailServiceName The name of the EmailService resource.
+ * @param domainName The name of the Domains resource.
+ * @param suppressionListName The name of the suppression list.
+ * @param addressId The id of the address in a suppression list.
+ * @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 emailServiceName, String domainName,
+ String suppressionListName, String addressId, Context context);
+
+ /**
+ * Delete
+ *
+ * Operation to delete a single address from a suppression list.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param emailServiceName The name of the EmailService resource.
+ * @param domainName The name of the Domains resource.
+ * @param suppressionListName The name of the suppression list.
+ * @param addressId The id of the address in a suppression list.
+ * @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 emailServiceName, String domainName, String suppressionListName,
+ String addressId);
+}
diff --git a/sdk/communication/azure-resourcemanager-communication/src/main/java/com/azure/resourcemanager/communication/fluent/SuppressionListsClient.java b/sdk/communication/azure-resourcemanager-communication/src/main/java/com/azure/resourcemanager/communication/fluent/SuppressionListsClient.java
new file mode 100644
index 000000000000..799363d149f5
--- /dev/null
+++ b/sdk/communication/azure-resourcemanager-communication/src/main/java/com/azure/resourcemanager/communication/fluent/SuppressionListsClient.java
@@ -0,0 +1,167 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.communication.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.util.Context;
+import com.azure.resourcemanager.communication.fluent.models.SuppressionListResourceInner;
+
+/**
+ * An instance of this class provides access to all the operations defined in SuppressionListsClient.
+ */
+public interface SuppressionListsClient {
+ /**
+ * List
+ *
+ * List all suppression lists for a domains resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param emailServiceName The name of the EmailService resource.
+ * @param domainName The name of the Domains resource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a class representing a Domains SuppressionListResource collection as paginated response with
+ * {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByDomain(String resourceGroupName, String emailServiceName,
+ String domainName);
+
+ /**
+ * List
+ *
+ * List all suppression lists for a domains resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param emailServiceName The name of the EmailService resource.
+ * @param domainName The name of the Domains 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 class representing a Domains SuppressionListResource collection as paginated response with
+ * {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByDomain(String resourceGroupName, String emailServiceName,
+ String domainName, Context context);
+
+ /**
+ * Get
+ *
+ * Get a SuppressionList resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param emailServiceName The name of the EmailService resource.
+ * @param domainName The name of the Domains resource.
+ * @param suppressionListName The name of the suppression list.
+ * @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 SuppressionList resource along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(String resourceGroupName, String emailServiceName,
+ String domainName, String suppressionListName, Context context);
+
+ /**
+ * Get
+ *
+ * Get a SuppressionList resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param emailServiceName The name of the EmailService resource.
+ * @param domainName The name of the Domains resource.
+ * @param suppressionListName The name of the suppression list.
+ * @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 SuppressionList resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SuppressionListResourceInner get(String resourceGroupName, String emailServiceName, String domainName,
+ String suppressionListName);
+
+ /**
+ * Create Or Update
+ *
+ * Add a new SuppressionList resource under the parent Domains resource or update an existing SuppressionList
+ * resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param emailServiceName The name of the EmailService resource.
+ * @param domainName The name of the Domains resource.
+ * @param suppressionListName The name of the suppression list.
+ * @param parameters Parameters for the create or update operation.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a class representing a SuppressionList resource along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response createOrUpdateWithResponse(String resourceGroupName, String emailServiceName,
+ String domainName, String suppressionListName, SuppressionListResourceInner parameters, Context context);
+
+ /**
+ * Create Or Update
+ *
+ * Add a new SuppressionList resource under the parent Domains resource or update an existing SuppressionList
+ * resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param emailServiceName The name of the EmailService resource.
+ * @param domainName The name of the Domains resource.
+ * @param suppressionListName The name of the suppression list.
+ * @param parameters Parameters for the create or update operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a class representing a SuppressionList resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SuppressionListResourceInner createOrUpdate(String resourceGroupName, String emailServiceName, String domainName,
+ String suppressionListName, SuppressionListResourceInner parameters);
+
+ /**
+ * Delete
+ *
+ * Delete a SuppressionList.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param emailServiceName The name of the EmailService resource.
+ * @param domainName The name of the Domains resource.
+ * @param suppressionListName The name of the suppression list.
+ * @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 emailServiceName, String domainName,
+ String suppressionListName, Context context);
+
+ /**
+ * Delete
+ *
+ * Delete a SuppressionList.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param emailServiceName The name of the EmailService resource.
+ * @param domainName The name of the Domains resource.
+ * @param suppressionListName The name of the suppression list.
+ * @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 emailServiceName, String domainName, String suppressionListName);
+}
diff --git a/sdk/communication/azure-resourcemanager-communication/src/main/java/com/azure/resourcemanager/communication/fluent/models/CommunicationServiceProperties.java b/sdk/communication/azure-resourcemanager-communication/src/main/java/com/azure/resourcemanager/communication/fluent/models/CommunicationServiceProperties.java
index d85a8701fdf1..595a87a60e69 100644
--- a/sdk/communication/azure-resourcemanager-communication/src/main/java/com/azure/resourcemanager/communication/fluent/models/CommunicationServiceProperties.java
+++ b/sdk/communication/azure-resourcemanager-communication/src/main/java/com/azure/resourcemanager/communication/fluent/models/CommunicationServiceProperties.java
@@ -11,6 +11,7 @@
import com.azure.json.JsonToken;
import com.azure.json.JsonWriter;
import com.azure.resourcemanager.communication.models.CommunicationServicesProvisioningState;
+import com.azure.resourcemanager.communication.models.PublicNetworkAccess;
import java.io.IOException;
import java.util.List;
@@ -54,6 +55,17 @@ public final class CommunicationServiceProperties implements JsonSerializable linkedDomains;
+ /*
+ * Allow, disallow, or let network security perimeter configuration control public network access to the protected
+ * resource. Value is optional but if passed in, it must be 'Enabled', 'Disabled' or 'SecuredByPerimeter'.
+ */
+ private PublicNetworkAccess publicNetworkAccess;
+
+ /*
+ * Disable local authentication for the CommunicationService.
+ */
+ private Boolean disableLocalAuth;
+
/**
* Creates an instance of CommunicationServiceProperties class.
*/
@@ -146,6 +158,50 @@ public CommunicationServiceProperties withLinkedDomains(List linkedDomai
return this;
}
+ /**
+ * Get the publicNetworkAccess property: Allow, disallow, or let network security perimeter configuration control
+ * public network access to the protected resource. Value is optional but if passed in, it must be 'Enabled',
+ * 'Disabled' or 'SecuredByPerimeter'.
+ *
+ * @return the publicNetworkAccess value.
+ */
+ public PublicNetworkAccess publicNetworkAccess() {
+ return this.publicNetworkAccess;
+ }
+
+ /**
+ * Set the publicNetworkAccess property: Allow, disallow, or let network security perimeter configuration control
+ * public network access to the protected resource. Value is optional but if passed in, it must be 'Enabled',
+ * 'Disabled' or 'SecuredByPerimeter'.
+ *
+ * @param publicNetworkAccess the publicNetworkAccess value to set.
+ * @return the CommunicationServiceProperties object itself.
+ */
+ public CommunicationServiceProperties withPublicNetworkAccess(PublicNetworkAccess publicNetworkAccess) {
+ this.publicNetworkAccess = publicNetworkAccess;
+ return this;
+ }
+
+ /**
+ * Get the disableLocalAuth property: Disable local authentication for the CommunicationService.
+ *
+ * @return the disableLocalAuth value.
+ */
+ public Boolean disableLocalAuth() {
+ return this.disableLocalAuth;
+ }
+
+ /**
+ * Set the disableLocalAuth property: Disable local authentication for the CommunicationService.
+ *
+ * @param disableLocalAuth the disableLocalAuth value to set.
+ * @return the CommunicationServiceProperties object itself.
+ */
+ public CommunicationServiceProperties withDisableLocalAuth(Boolean disableLocalAuth) {
+ this.disableLocalAuth = disableLocalAuth;
+ return this;
+ }
+
/**
* Validates the instance.
*
@@ -170,6 +226,9 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
jsonWriter.writeStringField("dataLocation", this.dataLocation);
jsonWriter.writeArrayField("linkedDomains", this.linkedDomains,
(writer, element) -> writer.writeString(element));
+ jsonWriter.writeStringField("publicNetworkAccess",
+ this.publicNetworkAccess == null ? null : this.publicNetworkAccess.toString());
+ jsonWriter.writeBooleanField("disableLocalAuth", this.disableLocalAuth);
return jsonWriter.writeEndObject();
}
@@ -206,6 +265,12 @@ public static CommunicationServiceProperties fromJson(JsonReader jsonReader) thr
} else if ("linkedDomains".equals(fieldName)) {
List linkedDomains = reader.readArray(reader1 -> reader1.getString());
deserializedCommunicationServiceProperties.linkedDomains = linkedDomains;
+ } else if ("publicNetworkAccess".equals(fieldName)) {
+ deserializedCommunicationServiceProperties.publicNetworkAccess
+ = PublicNetworkAccess.fromString(reader.getString());
+ } else if ("disableLocalAuth".equals(fieldName)) {
+ deserializedCommunicationServiceProperties.disableLocalAuth
+ = reader.getNullable(JsonReader::getBoolean);
} else {
reader.skipChildren();
}
diff --git a/sdk/communication/azure-resourcemanager-communication/src/main/java/com/azure/resourcemanager/communication/fluent/models/CommunicationServiceResourceInner.java b/sdk/communication/azure-resourcemanager-communication/src/main/java/com/azure/resourcemanager/communication/fluent/models/CommunicationServiceResourceInner.java
index c836ea5a7be4..dceaed6de2aa 100644
--- a/sdk/communication/azure-resourcemanager-communication/src/main/java/com/azure/resourcemanager/communication/fluent/models/CommunicationServiceResourceInner.java
+++ b/sdk/communication/azure-resourcemanager-communication/src/main/java/com/azure/resourcemanager/communication/fluent/models/CommunicationServiceResourceInner.java
@@ -12,6 +12,7 @@
import com.azure.json.JsonWriter;
import com.azure.resourcemanager.communication.models.CommunicationServicesProvisioningState;
import com.azure.resourcemanager.communication.models.ManagedServiceIdentity;
+import com.azure.resourcemanager.communication.models.PublicNetworkAccess;
import java.io.IOException;
import java.util.List;
import java.util.Map;
@@ -235,6 +236,56 @@ public CommunicationServiceResourceInner withLinkedDomains(List linkedDo
return this;
}
+ /**
+ * Get the publicNetworkAccess property: Allow, disallow, or let network security perimeter configuration control
+ * public network access to the protected resource. Value is optional but if passed in, it must be 'Enabled',
+ * 'Disabled' or 'SecuredByPerimeter'.
+ *
+ * @return the publicNetworkAccess value.
+ */
+ public PublicNetworkAccess publicNetworkAccess() {
+ return this.innerProperties() == null ? null : this.innerProperties().publicNetworkAccess();
+ }
+
+ /**
+ * Set the publicNetworkAccess property: Allow, disallow, or let network security perimeter configuration control
+ * public network access to the protected resource. Value is optional but if passed in, it must be 'Enabled',
+ * 'Disabled' or 'SecuredByPerimeter'.
+ *
+ * @param publicNetworkAccess the publicNetworkAccess value to set.
+ * @return the CommunicationServiceResourceInner object itself.
+ */
+ public CommunicationServiceResourceInner withPublicNetworkAccess(PublicNetworkAccess publicNetworkAccess) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new CommunicationServiceProperties();
+ }
+ this.innerProperties().withPublicNetworkAccess(publicNetworkAccess);
+ return this;
+ }
+
+ /**
+ * Get the disableLocalAuth property: Disable local authentication for the CommunicationService.
+ *
+ * @return the disableLocalAuth value.
+ */
+ public Boolean disableLocalAuth() {
+ return this.innerProperties() == null ? null : this.innerProperties().disableLocalAuth();
+ }
+
+ /**
+ * Set the disableLocalAuth property: Disable local authentication for the CommunicationService.
+ *
+ * @param disableLocalAuth the disableLocalAuth value to set.
+ * @return the CommunicationServiceResourceInner object itself.
+ */
+ public CommunicationServiceResourceInner withDisableLocalAuth(Boolean disableLocalAuth) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new CommunicationServiceProperties();
+ }
+ this.innerProperties().withDisableLocalAuth(disableLocalAuth);
+ return this;
+ }
+
/**
* Validates the instance.
*
diff --git a/sdk/communication/azure-resourcemanager-communication/src/main/java/com/azure/resourcemanager/communication/fluent/models/CommunicationServiceUpdateProperties.java b/sdk/communication/azure-resourcemanager-communication/src/main/java/com/azure/resourcemanager/communication/fluent/models/CommunicationServiceUpdateProperties.java
index c388a026582d..8f7feeaabbdd 100644
--- a/sdk/communication/azure-resourcemanager-communication/src/main/java/com/azure/resourcemanager/communication/fluent/models/CommunicationServiceUpdateProperties.java
+++ b/sdk/communication/azure-resourcemanager-communication/src/main/java/com/azure/resourcemanager/communication/fluent/models/CommunicationServiceUpdateProperties.java
@@ -9,6 +9,7 @@
import com.azure.json.JsonSerializable;
import com.azure.json.JsonToken;
import com.azure.json.JsonWriter;
+import com.azure.resourcemanager.communication.models.PublicNetworkAccess;
import java.io.IOException;
import java.util.List;
@@ -23,6 +24,17 @@ public final class CommunicationServiceUpdateProperties
*/
private List linkedDomains;
+ /*
+ * Allow, disallow, or let network security perimeter configuration control public network access to the protected
+ * resource. Value is optional but if passed in, it must be 'Enabled', 'Disabled' or 'SecuredByPerimeter'.
+ */
+ private PublicNetworkAccess publicNetworkAccess;
+
+ /*
+ * Disable local authentication for the CommunicationService.
+ */
+ private Boolean disableLocalAuth;
+
/**
* Creates an instance of CommunicationServiceUpdateProperties class.
*/
@@ -49,6 +61,50 @@ public CommunicationServiceUpdateProperties withLinkedDomains(List linke
return this;
}
+ /**
+ * Get the publicNetworkAccess property: Allow, disallow, or let network security perimeter configuration control
+ * public network access to the protected resource. Value is optional but if passed in, it must be 'Enabled',
+ * 'Disabled' or 'SecuredByPerimeter'.
+ *
+ * @return the publicNetworkAccess value.
+ */
+ public PublicNetworkAccess publicNetworkAccess() {
+ return this.publicNetworkAccess;
+ }
+
+ /**
+ * Set the publicNetworkAccess property: Allow, disallow, or let network security perimeter configuration control
+ * public network access to the protected resource. Value is optional but if passed in, it must be 'Enabled',
+ * 'Disabled' or 'SecuredByPerimeter'.
+ *
+ * @param publicNetworkAccess the publicNetworkAccess value to set.
+ * @return the CommunicationServiceUpdateProperties object itself.
+ */
+ public CommunicationServiceUpdateProperties withPublicNetworkAccess(PublicNetworkAccess publicNetworkAccess) {
+ this.publicNetworkAccess = publicNetworkAccess;
+ return this;
+ }
+
+ /**
+ * Get the disableLocalAuth property: Disable local authentication for the CommunicationService.
+ *
+ * @return the disableLocalAuth value.
+ */
+ public Boolean disableLocalAuth() {
+ return this.disableLocalAuth;
+ }
+
+ /**
+ * Set the disableLocalAuth property: Disable local authentication for the CommunicationService.
+ *
+ * @param disableLocalAuth the disableLocalAuth value to set.
+ * @return the CommunicationServiceUpdateProperties object itself.
+ */
+ public CommunicationServiceUpdateProperties withDisableLocalAuth(Boolean disableLocalAuth) {
+ this.disableLocalAuth = disableLocalAuth;
+ return this;
+ }
+
/**
* Validates the instance.
*
@@ -65,6 +121,9 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
jsonWriter.writeStartObject();
jsonWriter.writeArrayField("linkedDomains", this.linkedDomains,
(writer, element) -> writer.writeString(element));
+ jsonWriter.writeStringField("publicNetworkAccess",
+ this.publicNetworkAccess == null ? null : this.publicNetworkAccess.toString());
+ jsonWriter.writeBooleanField("disableLocalAuth", this.disableLocalAuth);
return jsonWriter.writeEndObject();
}
@@ -87,6 +146,12 @@ public static CommunicationServiceUpdateProperties fromJson(JsonReader jsonReade
if ("linkedDomains".equals(fieldName)) {
List linkedDomains = reader.readArray(reader1 -> reader1.getString());
deserializedCommunicationServiceUpdateProperties.linkedDomains = linkedDomains;
+ } else if ("publicNetworkAccess".equals(fieldName)) {
+ deserializedCommunicationServiceUpdateProperties.publicNetworkAccess
+ = PublicNetworkAccess.fromString(reader.getString());
+ } else if ("disableLocalAuth".equals(fieldName)) {
+ deserializedCommunicationServiceUpdateProperties.disableLocalAuth
+ = reader.getNullable(JsonReader::getBoolean);
} else {
reader.skipChildren();
}
diff --git a/sdk/communication/azure-resourcemanager-communication/src/main/java/com/azure/resourcemanager/communication/fluent/models/SmtpUsernameProperties.java b/sdk/communication/azure-resourcemanager-communication/src/main/java/com/azure/resourcemanager/communication/fluent/models/SmtpUsernameProperties.java
new file mode 100644
index 000000000000..1ef93aacbb20
--- /dev/null
+++ b/sdk/communication/azure-resourcemanager-communication/src/main/java/com/azure/resourcemanager/communication/fluent/models/SmtpUsernameProperties.java
@@ -0,0 +1,168 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.communication.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import java.io.IOException;
+
+/**
+ * A class that describes the properties of a SmtpUsername resource.
+ */
+@Fluent
+public final class SmtpUsernameProperties implements JsonSerializable {
+ /*
+ * The SMTP username. Could be free form or in the email address format.
+ */
+ private String username;
+
+ /*
+ * The application Id for the linked Entra Application.
+ */
+ private String entraApplicationId;
+
+ /*
+ * The tenant of the linked Entra Application.
+ */
+ private String tenantId;
+
+ /**
+ * Creates an instance of SmtpUsernameProperties class.
+ */
+ public SmtpUsernameProperties() {
+ }
+
+ /**
+ * Get the username property: The SMTP username. Could be free form or in the email address format.
+ *
+ * @return the username value.
+ */
+ public String username() {
+ return this.username;
+ }
+
+ /**
+ * Set the username property: The SMTP username. Could be free form or in the email address format.
+ *
+ * @param username the username value to set.
+ * @return the SmtpUsernameProperties object itself.
+ */
+ public SmtpUsernameProperties withUsername(String username) {
+ this.username = username;
+ return this;
+ }
+
+ /**
+ * Get the entraApplicationId property: The application Id for the linked Entra Application.
+ *
+ * @return the entraApplicationId value.
+ */
+ public String entraApplicationId() {
+ return this.entraApplicationId;
+ }
+
+ /**
+ * Set the entraApplicationId property: The application Id for the linked Entra Application.
+ *
+ * @param entraApplicationId the entraApplicationId value to set.
+ * @return the SmtpUsernameProperties object itself.
+ */
+ public SmtpUsernameProperties withEntraApplicationId(String entraApplicationId) {
+ this.entraApplicationId = entraApplicationId;
+ return this;
+ }
+
+ /**
+ * Get the tenantId property: The tenant of the linked Entra Application.
+ *
+ * @return the tenantId value.
+ */
+ public String tenantId() {
+ return this.tenantId;
+ }
+
+ /**
+ * Set the tenantId property: The tenant of the linked Entra Application.
+ *
+ * @param tenantId the tenantId value to set.
+ * @return the SmtpUsernameProperties object itself.
+ */
+ public SmtpUsernameProperties withTenantId(String tenantId) {
+ this.tenantId = tenantId;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (username() == null) {
+ throw LOGGER.atError()
+ .log(
+ new IllegalArgumentException("Missing required property username in model SmtpUsernameProperties"));
+ }
+ if (entraApplicationId() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Missing required property entraApplicationId in model SmtpUsernameProperties"));
+ }
+ if (tenantId() == null) {
+ throw LOGGER.atError()
+ .log(
+ new IllegalArgumentException("Missing required property tenantId in model SmtpUsernameProperties"));
+ }
+ }
+
+ private static final ClientLogger LOGGER = new ClientLogger(SmtpUsernameProperties.class);
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeStringField("username", this.username);
+ jsonWriter.writeStringField("entraApplicationId", this.entraApplicationId);
+ jsonWriter.writeStringField("tenantId", this.tenantId);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of SmtpUsernameProperties from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of SmtpUsernameProperties if the JsonReader was pointing to an instance of it, or null if it
+ * was pointing to JSON null.
+ * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
+ * @throws IOException If an error occurs while reading the SmtpUsernameProperties.
+ */
+ public static SmtpUsernameProperties fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ SmtpUsernameProperties deserializedSmtpUsernameProperties = new SmtpUsernameProperties();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("username".equals(fieldName)) {
+ deserializedSmtpUsernameProperties.username = reader.getString();
+ } else if ("entraApplicationId".equals(fieldName)) {
+ deserializedSmtpUsernameProperties.entraApplicationId = reader.getString();
+ } else if ("tenantId".equals(fieldName)) {
+ deserializedSmtpUsernameProperties.tenantId = reader.getString();
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedSmtpUsernameProperties;
+ });
+ }
+}
diff --git a/sdk/communication/azure-resourcemanager-communication/src/main/java/com/azure/resourcemanager/communication/fluent/models/SmtpUsernameResourceInner.java b/sdk/communication/azure-resourcemanager-communication/src/main/java/com/azure/resourcemanager/communication/fluent/models/SmtpUsernameResourceInner.java
new file mode 100644
index 000000000000..366c6430faab
--- /dev/null
+++ b/sdk/communication/azure-resourcemanager-communication/src/main/java/com/azure/resourcemanager/communication/fluent/models/SmtpUsernameResourceInner.java
@@ -0,0 +1,223 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.communication.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.management.ProxyResource;
+import com.azure.core.management.SystemData;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import java.io.IOException;
+
+/**
+ * The object describing the smtp username resource.
+ */
+@Fluent
+public final class SmtpUsernameResourceInner extends ProxyResource {
+ /*
+ * The properties of a SmtpUsername resource.
+ */
+ private SmtpUsernameProperties innerProperties;
+
+ /*
+ * Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ */
+ private SystemData systemData;
+
+ /*
+ * The type of the resource.
+ */
+ private String type;
+
+ /*
+ * The name of the resource.
+ */
+ private String name;
+
+ /*
+ * Fully qualified resource Id for the resource.
+ */
+ private String id;
+
+ /**
+ * Creates an instance of SmtpUsernameResourceInner class.
+ */
+ public SmtpUsernameResourceInner() {
+ }
+
+ /**
+ * Get the innerProperties property: The properties of a SmtpUsername resource.
+ *
+ * @return the innerProperties value.
+ */
+ private SmtpUsernameProperties innerProperties() {
+ return this.innerProperties;
+ }
+
+ /**
+ * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ *
+ * @return the systemData value.
+ */
+ public SystemData systemData() {
+ return this.systemData;
+ }
+
+ /**
+ * Get the type property: The type of the resource.
+ *
+ * @return the type value.
+ */
+ @Override
+ public String type() {
+ return this.type;
+ }
+
+ /**
+ * Get the name property: The name of the resource.
+ *
+ * @return the name value.
+ */
+ @Override
+ public String name() {
+ return this.name;
+ }
+
+ /**
+ * Get the id property: Fully qualified resource Id for the resource.
+ *
+ * @return the id value.
+ */
+ @Override
+ public String id() {
+ return this.id;
+ }
+
+ /**
+ * Get the username property: The SMTP username. Could be free form or in the email address format.
+ *
+ * @return the username value.
+ */
+ public String username() {
+ return this.innerProperties() == null ? null : this.innerProperties().username();
+ }
+
+ /**
+ * Set the username property: The SMTP username. Could be free form or in the email address format.
+ *
+ * @param username the username value to set.
+ * @return the SmtpUsernameResourceInner object itself.
+ */
+ public SmtpUsernameResourceInner withUsername(String username) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new SmtpUsernameProperties();
+ }
+ this.innerProperties().withUsername(username);
+ return this;
+ }
+
+ /**
+ * Get the entraApplicationId property: The application Id for the linked Entra Application.
+ *
+ * @return the entraApplicationId value.
+ */
+ public String entraApplicationId() {
+ return this.innerProperties() == null ? null : this.innerProperties().entraApplicationId();
+ }
+
+ /**
+ * Set the entraApplicationId property: The application Id for the linked Entra Application.
+ *
+ * @param entraApplicationId the entraApplicationId value to set.
+ * @return the SmtpUsernameResourceInner object itself.
+ */
+ public SmtpUsernameResourceInner withEntraApplicationId(String entraApplicationId) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new SmtpUsernameProperties();
+ }
+ this.innerProperties().withEntraApplicationId(entraApplicationId);
+ return this;
+ }
+
+ /**
+ * Get the tenantId property: The tenant of the linked Entra Application.
+ *
+ * @return the tenantId value.
+ */
+ public String tenantId() {
+ return this.innerProperties() == null ? null : this.innerProperties().tenantId();
+ }
+
+ /**
+ * Set the tenantId property: The tenant of the linked Entra Application.
+ *
+ * @param tenantId the tenantId value to set.
+ * @return the SmtpUsernameResourceInner object itself.
+ */
+ public SmtpUsernameResourceInner withTenantId(String tenantId) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new SmtpUsernameProperties();
+ }
+ this.innerProperties().withTenantId(tenantId);
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (innerProperties() != null) {
+ innerProperties().validate();
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeJsonField("properties", this.innerProperties);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of SmtpUsernameResourceInner from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of SmtpUsernameResourceInner if the JsonReader was pointing to an instance of it, or null if
+ * it was pointing to JSON null.
+ * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
+ * @throws IOException If an error occurs while reading the SmtpUsernameResourceInner.
+ */
+ public static SmtpUsernameResourceInner fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ SmtpUsernameResourceInner deserializedSmtpUsernameResourceInner = new SmtpUsernameResourceInner();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("id".equals(fieldName)) {
+ deserializedSmtpUsernameResourceInner.id = reader.getString();
+ } else if ("name".equals(fieldName)) {
+ deserializedSmtpUsernameResourceInner.name = reader.getString();
+ } else if ("type".equals(fieldName)) {
+ deserializedSmtpUsernameResourceInner.type = reader.getString();
+ } else if ("properties".equals(fieldName)) {
+ deserializedSmtpUsernameResourceInner.innerProperties = SmtpUsernameProperties.fromJson(reader);
+ } else if ("systemData".equals(fieldName)) {
+ deserializedSmtpUsernameResourceInner.systemData = SystemData.fromJson(reader);
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedSmtpUsernameResourceInner;
+ });
+ }
+}
diff --git a/sdk/communication/azure-resourcemanager-communication/src/main/java/com/azure/resourcemanager/communication/fluent/models/SuppressionListAddressProperties.java b/sdk/communication/azure-resourcemanager-communication/src/main/java/com/azure/resourcemanager/communication/fluent/models/SuppressionListAddressProperties.java
new file mode 100644
index 000000000000..11e3108eb360
--- /dev/null
+++ b/sdk/communication/azure-resourcemanager-communication/src/main/java/com/azure/resourcemanager/communication/fluent/models/SuppressionListAddressProperties.java
@@ -0,0 +1,224 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.communication.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.util.CoreUtils;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import java.io.IOException;
+import java.time.OffsetDateTime;
+
+/**
+ * A class that describes the properties of a SuppressionListAddress resource.
+ */
+@Fluent
+public final class SuppressionListAddressProperties implements JsonSerializable {
+ /*
+ * Email address of the recipient.
+ */
+ private String email;
+
+ /*
+ * The first name of the email recipient.
+ */
+ private String firstName;
+
+ /*
+ * The last name of the email recipient.
+ */
+ private String lastName;
+
+ /*
+ * An optional property to provide contextual notes or a description for an address.
+ */
+ private String notes;
+
+ /*
+ * The date the address was last updated in a suppression list.
+ */
+ private OffsetDateTime lastModified;
+
+ /*
+ * The location where the SuppressionListAddress data is stored at rest. This value is inherited from the parent
+ * Domains resource.
+ */
+ private String dataLocation;
+
+ /**
+ * Creates an instance of SuppressionListAddressProperties class.
+ */
+ public SuppressionListAddressProperties() {
+ }
+
+ /**
+ * Get the email property: Email address of the recipient.
+ *
+ * @return the email value.
+ */
+ public String email() {
+ return this.email;
+ }
+
+ /**
+ * Set the email property: Email address of the recipient.
+ *
+ * @param email the email value to set.
+ * @return the SuppressionListAddressProperties object itself.
+ */
+ public SuppressionListAddressProperties withEmail(String email) {
+ this.email = email;
+ return this;
+ }
+
+ /**
+ * Get the firstName property: The first name of the email recipient.
+ *
+ * @return the firstName value.
+ */
+ public String firstName() {
+ return this.firstName;
+ }
+
+ /**
+ * Set the firstName property: The first name of the email recipient.
+ *
+ * @param firstName the firstName value to set.
+ * @return the SuppressionListAddressProperties object itself.
+ */
+ public SuppressionListAddressProperties withFirstName(String firstName) {
+ this.firstName = firstName;
+ return this;
+ }
+
+ /**
+ * Get the lastName property: The last name of the email recipient.
+ *
+ * @return the lastName value.
+ */
+ public String lastName() {
+ return this.lastName;
+ }
+
+ /**
+ * Set the lastName property: The last name of the email recipient.
+ *
+ * @param lastName the lastName value to set.
+ * @return the SuppressionListAddressProperties object itself.
+ */
+ public SuppressionListAddressProperties withLastName(String lastName) {
+ this.lastName = lastName;
+ return this;
+ }
+
+ /**
+ * Get the notes property: An optional property to provide contextual notes or a description for an address.
+ *
+ * @return the notes value.
+ */
+ public String notes() {
+ return this.notes;
+ }
+
+ /**
+ * Set the notes property: An optional property to provide contextual notes or a description for an address.
+ *
+ * @param notes the notes value to set.
+ * @return the SuppressionListAddressProperties object itself.
+ */
+ public SuppressionListAddressProperties withNotes(String notes) {
+ this.notes = notes;
+ return this;
+ }
+
+ /**
+ * Get the lastModified property: The date the address was last updated in a suppression list.
+ *
+ * @return the lastModified value.
+ */
+ public OffsetDateTime lastModified() {
+ return this.lastModified;
+ }
+
+ /**
+ * Get the dataLocation property: The location where the SuppressionListAddress data is stored at rest. This value
+ * is inherited from the parent Domains resource.
+ *
+ * @return the dataLocation value.
+ */
+ public String dataLocation() {
+ return this.dataLocation;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (email() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Missing required property email in model SuppressionListAddressProperties"));
+ }
+ }
+
+ private static final ClientLogger LOGGER = new ClientLogger(SuppressionListAddressProperties.class);
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeStringField("email", this.email);
+ jsonWriter.writeStringField("firstName", this.firstName);
+ jsonWriter.writeStringField("lastName", this.lastName);
+ jsonWriter.writeStringField("notes", this.notes);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of SuppressionListAddressProperties from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of SuppressionListAddressProperties if the JsonReader was pointing to an instance of it, or
+ * null if it was pointing to JSON null.
+ * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
+ * @throws IOException If an error occurs while reading the SuppressionListAddressProperties.
+ */
+ public static SuppressionListAddressProperties fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ SuppressionListAddressProperties deserializedSuppressionListAddressProperties
+ = new SuppressionListAddressProperties();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("email".equals(fieldName)) {
+ deserializedSuppressionListAddressProperties.email = reader.getString();
+ } else if ("firstName".equals(fieldName)) {
+ deserializedSuppressionListAddressProperties.firstName = reader.getString();
+ } else if ("lastName".equals(fieldName)) {
+ deserializedSuppressionListAddressProperties.lastName = reader.getString();
+ } else if ("notes".equals(fieldName)) {
+ deserializedSuppressionListAddressProperties.notes = reader.getString();
+ } else if ("lastModified".equals(fieldName)) {
+ deserializedSuppressionListAddressProperties.lastModified = reader
+ .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()));
+ } else if ("dataLocation".equals(fieldName)) {
+ deserializedSuppressionListAddressProperties.dataLocation = reader.getString();
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedSuppressionListAddressProperties;
+ });
+ }
+}
diff --git a/sdk/communication/azure-resourcemanager-communication/src/main/java/com/azure/resourcemanager/communication/fluent/models/SuppressionListAddressResourceInner.java b/sdk/communication/azure-resourcemanager-communication/src/main/java/com/azure/resourcemanager/communication/fluent/models/SuppressionListAddressResourceInner.java
new file mode 100644
index 000000000000..28054b5d02b3
--- /dev/null
+++ b/sdk/communication/azure-resourcemanager-communication/src/main/java/com/azure/resourcemanager/communication/fluent/models/SuppressionListAddressResourceInner.java
@@ -0,0 +1,268 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.communication.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.management.ProxyResource;
+import com.azure.core.management.SystemData;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import java.io.IOException;
+import java.time.OffsetDateTime;
+
+/**
+ * A object that represents a SuppressionList record.
+ */
+@Fluent
+public final class SuppressionListAddressResourceInner extends ProxyResource {
+ /*
+ * The properties of a SuppressionListAddress resource.
+ */
+ private SuppressionListAddressProperties innerProperties;
+
+ /*
+ * Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ */
+ private SystemData systemData;
+
+ /*
+ * The type of the resource.
+ */
+ private String type;
+
+ /*
+ * The name of the resource.
+ */
+ private String name;
+
+ /*
+ * Fully qualified resource Id for the resource.
+ */
+ private String id;
+
+ /**
+ * Creates an instance of SuppressionListAddressResourceInner class.
+ */
+ public SuppressionListAddressResourceInner() {
+ }
+
+ /**
+ * Get the innerProperties property: The properties of a SuppressionListAddress resource.
+ *
+ * @return the innerProperties value.
+ */
+ private SuppressionListAddressProperties innerProperties() {
+ return this.innerProperties;
+ }
+
+ /**
+ * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ *
+ * @return the systemData value.
+ */
+ public SystemData systemData() {
+ return this.systemData;
+ }
+
+ /**
+ * Get the type property: The type of the resource.
+ *
+ * @return the type value.
+ */
+ @Override
+ public String type() {
+ return this.type;
+ }
+
+ /**
+ * Get the name property: The name of the resource.
+ *
+ * @return the name value.
+ */
+ @Override
+ public String name() {
+ return this.name;
+ }
+
+ /**
+ * Get the id property: Fully qualified resource Id for the resource.
+ *
+ * @return the id value.
+ */
+ @Override
+ public String id() {
+ return this.id;
+ }
+
+ /**
+ * Get the email property: Email address of the recipient.
+ *
+ * @return the email value.
+ */
+ public String email() {
+ return this.innerProperties() == null ? null : this.innerProperties().email();
+ }
+
+ /**
+ * Set the email property: Email address of the recipient.
+ *
+ * @param email the email value to set.
+ * @return the SuppressionListAddressResourceInner object itself.
+ */
+ public SuppressionListAddressResourceInner withEmail(String email) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new SuppressionListAddressProperties();
+ }
+ this.innerProperties().withEmail(email);
+ return this;
+ }
+
+ /**
+ * Get the firstName property: The first name of the email recipient.
+ *
+ * @return the firstName value.
+ */
+ public String firstName() {
+ return this.innerProperties() == null ? null : this.innerProperties().firstName();
+ }
+
+ /**
+ * Set the firstName property: The first name of the email recipient.
+ *
+ * @param firstName the firstName value to set.
+ * @return the SuppressionListAddressResourceInner object itself.
+ */
+ public SuppressionListAddressResourceInner withFirstName(String firstName) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new SuppressionListAddressProperties();
+ }
+ this.innerProperties().withFirstName(firstName);
+ return this;
+ }
+
+ /**
+ * Get the lastName property: The last name of the email recipient.
+ *
+ * @return the lastName value.
+ */
+ public String lastName() {
+ return this.innerProperties() == null ? null : this.innerProperties().lastName();
+ }
+
+ /**
+ * Set the lastName property: The last name of the email recipient.
+ *
+ * @param lastName the lastName value to set.
+ * @return the SuppressionListAddressResourceInner object itself.
+ */
+ public SuppressionListAddressResourceInner withLastName(String lastName) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new SuppressionListAddressProperties();
+ }
+ this.innerProperties().withLastName(lastName);
+ return this;
+ }
+
+ /**
+ * Get the notes property: An optional property to provide contextual notes or a description for an address.
+ *
+ * @return the notes value.
+ */
+ public String notes() {
+ return this.innerProperties() == null ? null : this.innerProperties().notes();
+ }
+
+ /**
+ * Set the notes property: An optional property to provide contextual notes or a description for an address.
+ *
+ * @param notes the notes value to set.
+ * @return the SuppressionListAddressResourceInner object itself.
+ */
+ public SuppressionListAddressResourceInner withNotes(String notes) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new SuppressionListAddressProperties();
+ }
+ this.innerProperties().withNotes(notes);
+ return this;
+ }
+
+ /**
+ * Get the lastModified property: The date the address was last updated in a suppression list.
+ *
+ * @return the lastModified value.
+ */
+ public OffsetDateTime lastModified() {
+ return this.innerProperties() == null ? null : this.innerProperties().lastModified();
+ }
+
+ /**
+ * Get the dataLocation property: The location where the SuppressionListAddress data is stored at rest. This value
+ * is inherited from the parent Domains resource.
+ *
+ * @return the dataLocation value.
+ */
+ public String dataLocation() {
+ return this.innerProperties() == null ? null : this.innerProperties().dataLocation();
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (innerProperties() != null) {
+ innerProperties().validate();
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeJsonField("properties", this.innerProperties);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of SuppressionListAddressResourceInner from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of SuppressionListAddressResourceInner if the JsonReader was pointing to an instance of it,
+ * or null if it was pointing to JSON null.
+ * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
+ * @throws IOException If an error occurs while reading the SuppressionListAddressResourceInner.
+ */
+ public static SuppressionListAddressResourceInner fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ SuppressionListAddressResourceInner deserializedSuppressionListAddressResourceInner
+ = new SuppressionListAddressResourceInner();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("id".equals(fieldName)) {
+ deserializedSuppressionListAddressResourceInner.id = reader.getString();
+ } else if ("name".equals(fieldName)) {
+ deserializedSuppressionListAddressResourceInner.name = reader.getString();
+ } else if ("type".equals(fieldName)) {
+ deserializedSuppressionListAddressResourceInner.type = reader.getString();
+ } else if ("properties".equals(fieldName)) {
+ deserializedSuppressionListAddressResourceInner.innerProperties
+ = SuppressionListAddressProperties.fromJson(reader);
+ } else if ("systemData".equals(fieldName)) {
+ deserializedSuppressionListAddressResourceInner.systemData = SystemData.fromJson(reader);
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedSuppressionListAddressResourceInner;
+ });
+ }
+}
diff --git a/sdk/communication/azure-resourcemanager-communication/src/main/java/com/azure/resourcemanager/communication/fluent/models/SuppressionListProperties.java b/sdk/communication/azure-resourcemanager-communication/src/main/java/com/azure/resourcemanager/communication/fluent/models/SuppressionListProperties.java
new file mode 100644
index 000000000000..f666ca875a3f
--- /dev/null
+++ b/sdk/communication/azure-resourcemanager-communication/src/main/java/com/azure/resourcemanager/communication/fluent/models/SuppressionListProperties.java
@@ -0,0 +1,145 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.communication.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import java.io.IOException;
+
+/**
+ * A class that describes the properties of a SuppressionList resource.
+ */
+@Fluent
+public final class SuppressionListProperties implements JsonSerializable {
+ /*
+ * The name of the suppression list. This value must match one of the valid sender usernames of the sending domain.
+ */
+ private String listName;
+
+ /*
+ * The date the resource was last updated.
+ */
+ private String lastUpdatedTimestamp;
+
+ /*
+ * The date the resource was created.
+ */
+ private String createdTimestamp;
+
+ /*
+ * The location where the SuppressionListAddress data is stored at rest. This value is inherited from the parent
+ * Domains resource.
+ */
+ private String dataLocation;
+
+ /**
+ * Creates an instance of SuppressionListProperties class.
+ */
+ public SuppressionListProperties() {
+ }
+
+ /**
+ * Get the listName property: The name of the suppression list. This value must match one of the valid sender
+ * usernames of the sending domain.
+ *
+ * @return the listName value.
+ */
+ public String listName() {
+ return this.listName;
+ }
+
+ /**
+ * Set the listName property: The name of the suppression list. This value must match one of the valid sender
+ * usernames of the sending domain.
+ *
+ * @param listName the listName value to set.
+ * @return the SuppressionListProperties object itself.
+ */
+ public SuppressionListProperties withListName(String listName) {
+ this.listName = listName;
+ return this;
+ }
+
+ /**
+ * Get the lastUpdatedTimestamp property: The date the resource was last updated.
+ *
+ * @return the lastUpdatedTimestamp value.
+ */
+ public String lastUpdatedTimestamp() {
+ return this.lastUpdatedTimestamp;
+ }
+
+ /**
+ * Get the createdTimestamp property: The date the resource was created.
+ *
+ * @return the createdTimestamp value.
+ */
+ public String createdTimestamp() {
+ return this.createdTimestamp;
+ }
+
+ /**
+ * Get the dataLocation property: The location where the SuppressionListAddress data is stored at rest. This value
+ * is inherited from the parent Domains resource.
+ *
+ * @return the dataLocation value.
+ */
+ public String dataLocation() {
+ return this.dataLocation;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeStringField("listName", this.listName);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of SuppressionListProperties from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of SuppressionListProperties if the JsonReader was pointing to an instance of it, or null if
+ * it was pointing to JSON null.
+ * @throws IOException If an error occurs while reading the SuppressionListProperties.
+ */
+ public static SuppressionListProperties fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ SuppressionListProperties deserializedSuppressionListProperties = new SuppressionListProperties();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("listName".equals(fieldName)) {
+ deserializedSuppressionListProperties.listName = reader.getString();
+ } else if ("lastUpdatedTimeStamp".equals(fieldName)) {
+ deserializedSuppressionListProperties.lastUpdatedTimestamp = reader.getString();
+ } else if ("createdTimeStamp".equals(fieldName)) {
+ deserializedSuppressionListProperties.createdTimestamp = reader.getString();
+ } else if ("dataLocation".equals(fieldName)) {
+ deserializedSuppressionListProperties.dataLocation = reader.getString();
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedSuppressionListProperties;
+ });
+ }
+}
diff --git a/sdk/communication/azure-resourcemanager-communication/src/main/java/com/azure/resourcemanager/communication/fluent/models/SuppressionListResourceInner.java b/sdk/communication/azure-resourcemanager-communication/src/main/java/com/azure/resourcemanager/communication/fluent/models/SuppressionListResourceInner.java
new file mode 100644
index 000000000000..d1e6ca359fd5
--- /dev/null
+++ b/sdk/communication/azure-resourcemanager-communication/src/main/java/com/azure/resourcemanager/communication/fluent/models/SuppressionListResourceInner.java
@@ -0,0 +1,208 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.communication.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.management.ProxyResource;
+import com.azure.core.management.SystemData;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import java.io.IOException;
+
+/**
+ * A class representing a SuppressionList resource.
+ */
+@Fluent
+public final class SuppressionListResourceInner extends ProxyResource {
+ /*
+ * The properties of a SuppressionList resource.
+ */
+ private SuppressionListProperties innerProperties;
+
+ /*
+ * Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ */
+ private SystemData systemData;
+
+ /*
+ * The type of the resource.
+ */
+ private String type;
+
+ /*
+ * The name of the resource.
+ */
+ private String name;
+
+ /*
+ * Fully qualified resource Id for the resource.
+ */
+ private String id;
+
+ /**
+ * Creates an instance of SuppressionListResourceInner class.
+ */
+ public SuppressionListResourceInner() {
+ }
+
+ /**
+ * Get the innerProperties property: The properties of a SuppressionList resource.
+ *
+ * @return the innerProperties value.
+ */
+ private SuppressionListProperties innerProperties() {
+ return this.innerProperties;
+ }
+
+ /**
+ * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ *
+ * @return the systemData value.
+ */
+ public SystemData systemData() {
+ return this.systemData;
+ }
+
+ /**
+ * Get the type property: The type of the resource.
+ *
+ * @return the type value.
+ */
+ @Override
+ public String type() {
+ return this.type;
+ }
+
+ /**
+ * Get the name property: The name of the resource.
+ *
+ * @return the name value.
+ */
+ @Override
+ public String name() {
+ return this.name;
+ }
+
+ /**
+ * Get the id property: Fully qualified resource Id for the resource.
+ *
+ * @return the id value.
+ */
+ @Override
+ public String id() {
+ return this.id;
+ }
+
+ /**
+ * Get the listName property: The name of the suppression list. This value must match one of the valid sender
+ * usernames of the sending domain.
+ *
+ * @return the listName value.
+ */
+ public String listName() {
+ return this.innerProperties() == null ? null : this.innerProperties().listName();
+ }
+
+ /**
+ * Set the listName property: The name of the suppression list. This value must match one of the valid sender
+ * usernames of the sending domain.
+ *
+ * @param listName the listName value to set.
+ * @return the SuppressionListResourceInner object itself.
+ */
+ public SuppressionListResourceInner withListName(String listName) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new SuppressionListProperties();
+ }
+ this.innerProperties().withListName(listName);
+ return this;
+ }
+
+ /**
+ * Get the lastUpdatedTimestamp property: The date the resource was last updated.
+ *
+ * @return the lastUpdatedTimestamp value.
+ */
+ public String lastUpdatedTimestamp() {
+ return this.innerProperties() == null ? null : this.innerProperties().lastUpdatedTimestamp();
+ }
+
+ /**
+ * Get the createdTimestamp property: The date the resource was created.
+ *
+ * @return the createdTimestamp value.
+ */
+ public String createdTimestamp() {
+ return this.innerProperties() == null ? null : this.innerProperties().createdTimestamp();
+ }
+
+ /**
+ * Get the dataLocation property: The location where the SuppressionListAddress data is stored at rest. This value
+ * is inherited from the parent Domains resource.
+ *
+ * @return the dataLocation value.
+ */
+ public String dataLocation() {
+ return this.innerProperties() == null ? null : this.innerProperties().dataLocation();
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (innerProperties() != null) {
+ innerProperties().validate();
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeJsonField("properties", this.innerProperties);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of SuppressionListResourceInner from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of SuppressionListResourceInner if the JsonReader was pointing to an instance of it, or null
+ * if it was pointing to JSON null.
+ * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
+ * @throws IOException If an error occurs while reading the SuppressionListResourceInner.
+ */
+ public static SuppressionListResourceInner fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ SuppressionListResourceInner deserializedSuppressionListResourceInner = new SuppressionListResourceInner();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("id".equals(fieldName)) {
+ deserializedSuppressionListResourceInner.id = reader.getString();
+ } else if ("name".equals(fieldName)) {
+ deserializedSuppressionListResourceInner.name = reader.getString();
+ } else if ("type".equals(fieldName)) {
+ deserializedSuppressionListResourceInner.type = reader.getString();
+ } else if ("properties".equals(fieldName)) {
+ deserializedSuppressionListResourceInner.innerProperties
+ = SuppressionListProperties.fromJson(reader);
+ } else if ("systemData".equals(fieldName)) {
+ deserializedSuppressionListResourceInner.systemData = SystemData.fromJson(reader);
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedSuppressionListResourceInner;
+ });
+ }
+}
diff --git a/sdk/communication/azure-resourcemanager-communication/src/main/java/com/azure/resourcemanager/communication/implementation/CommunicationServiceManagementClientImpl.java b/sdk/communication/azure-resourcemanager-communication/src/main/java/com/azure/resourcemanager/communication/implementation/CommunicationServiceManagementClientImpl.java
index ce3b59febe14..e7993401810d 100644
--- a/sdk/communication/azure-resourcemanager-communication/src/main/java/com/azure/resourcemanager/communication/implementation/CommunicationServiceManagementClientImpl.java
+++ b/sdk/communication/azure-resourcemanager-communication/src/main/java/com/azure/resourcemanager/communication/implementation/CommunicationServiceManagementClientImpl.java
@@ -15,12 +15,15 @@
import com.azure.core.management.exception.ManagementException;
import com.azure.core.management.polling.PollResult;
import com.azure.core.management.polling.PollerFactory;
+import com.azure.core.management.polling.SyncPollerFactory;
+import com.azure.core.util.BinaryData;
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;
import com.azure.core.util.polling.PollerFlux;
+import com.azure.core.util.polling.SyncPoller;
import com.azure.core.util.serializer.SerializerAdapter;
import com.azure.core.util.serializer.SerializerEncoding;
import com.azure.resourcemanager.communication.fluent.CommunicationServiceManagementClient;
@@ -29,6 +32,9 @@
import com.azure.resourcemanager.communication.fluent.EmailServicesClient;
import com.azure.resourcemanager.communication.fluent.OperationsClient;
import com.azure.resourcemanager.communication.fluent.SenderUsernamesClient;
+import com.azure.resourcemanager.communication.fluent.SmtpUsernamesClient;
+import com.azure.resourcemanager.communication.fluent.SuppressionListAddressesClient;
+import com.azure.resourcemanager.communication.fluent.SuppressionListsClient;
import java.io.IOException;
import java.lang.reflect.Type;
import java.nio.ByteBuffer;
@@ -197,6 +203,48 @@ public SenderUsernamesClient getSenderUsernames() {
return this.senderUsernames;
}
+ /**
+ * The SmtpUsernamesClient object to access its operations.
+ */
+ private final SmtpUsernamesClient smtpUsernames;
+
+ /**
+ * Gets the SmtpUsernamesClient object to access its operations.
+ *
+ * @return the SmtpUsernamesClient object.
+ */
+ public SmtpUsernamesClient getSmtpUsernames() {
+ return this.smtpUsernames;
+ }
+
+ /**
+ * The SuppressionListsClient object to access its operations.
+ */
+ private final SuppressionListsClient suppressionLists;
+
+ /**
+ * Gets the SuppressionListsClient object to access its operations.
+ *
+ * @return the SuppressionListsClient object.
+ */
+ public SuppressionListsClient getSuppressionLists() {
+ return this.suppressionLists;
+ }
+
+ /**
+ * The SuppressionListAddressesClient object to access its operations.
+ */
+ private final SuppressionListAddressesClient suppressionListAddresses;
+
+ /**
+ * Gets the SuppressionListAddressesClient object to access its operations.
+ *
+ * @return the SuppressionListAddressesClient object.
+ */
+ public SuppressionListAddressesClient getSuppressionListAddresses() {
+ return this.suppressionListAddresses;
+ }
+
/**
* Initializes an instance of CommunicationServiceManagementClient client.
*
@@ -214,12 +262,15 @@ public SenderUsernamesClient getSenderUsernames() {
this.defaultPollInterval = defaultPollInterval;
this.subscriptionId = subscriptionId;
this.endpoint = endpoint;
- this.apiVersion = "2023-04-01";
+ this.apiVersion = "2025-09-01";
this.operations = new OperationsClientImpl(this);
this.communicationServices = new CommunicationServicesClientImpl(this);
this.domains = new DomainsClientImpl(this);
this.emailServices = new EmailServicesClientImpl(this);
this.senderUsernames = new SenderUsernamesClientImpl(this);
+ this.smtpUsernames = new SmtpUsernamesClientImpl(this);
+ this.suppressionLists = new SuppressionListsClientImpl(this);
+ this.suppressionListAddresses = new SuppressionListAddressesClientImpl(this);
}
/**
@@ -259,6 +310,23 @@ public PollerFlux, U> getLroResult(Mono type of poll result.
+ * @param type of final result.
+ * @return SyncPoller for poll result and final result.
+ */
+ public SyncPoller, U> getLroResult(Response activationResponse,
+ Type pollResultType, Type finalResultType, Context context) {
+ return SyncPollerFactory.create(serializerAdapter, httpPipeline, pollResultType, finalResultType,
+ defaultPollInterval, () -> activationResponse, context);
+ }
+
/**
* Gets the final result, or an error, based on last async poll response.
*
diff --git a/sdk/communication/azure-resourcemanager-communication/src/main/java/com/azure/resourcemanager/communication/implementation/CommunicationServiceResourceImpl.java b/sdk/communication/azure-resourcemanager-communication/src/main/java/com/azure/resourcemanager/communication/implementation/CommunicationServiceResourceImpl.java
index a9ca1c32da9f..d19e1b4da006 100644
--- a/sdk/communication/azure-resourcemanager-communication/src/main/java/com/azure/resourcemanager/communication/implementation/CommunicationServiceResourceImpl.java
+++ b/sdk/communication/azure-resourcemanager-communication/src/main/java/com/azure/resourcemanager/communication/implementation/CommunicationServiceResourceImpl.java
@@ -16,6 +16,7 @@
import com.azure.resourcemanager.communication.models.LinkNotificationHubParameters;
import com.azure.resourcemanager.communication.models.LinkedNotificationHub;
import com.azure.resourcemanager.communication.models.ManagedServiceIdentity;
+import com.azure.resourcemanager.communication.models.PublicNetworkAccess;
import com.azure.resourcemanager.communication.models.RegenerateKeyParameters;
import java.util.Collections;
import java.util.List;
@@ -93,6 +94,14 @@ public List linkedDomains() {
}
}
+ public PublicNetworkAccess publicNetworkAccess() {
+ return this.innerModel().publicNetworkAccess();
+ }
+
+ public Boolean disableLocalAuth() {
+ return this.innerModel().disableLocalAuth();
+ }
+
public Region region() {
return Region.fromName(this.regionName());
}
@@ -267,7 +276,27 @@ public CommunicationServiceResourceImpl withLinkedDomains(List linkedDom
}
}
+ public CommunicationServiceResourceImpl withPublicNetworkAccess(PublicNetworkAccess publicNetworkAccess) {
+ if (isInCreateMode()) {
+ this.innerModel().withPublicNetworkAccess(publicNetworkAccess);
+ return this;
+ } else {
+ this.updateParameters.withPublicNetworkAccess(publicNetworkAccess);
+ return this;
+ }
+ }
+
+ public CommunicationServiceResourceImpl withDisableLocalAuth(Boolean disableLocalAuth) {
+ if (isInCreateMode()) {
+ this.innerModel().withDisableLocalAuth(disableLocalAuth);
+ return this;
+ } else {
+ this.updateParameters.withDisableLocalAuth(disableLocalAuth);
+ return this;
+ }
+ }
+
private boolean isInCreateMode() {
- return this.innerModel().id() == null;
+ return this.innerModel() == null || this.innerModel().id() == null;
}
}
diff --git a/sdk/communication/azure-resourcemanager-communication/src/main/java/com/azure/resourcemanager/communication/implementation/CommunicationServicesClientImpl.java b/sdk/communication/azure-resourcemanager-communication/src/main/java/com/azure/resourcemanager/communication/implementation/CommunicationServicesClientImpl.java
index 1a199f612113..87bab39879a6 100644
--- a/sdk/communication/azure-resourcemanager-communication/src/main/java/com/azure/resourcemanager/communication/implementation/CommunicationServicesClientImpl.java
+++ b/sdk/communication/azure-resourcemanager-communication/src/main/java/com/azure/resourcemanager/communication/implementation/CommunicationServicesClientImpl.java
@@ -29,8 +29,10 @@
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.BinaryData;
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.communication.fluent.CommunicationServicesClient;
@@ -77,7 +79,7 @@ public final class CommunicationServicesClientImpl implements CommunicationServi
* by the proxy service to perform REST calls.
*/
@Host("{$host}")
- @ServiceInterface(name = "CommunicationService")
+ @ServiceInterface(name = "CommunicationServiceManagementClientCommunicationServices")
public interface CommunicationServicesService {
@Headers({ "Content-Type: application/json" })
@Post("/subscriptions/{subscriptionId}/providers/Microsoft.Communication/checkNameAvailability")
@@ -88,6 +90,15 @@ Mono> checkNameAvailability(@HostPa
@BodyParam("application/json") NameAvailabilityParameters nameAvailabilityParameters,
@HeaderParam("Accept") String accept, Context context);
+ @Headers({ "Content-Type: application/json" })
+ @Post("/subscriptions/{subscriptionId}/providers/Microsoft.Communication/checkNameAvailability")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response checkNameAvailabilitySync(@HostParam("$host") String endpoint,
+ @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion,
+ @BodyParam("application/json") NameAvailabilityParameters nameAvailabilityParameters,
+ @HeaderParam("Accept") String accept, Context context);
+
@Headers({ "Content-Type: application/json" })
@Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Communication/communicationServices/{communicationServiceName}/linkNotificationHub")
@ExpectedResponses({ 200 })
@@ -99,6 +110,17 @@ Mono> linkNotificationHub(@HostParam("$host
@BodyParam("application/json") LinkNotificationHubParameters linkNotificationHubParameters,
@HeaderParam("Accept") String accept, Context context);
+ @Headers({ "Content-Type: application/json" })
+ @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Communication/communicationServices/{communicationServiceName}/linkNotificationHub")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response linkNotificationHubSync(@HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("communicationServiceName") String communicationServiceName,
+ @BodyParam("application/json") LinkNotificationHubParameters linkNotificationHubParameters,
+ @HeaderParam("Accept") String accept, Context context);
+
@Headers({ "Content-Type: application/json" })
@Get("/subscriptions/{subscriptionId}/providers/Microsoft.Communication/communicationServices")
@ExpectedResponses({ 200 })
@@ -107,6 +129,14 @@ Mono> list(@HostParam("$host") String
@QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
@HeaderParam("Accept") String accept, Context context);
+ @Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Communication/communicationServices")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response listSync(@HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @HeaderParam("Accept") String accept, Context context);
+
@Headers({ "Content-Type: application/json" })
@Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Communication/communicationServices")
@ExpectedResponses({ 200 })
@@ -116,6 +146,15 @@ Mono> listByResourceGroup(@HostParam(
@PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept,
Context context);
+ @Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Communication/communicationServices")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response listByResourceGroupSync(@HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept,
+ Context context);
+
@Headers({ "Content-Type: application/json" })
@Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Communication/communicationServices/{communicationServiceName}")
@ExpectedResponses({ 200 })
@@ -127,6 +166,17 @@ Mono> update(@HostParam("$host") Str
@BodyParam("application/json") CommunicationServiceResourceUpdate parameters,
@HeaderParam("Accept") String accept, Context context);
+ @Headers({ "Content-Type: application/json" })
+ @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Communication/communicationServices/{communicationServiceName}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response updateSync(@HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("communicationServiceName") String communicationServiceName,
+ @BodyParam("application/json") CommunicationServiceResourceUpdate parameters,
+ @HeaderParam("Accept") String accept, Context context);
+
@Headers({ "Content-Type: application/json" })
@Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Communication/communicationServices/{communicationServiceName}")
@ExpectedResponses({ 200 })
@@ -137,6 +187,16 @@ Mono> getByResourceGroup(@HostParam(
@PathParam("communicationServiceName") String communicationServiceName,
@HeaderParam("Accept") String accept, Context context);
+ @Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Communication/communicationServices/{communicationServiceName}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response getByResourceGroupSync(@HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("communicationServiceName") String communicationServiceName,
+ @HeaderParam("Accept") String accept, Context context);
+
@Headers({ "Content-Type: application/json" })
@Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Communication/communicationServices/{communicationServiceName}")
@ExpectedResponses({ 200, 201 })
@@ -148,6 +208,17 @@ Mono>> createOrUpdate(@HostParam("$host") String endpo
@BodyParam("application/json") CommunicationServiceResourceInner parameters,
@HeaderParam("Accept") String accept, Context context);
+ @Headers({ "Content-Type: application/json" })
+ @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Communication/communicationServices/{communicationServiceName}")
+ @ExpectedResponses({ 200, 201 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response createOrUpdateSync(@HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("communicationServiceName") String communicationServiceName,
+ @BodyParam("application/json") CommunicationServiceResourceInner parameters,
+ @HeaderParam("Accept") String accept, Context context);
+
@Headers({ "Content-Type: application/json" })
@Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Communication/communicationServices/{communicationServiceName}")
@ExpectedResponses({ 200, 202, 204 })
@@ -158,6 +229,16 @@ Mono>> delete(@HostParam("$host") String endpoint,
@PathParam("communicationServiceName") String communicationServiceName,
@HeaderParam("Accept") String accept, Context context);
+ @Headers({ "Content-Type: application/json" })
+ @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Communication/communicationServices/{communicationServiceName}")
+ @ExpectedResponses({ 200, 202, 204 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response deleteSync(@HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("communicationServiceName") String communicationServiceName,
+ @HeaderParam("Accept") String accept, Context context);
+
@Headers({ "Content-Type: application/json" })
@Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Communication/communicationServices/{communicationServiceName}/listKeys")
@ExpectedResponses({ 200 })
@@ -168,6 +249,16 @@ Mono> listKeys(@HostParam("$host") Strin
@PathParam("communicationServiceName") String communicationServiceName,
@HeaderParam("Accept") String accept, Context context);
+ @Headers({ "Content-Type: application/json" })
+ @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Communication/communicationServices/{communicationServiceName}/listKeys")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response listKeysSync(@HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("communicationServiceName") String communicationServiceName,
+ @HeaderParam("Accept") String accept, Context context);
+
@Headers({ "Content-Type: application/json" })
@Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Communication/communicationServices/{communicationServiceName}/regenerateKey")
@ExpectedResponses({ 200 })
@@ -179,6 +270,17 @@ Mono> regenerateKey(@HostParam("$host")
@BodyParam("application/json") RegenerateKeyParameters parameters, @HeaderParam("Accept") String accept,
Context context);
+ @Headers({ "Content-Type: application/json" })
+ @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Communication/communicationServices/{communicationServiceName}/regenerateKey")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response regenerateKeySync(@HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("communicationServiceName") String communicationServiceName,
+ @BodyParam("application/json") RegenerateKeyParameters parameters, @HeaderParam("Accept") String accept,
+ Context context);
+
@Headers({ "Content-Type: application/json" })
@Get("{nextLink}")
@ExpectedResponses({ 200 })
@@ -187,6 +289,14 @@ Mono> listBySubscriptionNext(
@PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint,
@HeaderParam("Accept") String accept, Context context);
+ @Headers({ "Content-Type: application/json" })
+ @Get("{nextLink}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response listBySubscriptionNextSync(
+ @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint,
+ @HeaderParam("Accept") String accept, Context context);
+
@Headers({ "Content-Type: application/json" })
@Get("{nextLink}")
@ExpectedResponses({ 200 })
@@ -194,6 +304,14 @@ Mono> listBySubscriptionNext(
Mono> listByResourceGroupNext(
@PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint,
@HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("{nextLink}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response listByResourceGroupNextSync(
+ @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint,
+ @HeaderParam("Accept") String accept, Context context);
}
/**
@@ -232,41 +350,6 @@ Mono> listByResourceGroupNext(
.contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
- /**
- * Check Name Availability
- *
- * Checks that the CommunicationService name is valid and is not already in use.
- *
- * @param nameAvailabilityParameters 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 the check availability result along with {@link Response} on successful completion of {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono>
- checkNameAvailabilityWithResponseAsync(NameAvailabilityParameters nameAvailabilityParameters, 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 (nameAvailabilityParameters == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter nameAvailabilityParameters is required and cannot be null."));
- } else {
- nameAvailabilityParameters.validate();
- }
- final String accept = "application/json";
- context = this.client.mergeContext(context);
- return service.checkNameAvailability(this.client.getEndpoint(), this.client.getSubscriptionId(),
- this.client.getApiVersion(), nameAvailabilityParameters, accept, context);
- }
-
/**
* Check Name Availability
*
@@ -300,7 +383,26 @@ Mono> listByResourceGroupNext(
@ServiceMethod(returns = ReturnType.SINGLE)
public Response
checkNameAvailabilityWithResponse(NameAvailabilityParameters nameAvailabilityParameters, Context context) {
- return checkNameAvailabilityWithResponseAsync(nameAvailabilityParameters, context).block();
+ if (this.client.getEndpoint() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (nameAvailabilityParameters == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Parameter nameAvailabilityParameters is required and cannot be null."));
+ } else {
+ nameAvailabilityParameters.validate();
+ }
+ final String accept = "application/json";
+ return service.checkNameAvailabilitySync(this.client.getEndpoint(), this.client.getSubscriptionId(),
+ this.client.getApiVersion(), nameAvailabilityParameters, accept, context);
}
/**
@@ -364,50 +466,6 @@ private Mono> linkNotificationHubWithRespon
.contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
- /**
- * Link Notification Hub
- *
- * Links an Azure Notification Hub to this communication service.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param communicationServiceName The name of the CommunicationService resource.
- * @param linkNotificationHubParameters 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 a notification hub that has been linked to the communication service along with {@link Response} on
- * successful completion of {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> linkNotificationHubWithResponseAsync(String resourceGroupName,
- String communicationServiceName, LinkNotificationHubParameters linkNotificationHubParameters, 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 (communicationServiceName == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter communicationServiceName is required and cannot be null."));
- }
- if (linkNotificationHubParameters != null) {
- linkNotificationHubParameters.validate();
- }
- final String accept = "application/json";
- context = this.client.mergeContext(context);
- return service.linkNotificationHub(this.client.getEndpoint(), this.client.getApiVersion(),
- this.client.getSubscriptionId(), resourceGroupName, communicationServiceName, linkNotificationHubParameters,
- accept, context);
- }
-
/**
* Link Notification Hub
*
@@ -446,8 +504,32 @@ private Mono linkNotificationHubAsync(String resourc
@ServiceMethod(returns = ReturnType.SINGLE)
public Response linkNotificationHubWithResponse(String resourceGroupName,
String communicationServiceName, LinkNotificationHubParameters linkNotificationHubParameters, Context context) {
- return linkNotificationHubWithResponseAsync(resourceGroupName, communicationServiceName,
- linkNotificationHubParameters, context).block();
+ if (this.client.getEndpoint() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (communicationServiceName == null) {
+ throw LOGGER.atError()
+ .log(
+ new IllegalArgumentException("Parameter communicationServiceName is required and cannot be null."));
+ }
+ if (linkNotificationHubParameters != null) {
+ linkNotificationHubParameters.validate();
+ }
+ final String accept = "application/json";
+ return service.linkNotificationHubSync(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, communicationServiceName, linkNotificationHubParameters,
+ accept, context);
}
/**
@@ -503,30 +585,15 @@ private Mono> listSinglePageAsy
*
* Handles requests to list all resources in a subscription.
*
- * @param context The context to associate with this operation.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return object that includes an array of CommunicationServices and a possible link for next set along with
- * {@link PagedResponse} on successful completion of {@link Mono}.
+ * @return object that includes an array of CommunicationServices and a possible link for next set as paginated
+ * response with {@link PagedFlux}.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> listSinglePageAsync(Context context) {
- if (this.client.getEndpoint() == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
- }
- if (this.client.getSubscriptionId() == null) {
- return Mono.error(new IllegalArgumentException(
- "Parameter this.client.getSubscriptionId() is required and cannot be null."));
- }
- final String accept = "application/json";
- context = this.client.mergeContext(context);
- return service
- .list(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), accept,
- context)
- .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(),
- res.getValue().value(), res.getValue().nextLink(), null));
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync() {
+ return new PagedFlux<>(() -> listSinglePageAsync(),
+ nextLink -> listBySubscriptionNextSinglePageAsync(nextLink));
}
/**
@@ -536,13 +603,26 @@ private Mono> listSinglePageAsy
*
* @throws 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 CommunicationServices and a possible link for next set as paginated
- * response with {@link PagedFlux}.
+ * @return object that includes an array of CommunicationServices and a possible link for next set along with
+ * {@link PagedResponse}.
*/
- @ServiceMethod(returns = ReturnType.COLLECTION)
- private PagedFlux listAsync() {
- return new PagedFlux<>(() -> listSinglePageAsync(),
- nextLink -> listBySubscriptionNextSinglePageAsync(nextLink));
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PagedResponse listSinglePage() {
+ if (this.client.getEndpoint() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ Response res = service.listSync(this.client.getEndpoint(),
+ this.client.getApiVersion(), this.client.getSubscriptionId(), accept, Context.NONE);
+ return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(),
+ res.getValue().nextLink(), null);
}
/**
@@ -554,13 +634,26 @@ 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 CommunicationServices and a possible link for next set as paginated
- * response with {@link PagedFlux}.
+ * @return object that includes an array of CommunicationServices and a possible link for next set along with
+ * {@link PagedResponse}.
*/
- @ServiceMethod(returns = ReturnType.COLLECTION)
- private PagedFlux listAsync(Context context) {
- return new PagedFlux<>(() -> listSinglePageAsync(context),
- nextLink -> listBySubscriptionNextSinglePageAsync(nextLink, context));
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PagedResponse listSinglePage(Context context) {
+ if (this.client.getEndpoint() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ Response res = service.listSync(this.client.getEndpoint(),
+ this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context);
+ return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(),
+ res.getValue().nextLink(), null);
}
/**
@@ -575,7 +668,7 @@ private PagedFlux listAsync(Context context)
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
public PagedIterable list() {
- return new PagedIterable<>(listAsync());
+ return new PagedIterable<>(() -> listSinglePage(), nextLink -> listBySubscriptionNextSinglePage(nextLink));
}
/**
@@ -592,7 +685,8 @@ public PagedIterable list() {
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
public PagedIterable list(Context context) {
- return new PagedIterable<>(listAsync(context));
+ return new PagedIterable<>(() -> listSinglePage(context),
+ nextLink -> listBySubscriptionNextSinglePage(nextLink, context));
}
/**
@@ -637,35 +731,16 @@ public PagedIterable list(Context context) {
* Handles requests to list all resources in a resource group.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @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 CommunicationServices and a possible link for next set along with
- * {@link PagedResponse} on successful completion of {@link Mono}.
+ * @return object that includes an array of CommunicationServices and a possible link for next set as paginated
+ * response with {@link PagedFlux}.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono>
- listByResourceGroupSinglePageAsync(String resourceGroupName, Context context) {
- if (this.client.getEndpoint() == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
- }
- 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."));
- }
- final String accept = "application/json";
- context = this.client.mergeContext(context);
- return service
- .listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(),
- this.client.getSubscriptionId(), resourceGroupName, accept, context)
- .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(),
- res.getValue().value(), res.getValue().nextLink(), null));
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listByResourceGroupAsync(String resourceGroupName) {
+ return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName),
+ nextLink -> listByResourceGroupNextSinglePageAsync(nextLink));
}
/**
@@ -677,13 +752,30 @@ 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 CommunicationServices and a possible link for next set as paginated
- * response with {@link PagedFlux}.
+ * @return object that includes an array of CommunicationServices and a possible link for next set along with
+ * {@link PagedResponse}.
*/
- @ServiceMethod(returns = ReturnType.COLLECTION)
- private PagedFlux listByResourceGroupAsync(String resourceGroupName) {
- return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName),
- nextLink -> listByResourceGroupNextSinglePageAsync(nextLink));
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PagedResponse listByResourceGroupSinglePage(String resourceGroupName) {
+ if (this.client.getEndpoint() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ Response res = service.listByResourceGroupSync(this.client.getEndpoint(),
+ this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, accept, Context.NONE);
+ return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(),
+ res.getValue().nextLink(), null);
}
/**
@@ -696,14 +788,31 @@ private PagedFlux listByResourceGroupAsync(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 object that includes an array of CommunicationServices and a possible link for next set as paginated
- * response with {@link PagedFlux}.
+ * @return object that includes an array of CommunicationServices and a possible link for next set along with
+ * {@link PagedResponse}.
*/
- @ServiceMethod(returns = ReturnType.COLLECTION)
- private PagedFlux listByResourceGroupAsync(String resourceGroupName,
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PagedResponse listByResourceGroupSinglePage(String resourceGroupName,
Context context) {
- return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, context),
- nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context));
+ if (this.client.getEndpoint() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ Response res = service.listByResourceGroupSync(this.client.getEndpoint(),
+ this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, accept, context);
+ return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(),
+ res.getValue().nextLink(), null);
}
/**
@@ -720,7 +829,8 @@ private PagedFlux listByResourceGroupAsync(St
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
public PagedIterable listByResourceGroup(String resourceGroupName) {
- return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName));
+ return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName),
+ nextLink -> listByResourceGroupNextSinglePage(nextLink));
}
/**
@@ -739,7 +849,8 @@ public PagedIterable listByResourceGroup(Stri
@ServiceMethod(returns = ReturnType.COLLECTION)
public PagedIterable listByResourceGroup(String resourceGroupName,
Context context) {
- return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, context));
+ return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName, context),
+ nextLink -> listByResourceGroupNextSinglePage(nextLink, context));
}
/**
@@ -786,51 +897,6 @@ private Mono> updateWithResponseAsyn
.contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
- /**
- * Update
- *
- * Operation to update an existing CommunicationService.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param communicationServiceName The name of the CommunicationService resource.
- * @param parameters Parameters for the update operation.
- * @param context The context to associate with this operation.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a class representing a CommunicationService resource along with {@link Response} on successful completion
- * of {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> updateWithResponseAsync(String resourceGroupName,
- String communicationServiceName, CommunicationServiceResourceUpdate 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 (communicationServiceName == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter communicationServiceName is required and cannot be null."));
- }
- if (parameters == null) {
- return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null."));
- } else {
- parameters.validate();
- }
- final String accept = "application/json";
- context = this.client.mergeContext(context);
- return service.update(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(),
- resourceGroupName, communicationServiceName, parameters, accept, context);
- }
-
/**
* Update
*
@@ -868,7 +934,34 @@ private Mono updateAsync(String resourceGroup
@ServiceMethod(returns = ReturnType.SINGLE)
public Response updateWithResponse(String resourceGroupName,
String communicationServiceName, CommunicationServiceResourceUpdate parameters, Context context) {
- return updateWithResponseAsync(resourceGroupName, communicationServiceName, parameters, context).block();
+ if (this.client.getEndpoint() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (communicationServiceName == null) {
+ throw LOGGER.atError()
+ .log(
+ new IllegalArgumentException("Parameter communicationServiceName is required and cannot be null."));
+ }
+ if (parameters == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter parameters is required and cannot be null."));
+ } else {
+ parameters.validate();
+ }
+ final String accept = "application/json";
+ return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, communicationServiceName, parameters, accept, context);
}
/**
@@ -929,45 +1022,6 @@ public CommunicationServiceResourceInner update(String resourceGroupName, String
.contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
- /**
- * Get
- *
- * Get the CommunicationService and its properties.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param communicationServiceName The name of the CommunicationService 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 CommunicationService and its properties along with {@link Response} on successful completion of
- * {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> getByResourceGroupWithResponseAsync(
- String resourceGroupName, String communicationServiceName, 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 (communicationServiceName == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter communicationServiceName is required and cannot be null."));
- }
- final String accept = "application/json";
- context = this.client.mergeContext(context);
- return service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(),
- this.client.getSubscriptionId(), resourceGroupName, communicationServiceName, accept, context);
- }
-
/**
* Get
*
@@ -1003,7 +1057,28 @@ private Mono getByResourceGroupAsync(String r
@ServiceMethod(returns = ReturnType.SINGLE)
public Response getByResourceGroupWithResponse(String resourceGroupName,
String communicationServiceName, Context context) {
- return getByResourceGroupWithResponseAsync(resourceGroupName, communicationServiceName, context).block();
+ if (this.client.getEndpoint() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (communicationServiceName == null) {
+ throw LOGGER.atError()
+ .log(
+ new IllegalArgumentException("Parameter communicationServiceName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return service.getByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, communicationServiceName, accept, context);
}
/**
@@ -1078,41 +1153,43 @@ private Mono>> createOrUpdateWithResponseAsync(String
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param communicationServiceName The name of the CommunicationService resource.
* @param parameters Parameters for the create or update operation.
- * @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a class representing a CommunicationService resource along with {@link Response} on successful completion
- * of {@link Mono}.
+ * @return a class representing a CommunicationService resource along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName,
- String communicationServiceName, CommunicationServiceResourceInner parameters, Context context) {
+ private Response createOrUpdateWithResponse(String resourceGroupName, String communicationServiceName,
+ CommunicationServiceResourceInner parameters) {
if (this.client.getEndpoint() == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
+ throw LOGGER.atError()
+ .log(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."));
+ throw LOGGER.atError()
+ .log(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."));
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
}
if (communicationServiceName == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter communicationServiceName is required and cannot be null."));
+ throw LOGGER.atError()
+ .log(
+ new IllegalArgumentException("Parameter communicationServiceName is required and cannot be null."));
}
if (parameters == null) {
- return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null."));
+ throw LOGGER.atError()
+ .log(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.getApiVersion(),
- this.client.getSubscriptionId(), resourceGroupName, communicationServiceName, parameters, accept, context);
+ return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, communicationServiceName, parameters, accept,
+ Context.NONE);
}
/**
@@ -1123,20 +1200,43 @@ private Mono>> createOrUpdateWithResponseAsync(String
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param communicationServiceName The name of the CommunicationService resource.
* @param parameters Parameters for the create or update operation.
+ * @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the {@link PollerFlux} for polling of a class representing a CommunicationService resource.
+ * @return a class representing a CommunicationService resource along with {@link Response}.
*/
- @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- private PollerFlux, CommunicationServiceResourceInner>
- beginCreateOrUpdateAsync(String resourceGroupName, String communicationServiceName,
- CommunicationServiceResourceInner parameters) {
- Mono>> mono
- = createOrUpdateWithResponseAsync(resourceGroupName, communicationServiceName, parameters);
- return this.client.getLroResult(mono,
- this.client.getHttpPipeline(), CommunicationServiceResourceInner.class,
- CommunicationServiceResourceInner.class, this.client.getContext());
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Response createOrUpdateWithResponse(String resourceGroupName, String communicationServiceName,
+ CommunicationServiceResourceInner parameters, Context context) {
+ if (this.client.getEndpoint() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (communicationServiceName == null) {
+ throw LOGGER.atError()
+ .log(
+ new IllegalArgumentException("Parameter communicationServiceName is required and cannot be null."));
+ }
+ if (parameters == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter parameters is required and cannot be null."));
+ } else {
+ parameters.validate();
+ }
+ final String accept = "application/json";
+ return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, communicationServiceName, parameters, accept, context);
}
/**
@@ -1147,7 +1247,6 @@ private Mono>> createOrUpdateWithResponseAsync(String
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param communicationServiceName The name of the CommunicationService resource.
* @param parameters Parameters for the create or update operation.
- * @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
@@ -1156,13 +1255,12 @@ private Mono>> createOrUpdateWithResponseAsync(String
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
private PollerFlux, CommunicationServiceResourceInner>
beginCreateOrUpdateAsync(String resourceGroupName, String communicationServiceName,
- CommunicationServiceResourceInner parameters, Context context) {
- context = this.client.mergeContext(context);
+ CommunicationServiceResourceInner parameters) {
Mono>> mono
- = createOrUpdateWithResponseAsync(resourceGroupName, communicationServiceName, parameters, context);
+ = createOrUpdateWithResponseAsync(resourceGroupName, communicationServiceName, parameters);
return this.client.getLroResult(mono,
this.client.getHttpPipeline(), CommunicationServiceResourceInner.class,
- CommunicationServiceResourceInner.class, context);
+ CommunicationServiceResourceInner.class, this.client.getContext());
}
/**
@@ -1182,7 +1280,10 @@ private Mono>> createOrUpdateWithResponseAsync(String
public SyncPoller, CommunicationServiceResourceInner>
beginCreateOrUpdate(String resourceGroupName, String communicationServiceName,
CommunicationServiceResourceInner parameters) {
- return this.beginCreateOrUpdateAsync(resourceGroupName, communicationServiceName, parameters).getSyncPoller();
+ Response response
+ = createOrUpdateWithResponse(resourceGroupName, communicationServiceName, parameters);
+ return this.client.getLroResult(response,
+ CommunicationServiceResourceInner.class, CommunicationServiceResourceInner.class, Context.NONE);
}
/**
@@ -1203,8 +1304,10 @@ private Mono>> createOrUpdateWithResponseAsync(String
public SyncPoller, CommunicationServiceResourceInner>
beginCreateOrUpdate(String resourceGroupName, String communicationServiceName,
CommunicationServiceResourceInner parameters, Context context) {
- return this.beginCreateOrUpdateAsync(resourceGroupName, communicationServiceName, parameters, context)
- .getSyncPoller();
+ Response response
+ = createOrUpdateWithResponse(resourceGroupName, communicationServiceName, parameters, context);
+ return this.client.getLroResult(response,
+ CommunicationServiceResourceInner.class, CommunicationServiceResourceInner.class, context);
}
/**
@@ -1227,27 +1330,6 @@ private Mono createOrUpdateAsync(String resou
.flatMap(this.client::getLroFinalResultOrError);
}
- /**
- * Create Or Update
- *
- * Create a new CommunicationService or update an existing CommunicationService.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param communicationServiceName The name of the CommunicationService resource.
- * @param parameters Parameters for the create or update operation.
- * @param context The context to associate with this operation.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a class representing a CommunicationService resource on successful completion of {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono createOrUpdateAsync(String resourceGroupName,
- String communicationServiceName, CommunicationServiceResourceInner parameters, Context context) {
- return beginCreateOrUpdateAsync(resourceGroupName, communicationServiceName, parameters, context).last()
- .flatMap(this.client::getLroFinalResultOrError);
- }
-
/**
* Create Or Update
*
@@ -1264,7 +1346,7 @@ private Mono createOrUpdateAsync(String resou
@ServiceMethod(returns = ReturnType.SINGLE)
public CommunicationServiceResourceInner createOrUpdate(String resourceGroupName, String communicationServiceName,
CommunicationServiceResourceInner parameters) {
- return createOrUpdateAsync(resourceGroupName, communicationServiceName, parameters).block();
+ return beginCreateOrUpdate(resourceGroupName, communicationServiceName, parameters).getFinalResult();
}
/**
@@ -1284,7 +1366,7 @@ public CommunicationServiceResourceInner createOrUpdate(String resourceGroupName
@ServiceMethod(returns = ReturnType.SINGLE)
public CommunicationServiceResourceInner createOrUpdate(String resourceGroupName, String communicationServiceName,
CommunicationServiceResourceInner parameters, Context context) {
- return createOrUpdateAsync(resourceGroupName, communicationServiceName, parameters, context).block();
+ return beginCreateOrUpdate(resourceGroupName, communicationServiceName, parameters, context).getFinalResult();
}
/**
@@ -1332,35 +1414,35 @@ private Mono>> deleteWithResponseAsync(String resource
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param communicationServiceName The name of the CommunicationService resource.
- * @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the {@link Response} on successful completion of {@link Mono}.
+ * @return the response body along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono>> deleteWithResponseAsync(String resourceGroupName,
- String communicationServiceName, Context context) {
+ private Response deleteWithResponse(String resourceGroupName, String communicationServiceName) {
if (this.client.getEndpoint() == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
+ throw LOGGER.atError()
+ .log(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."));
+ throw LOGGER.atError()
+ .log(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."));
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
}
if (communicationServiceName == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter communicationServiceName is required and cannot be null."));
+ throw LOGGER.atError()
+ .log(
+ new IllegalArgumentException("Parameter communicationServiceName is required and cannot be null."));
}
final String accept = "application/json";
- context = this.client.mergeContext(context);
- return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(),
- resourceGroupName, communicationServiceName, accept, context);
+ return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, communicationServiceName, accept, Context.NONE);
}
/**
@@ -1370,17 +1452,37 @@ private Mono>> deleteWithResponseAsync(String resource
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param communicationServiceName The name of the CommunicationService resource.
+ * @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the {@link PollerFlux} for polling of long-running operation.
+ * @return the response body along with {@link Response}.
*/
- @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- private PollerFlux, Void> beginDeleteAsync(String resourceGroupName,
- String communicationServiceName) {
- Mono>> mono = deleteWithResponseAsync(resourceGroupName, communicationServiceName);
- return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class,
- this.client.getContext());
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Response deleteWithResponse(String resourceGroupName, String communicationServiceName,
+ Context context) {
+ if (this.client.getEndpoint() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (communicationServiceName == null) {
+ throw LOGGER.atError()
+ .log(
+ new IllegalArgumentException("Parameter communicationServiceName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, communicationServiceName, accept, context);
}
/**
@@ -1390,7 +1492,6 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param communicationServiceName The name of the CommunicationService 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.
@@ -1398,12 +1499,10 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
private PollerFlux, Void> beginDeleteAsync(String resourceGroupName,
- String communicationServiceName, Context context) {
- context = this.client.mergeContext(context);
- Mono>> mono
- = deleteWithResponseAsync(resourceGroupName, communicationServiceName, context);
+ String communicationServiceName) {
+ Mono>> mono = deleteWithResponseAsync(resourceGroupName, communicationServiceName);
return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class,
- context);
+ this.client.getContext());
}
/**
@@ -1420,7 +1519,8 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
public SyncPoller, Void> beginDelete(String resourceGroupName, String communicationServiceName) {
- return this.beginDeleteAsync(resourceGroupName, communicationServiceName).getSyncPoller();
+ Response response = deleteWithResponse(resourceGroupName, communicationServiceName);
+ return this.client.getLroResult(response, Void.class, Void.class, Context.NONE);
}
/**
@@ -1439,7 +1539,8 @@ public SyncPoller, Void> beginDelete(String resourceGroupName,
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
public SyncPoller, Void> beginDelete(String resourceGroupName, String communicationServiceName,
Context context) {
- return this.beginDeleteAsync(resourceGroupName, communicationServiceName, context).getSyncPoller();
+ Response response = deleteWithResponse(resourceGroupName, communicationServiceName, context);
+ return this.client.getLroResult(response, Void.class, Void.class, context);
}
/**
@@ -1460,25 +1561,6 @@ private Mono deleteAsync(String resourceGroupName, String communicationSer
.flatMap(this.client::getLroFinalResultOrError);
}
- /**
- * Delete
- *
- * Operation to delete a CommunicationService.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param communicationServiceName The name of the CommunicationService 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 {@link Mono} that completes when a successful response is received.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono deleteAsync(String resourceGroupName, String communicationServiceName, Context context) {
- return beginDeleteAsync(resourceGroupName, communicationServiceName, context).last()
- .flatMap(this.client::getLroFinalResultOrError);
- }
-
/**
* Delete
*
@@ -1492,7 +1574,7 @@ private Mono deleteAsync(String resourceGroupName, String communicationSer
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public void delete(String resourceGroupName, String communicationServiceName) {
- deleteAsync(resourceGroupName, communicationServiceName).block();
+ beginDelete(resourceGroupName, communicationServiceName).getFinalResult();
}
/**
@@ -1509,7 +1591,7 @@ public void delete(String resourceGroupName, String communicationServiceName) {
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public void delete(String resourceGroupName, String communicationServiceName, Context context) {
- deleteAsync(resourceGroupName, communicationServiceName, context).block();
+ beginDelete(resourceGroupName, communicationServiceName, context).getFinalResult();
}
/**
@@ -1551,45 +1633,6 @@ private Mono> listKeysWithResponseAsync(
.contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
- /**
- * List Keys
- *
- * Get the access keys of the CommunicationService resource.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param communicationServiceName The name of the CommunicationService 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 CommunicationService resource along with {@link Response} on successful completion
- * of {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> listKeysWithResponseAsync(String resourceGroupName,
- String communicationServiceName, 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 (communicationServiceName == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter communicationServiceName is required and cannot be null."));
- }
- final String accept = "application/json";
- context = this.client.mergeContext(context);
- return service.listKeys(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(),
- resourceGroupName, communicationServiceName, accept, context);
- }
-
/**
* List Keys
*
@@ -1625,7 +1668,28 @@ private Mono listKeysAsync(String resourceGroupNa
@ServiceMethod(returns = ReturnType.SINGLE)
public Response listKeysWithResponse(String resourceGroupName,
String communicationServiceName, Context context) {
- return listKeysWithResponseAsync(resourceGroupName, communicationServiceName, context).block();
+ if (this.client.getEndpoint() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (communicationServiceName == null) {
+ throw LOGGER.atError()
+ .log(
+ new IllegalArgumentException("Parameter communicationServiceName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return service.listKeysSync(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, communicationServiceName, accept, context);
}
/**
@@ -1691,51 +1755,6 @@ private Mono> regenerateKeyWithResponseA
.contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
- /**
- * Regenerate Key
- *
- * Regenerate CommunicationService access key. PrimaryKey and SecondaryKey cannot be regenerated at the same time.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param communicationServiceName The name of the CommunicationService resource.
- * @param parameters Parameter that describes the Regenerate Key Operation.
- * @param context The context to associate with this operation.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws 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 representing the access keys of a CommunicationService along with {@link Response} on successful
- * completion of {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> regenerateKeyWithResponseAsync(String resourceGroupName,
- String communicationServiceName, RegenerateKeyParameters 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 (communicationServiceName == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter communicationServiceName 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.regenerateKey(this.client.getEndpoint(), this.client.getApiVersion(),
- this.client.getSubscriptionId(), resourceGroupName, communicationServiceName, parameters, accept, context);
- }
-
/**
* Regenerate Key
*
@@ -1773,7 +1792,34 @@ private Mono regenerateKeyAsync(String resourceGr
@ServiceMethod(returns = ReturnType.SINGLE)
public Response regenerateKeyWithResponse(String resourceGroupName,
String communicationServiceName, RegenerateKeyParameters parameters, Context context) {
- return regenerateKeyWithResponseAsync(resourceGroupName, communicationServiceName, parameters, context).block();
+ if (this.client.getEndpoint() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (communicationServiceName == null) {
+ throw LOGGER.atError()
+ .log(
+ new IllegalArgumentException("Parameter communicationServiceName is required and cannot be null."));
+ }
+ if (parameters == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter parameters is required and cannot be null."));
+ } else {
+ parameters.validate();
+ }
+ final String accept = "application/json";
+ return service.regenerateKeySync(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, communicationServiceName, parameters, accept, context);
}
/**
@@ -1797,6 +1843,8 @@ public CommunicationServiceKeysInner regenerateKey(String resourceGroupName, Str
}
/**
+ * List By Subscription
+ *
* Get the next page of items.
*
* @param nextLink The URL to get the next list of items.
@@ -1826,6 +1874,38 @@ public CommunicationServiceKeysInner regenerateKey(String resourceGroupName, Str
}
/**
+ * List By Subscription
+ *
+ * Get the next page of items.
+ *
+ * @param nextLink The URL to get the next list of items.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 CommunicationServices and a possible link for next set along with
+ * {@link PagedResponse}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PagedResponse listBySubscriptionNextSinglePage(String nextLink) {
+ if (nextLink == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
+ }
+ if (this.client.getEndpoint() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ Response res
+ = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE);
+ return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(),
+ res.getValue().nextLink(), null);
+ }
+
+ /**
+ * List By Subscription
+ *
* Get the next page of items.
*
* @param nextLink The URL to get the next list of items.
@@ -1834,26 +1914,30 @@ public CommunicationServiceKeysInner regenerateKey(String resourceGroupName, Str
* @throws 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 CommunicationServices and a possible link for next set along with
- * {@link PagedResponse} on successful completion of {@link Mono}.
+ * {@link PagedResponse}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono>
- listBySubscriptionNextSinglePageAsync(String nextLink, Context context) {
+ private PagedResponse listBySubscriptionNextSinglePage(String nextLink,
+ Context context) {
if (nextLink == null) {
- return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
+ throw LOGGER.atError()
+ .log(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."));
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
}
final String accept = "application/json";
- context = this.client.mergeContext(context);
- return service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context)
- .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(),
- res.getValue().value(), res.getValue().nextLink(), null));
+ Response res
+ = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, context);
+ return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(),
+ res.getValue().nextLink(), null);
}
/**
+ * List By Resource Group
+ *
* Get the next page of items.
*
* @param nextLink The URL to get the next list of items.
@@ -1883,6 +1967,38 @@ public CommunicationServiceKeysInner regenerateKey(String resourceGroupName, Str
}
/**
+ * List By Resource Group
+ *
+ * Get the next page of items.
+ *
+ * @param nextLink The URL to get the next list of items.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 CommunicationServices and a possible link for next set along with
+ * {@link PagedResponse}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PagedResponse listByResourceGroupNextSinglePage(String nextLink) {
+ if (nextLink == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
+ }
+ if (this.client.getEndpoint() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ Response res
+ = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE);
+ return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(),
+ res.getValue().nextLink(), null);
+ }
+
+ /**
+ * List By Resource Group
+ *
* Get the next page of items.
*
* @param nextLink The URL to get the next list of items.
@@ -1891,22 +2007,26 @@ public CommunicationServiceKeysInner regenerateKey(String resourceGroupName, Str
* @throws 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 CommunicationServices and a possible link for next set along with
- * {@link PagedResponse} on successful completion of {@link Mono}.
+ * {@link PagedResponse}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono>
- listByResourceGroupNextSinglePageAsync(String nextLink, Context context) {
+ private PagedResponse listByResourceGroupNextSinglePage(String nextLink,
+ Context context) {
if (nextLink == null) {
- return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
+ throw LOGGER.atError()
+ .log(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."));
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
}
final String accept = "application/json";
- context = this.client.mergeContext(context);
- return service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context)
- .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(),
- res.getValue().value(), res.getValue().nextLink(), null));
+ Response res
+ = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, context);
+ return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(),
+ res.getValue().nextLink(), null);
}
+
+ private static final ClientLogger LOGGER = new ClientLogger(CommunicationServicesClientImpl.class);
}
diff --git a/sdk/communication/azure-resourcemanager-communication/src/main/java/com/azure/resourcemanager/communication/implementation/DomainResourceImpl.java b/sdk/communication/azure-resourcemanager-communication/src/main/java/com/azure/resourcemanager/communication/implementation/DomainResourceImpl.java
index 262bd8db8683..6ae44ef6ec65 100644
--- a/sdk/communication/azure-resourcemanager-communication/src/main/java/com/azure/resourcemanager/communication/implementation/DomainResourceImpl.java
+++ b/sdk/communication/azure-resourcemanager-communication/src/main/java/com/azure/resourcemanager/communication/implementation/DomainResourceImpl.java
@@ -237,6 +237,6 @@ public DomainResourceImpl withUserEngagementTracking(UserEngagementTracking user
}
private boolean isInCreateMode() {
- return this.innerModel().id() == null;
+ return this.innerModel() == null || this.innerModel().id() == null;
}
}
diff --git a/sdk/communication/azure-resourcemanager-communication/src/main/java/com/azure/resourcemanager/communication/implementation/DomainsClientImpl.java b/sdk/communication/azure-resourcemanager-communication/src/main/java/com/azure/resourcemanager/communication/implementation/DomainsClientImpl.java
index 500bcf446c70..f8fefe3ea32f 100644
--- a/sdk/communication/azure-resourcemanager-communication/src/main/java/com/azure/resourcemanager/communication/implementation/DomainsClientImpl.java
+++ b/sdk/communication/azure-resourcemanager-communication/src/main/java/com/azure/resourcemanager/communication/implementation/DomainsClientImpl.java
@@ -29,8 +29,10 @@
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.BinaryData;
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.communication.fluent.DomainsClient;
@@ -71,7 +73,7 @@ public final class DomainsClientImpl implements DomainsClient {
* service to perform REST calls.
*/
@Host("{$host}")
- @ServiceInterface(name = "CommunicationService")
+ @ServiceInterface(name = "CommunicationServiceManagementClientDomains")
public interface DomainsService {
@Headers({ "Content-Type: application/json" })
@Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Communication/emailServices/{emailServiceName}/domains/{domainName}")
@@ -83,6 +85,16 @@ Mono> get(@HostParam("$host") String endpoint,
@PathParam("emailServiceName") String emailServiceName, @PathParam("domainName") String domainName,
@HeaderParam("Accept") String accept, Context context);
+ @Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Communication/emailServices/{emailServiceName}/domains/{domainName}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response getSync(@HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("emailServiceName") String emailServiceName, @PathParam("domainName") String domainName,
+ @HeaderParam("Accept") String accept, Context context);
+
@Headers({ "Content-Type: application/json" })
@Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Communication/emailServices/{emailServiceName}/domains/{domainName}")
@ExpectedResponses({ 200, 201 })
@@ -94,6 +106,17 @@ Mono>> createOrUpdate(@HostParam("$host") String endpo
@BodyParam("application/json") DomainResourceInner parameters, @HeaderParam("Accept") String accept,
Context context);
+ @Headers({ "Content-Type: application/json" })
+ @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Communication/emailServices/{emailServiceName}/domains/{domainName}")
+ @ExpectedResponses({ 200, 201 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response createOrUpdateSync(@HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("emailServiceName") String emailServiceName, @PathParam("domainName") String domainName,
+ @BodyParam("application/json") DomainResourceInner parameters, @HeaderParam("Accept") String accept,
+ Context context);
+
@Headers({ "Content-Type: application/json" })
@Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Communication/emailServices/{emailServiceName}/domains/{domainName}")
@ExpectedResponses({ 200, 202, 204 })
@@ -104,6 +127,16 @@ Mono>> delete(@HostParam("$host") String endpoint,
@PathParam("emailServiceName") String emailServiceName, @PathParam("domainName") String domainName,
@HeaderParam("Accept") String accept, Context context);
+ @Headers({ "Content-Type: application/json" })
+ @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Communication/emailServices/{emailServiceName}/domains/{domainName}")
+ @ExpectedResponses({ 200, 202, 204 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response deleteSync(@HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("emailServiceName") String emailServiceName, @PathParam("domainName") String domainName,
+ @HeaderParam("Accept") String accept, Context context);
+
@Headers({ "Content-Type: application/json" })
@Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Communication/emailServices/{emailServiceName}/domains/{domainName}")
@ExpectedResponses({ 200, 201 })
@@ -115,6 +148,17 @@ Mono>> update(@HostParam("$host") String endpoint,
@BodyParam("application/json") UpdateDomainRequestParameters parameters,
@HeaderParam("Accept") String accept, Context context);
+ @Headers({ "Content-Type: application/json" })
+ @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Communication/emailServices/{emailServiceName}/domains/{domainName}")
+ @ExpectedResponses({ 200, 201 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response updateSync(@HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("emailServiceName") String emailServiceName, @PathParam("domainName") String domainName,
+ @BodyParam("application/json") UpdateDomainRequestParameters parameters,
+ @HeaderParam("Accept") String accept, Context context);
+
@Headers({ "Content-Type: application/json" })
@Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Communication/emailServices/{emailServiceName}/domains")
@ExpectedResponses({ 200 })
@@ -125,6 +169,16 @@ Mono> listByEmailServiceResource(@HostParam("$host"
@PathParam("emailServiceName") String emailServiceName, @HeaderParam("Accept") String accept,
Context context);
+ @Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Communication/emailServices/{emailServiceName}/domains")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response listByEmailServiceResourceSync(@HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("emailServiceName") String emailServiceName, @HeaderParam("Accept") String accept,
+ Context context);
+
@Headers({ "Content-Type: application/json" })
@Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Communication/emailServices/{emailServiceName}/domains/{domainName}/initiateVerification")
@ExpectedResponses({ 202 })
@@ -136,6 +190,17 @@ Mono>> initiateVerification(@HostParam("$host") String
@BodyParam("application/json") VerificationParameter parameters, @HeaderParam("Accept") String accept,
Context context);
+ @Headers({ "Content-Type: application/json" })
+ @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Communication/emailServices/{emailServiceName}/domains/{domainName}/initiateVerification")
+ @ExpectedResponses({ 202 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response initiateVerificationSync(@HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("emailServiceName") String emailServiceName, @PathParam("domainName") String domainName,
+ @BodyParam("application/json") VerificationParameter parameters, @HeaderParam("Accept") String accept,
+ Context context);
+
@Headers({ "Content-Type: application/json" })
@Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Communication/emailServices/{emailServiceName}/domains/{domainName}/cancelVerification")
@ExpectedResponses({ 202 })
@@ -147,6 +212,17 @@ Mono>> cancelVerification(@HostParam("$host") String e
@BodyParam("application/json") VerificationParameter parameters, @HeaderParam("Accept") String accept,
Context context);
+ @Headers({ "Content-Type: application/json" })
+ @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Communication/emailServices/{emailServiceName}/domains/{domainName}/cancelVerification")
+ @ExpectedResponses({ 202 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response cancelVerificationSync(@HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("emailServiceName") String emailServiceName, @PathParam("domainName") String domainName,
+ @BodyParam("application/json") VerificationParameter parameters, @HeaderParam("Accept") String accept,
+ Context context);
+
@Headers({ "Content-Type: application/json" })
@Get("{nextLink}")
@ExpectedResponses({ 200 })
@@ -154,6 +230,14 @@ Mono>> cancelVerification(@HostParam("$host") String e
Mono> listByEmailServiceResourceNext(
@PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint,
@HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("{nextLink}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response listByEmailServiceResourceNextSync(
+ @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint,
+ @HeaderParam("Accept") String accept, Context context);
}
/**
@@ -199,49 +283,6 @@ private Mono> getWithResponseAsync(String resource
.contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
- /**
- * Get
- *
- * Get the Domains resource and its properties.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param emailServiceName The name of the EmailService resource.
- * @param domainName The name of the Domains 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 Domains resource and its properties along with {@link Response} on successful completion of
- * {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> getWithResponseAsync(String resourceGroupName, String emailServiceName,
- String domainName, 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 (emailServiceName == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter emailServiceName is required and cannot be null."));
- }
- if (domainName == null) {
- return Mono.error(new IllegalArgumentException("Parameter domainName is required and cannot be null."));
- }
- final String accept = "application/json";
- context = this.client.mergeContext(context);
- return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(),
- resourceGroupName, emailServiceName, domainName, accept, context);
- }
-
/**
* Get
*
@@ -278,7 +319,31 @@ private Mono getAsync(String resourceGroupName, String emai
@ServiceMethod(returns = ReturnType.SINGLE)
public Response getWithResponse(String resourceGroupName, String emailServiceName,
String domainName, Context context) {
- return getWithResponseAsync(resourceGroupName, emailServiceName, domainName, context).block();
+ if (this.client.getEndpoint() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (emailServiceName == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter emailServiceName is required and cannot be null."));
+ }
+ if (domainName == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter domainName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(),
+ resourceGroupName, emailServiceName, domainName, accept, context);
}
/**
@@ -358,45 +423,46 @@ private Mono>> createOrUpdateWithResponseAsync(String
* @param emailServiceName The name of the EmailService resource.
* @param domainName The name of the Domains resource.
* @param parameters Parameters for the create or update operation.
- * @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a class representing a Domains resource along with {@link Response} on successful completion of
- * {@link Mono}.
+ * @return a class representing a Domains resource along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName,
- String emailServiceName, String domainName, DomainResourceInner parameters, Context context) {
+ private Response createOrUpdateWithResponse(String resourceGroupName, String emailServiceName,
+ String domainName, DomainResourceInner parameters) {
if (this.client.getEndpoint() == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
+ throw LOGGER.atError()
+ .log(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."));
+ throw LOGGER.atError()
+ .log(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."));
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
}
if (emailServiceName == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter emailServiceName is required and cannot be null."));
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter emailServiceName is required and cannot be null."));
}
if (domainName == null) {
- return Mono.error(new IllegalArgumentException("Parameter domainName is required and cannot be null."));
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter domainName is required and cannot be null."));
}
if (parameters == null) {
- return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null."));
+ throw LOGGER.atError()
+ .log(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.getApiVersion(),
+ return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(),
this.client.getSubscriptionId(), resourceGroupName, emailServiceName, domainName, parameters, accept,
- context);
+ Context.NONE);
}
/**
@@ -408,18 +474,47 @@ private Mono>> createOrUpdateWithResponseAsync(String
* @param emailServiceName The name of the EmailService resource.
* @param domainName The name of the Domains resource.
* @param parameters Parameters for the create or update operation.
+ * @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the {@link PollerFlux} for polling of a class representing a Domains resource.
+ * @return a class representing a Domains resource along with {@link Response}.
*/
- @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- private PollerFlux, DomainResourceInner> beginCreateOrUpdateAsync(
- String resourceGroupName, String emailServiceName, String domainName, DomainResourceInner parameters) {
- Mono>> mono
- = createOrUpdateWithResponseAsync(resourceGroupName, emailServiceName, domainName, parameters);
- return this.client.getLroResult(mono, this.client.getHttpPipeline(),
- DomainResourceInner.class, DomainResourceInner.class, this.client.getContext());
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Response createOrUpdateWithResponse(String resourceGroupName, String emailServiceName,
+ String domainName, DomainResourceInner parameters, Context context) {
+ if (this.client.getEndpoint() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (emailServiceName == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter emailServiceName is required and cannot be null."));
+ }
+ if (domainName == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter domainName is required and cannot be null."));
+ }
+ if (parameters == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter parameters is required and cannot be null."));
+ } else {
+ parameters.validate();
+ }
+ final String accept = "application/json";
+ return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, emailServiceName, domainName, parameters, accept,
+ context);
}
/**
@@ -431,7 +526,6 @@ private PollerFlux, DomainResourceInner> beginCr
* @param emailServiceName The name of the EmailService resource.
* @param domainName The name of the Domains resource.
* @param parameters Parameters for the create or update operation.
- * @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
@@ -439,13 +533,11 @@ private PollerFlux, DomainResourceInner> beginCr
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
private PollerFlux, DomainResourceInner> beginCreateOrUpdateAsync(
- String resourceGroupName, String emailServiceName, String domainName, DomainResourceInner parameters,
- Context context) {
- context = this.client.mergeContext(context);
+ String resourceGroupName, String emailServiceName, String domainName, DomainResourceInner parameters) {
Mono>> mono
- = createOrUpdateWithResponseAsync(resourceGroupName, emailServiceName, domainName, parameters, context);
+ = createOrUpdateWithResponseAsync(resourceGroupName, emailServiceName, domainName, parameters);
return this.client.getLroResult(mono, this.client.getHttpPipeline(),
- DomainResourceInner.class, DomainResourceInner.class, context);
+ DomainResourceInner.class, DomainResourceInner.class, this.client.getContext());
}
/**
@@ -465,8 +557,10 @@ private PollerFlux, DomainResourceInner> beginCr
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
public SyncPoller, DomainResourceInner> beginCreateOrUpdate(
String resourceGroupName, String emailServiceName, String domainName, DomainResourceInner parameters) {
- return this.beginCreateOrUpdateAsync(resourceGroupName, emailServiceName, domainName, parameters)
- .getSyncPoller();
+ Response response
+ = createOrUpdateWithResponse(resourceGroupName, emailServiceName, domainName, parameters);
+ return this.client.getLroResult(response, DomainResourceInner.class,
+ DomainResourceInner.class, Context.NONE);
}
/**
@@ -488,8 +582,10 @@ public SyncPoller, DomainResourceInner> beginCre
public SyncPoller, DomainResourceInner> beginCreateOrUpdate(
String resourceGroupName, String emailServiceName, String domainName, DomainResourceInner parameters,
Context context) {
- return this.beginCreateOrUpdateAsync(resourceGroupName, emailServiceName, domainName, parameters, context)
- .getSyncPoller();
+ Response response
+ = createOrUpdateWithResponse(resourceGroupName, emailServiceName, domainName, parameters, context);
+ return this.client.getLroResult(response, DomainResourceInner.class,
+ DomainResourceInner.class, context);
}
/**
@@ -513,28 +609,6 @@ private Mono createOrUpdateAsync(String resourceGroupName,
.flatMap(this.client::getLroFinalResultOrError);
}
- /**
- * Create Or Update
- *
- * Add a new Domains resource under the parent EmailService resource or update an existing Domains resource.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param emailServiceName The name of the EmailService resource.
- * @param domainName The name of the Domains resource.
- * @param parameters Parameters for the create or update operation.
- * @param context The context to associate with this operation.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a class representing a Domains resource on successful completion of {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono createOrUpdateAsync(String resourceGroupName, String emailServiceName,
- String domainName, DomainResourceInner parameters, Context context) {
- return beginCreateOrUpdateAsync(resourceGroupName, emailServiceName, domainName, parameters, context).last()
- .flatMap(this.client::getLroFinalResultOrError);
- }
-
/**
* Create Or Update
*
@@ -552,7 +626,7 @@ private Mono createOrUpdateAsync(String resourceGroupName,
@ServiceMethod(returns = ReturnType.SINGLE)
public DomainResourceInner createOrUpdate(String resourceGroupName, String emailServiceName, String domainName,
DomainResourceInner parameters) {
- return createOrUpdateAsync(resourceGroupName, emailServiceName, domainName, parameters).block();
+ return beginCreateOrUpdate(resourceGroupName, emailServiceName, domainName, parameters).getFinalResult();
}
/**
@@ -573,7 +647,8 @@ public DomainResourceInner createOrUpdate(String resourceGroupName, String email
@ServiceMethod(returns = ReturnType.SINGLE)
public DomainResourceInner createOrUpdate(String resourceGroupName, String emailServiceName, String domainName,
DomainResourceInner parameters, Context context) {
- return createOrUpdateAsync(resourceGroupName, emailServiceName, domainName, parameters, context).block();
+ return beginCreateOrUpdate(resourceGroupName, emailServiceName, domainName, parameters, context)
+ .getFinalResult();
}
/**
@@ -626,38 +701,39 @@ private Mono>> deleteWithResponseAsync(String resource
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param emailServiceName The name of the EmailService resource.
* @param domainName The name of the Domains resource.
- * @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the {@link Response} on successful completion of {@link Mono}.
+ * @return the response body along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono>> deleteWithResponseAsync(String resourceGroupName, String emailServiceName,
- String domainName, Context context) {
+ private Response deleteWithResponse(String resourceGroupName, String emailServiceName,
+ String domainName) {
if (this.client.getEndpoint() == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
+ throw LOGGER.atError()
+ .log(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."));
+ throw LOGGER.atError()
+ .log(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."));
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
}
if (emailServiceName == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter emailServiceName is required and cannot be null."));
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter emailServiceName is required and cannot be null."));
}
if (domainName == null) {
- return Mono.error(new IllegalArgumentException("Parameter domainName is required and cannot be null."));
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter domainName is required and cannot be null."));
}
final String accept = "application/json";
- context = this.client.mergeContext(context);
- return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(),
- resourceGroupName, emailServiceName, domainName, accept, context);
+ return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, emailServiceName, domainName, accept, Context.NONE);
}
/**
@@ -668,18 +744,40 @@ private Mono>> deleteWithResponseAsync(String resource
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param emailServiceName The name of the EmailService resource.
* @param domainName The name of the Domains resource.
+ * @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the {@link PollerFlux} for polling of long-running operation.
+ * @return the response body along with {@link Response}.
*/
- @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String emailServiceName,
- String domainName) {
- Mono>> mono
- = deleteWithResponseAsync(resourceGroupName, emailServiceName, domainName);
- return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class,
- this.client.getContext());
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Response deleteWithResponse(String resourceGroupName, String emailServiceName,
+ String domainName, Context context) {
+ if (this.client.getEndpoint() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (emailServiceName == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter emailServiceName is required and cannot be null."));
+ }
+ if (domainName == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter domainName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, emailServiceName, domainName, accept, context);
}
/**
@@ -690,7 +788,6 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param emailServiceName The name of the EmailService resource.
* @param domainName The name of the Domains 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.
@@ -698,12 +795,11 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String emailServiceName,
- String domainName, Context context) {
- context = this.client.mergeContext(context);
+ String domainName) {
Mono>> mono
- = deleteWithResponseAsync(resourceGroupName, emailServiceName, domainName, context);
+ = deleteWithResponseAsync(resourceGroupName, emailServiceName, domainName);
return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class,
- context);
+ this.client.getContext());
}
/**
@@ -722,7 +818,8 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
public SyncPoller, Void> beginDelete(String resourceGroupName, String emailServiceName,
String domainName) {
- return this.beginDeleteAsync(resourceGroupName, emailServiceName, domainName).getSyncPoller();
+ Response response = deleteWithResponse(resourceGroupName, emailServiceName, domainName);
+ return this.client.getLroResult(response, Void.class, Void.class, Context.NONE);
}
/**
@@ -742,7 +839,8 @@ public SyncPoller, Void> beginDelete(String resourceGroupName,
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
public SyncPoller, Void> beginDelete(String resourceGroupName, String emailServiceName,
String domainName, Context context) {
- return this.beginDeleteAsync(resourceGroupName, emailServiceName, domainName, context).getSyncPoller();
+ Response response = deleteWithResponse(resourceGroupName, emailServiceName, domainName, context);
+ return this.client.getLroResult(response, Void.class, Void.class, context);
}
/**
@@ -764,27 +862,6 @@ private Mono deleteAsync(String resourceGroupName, String emailServiceName
.flatMap(this.client::getLroFinalResultOrError);
}
- /**
- * Delete
- *
- * Operation to delete a Domains resource.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param emailServiceName The name of the EmailService resource.
- * @param domainName The name of the Domains 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 {@link Mono} that completes when a successful response is received.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono deleteAsync(String resourceGroupName, String emailServiceName, String domainName,
- Context context) {
- return beginDeleteAsync(resourceGroupName, emailServiceName, domainName, context).last()
- .flatMap(this.client::getLroFinalResultOrError);
- }
-
/**
* Delete
*
@@ -799,7 +876,7 @@ private Mono deleteAsync(String resourceGroupName, String emailServiceName
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public void delete(String resourceGroupName, String emailServiceName, String domainName) {
- deleteAsync(resourceGroupName, emailServiceName, domainName).block();
+ beginDelete(resourceGroupName, emailServiceName, domainName).getFinalResult();
}
/**
@@ -817,7 +894,7 @@ public void delete(String resourceGroupName, String emailServiceName, String dom
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public void delete(String resourceGroupName, String emailServiceName, String domainName, Context context) {
- deleteAsync(resourceGroupName, emailServiceName, domainName, context).block();
+ beginDelete(resourceGroupName, emailServiceName, domainName, context).getFinalResult();
}
/**
@@ -879,44 +956,46 @@ private Mono>> updateWithResponseAsync(String resource
* @param emailServiceName The name of the EmailService resource.
* @param domainName The name of the Domains resource.
* @param parameters Parameters for the update operation.
- * @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a class representing a Domains resource along with {@link Response} on successful completion of
- * {@link Mono}.
+ * @return a class representing a Domains resource along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono>> updateWithResponseAsync(String resourceGroupName, String emailServiceName,
- String domainName, UpdateDomainRequestParameters parameters, Context context) {
+ private Response updateWithResponse(String resourceGroupName, String emailServiceName,
+ String domainName, UpdateDomainRequestParameters parameters) {
if (this.client.getEndpoint() == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
+ throw LOGGER.atError()
+ .log(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."));
+ throw LOGGER.atError()
+ .log(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."));
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
}
if (emailServiceName == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter emailServiceName is required and cannot be null."));
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter emailServiceName is required and cannot be null."));
}
if (domainName == null) {
- return Mono.error(new IllegalArgumentException("Parameter domainName is required and cannot be null."));
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter domainName is required and cannot be null."));
}
if (parameters == null) {
- return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null."));
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter parameters is required and cannot be null."));
} else {
parameters.validate();
}
final String accept = "application/json";
- context = this.client.mergeContext(context);
- return service.update(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(),
- resourceGroupName, emailServiceName, domainName, parameters, accept, context);
+ return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, emailServiceName, domainName, parameters, accept,
+ Context.NONE);
}
/**
@@ -928,18 +1007,47 @@ private Mono>> updateWithResponseAsync(String resource
* @param emailServiceName The name of the EmailService resource.
* @param domainName The name of the Domains resource.
* @param parameters Parameters for the update operation.
+ * @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the {@link PollerFlux} for polling of a class representing a Domains resource.
+ * @return a class representing a Domains resource along with {@link Response}.
*/
- @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- private PollerFlux, DomainResourceInner> beginUpdateAsync(String resourceGroupName,
- String emailServiceName, String domainName, UpdateDomainRequestParameters parameters) {
- Mono>> mono
- = updateWithResponseAsync(resourceGroupName, emailServiceName, domainName, parameters);
- return this.client.getLroResult(mono, this.client.getHttpPipeline(),
- DomainResourceInner.class, DomainResourceInner.class, this.client.getContext());
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Response updateWithResponse(String resourceGroupName, String emailServiceName,
+ String domainName, UpdateDomainRequestParameters parameters, Context context) {
+ if (this.client.getEndpoint() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (emailServiceName == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter emailServiceName is required and cannot be null."));
+ }
+ if (domainName == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter domainName is required and cannot be null."));
+ }
+ if (parameters == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter parameters is required and cannot be null."));
+ } else {
+ parameters.validate();
+ }
+ final String accept = "application/json";
+ return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, emailServiceName, domainName, parameters, accept,
+ context);
}
/**
@@ -951,7 +1059,6 @@ private PollerFlux, DomainResourceInner> beginUp
* @param emailServiceName The name of the EmailService resource.
* @param domainName The name of the Domains resource.
* @param parameters Parameters for the update operation.
- * @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
@@ -959,12 +1066,11 @@ private PollerFlux, DomainResourceInner> beginUp
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
private PollerFlux