diff --git a/sdk/relay/azure-resourcemanager-relay/CHANGELOG.md b/sdk/relay/azure-resourcemanager-relay/CHANGELOG.md
index 147f7a13a21a..4e0b625ef131 100644
--- a/sdk/relay/azure-resourcemanager-relay/CHANGELOG.md
+++ b/sdk/relay/azure-resourcemanager-relay/CHANGELOG.md
@@ -1,7 +1,8 @@
# Release History
-## 1.0.0-beta.2 (Unreleased)
+## 1.0.0-beta.1 (2022-03-14)
+- Azure Resource Manager Relay client library for Java. This package contains Microsoft Azure SDK for Relay Management SDK. Use these API to manage Azure Relay resources through Azure Resource Manager. Package tag package-2017-04. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
## 1.0.0-beta.1 (2020-12-18)
diff --git a/sdk/relay/azure-resourcemanager-relay/README.md b/sdk/relay/azure-resourcemanager-relay/README.md
index 065e213e9d43..68e57750f931 100644
--- a/sdk/relay/azure-resourcemanager-relay/README.md
+++ b/sdk/relay/azure-resourcemanager-relay/README.md
@@ -4,6 +4,20 @@ Azure Resource Manager Relay client library for Java.
This package contains Microsoft Azure SDK for Relay Management SDK. Use these API to manage Azure Relay resources through Azure Resource Manager. Package tag package-2017-04. 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
+
+We're always working on improving our products and the way we communicate with our users. So we'd love to learn what's working and how we can do better.
+
+If you haven't already, please take a few minutes to [complete this short survey][survey] we have put together.
+
+Thank you in advance for your collaboration. We really appreciate your time!
+
+## Documentation
+
+Various documentation is available to help you get started
+
+- [API reference documentation][docs]
+
## Getting started
### Prerequisites
@@ -18,7 +32,7 @@ This package contains Microsoft Azure SDK for Relay Management SDK. Use these AP
com.azure.resourcemanager
azure-resourcemanager-relay
- 1.0.0-beta.1
+ 1.0.0-beta.2
```
[//]: # ({x-version-update-end})
@@ -60,6 +74,9 @@ See [API design][design] for general introduction on design and key concepts on
## Examples
+[Code snippets and samples](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/relay/azure-resourcemanager-relay/SAMPLE.md)
+
+
## Troubleshooting
## Next steps
@@ -75,6 +92,8 @@ For details on contributing to this repository, see the [contributing guide](htt
1. Create new Pull Request
+[survey]: https://microsoft.qualtrics.com/jfe/form/SV_ehN0lIk2FKEBkwd?Q_CHL=DOCS
+[docs]: https://azure.github.io/azure-sdk-for-java/
[jdk]: https://docs.microsoft.com/java/azure/jdk/
[azure_subscription]: https://azure.microsoft.com/free/
[azure_identity]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/identity/azure-identity
diff --git a/sdk/relay/azure-resourcemanager-relay/SAMPLE.md b/sdk/relay/azure-resourcemanager-relay/SAMPLE.md
new file mode 100644
index 000000000000..e466aa6107ac
--- /dev/null
+++ b/sdk/relay/azure-resourcemanager-relay/SAMPLE.md
@@ -0,0 +1,945 @@
+# Code snippets and samples
+
+
+## HybridConnections
+
+- [CreateOrUpdate](#hybridconnections_createorupdate)
+- [CreateOrUpdateAuthorizationRule](#hybridconnections_createorupdateauthorizationrule)
+- [Delete](#hybridconnections_delete)
+- [DeleteAuthorizationRule](#hybridconnections_deleteauthorizationrule)
+- [Get](#hybridconnections_get)
+- [GetAuthorizationRule](#hybridconnections_getauthorizationrule)
+- [ListAuthorizationRules](#hybridconnections_listauthorizationrules)
+- [ListByNamespace](#hybridconnections_listbynamespace)
+- [ListKeys](#hybridconnections_listkeys)
+- [RegenerateKeys](#hybridconnections_regeneratekeys)
+
+## Namespaces
+
+- [CheckNameAvailability](#namespaces_checknameavailability)
+- [CreateOrUpdate](#namespaces_createorupdate)
+- [CreateOrUpdateAuthorizationRule](#namespaces_createorupdateauthorizationrule)
+- [Delete](#namespaces_delete)
+- [DeleteAuthorizationRule](#namespaces_deleteauthorizationrule)
+- [GetAuthorizationRule](#namespaces_getauthorizationrule)
+- [GetByResourceGroup](#namespaces_getbyresourcegroup)
+- [List](#namespaces_list)
+- [ListAuthorizationRules](#namespaces_listauthorizationrules)
+- [ListByResourceGroup](#namespaces_listbyresourcegroup)
+- [ListKeys](#namespaces_listkeys)
+- [RegenerateKeys](#namespaces_regeneratekeys)
+- [Update](#namespaces_update)
+
+## Operations
+
+- [List](#operations_list)
+
+## WcfRelays
+
+- [CreateOrUpdate](#wcfrelays_createorupdate)
+- [CreateOrUpdateAuthorizationRule](#wcfrelays_createorupdateauthorizationrule)
+- [Delete](#wcfrelays_delete)
+- [DeleteAuthorizationRule](#wcfrelays_deleteauthorizationrule)
+- [Get](#wcfrelays_get)
+- [GetAuthorizationRule](#wcfrelays_getauthorizationrule)
+- [ListAuthorizationRules](#wcfrelays_listauthorizationrules)
+- [ListByNamespace](#wcfrelays_listbynamespace)
+- [ListKeys](#wcfrelays_listkeys)
+- [RegenerateKeys](#wcfrelays_regeneratekeys)
+### HybridConnections_CreateOrUpdate
+
+```java
+/** Samples for HybridConnections CreateOrUpdate. */
+public final class HybridConnectionsCreateOrUpdateSamples {
+ /*
+ * x-ms-original-file: specification/relay/resource-manager/Microsoft.Relay/stable/2017-04-01/examples/HybridConnection/RelayHybridConnectionCreate.json
+ */
+ /**
+ * Sample code: RelayHybridConnectionCreate.
+ *
+ * @param manager Entry point to RelayManager.
+ */
+ public static void relayHybridConnectionCreate(com.azure.resourcemanager.relay.RelayManager manager) {
+ manager
+ .hybridConnections()
+ .define("example-Relay-Hybrid-01")
+ .withExistingNamespace("resourcegroup", "example-RelayNamespace-01")
+ .withRequiresClientAuthorization(true)
+ .create();
+ }
+}
+```
+
+### HybridConnections_CreateOrUpdateAuthorizationRule
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.relay.fluent.models.AuthorizationRuleInner;
+import com.azure.resourcemanager.relay.models.AccessRights;
+import java.util.Arrays;
+
+/** Samples for HybridConnections CreateOrUpdateAuthorizationRule. */
+public final class HybridConnectionsCreateOrUpdateAuthorizationRuleSamples {
+ /*
+ * x-ms-original-file: specification/relay/resource-manager/Microsoft.Relay/stable/2017-04-01/examples/HybridConnection/RelayHybridConnectionAuthorizationRuleCreate.json
+ */
+ /**
+ * Sample code: RelayHybridConnectionAuthorizationRuleCreate.
+ *
+ * @param manager Entry point to RelayManager.
+ */
+ public static void relayHybridConnectionAuthorizationRuleCreate(
+ com.azure.resourcemanager.relay.RelayManager manager) {
+ manager
+ .hybridConnections()
+ .createOrUpdateAuthorizationRuleWithResponse(
+ "resourcegroup",
+ "example-RelayNamespace-01",
+ "example-Relay-Hybrid-01",
+ "example-RelayAuthRules-01",
+ new AuthorizationRuleInner().withRights(Arrays.asList(AccessRights.LISTEN, AccessRights.SEND)),
+ Context.NONE);
+ }
+}
+```
+
+### HybridConnections_Delete
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for HybridConnections Delete. */
+public final class HybridConnectionsDeleteSamples {
+ /*
+ * x-ms-original-file: specification/relay/resource-manager/Microsoft.Relay/stable/2017-04-01/examples/HybridConnection/RelayHybridconnectionDelete.json
+ */
+ /**
+ * Sample code: RelayHybridconnectionDelete.
+ *
+ * @param manager Entry point to RelayManager.
+ */
+ public static void relayHybridconnectionDelete(com.azure.resourcemanager.relay.RelayManager manager) {
+ manager
+ .hybridConnections()
+ .deleteWithResponse("resourcegroup", "example-RelayNamespace-01", "example-Relay-Hybrid-01", Context.NONE);
+ }
+}
+```
+
+### HybridConnections_DeleteAuthorizationRule
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for HybridConnections DeleteAuthorizationRule. */
+public final class HybridConnectionsDeleteAuthorizationRuleSamples {
+ /*
+ * x-ms-original-file: specification/relay/resource-manager/Microsoft.Relay/stable/2017-04-01/examples/HybridConnection/RelayHybridConnectionAutorizationRuleDelete.json
+ */
+ /**
+ * Sample code: RelayHybridConnectionAutorizationRuleDelete.
+ *
+ * @param manager Entry point to RelayManager.
+ */
+ public static void relayHybridConnectionAutorizationRuleDelete(
+ com.azure.resourcemanager.relay.RelayManager manager) {
+ manager
+ .hybridConnections()
+ .deleteAuthorizationRuleWithResponse(
+ "resourcegroup",
+ "example-RelayNamespace-01",
+ "example-Relay-Hybrid-01",
+ "example-RelayAuthRules-01",
+ Context.NONE);
+ }
+}
+```
+
+### HybridConnections_Get
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for HybridConnections Get. */
+public final class HybridConnectionsGetSamples {
+ /*
+ * x-ms-original-file: specification/relay/resource-manager/Microsoft.Relay/stable/2017-04-01/examples/HybridConnection/RelayHybridConnectionGet.json
+ */
+ /**
+ * Sample code: RelayHybridConnectionGet.
+ *
+ * @param manager Entry point to RelayManager.
+ */
+ public static void relayHybridConnectionGet(com.azure.resourcemanager.relay.RelayManager manager) {
+ manager
+ .hybridConnections()
+ .getWithResponse("resourcegroup", "example-RelayNamespace-01", "example-Relay-Hybrid-01", Context.NONE);
+ }
+}
+```
+
+### HybridConnections_GetAuthorizationRule
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for HybridConnections GetAuthorizationRule. */
+public final class HybridConnectionsGetAuthorizationRuleSamples {
+ /*
+ * x-ms-original-file: specification/relay/resource-manager/Microsoft.Relay/stable/2017-04-01/examples/HybridConnection/RelayHybridConnectionAutorizationRuleGet.json
+ */
+ /**
+ * Sample code: RelayHybridConnectionAutorizationRuleGet.
+ *
+ * @param manager Entry point to RelayManager.
+ */
+ public static void relayHybridConnectionAutorizationRuleGet(com.azure.resourcemanager.relay.RelayManager manager) {
+ manager
+ .hybridConnections()
+ .getAuthorizationRuleWithResponse(
+ "resourcegroup",
+ "example-RelayNamespace-01",
+ "example-Relay-Hybrid-01",
+ "example-RelayAuthRules-01",
+ Context.NONE);
+ }
+}
+```
+
+### HybridConnections_ListAuthorizationRules
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for HybridConnections ListAuthorizationRules. */
+public final class HybridConnectionsListAuthorizationRulesSamples {
+ /*
+ * x-ms-original-file: specification/relay/resource-manager/Microsoft.Relay/stable/2017-04-01/examples/HybridConnection/RelayHybridConnectionAutorizationRuleListAll.json
+ */
+ /**
+ * Sample code: RelayHybridConnectionAutorizationRuleListAll.
+ *
+ * @param manager Entry point to RelayManager.
+ */
+ public static void relayHybridConnectionAutorizationRuleListAll(
+ com.azure.resourcemanager.relay.RelayManager manager) {
+ manager
+ .hybridConnections()
+ .listAuthorizationRules(
+ "resourcegroup", "example-RelayNamespace-01", "example-Relay-Hybrid-01", Context.NONE);
+ }
+}
+```
+
+### HybridConnections_ListByNamespace
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for HybridConnections ListByNamespace. */
+public final class HybridConnectionsListByNamespaceSamples {
+ /*
+ * x-ms-original-file: specification/relay/resource-manager/Microsoft.Relay/stable/2017-04-01/examples/HybridConnection/RelayHybridConnectionListAll.json
+ */
+ /**
+ * Sample code: RelayHybridConnectionListAll.
+ *
+ * @param manager Entry point to RelayManager.
+ */
+ public static void relayHybridConnectionListAll(com.azure.resourcemanager.relay.RelayManager manager) {
+ manager.hybridConnections().listByNamespace("resourcegroup", "example-RelayNamespace-01", Context.NONE);
+ }
+}
+```
+
+### HybridConnections_ListKeys
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for HybridConnections ListKeys. */
+public final class HybridConnectionsListKeysSamples {
+ /*
+ * x-ms-original-file: specification/relay/resource-manager/Microsoft.Relay/stable/2017-04-01/examples/HybridConnection/RelayHybridConnectionAuthorizationRuleListKey.json
+ */
+ /**
+ * Sample code: RelayHybridConnectionAuthorizationRuleListKey.
+ *
+ * @param manager Entry point to RelayManager.
+ */
+ public static void relayHybridConnectionAuthorizationRuleListKey(
+ com.azure.resourcemanager.relay.RelayManager manager) {
+ manager
+ .hybridConnections()
+ .listKeysWithResponse(
+ "resourcegroup",
+ "example-RelayNamespace-01",
+ "example-Relay-Hybrid-01",
+ "example-RelayAuthRules-01",
+ Context.NONE);
+ }
+}
+```
+
+### HybridConnections_RegenerateKeys
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.relay.models.KeyType;
+import com.azure.resourcemanager.relay.models.RegenerateAccessKeyParameters;
+
+/** Samples for HybridConnections RegenerateKeys. */
+public final class HybridConnectionsRegenerateKeysSamples {
+ /*
+ * x-ms-original-file: specification/relay/resource-manager/Microsoft.Relay/stable/2017-04-01/examples/HybridConnection/RelayHybridConnectionAuthorizationRuleRegenrateKey.json
+ */
+ /**
+ * Sample code: RelayHybridConnectionAuthorizationRuleRegenrateKey.
+ *
+ * @param manager Entry point to RelayManager.
+ */
+ public static void relayHybridConnectionAuthorizationRuleRegenrateKey(
+ com.azure.resourcemanager.relay.RelayManager manager) {
+ manager
+ .hybridConnections()
+ .regenerateKeysWithResponse(
+ "resourcegroup",
+ "example-RelayNamespace-01",
+ "example-Relay-Hybrid-01",
+ "example-RelayAuthRules-01",
+ new RegenerateAccessKeyParameters().withKeyType(KeyType.PRIMARY_KEY),
+ Context.NONE);
+ }
+}
+```
+
+### Namespaces_CheckNameAvailability
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.relay.models.CheckNameAvailability;
+
+/** Samples for Namespaces CheckNameAvailability. */
+public final class NamespacesCheckNameAvailabilitySamples {
+ /*
+ * x-ms-original-file: specification/relay/resource-manager/Microsoft.Relay/stable/2017-04-01/examples/NameSpaces/RelayNameSpaceCheckNameAvailability.json
+ */
+ /**
+ * Sample code: RelayCheckNameAvailability.
+ *
+ * @param manager Entry point to RelayManager.
+ */
+ public static void relayCheckNameAvailability(com.azure.resourcemanager.relay.RelayManager manager) {
+ manager
+ .namespaces()
+ .checkNameAvailabilityWithResponse(new CheckNameAvailability().withName("sdk-Namespace1321"), Context.NONE);
+ }
+}
+```
+
+### Namespaces_CreateOrUpdate
+
+```java
+import com.azure.resourcemanager.relay.models.Sku;
+import com.azure.resourcemanager.relay.models.SkuTier;
+import java.util.HashMap;
+import java.util.Map;
+
+/** Samples for Namespaces CreateOrUpdate. */
+public final class NamespacesCreateOrUpdateSamples {
+ /*
+ * x-ms-original-file: specification/relay/resource-manager/Microsoft.Relay/stable/2017-04-01/examples/NameSpaces/RelayNameSpaceCreate.json
+ */
+ /**
+ * Sample code: RelayNamespaceCreate.
+ *
+ * @param manager Entry point to RelayManager.
+ */
+ public static void relayNamespaceCreate(com.azure.resourcemanager.relay.RelayManager manager) {
+ manager
+ .namespaces()
+ .define("example-RelayNamespace-01")
+ .withRegion("West US")
+ .withExistingResourceGroup("resourcegroup")
+ .withTags(mapOf("tag1", "value1", "tag2", "value2"))
+ .withSku(new Sku().withTier(SkuTier.STANDARD))
+ .create();
+ }
+
+ @SuppressWarnings("unchecked")
+ private static Map mapOf(Object... inputs) {
+ Map map = new HashMap<>();
+ for (int i = 0; i < inputs.length; i += 2) {
+ String key = (String) inputs[i];
+ T value = (T) inputs[i + 1];
+ map.put(key, value);
+ }
+ return map;
+ }
+}
+```
+
+### Namespaces_CreateOrUpdateAuthorizationRule
+
+```java
+import com.azure.resourcemanager.relay.models.AccessRights;
+import java.util.Arrays;
+
+/** Samples for Namespaces CreateOrUpdateAuthorizationRule. */
+public final class NamespacesCreateOrUpdateAuthorizationRuleSamples {
+ /*
+ * x-ms-original-file: specification/relay/resource-manager/Microsoft.Relay/stable/2017-04-01/examples/NameSpaces/RelayNameSpaceAuthorizationRuleCreate.json
+ */
+ /**
+ * Sample code: RelayNameSpaceAuthorizationRuleCreate.
+ *
+ * @param manager Entry point to RelayManager.
+ */
+ public static void relayNameSpaceAuthorizationRuleCreate(com.azure.resourcemanager.relay.RelayManager manager) {
+ manager
+ .namespaces()
+ .defineAuthorizationRule("example-RelayAuthRules-01")
+ .withExistingNamespace("resourcegroup", "example-RelayNamespace-01")
+ .withRights(Arrays.asList(AccessRights.LISTEN, AccessRights.SEND))
+ .create();
+ }
+}
+```
+
+### Namespaces_Delete
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Namespaces Delete. */
+public final class NamespacesDeleteSamples {
+ /*
+ * x-ms-original-file: specification/relay/resource-manager/Microsoft.Relay/stable/2017-04-01/examples/NameSpaces/RelayNameSpaceDelete.json
+ */
+ /**
+ * Sample code: RelayNameSpaceDelete.
+ *
+ * @param manager Entry point to RelayManager.
+ */
+ public static void relayNameSpaceDelete(com.azure.resourcemanager.relay.RelayManager manager) {
+ manager.namespaces().delete("resourcegroup", "example-RelayNamespace-01", Context.NONE);
+ }
+}
+```
+
+### Namespaces_DeleteAuthorizationRule
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Namespaces DeleteAuthorizationRule. */
+public final class NamespacesDeleteAuthorizationRuleSamples {
+ /*
+ * x-ms-original-file: specification/relay/resource-manager/Microsoft.Relay/stable/2017-04-01/examples/NameSpaces/RelayNameSpaceAutorizationRuleDelete.json
+ */
+ /**
+ * Sample code: RelayNameSpaceAutorizationRuleDelete.
+ *
+ * @param manager Entry point to RelayManager.
+ */
+ public static void relayNameSpaceAutorizationRuleDelete(com.azure.resourcemanager.relay.RelayManager manager) {
+ manager
+ .namespaces()
+ .deleteAuthorizationRuleWithResponse(
+ "resourcegroup", "example-RelayNamespace-01", "example-RelayAuthRules-01", Context.NONE);
+ }
+}
+```
+
+### Namespaces_GetAuthorizationRule
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Namespaces GetAuthorizationRule. */
+public final class NamespacesGetAuthorizationRuleSamples {
+ /*
+ * x-ms-original-file: specification/relay/resource-manager/Microsoft.Relay/stable/2017-04-01/examples/NameSpaces/RelayNameSpaceAutorizationRuleGet.json
+ */
+ /**
+ * Sample code: RelayNameSpaceAutorizationRuleGet.
+ *
+ * @param manager Entry point to RelayManager.
+ */
+ public static void relayNameSpaceAutorizationRuleGet(com.azure.resourcemanager.relay.RelayManager manager) {
+ manager
+ .namespaces()
+ .getAuthorizationRuleWithResponse(
+ "resourcegroup", "example-RelayNamespace-01", "example-RelayAuthRules-01", Context.NONE);
+ }
+}
+```
+
+### Namespaces_GetByResourceGroup
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Namespaces GetByResourceGroup. */
+public final class NamespacesGetByResourceGroupSamples {
+ /*
+ * x-ms-original-file: specification/relay/resource-manager/Microsoft.Relay/stable/2017-04-01/examples/NameSpaces/RelayNameSpaceGet.json
+ */
+ /**
+ * Sample code: RelayNameSpaceGet.
+ *
+ * @param manager Entry point to RelayManager.
+ */
+ public static void relayNameSpaceGet(com.azure.resourcemanager.relay.RelayManager manager) {
+ manager.namespaces().getByResourceGroupWithResponse("resourcegroup", "example-RelayNamespace-01", Context.NONE);
+ }
+}
+```
+
+### Namespaces_List
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Namespaces List. */
+public final class NamespacesListSamples {
+ /*
+ * x-ms-original-file: specification/relay/resource-manager/Microsoft.Relay/stable/2017-04-01/examples/NameSpaces/RelayNameSpaceListBySubscription.json
+ */
+ /**
+ * Sample code: RelayNameSpaceListBySubscription.
+ *
+ * @param manager Entry point to RelayManager.
+ */
+ public static void relayNameSpaceListBySubscription(com.azure.resourcemanager.relay.RelayManager manager) {
+ manager.namespaces().list(Context.NONE);
+ }
+}
+```
+
+### Namespaces_ListAuthorizationRules
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Namespaces ListAuthorizationRules. */
+public final class NamespacesListAuthorizationRulesSamples {
+ /*
+ * x-ms-original-file: specification/relay/resource-manager/Microsoft.Relay/stable/2017-04-01/examples/NameSpaces/RelayNameSpaceAutorizationRuleListAll.json
+ */
+ /**
+ * Sample code: RelayNameSpaceAutorizationRuleListAll.
+ *
+ * @param manager Entry point to RelayManager.
+ */
+ public static void relayNameSpaceAutorizationRuleListAll(com.azure.resourcemanager.relay.RelayManager manager) {
+ manager.namespaces().listAuthorizationRules("resourcegroup", "example-RelayNamespace-01", Context.NONE);
+ }
+}
+```
+
+### Namespaces_ListByResourceGroup
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Namespaces ListByResourceGroup. */
+public final class NamespacesListByResourceGroupSamples {
+ /*
+ * x-ms-original-file: specification/relay/resource-manager/Microsoft.Relay/stable/2017-04-01/examples/NameSpaces/RelayNameSpaceListByResourceGroup.json
+ */
+ /**
+ * Sample code: RelayNameSpaceListByResourceGroup.
+ *
+ * @param manager Entry point to RelayManager.
+ */
+ public static void relayNameSpaceListByResourceGroup(com.azure.resourcemanager.relay.RelayManager manager) {
+ manager.namespaces().listByResourceGroup("resourcegroup", Context.NONE);
+ }
+}
+```
+
+### Namespaces_ListKeys
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Namespaces ListKeys. */
+public final class NamespacesListKeysSamples {
+ /*
+ * x-ms-original-file: specification/relay/resource-manager/Microsoft.Relay/stable/2017-04-01/examples/NameSpaces/RelayNameSpaceAuthorizationRuleListKey.json
+ */
+ /**
+ * Sample code: RelayNameSpaceAuthorizationRuleListKey.
+ *
+ * @param manager Entry point to RelayManager.
+ */
+ public static void relayNameSpaceAuthorizationRuleListKey(com.azure.resourcemanager.relay.RelayManager manager) {
+ manager
+ .namespaces()
+ .listKeysWithResponse(
+ "resourcegroup", "example-RelayNamespace-01", "example-RelayAuthRules-01", Context.NONE);
+ }
+}
+```
+
+### Namespaces_RegenerateKeys
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.relay.models.KeyType;
+import com.azure.resourcemanager.relay.models.RegenerateAccessKeyParameters;
+
+/** Samples for Namespaces RegenerateKeys. */
+public final class NamespacesRegenerateKeysSamples {
+ /*
+ * x-ms-original-file: specification/relay/resource-manager/Microsoft.Relay/stable/2017-04-01/examples/NameSpaces/RelayNameSpaceAuthorizationRuleRegenrateKey.json
+ */
+ /**
+ * Sample code: RelayNameSpaceAuthorizationRuleRegenrateKey.
+ *
+ * @param manager Entry point to RelayManager.
+ */
+ public static void relayNameSpaceAuthorizationRuleRegenrateKey(
+ com.azure.resourcemanager.relay.RelayManager manager) {
+ manager
+ .namespaces()
+ .regenerateKeysWithResponse(
+ "resourcegroup",
+ "example-RelayNamespace-01",
+ "example-RelayAuthRules-01",
+ new RegenerateAccessKeyParameters().withKeyType(KeyType.PRIMARY_KEY),
+ Context.NONE);
+ }
+}
+```
+
+### Namespaces_Update
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.relay.models.RelayNamespace;
+import java.util.HashMap;
+import java.util.Map;
+
+/** Samples for Namespaces Update. */
+public final class NamespacesUpdateSamples {
+ /*
+ * x-ms-original-file: specification/relay/resource-manager/Microsoft.Relay/stable/2017-04-01/examples/NameSpaces/RelayNameSpaceUpdate.json
+ */
+ /**
+ * Sample code: RelayNameSpaceUpdate.
+ *
+ * @param manager Entry point to RelayManager.
+ */
+ public static void relayNameSpaceUpdate(com.azure.resourcemanager.relay.RelayManager manager) {
+ RelayNamespace resource =
+ manager
+ .namespaces()
+ .getByResourceGroupWithResponse("resourcegroup", "example-RelayNamespace-01", Context.NONE)
+ .getValue();
+ resource
+ .update()
+ .withTags(mapOf("tag3", "value3", "tag4", "value4", "tag5", "value5", "tag6", "value6"))
+ .apply();
+ }
+
+ @SuppressWarnings("unchecked")
+ private static Map mapOf(Object... inputs) {
+ Map map = new HashMap<>();
+ for (int i = 0; i < inputs.length; i += 2) {
+ String key = (String) inputs[i];
+ T value = (T) inputs[i + 1];
+ map.put(key, value);
+ }
+ return map;
+ }
+}
+```
+
+### Operations_List
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Operations List. */
+public final class OperationsListSamples {
+ /*
+ * x-ms-original-file: specification/relay/resource-manager/Microsoft.Relay/stable/2017-04-01/examples/RelayOperations_List.json
+ */
+ /**
+ * Sample code: RelayOperationsList.
+ *
+ * @param manager Entry point to RelayManager.
+ */
+ public static void relayOperationsList(com.azure.resourcemanager.relay.RelayManager manager) {
+ manager.operations().list(Context.NONE);
+ }
+}
+```
+
+### WcfRelays_CreateOrUpdate
+
+```java
+import com.azure.resourcemanager.relay.models.Relaytype;
+
+/** Samples for WcfRelays CreateOrUpdate. */
+public final class WcfRelaysCreateOrUpdateSamples {
+ /*
+ * x-ms-original-file: specification/relay/resource-manager/Microsoft.Relay/stable/2017-04-01/examples/Relay/RelayCreate.json
+ */
+ /**
+ * Sample code: RelayCreate.
+ *
+ * @param manager Entry point to RelayManager.
+ */
+ public static void relayCreate(com.azure.resourcemanager.relay.RelayManager manager) {
+ manager
+ .wcfRelays()
+ .define("example-Relay-Wcf-1194")
+ .withExistingNamespace("resourcegroup", "example-RelayNamespace-9953")
+ .withRelayType(Relaytype.NET_TCP)
+ .withRequiresClientAuthorization(true)
+ .withRequiresTransportSecurity(true)
+ .create();
+ }
+}
+```
+
+### WcfRelays_CreateOrUpdateAuthorizationRule
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.relay.fluent.models.AuthorizationRuleInner;
+import com.azure.resourcemanager.relay.models.AccessRights;
+import java.util.Arrays;
+
+/** Samples for WcfRelays CreateOrUpdateAuthorizationRule. */
+public final class WcfRelaysCreateOrUpdateAuthorizationRuleSamples {
+ /*
+ * x-ms-original-file: specification/relay/resource-manager/Microsoft.Relay/stable/2017-04-01/examples/Relay/RelayAuthorizationRuleCreate.json
+ */
+ /**
+ * Sample code: RelayAuthorizationRuleCreate.
+ *
+ * @param manager Entry point to RelayManager.
+ */
+ public static void relayAuthorizationRuleCreate(com.azure.resourcemanager.relay.RelayManager manager) {
+ manager
+ .wcfRelays()
+ .createOrUpdateAuthorizationRuleWithResponse(
+ "resourcegroup",
+ "example-RelayNamespace-01",
+ "example-Relay-wcf-01",
+ "example-RelayAuthRules-01",
+ new AuthorizationRuleInner().withRights(Arrays.asList(AccessRights.LISTEN, AccessRights.SEND)),
+ Context.NONE);
+ }
+}
+```
+
+### WcfRelays_Delete
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for WcfRelays Delete. */
+public final class WcfRelaysDeleteSamples {
+ /*
+ * x-ms-original-file: specification/relay/resource-manager/Microsoft.Relay/stable/2017-04-01/examples/Relay/RelayDelete.json
+ */
+ /**
+ * Sample code: RelayDelete.
+ *
+ * @param manager Entry point to RelayManager.
+ */
+ public static void relayDelete(com.azure.resourcemanager.relay.RelayManager manager) {
+ manager
+ .wcfRelays()
+ .deleteWithResponse("resourcegroup", "example-RelayNamespace-01", "example-Relay-wcf-01", Context.NONE);
+ }
+}
+```
+
+### WcfRelays_DeleteAuthorizationRule
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for WcfRelays DeleteAuthorizationRule. */
+public final class WcfRelaysDeleteAuthorizationRuleSamples {
+ /*
+ * x-ms-original-file: specification/relay/resource-manager/Microsoft.Relay/stable/2017-04-01/examples/Relay/RelayAutorizationRuleDelete.json
+ */
+ /**
+ * Sample code: RelayAutorizationRuleDelete.
+ *
+ * @param manager Entry point to RelayManager.
+ */
+ public static void relayAutorizationRuleDelete(com.azure.resourcemanager.relay.RelayManager manager) {
+ manager
+ .wcfRelays()
+ .deleteAuthorizationRuleWithResponse(
+ "resourcegroup",
+ "example-RelayNamespace-01",
+ "example-Relay-wcf-01",
+ "example-RelayAuthRules-01",
+ Context.NONE);
+ }
+}
+```
+
+### WcfRelays_Get
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for WcfRelays Get. */
+public final class WcfRelaysGetSamples {
+ /*
+ * x-ms-original-file: specification/relay/resource-manager/Microsoft.Relay/stable/2017-04-01/examples/Relay/RelayGet.json
+ */
+ /**
+ * Sample code: RelayGet.
+ *
+ * @param manager Entry point to RelayManager.
+ */
+ public static void relayGet(com.azure.resourcemanager.relay.RelayManager manager) {
+ manager
+ .wcfRelays()
+ .getWithResponse("resourcegroup", "example-RelayNamespace-9953", "example-Relay-Wcf-1194", Context.NONE);
+ }
+}
+```
+
+### WcfRelays_GetAuthorizationRule
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for WcfRelays GetAuthorizationRule. */
+public final class WcfRelaysGetAuthorizationRuleSamples {
+ /*
+ * x-ms-original-file: specification/relay/resource-manager/Microsoft.Relay/stable/2017-04-01/examples/Relay/RelayAutorizationRuleGet.json
+ */
+ /**
+ * Sample code: RelayAutorizationRuleGet.
+ *
+ * @param manager Entry point to RelayManager.
+ */
+ public static void relayAutorizationRuleGet(com.azure.resourcemanager.relay.RelayManager manager) {
+ manager
+ .wcfRelays()
+ .getAuthorizationRuleWithResponse(
+ "resourcegroup",
+ "example-RelayNamespace-01",
+ "example-Relay-wcf-01",
+ "example-RelayAuthRules-01",
+ Context.NONE);
+ }
+}
+```
+
+### WcfRelays_ListAuthorizationRules
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for WcfRelays ListAuthorizationRules. */
+public final class WcfRelaysListAuthorizationRulesSamples {
+ /*
+ * x-ms-original-file: specification/relay/resource-manager/Microsoft.Relay/stable/2017-04-01/examples/Relay/RelayAutorizationRuleListAll.json
+ */
+ /**
+ * Sample code: RelayAutorizationRuleListAll.
+ *
+ * @param manager Entry point to RelayManager.
+ */
+ public static void relayAutorizationRuleListAll(com.azure.resourcemanager.relay.RelayManager manager) {
+ manager
+ .wcfRelays()
+ .listAuthorizationRules("resourcegroup", "example-RelayNamespace-01", "example-Relay-Wcf-01", Context.NONE);
+ }
+}
+```
+
+### WcfRelays_ListByNamespace
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for WcfRelays ListByNamespace. */
+public final class WcfRelaysListByNamespaceSamples {
+ /*
+ * x-ms-original-file: specification/relay/resource-manager/Microsoft.Relay/stable/2017-04-01/examples/Relay/RelayListAll.json
+ */
+ /**
+ * Sample code: RelayListAll.
+ *
+ * @param manager Entry point to RelayManager.
+ */
+ public static void relayListAll(com.azure.resourcemanager.relay.RelayManager manager) {
+ manager.wcfRelays().listByNamespace("resourcegroup", "example-RelayNamespace-01", Context.NONE);
+ }
+}
+```
+
+### WcfRelays_ListKeys
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for WcfRelays ListKeys. */
+public final class WcfRelaysListKeysSamples {
+ /*
+ * x-ms-original-file: specification/relay/resource-manager/Microsoft.Relay/stable/2017-04-01/examples/Relay/RelayAuthorizationRuleListKey.json
+ */
+ /**
+ * Sample code: RelayAuthorizationRuleListKey.json.
+ *
+ * @param manager Entry point to RelayManager.
+ */
+ public static void relayAuthorizationRuleListKeyJson(com.azure.resourcemanager.relay.RelayManager manager) {
+ manager
+ .wcfRelays()
+ .listKeysWithResponse(
+ "resourcegroup",
+ "example-RelayNamespace-01",
+ "example-Relay-wcf-01",
+ "example-RelayAuthRules-01",
+ Context.NONE);
+ }
+}
+```
+
+### WcfRelays_RegenerateKeys
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.relay.models.KeyType;
+import com.azure.resourcemanager.relay.models.RegenerateAccessKeyParameters;
+
+/** Samples for WcfRelays RegenerateKeys. */
+public final class WcfRelaysRegenerateKeysSamples {
+ /*
+ * x-ms-original-file: specification/relay/resource-manager/Microsoft.Relay/stable/2017-04-01/examples/Relay/RelayAuthorizationRuleRegenrateKey.json
+ */
+ /**
+ * Sample code: RelayAuthorizationRuleRegenrateKey.json.
+ *
+ * @param manager Entry point to RelayManager.
+ */
+ public static void relayAuthorizationRuleRegenrateKeyJson(com.azure.resourcemanager.relay.RelayManager manager) {
+ manager
+ .wcfRelays()
+ .regenerateKeysWithResponse(
+ "resourcegroup",
+ "example-RelayNamespace-01",
+ "example-Relay-wcf-01",
+ "example-RelayAuthRules-01",
+ new RegenerateAccessKeyParameters().withKeyType(KeyType.PRIMARY_KEY),
+ Context.NONE);
+ }
+}
+```
+
diff --git a/sdk/relay/azure-resourcemanager-relay/pom.xml b/sdk/relay/azure-resourcemanager-relay/pom.xml
index 0908b07d6be0..c53e8f5abcb7 100644
--- a/sdk/relay/azure-resourcemanager-relay/pom.xml
+++ b/sdk/relay/azure-resourcemanager-relay/pom.xml
@@ -1,50 +1,55 @@
- 4.0.0
-
- com.azure
- azure-client-sdk-parent
- 1.7.0
- ../../parents/azure-client-sdk-parent
-
+ 4.0.0
+
+ com.azure
+ azure-client-sdk-parent
+ 1.7.0
+ ../../parents/azure-client-sdk-parent
+
- com.azure.resourcemanager
- azure-resourcemanager-relay
- 1.0.0-beta.2
- jar
+ com.azure.resourcemanager
+ azure-resourcemanager-relay
+ 1.0.0-beta.2
+ jar
- Microsoft Azure SDK for Relay Management
- This package contains Microsoft Azure SDK for Relay Management SDK. Use these API to manage Azure Relay resources through Azure Resource Manager. Package tag package-2017-04. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt
- https://github.com/Azure/azure-sdk-for-java
+ Microsoft Azure SDK for Relay Management
+ This package contains Microsoft Azure SDK for Relay Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Use these API to manage Azure Relay resources through Azure Resource Manager. Package tag package-2017-04.
+ https://github.com/Azure/azure-sdk-for-java
-
-
- The MIT License (MIT)
- http://opensource.org/licenses/MIT
- repo
-
-
+
+
+ The MIT License (MIT)
+ http://opensource.org/licenses/MIT
+ repo
+
+
-
- https://github.com/Azure/azure-sdk-for-java
- scm:git:git@github.com:Azure/azure-sdk-for-java.git
- scm:git:git@github.com:Azure/azure-sdk-for-java.git
- HEAD
-
-
-
- microsoft
- Microsoft
-
-
-
- UTF-8
- true
-
-
-
- com.azure
- azure-core-management
- 1.5.3
-
-
+
+ https://github.com/Azure/azure-sdk-for-java
+ scm:git:git@github.com:Azure/azure-sdk-for-java.git
+ scm:git:git@github.com:Azure/azure-sdk-for-java.git
+ HEAD
+
+
+
+ microsoft
+ Microsoft
+
+
+
+ UTF-8
+ true
+
+
+
+ com.azure
+ azure-core
+ 1.26.0
+
+
+ com.azure
+ azure-core-management
+ 1.5.3
+
+
diff --git a/sdk/relay/azure-resourcemanager-relay/src/main/java/com/azure/resourcemanager/relay/RelayManager.java b/sdk/relay/azure-resourcemanager-relay/src/main/java/com/azure/resourcemanager/relay/RelayManager.java
index 5e40fa85401f..1158cedccc89 100644
--- a/sdk/relay/azure-resourcemanager-relay/src/main/java/com/azure/resourcemanager/relay/RelayManager.java
+++ b/sdk/relay/azure-resourcemanager-relay/src/main/java/com/azure/resourcemanager/relay/RelayManager.java
@@ -8,8 +8,8 @@
import com.azure.core.http.HttpClient;
import com.azure.core.http.HttpPipeline;
import com.azure.core.http.HttpPipelineBuilder;
+import com.azure.core.http.HttpPipelinePosition;
import com.azure.core.http.policy.AddDatePolicy;
-import com.azure.core.http.policy.BearerTokenAuthenticationPolicy;
import com.azure.core.http.policy.HttpLogOptions;
import com.azure.core.http.policy.HttpLoggingPolicy;
import com.azure.core.http.policy.HttpPipelinePolicy;
@@ -17,6 +17,7 @@
import com.azure.core.http.policy.RequestIdPolicy;
import com.azure.core.http.policy.RetryPolicy;
import com.azure.core.http.policy.UserAgentPolicy;
+import com.azure.core.management.http.policy.ArmChallengeAuthenticationPolicy;
import com.azure.core.management.profile.AzureProfile;
import com.azure.core.util.Configuration;
import com.azure.core.util.logging.ClientLogger;
@@ -35,6 +36,7 @@
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;
+import java.util.stream.Collectors;
/** Entry point to RelayManager. Use these API to manage Azure Relay resources through Azure Resource Manager. */
public final class RelayManager {
@@ -84,11 +86,12 @@ public static Configurable configure() {
/** The Configurable allowing configurations to be set. */
public static final class Configurable {
- private final ClientLogger logger = new ClientLogger(Configurable.class);
+ private static final ClientLogger LOGGER = new ClientLogger(Configurable.class);
private HttpClient httpClient;
private HttpLogOptions httpLogOptions;
private final List policies = new ArrayList<>();
+ private final List scopes = new ArrayList<>();
private RetryPolicy retryPolicy;
private Duration defaultPollInterval;
@@ -128,6 +131,17 @@ public Configurable withPolicy(HttpPipelinePolicy policy) {
return this;
}
+ /**
+ * Adds the scope to permission sets.
+ *
+ * @param scope the scope.
+ * @return the configurable object itself.
+ */
+ public Configurable withScope(String scope) {
+ this.scopes.add(Objects.requireNonNull(scope, "'scope' cannot be null."));
+ return this;
+ }
+
/**
* Sets the retry policy to the HTTP pipeline.
*
@@ -146,9 +160,11 @@ public Configurable withRetryPolicy(RetryPolicy retryPolicy) {
* @return the configurable object itself.
*/
public Configurable withDefaultPollInterval(Duration defaultPollInterval) {
- this.defaultPollInterval = Objects.requireNonNull(defaultPollInterval, "'retryPolicy' cannot be null.");
+ this.defaultPollInterval =
+ Objects.requireNonNull(defaultPollInterval, "'defaultPollInterval' cannot be null.");
if (this.defaultPollInterval.isNegative()) {
- throw logger.logExceptionAsError(new IllegalArgumentException("'httpPipeline' cannot be negative"));
+ throw LOGGER
+ .logExceptionAsError(new IllegalArgumentException("'defaultPollInterval' cannot be negative"));
}
return this;
}
@@ -164,25 +180,53 @@ public RelayManager authenticate(TokenCredential credential, AzureProfile profil
Objects.requireNonNull(credential, "'credential' cannot be null.");
Objects.requireNonNull(profile, "'profile' cannot be null.");
+ StringBuilder userAgentBuilder = new StringBuilder();
+ userAgentBuilder
+ .append("azsdk-java")
+ .append("-")
+ .append("com.azure.resourcemanager.relay")
+ .append("/")
+ .append("1.0.0-beta.1");
+ if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) {
+ userAgentBuilder
+ .append(" (")
+ .append(Configuration.getGlobalConfiguration().get("java.version"))
+ .append("; ")
+ .append(Configuration.getGlobalConfiguration().get("os.name"))
+ .append("; ")
+ .append(Configuration.getGlobalConfiguration().get("os.version"))
+ .append("; auto-generated)");
+ } else {
+ userAgentBuilder.append(" (auto-generated)");
+ }
+
+ if (scopes.isEmpty()) {
+ scopes.add(profile.getEnvironment().getManagementEndpoint() + "/.default");
+ }
if (retryPolicy == null) {
retryPolicy = new RetryPolicy("Retry-After", ChronoUnit.SECONDS);
}
List policies = new ArrayList<>();
- policies
- .add(
- new UserAgentPolicy(
- null,
- "com.azure.resourcemanager.relay",
- "1.0.0-beta.1",
- Configuration.getGlobalConfiguration()));
+ policies.add(new UserAgentPolicy(userAgentBuilder.toString()));
policies.add(new RequestIdPolicy());
+ policies
+ .addAll(
+ this
+ .policies
+ .stream()
+ .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_CALL)
+ .collect(Collectors.toList()));
HttpPolicyProviders.addBeforeRetryPolicies(policies);
policies.add(retryPolicy);
policies.add(new AddDatePolicy());
+ policies.add(new ArmChallengeAuthenticationPolicy(credential, scopes.toArray(new String[0])));
policies
- .add(
- new BearerTokenAuthenticationPolicy(
- credential, profile.getEnvironment().getManagementEndpoint() + "/.default"));
+ .addAll(
+ this
+ .policies
+ .stream()
+ .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY)
+ .collect(Collectors.toList()));
HttpPolicyProviders.addAfterRetryPolicies(policies);
policies.add(new HttpLoggingPolicy(httpLogOptions));
HttpPipeline httpPipeline =
diff --git a/sdk/relay/azure-resourcemanager-relay/src/main/java/com/azure/resourcemanager/relay/fluent/HybridConnectionsClient.java b/sdk/relay/azure-resourcemanager-relay/src/main/java/com/azure/resourcemanager/relay/fluent/HybridConnectionsClient.java
index 6a1b5770be1a..df616e9f65c1 100644
--- a/sdk/relay/azure-resourcemanager-relay/src/main/java/com/azure/resourcemanager/relay/fluent/HybridConnectionsClient.java
+++ b/sdk/relay/azure-resourcemanager-relay/src/main/java/com/azure/resourcemanager/relay/fluent/HybridConnectionsClient.java
@@ -24,7 +24,7 @@ public interface HybridConnectionsClient {
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.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 response of the list hybrid connection operation.
+ * @return the response of the list hybrid connection operation as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listByNamespace(String resourceGroupName, String namespaceName);
@@ -38,7 +38,7 @@ public interface HybridConnectionsClient {
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.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 response of the list hybrid connection operation.
+ * @return the response of the list hybrid connection operation as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listByNamespace(
@@ -71,7 +71,7 @@ HybridConnectionInner createOrUpdate(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return description of hybrid connection resource.
+ * @return description of hybrid connection resource along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response createOrUpdateWithResponse(
@@ -104,7 +104,7 @@ Response createOrUpdateWithResponse(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.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 response.
+ * @return the {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response deleteWithResponse(
@@ -134,7 +134,7 @@ Response deleteWithResponse(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.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 description of hybrid connection resource.
+ * @return description of hybrid connection resource along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response getWithResponse(
@@ -149,7 +149,7 @@ Response getWithResponse(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the response from the list namespace operation.
+ * @return the response from the list namespace operation as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listAuthorizationRules(
@@ -165,7 +165,7 @@ PagedIterable listAuthorizationRules(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.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 response from the list namespace operation.
+ * @return the response from the list namespace operation as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listAuthorizationRules(
@@ -204,7 +204,7 @@ AuthorizationRuleInner createOrUpdateAuthorizationRule(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.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 description of a namespace authorization rule.
+ * @return description of a namespace authorization rule along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response createOrUpdateAuthorizationRuleWithResponse(
@@ -241,7 +241,7 @@ void deleteAuthorizationRule(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.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 response.
+ * @return the {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response deleteAuthorizationRuleWithResponse(
@@ -278,7 +278,7 @@ AuthorizationRuleInner getAuthorizationRule(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.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 description of a namespace authorization rule.
+ * @return description of a namespace authorization rule along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response getAuthorizationRuleWithResponse(
@@ -315,7 +315,7 @@ AccessKeysInner listKeys(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.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 namespace/Relay Connection String.
+ * @return namespace/Relay Connection String along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response listKeysWithResponse(
@@ -358,7 +358,7 @@ AccessKeysInner regenerateKeys(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.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 namespace/Relay Connection String.
+ * @return namespace/Relay Connection String along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response regenerateKeysWithResponse(
diff --git a/sdk/relay/azure-resourcemanager-relay/src/main/java/com/azure/resourcemanager/relay/fluent/NamespacesClient.java b/sdk/relay/azure-resourcemanager-relay/src/main/java/com/azure/resourcemanager/relay/fluent/NamespacesClient.java
index db806011809e..b44498cc3720 100644
--- a/sdk/relay/azure-resourcemanager-relay/src/main/java/com/azure/resourcemanager/relay/fluent/NamespacesClient.java
+++ b/sdk/relay/azure-resourcemanager-relay/src/main/java/com/azure/resourcemanager/relay/fluent/NamespacesClient.java
@@ -41,7 +41,7 @@ public interface NamespacesClient {
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.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 description of the check name availability request properties.
+ * @return description of the check name availability request properties along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response checkNameAvailabilityWithResponse(
@@ -52,7 +52,7 @@ Response checkNameAvailabilityWithResponse(
*
* @throws com.azure.core.management.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 response from the list namespace operation.
+ * @return the response from the list namespace operation as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable list();
@@ -64,7 +64,7 @@ Response checkNameAvailabilityWithResponse(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the response from the list namespace operation.
+ * @return the response from the list namespace operation as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable list(Context context);
@@ -76,7 +76,7 @@ Response checkNameAvailabilityWithResponse(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the response from the list namespace operation.
+ * @return the response from the list namespace operation as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listByResourceGroup(String resourceGroupName);
@@ -89,7 +89,7 @@ Response checkNameAvailabilityWithResponse(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the response from the list namespace operation.
+ * @return the response from the list namespace operation as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listByResourceGroup(String resourceGroupName, Context context);
@@ -103,9 +103,9 @@ Response checkNameAvailabilityWithResponse(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return description of a namespace resource.
+ * @return the {@link SyncPoller} for polling of description of a namespace resource.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, RelayNamespaceInner> beginCreateOrUpdate(
String resourceGroupName, String namespaceName, RelayNamespaceInner parameters);
@@ -119,9 +119,9 @@ SyncPoller, RelayNamespaceInner> beginCreateOrUp
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.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 description of a namespace resource.
+ * @return the {@link SyncPoller} for polling of description of a namespace resource.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, RelayNamespaceInner> beginCreateOrUpdate(
String resourceGroupName, String namespaceName, RelayNamespaceInner parameters, Context context);
@@ -163,9 +163,9 @@ RelayNamespaceInner createOrUpdate(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the completion.
+ * @return the {@link SyncPoller} for polling of long-running operation.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, Void> beginDelete(String resourceGroupName, String namespaceName);
/**
@@ -177,9 +177,9 @@ RelayNamespaceInner createOrUpdate(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the completion.
+ * @return the {@link SyncPoller} for polling of long-running operation.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, Void> beginDelete(String resourceGroupName, String namespaceName, Context context);
/**
@@ -229,7 +229,7 @@ RelayNamespaceInner createOrUpdate(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return description of a namespace resource.
+ * @return description of a namespace resource along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response getByResourceGroupWithResponse(
@@ -261,7 +261,7 @@ Response getByResourceGroupWithResponse(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return description of a namespace resource.
+ * @return description of a namespace resource along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response updateWithResponse(
@@ -275,7 +275,7 @@ Response updateWithResponse(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the response from the list namespace operation.
+ * @return the response from the list namespace operation as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listAuthorizationRules(String resourceGroupName, String namespaceName);
@@ -289,7 +289,7 @@ Response updateWithResponse(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the response from the list namespace operation.
+ * @return the response from the list namespace operation as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listAuthorizationRules(
@@ -325,7 +325,7 @@ AuthorizationRuleInner createOrUpdateAuthorizationRule(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.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 description of a namespace authorization rule.
+ * @return description of a namespace authorization rule along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response createOrUpdateAuthorizationRuleWithResponse(
@@ -358,7 +358,7 @@ Response createOrUpdateAuthorizationRuleWithResponse(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.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 response.
+ * @return the {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response deleteAuthorizationRuleWithResponse(
@@ -389,7 +389,7 @@ AuthorizationRuleInner getAuthorizationRule(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.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 description of a namespace authorization rule.
+ * @return description of a namespace authorization rule along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response getAuthorizationRuleWithResponse(
@@ -419,7 +419,7 @@ Response getAuthorizationRuleWithResponse(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.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 namespace/Relay Connection String.
+ * @return namespace/Relay Connection String along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response listKeysWithResponse(
@@ -455,7 +455,7 @@ AccessKeysInner regenerateKeys(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.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 namespace/Relay Connection String.
+ * @return namespace/Relay Connection String along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response regenerateKeysWithResponse(
diff --git a/sdk/relay/azure-resourcemanager-relay/src/main/java/com/azure/resourcemanager/relay/fluent/OperationsClient.java b/sdk/relay/azure-resourcemanager-relay/src/main/java/com/azure/resourcemanager/relay/fluent/OperationsClient.java
index 6c98d1e944ad..4cdbe0a2c157 100644
--- a/sdk/relay/azure-resourcemanager-relay/src/main/java/com/azure/resourcemanager/relay/fluent/OperationsClient.java
+++ b/sdk/relay/azure-resourcemanager-relay/src/main/java/com/azure/resourcemanager/relay/fluent/OperationsClient.java
@@ -17,7 +17,7 @@ public interface OperationsClient {
*
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return result of the request to list Relay operations.
+ * @return result of the request to list Relay operations as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable list();
@@ -29,7 +29,7 @@ public interface OperationsClient {
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return result of the request to list Relay operations.
+ * @return result of the request to list Relay operations as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable list(Context context);
diff --git a/sdk/relay/azure-resourcemanager-relay/src/main/java/com/azure/resourcemanager/relay/fluent/WcfRelaysClient.java b/sdk/relay/azure-resourcemanager-relay/src/main/java/com/azure/resourcemanager/relay/fluent/WcfRelaysClient.java
index b46371aea26e..bd3bbf3e97f8 100644
--- a/sdk/relay/azure-resourcemanager-relay/src/main/java/com/azure/resourcemanager/relay/fluent/WcfRelaysClient.java
+++ b/sdk/relay/azure-resourcemanager-relay/src/main/java/com/azure/resourcemanager/relay/fluent/WcfRelaysClient.java
@@ -24,7 +24,7 @@ public interface WcfRelaysClient {
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.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 response of the list WCF relay operation.
+ * @return the response of the list WCF relay operation as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listByNamespace(String resourceGroupName, String namespaceName);
@@ -38,7 +38,7 @@ public interface WcfRelaysClient {
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.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 response of the list WCF relay operation.
+ * @return the response of the list WCF relay operation as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listByNamespace(String resourceGroupName, String namespaceName, Context context);
@@ -70,7 +70,7 @@ WcfRelayInner createOrUpdate(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return description of the WCF relay resource.
+ * @return description of the WCF relay resource along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response createOrUpdateWithResponse(
@@ -99,7 +99,7 @@ Response createOrUpdateWithResponse(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.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 response.
+ * @return the {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response deleteWithResponse(
@@ -129,7 +129,7 @@ Response deleteWithResponse(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.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 description of the WCF relay resource.
+ * @return description of the WCF relay resource along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response getWithResponse(
@@ -144,7 +144,7 @@ Response getWithResponse(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the response from the list namespace operation.
+ * @return the response from the list namespace operation as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listAuthorizationRules(
@@ -160,7 +160,7 @@ PagedIterable listAuthorizationRules(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.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 response from the list namespace operation.
+ * @return the response from the list namespace operation as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listAuthorizationRules(
@@ -199,7 +199,7 @@ AuthorizationRuleInner createOrUpdateAuthorizationRule(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.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 description of a namespace authorization rule.
+ * @return description of a namespace authorization rule along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response createOrUpdateAuthorizationRuleWithResponse(
@@ -236,7 +236,7 @@ void deleteAuthorizationRule(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.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 response.
+ * @return the {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response deleteAuthorizationRuleWithResponse(
@@ -273,7 +273,7 @@ AuthorizationRuleInner getAuthorizationRule(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.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 authorizationRule for a WCF relay by name.
+ * @return authorizationRule for a WCF relay by name along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response getAuthorizationRuleWithResponse(
@@ -310,7 +310,7 @@ AccessKeysInner listKeys(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.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 namespace/Relay Connection String.
+ * @return namespace/Relay Connection String along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response listKeysWithResponse(
@@ -353,7 +353,7 @@ AccessKeysInner regenerateKeys(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.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 namespace/Relay Connection String.
+ * @return namespace/Relay Connection String along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response regenerateKeysWithResponse(
diff --git a/sdk/relay/azure-resourcemanager-relay/src/main/java/com/azure/resourcemanager/relay/fluent/models/AccessKeysInner.java b/sdk/relay/azure-resourcemanager-relay/src/main/java/com/azure/resourcemanager/relay/fluent/models/AccessKeysInner.java
index f710dbd24806..354546e2c689 100644
--- a/sdk/relay/azure-resourcemanager-relay/src/main/java/com/azure/resourcemanager/relay/fluent/models/AccessKeysInner.java
+++ b/sdk/relay/azure-resourcemanager-relay/src/main/java/com/azure/resourcemanager/relay/fluent/models/AccessKeysInner.java
@@ -5,15 +5,11 @@
package com.azure.resourcemanager.relay.fluent.models;
import com.azure.core.annotation.Fluent;
-import com.azure.core.util.logging.ClientLogger;
-import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
/** Namespace/Relay Connection String. */
@Fluent
public final class AccessKeysInner {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(AccessKeysInner.class);
-
/*
* Primary connection string of the created namespace authorization rule.
*/
diff --git a/sdk/relay/azure-resourcemanager-relay/src/main/java/com/azure/resourcemanager/relay/fluent/models/AuthorizationRuleInner.java b/sdk/relay/azure-resourcemanager-relay/src/main/java/com/azure/resourcemanager/relay/fluent/models/AuthorizationRuleInner.java
index 8465be445750..efdf3c39ac05 100644
--- a/sdk/relay/azure-resourcemanager-relay/src/main/java/com/azure/resourcemanager/relay/fluent/models/AuthorizationRuleInner.java
+++ b/sdk/relay/azure-resourcemanager-relay/src/main/java/com/azure/resourcemanager/relay/fluent/models/AuthorizationRuleInner.java
@@ -5,25 +5,29 @@
package com.azure.resourcemanager.relay.fluent.models;
import com.azure.core.annotation.Fluent;
-import com.azure.core.annotation.JsonFlatten;
import com.azure.core.management.ProxyResource;
import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.relay.models.AccessRights;
-import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;
/** Description of a namespace authorization rule. */
-@JsonFlatten
@Fluent
-public class AuthorizationRuleInner extends ProxyResource {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(AuthorizationRuleInner.class);
-
+public final class AuthorizationRuleInner extends ProxyResource {
/*
- * The rights associated with the rule.
+ * Authorization rule properties.
+ */
+ @JsonProperty(value = "properties", required = true)
+ private AuthorizationRuleProperties innerProperties = new AuthorizationRuleProperties();
+
+ /**
+ * Get the innerProperties property: Authorization rule properties.
+ *
+ * @return the innerProperties value.
*/
- @JsonProperty(value = "properties.rights", required = true)
- private List rights;
+ private AuthorizationRuleProperties innerProperties() {
+ return this.innerProperties;
+ }
/**
* Get the rights property: The rights associated with the rule.
@@ -31,7 +35,7 @@ public class AuthorizationRuleInner extends ProxyResource {
* @return the rights value.
*/
public List rights() {
- return this.rights;
+ return this.innerProperties() == null ? null : this.innerProperties().rights();
}
/**
@@ -41,7 +45,10 @@ public List rights() {
* @return the AuthorizationRuleInner object itself.
*/
public AuthorizationRuleInner withRights(List rights) {
- this.rights = rights;
+ if (this.innerProperties() == null) {
+ this.innerProperties = new AuthorizationRuleProperties();
+ }
+ this.innerProperties().withRights(rights);
return this;
}
@@ -51,10 +58,15 @@ public AuthorizationRuleInner withRights(List rights) {
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
public void validate() {
- if (rights() == null) {
- throw logger
+ if (innerProperties() == null) {
+ throw LOGGER
.logExceptionAsError(
- new IllegalArgumentException("Missing required property rights in model AuthorizationRuleInner"));
+ new IllegalArgumentException(
+ "Missing required property innerProperties in model AuthorizationRuleInner"));
+ } else {
+ innerProperties().validate();
}
}
+
+ private static final ClientLogger LOGGER = new ClientLogger(AuthorizationRuleInner.class);
}
diff --git a/sdk/relay/azure-resourcemanager-relay/src/main/java/com/azure/resourcemanager/relay/fluent/models/AuthorizationRuleProperties.java b/sdk/relay/azure-resourcemanager-relay/src/main/java/com/azure/resourcemanager/relay/fluent/models/AuthorizationRuleProperties.java
new file mode 100644
index 000000000000..5c412461d85c
--- /dev/null
+++ b/sdk/relay/azure-resourcemanager-relay/src/main/java/com/azure/resourcemanager/relay/fluent/models/AuthorizationRuleProperties.java
@@ -0,0 +1,57 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.relay.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.relay.models.AccessRights;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.List;
+
+/** Authorization rule properties. */
+@Fluent
+public final class AuthorizationRuleProperties {
+ /*
+ * The rights associated with the rule.
+ */
+ @JsonProperty(value = "rights", required = true)
+ private List rights;
+
+ /**
+ * Get the rights property: The rights associated with the rule.
+ *
+ * @return the rights value.
+ */
+ public List rights() {
+ return this.rights;
+ }
+
+ /**
+ * Set the rights property: The rights associated with the rule.
+ *
+ * @param rights the rights value to set.
+ * @return the AuthorizationRuleProperties object itself.
+ */
+ public AuthorizationRuleProperties withRights(List rights) {
+ this.rights = rights;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (rights() == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ "Missing required property rights in model AuthorizationRuleProperties"));
+ }
+ }
+
+ private static final ClientLogger LOGGER = new ClientLogger(AuthorizationRuleProperties.class);
+}
diff --git a/sdk/relay/azure-resourcemanager-relay/src/main/java/com/azure/resourcemanager/relay/fluent/models/CheckNameAvailabilityResultInner.java b/sdk/relay/azure-resourcemanager-relay/src/main/java/com/azure/resourcemanager/relay/fluent/models/CheckNameAvailabilityResultInner.java
index ebbe8c9970e1..312d10400b3d 100644
--- a/sdk/relay/azure-resourcemanager-relay/src/main/java/com/azure/resourcemanager/relay/fluent/models/CheckNameAvailabilityResultInner.java
+++ b/sdk/relay/azure-resourcemanager-relay/src/main/java/com/azure/resourcemanager/relay/fluent/models/CheckNameAvailabilityResultInner.java
@@ -5,16 +5,12 @@
package com.azure.resourcemanager.relay.fluent.models;
import com.azure.core.annotation.Fluent;
-import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.relay.models.UnavailableReason;
-import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
/** Description of the check name availability request properties. */
@Fluent
public final class CheckNameAvailabilityResultInner {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(CheckNameAvailabilityResultInner.class);
-
/*
* The detailed info regarding the reason associated with the namespace.
*/
diff --git a/sdk/relay/azure-resourcemanager-relay/src/main/java/com/azure/resourcemanager/relay/fluent/models/HybridConnectionInner.java b/sdk/relay/azure-resourcemanager-relay/src/main/java/com/azure/resourcemanager/relay/fluent/models/HybridConnectionInner.java
index ee69f7af73ce..5040b3c9fa06 100644
--- a/sdk/relay/azure-resourcemanager-relay/src/main/java/com/azure/resourcemanager/relay/fluent/models/HybridConnectionInner.java
+++ b/sdk/relay/azure-resourcemanager-relay/src/main/java/com/azure/resourcemanager/relay/fluent/models/HybridConnectionInner.java
@@ -5,53 +5,27 @@
package com.azure.resourcemanager.relay.fluent.models;
import com.azure.core.annotation.Fluent;
-import com.azure.core.annotation.JsonFlatten;
import com.azure.core.management.ProxyResource;
-import com.azure.core.util.logging.ClientLogger;
-import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.time.OffsetDateTime;
/** Description of hybrid connection resource. */
-@JsonFlatten
@Fluent
-public class HybridConnectionInner extends ProxyResource {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(HybridConnectionInner.class);
-
- /*
- * The time the hybrid connection was created.
- */
- @JsonProperty(value = "properties.createdAt", access = JsonProperty.Access.WRITE_ONLY)
- private OffsetDateTime createdAt;
-
+public final class HybridConnectionInner extends ProxyResource {
/*
- * The time the namespace was updated.
+ * Properties of the HybridConnection.
*/
- @JsonProperty(value = "properties.updatedAt", access = JsonProperty.Access.WRITE_ONLY)
- private OffsetDateTime updatedAt;
+ @JsonProperty(value = "properties")
+ private HybridConnectionProperties innerProperties;
- /*
- * The number of listeners for this hybrid connection. Note that min : 1
- * and max:25 are supported.
- */
- @JsonProperty(value = "properties.listenerCount", access = JsonProperty.Access.WRITE_ONLY)
- private Integer listenerCount;
-
- /*
- * Returns true if client authorization is needed for this hybrid
- * connection; otherwise, false.
- */
- @JsonProperty(value = "properties.requiresClientAuthorization")
- private Boolean requiresClientAuthorization;
-
- /*
- * The usermetadata is a placeholder to store user-defined string data for
- * the hybrid connection endpoint. For example, it can be used to store
- * descriptive data, such as a list of teams and their contact information.
- * Also, user-defined configuration settings can be stored.
+ /**
+ * Get the innerProperties property: Properties of the HybridConnection.
+ *
+ * @return the innerProperties value.
*/
- @JsonProperty(value = "properties.userMetadata")
- private String userMetadata;
+ private HybridConnectionProperties innerProperties() {
+ return this.innerProperties;
+ }
/**
* Get the createdAt property: The time the hybrid connection was created.
@@ -59,7 +33,7 @@ public class HybridConnectionInner extends ProxyResource {
* @return the createdAt value.
*/
public OffsetDateTime createdAt() {
- return this.createdAt;
+ return this.innerProperties() == null ? null : this.innerProperties().createdAt();
}
/**
@@ -68,7 +42,7 @@ public OffsetDateTime createdAt() {
* @return the updatedAt value.
*/
public OffsetDateTime updatedAt() {
- return this.updatedAt;
+ return this.innerProperties() == null ? null : this.innerProperties().updatedAt();
}
/**
@@ -78,7 +52,7 @@ public OffsetDateTime updatedAt() {
* @return the listenerCount value.
*/
public Integer listenerCount() {
- return this.listenerCount;
+ return this.innerProperties() == null ? null : this.innerProperties().listenerCount();
}
/**
@@ -88,7 +62,7 @@ public Integer listenerCount() {
* @return the requiresClientAuthorization value.
*/
public Boolean requiresClientAuthorization() {
- return this.requiresClientAuthorization;
+ return this.innerProperties() == null ? null : this.innerProperties().requiresClientAuthorization();
}
/**
@@ -99,7 +73,10 @@ public Boolean requiresClientAuthorization() {
* @return the HybridConnectionInner object itself.
*/
public HybridConnectionInner withRequiresClientAuthorization(Boolean requiresClientAuthorization) {
- this.requiresClientAuthorization = requiresClientAuthorization;
+ if (this.innerProperties() == null) {
+ this.innerProperties = new HybridConnectionProperties();
+ }
+ this.innerProperties().withRequiresClientAuthorization(requiresClientAuthorization);
return this;
}
@@ -111,7 +88,7 @@ public HybridConnectionInner withRequiresClientAuthorization(Boolean requiresCli
* @return the userMetadata value.
*/
public String userMetadata() {
- return this.userMetadata;
+ return this.innerProperties() == null ? null : this.innerProperties().userMetadata();
}
/**
@@ -123,7 +100,10 @@ public String userMetadata() {
* @return the HybridConnectionInner object itself.
*/
public HybridConnectionInner withUserMetadata(String userMetadata) {
- this.userMetadata = userMetadata;
+ if (this.innerProperties() == null) {
+ this.innerProperties = new HybridConnectionProperties();
+ }
+ this.innerProperties().withUserMetadata(userMetadata);
return this;
}
@@ -133,5 +113,8 @@ public HybridConnectionInner withUserMetadata(String userMetadata) {
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
public void validate() {
+ if (innerProperties() != null) {
+ innerProperties().validate();
+ }
}
}
diff --git a/sdk/relay/azure-resourcemanager-relay/src/main/java/com/azure/resourcemanager/relay/fluent/models/HybridConnectionProperties.java b/sdk/relay/azure-resourcemanager-relay/src/main/java/com/azure/resourcemanager/relay/fluent/models/HybridConnectionProperties.java
new file mode 100644
index 000000000000..cb5361f3763b
--- /dev/null
+++ b/sdk/relay/azure-resourcemanager-relay/src/main/java/com/azure/resourcemanager/relay/fluent/models/HybridConnectionProperties.java
@@ -0,0 +1,130 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.relay.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.time.OffsetDateTime;
+
+/** Properties of the HybridConnection. */
+@Fluent
+public final class HybridConnectionProperties {
+ /*
+ * The time the hybrid connection was created.
+ */
+ @JsonProperty(value = "createdAt", access = JsonProperty.Access.WRITE_ONLY)
+ private OffsetDateTime createdAt;
+
+ /*
+ * The time the namespace was updated.
+ */
+ @JsonProperty(value = "updatedAt", access = JsonProperty.Access.WRITE_ONLY)
+ private OffsetDateTime updatedAt;
+
+ /*
+ * The number of listeners for this hybrid connection. Note that min : 1
+ * and max:25 are supported.
+ */
+ @JsonProperty(value = "listenerCount", access = JsonProperty.Access.WRITE_ONLY)
+ private Integer listenerCount;
+
+ /*
+ * Returns true if client authorization is needed for this hybrid
+ * connection; otherwise, false.
+ */
+ @JsonProperty(value = "requiresClientAuthorization")
+ private Boolean requiresClientAuthorization;
+
+ /*
+ * The usermetadata is a placeholder to store user-defined string data for
+ * the hybrid connection endpoint. For example, it can be used to store
+ * descriptive data, such as a list of teams and their contact information.
+ * Also, user-defined configuration settings can be stored.
+ */
+ @JsonProperty(value = "userMetadata")
+ private String userMetadata;
+
+ /**
+ * Get the createdAt property: The time the hybrid connection was created.
+ *
+ * @return the createdAt value.
+ */
+ public OffsetDateTime createdAt() {
+ return this.createdAt;
+ }
+
+ /**
+ * Get the updatedAt property: The time the namespace was updated.
+ *
+ * @return the updatedAt value.
+ */
+ public OffsetDateTime updatedAt() {
+ return this.updatedAt;
+ }
+
+ /**
+ * Get the listenerCount property: The number of listeners for this hybrid connection. Note that min : 1 and max:25
+ * are supported.
+ *
+ * @return the listenerCount value.
+ */
+ public Integer listenerCount() {
+ return this.listenerCount;
+ }
+
+ /**
+ * Get the requiresClientAuthorization property: Returns true if client authorization is needed for this hybrid
+ * connection; otherwise, false.
+ *
+ * @return the requiresClientAuthorization value.
+ */
+ public Boolean requiresClientAuthorization() {
+ return this.requiresClientAuthorization;
+ }
+
+ /**
+ * Set the requiresClientAuthorization property: Returns true if client authorization is needed for this hybrid
+ * connection; otherwise, false.
+ *
+ * @param requiresClientAuthorization the requiresClientAuthorization value to set.
+ * @return the HybridConnectionProperties object itself.
+ */
+ public HybridConnectionProperties withRequiresClientAuthorization(Boolean requiresClientAuthorization) {
+ this.requiresClientAuthorization = requiresClientAuthorization;
+ return this;
+ }
+
+ /**
+ * Get the userMetadata property: The usermetadata is a placeholder to store user-defined string data for the hybrid
+ * connection endpoint. For example, it can be used to store descriptive data, such as a list of teams and their
+ * contact information. Also, user-defined configuration settings can be stored.
+ *
+ * @return the userMetadata value.
+ */
+ public String userMetadata() {
+ return this.userMetadata;
+ }
+
+ /**
+ * Set the userMetadata property: The usermetadata is a placeholder to store user-defined string data for the hybrid
+ * connection endpoint. For example, it can be used to store descriptive data, such as a list of teams and their
+ * contact information. Also, user-defined configuration settings can be stored.
+ *
+ * @param userMetadata the userMetadata value to set.
+ * @return the HybridConnectionProperties object itself.
+ */
+ public HybridConnectionProperties withUserMetadata(String userMetadata) {
+ this.userMetadata = userMetadata;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ }
+}
diff --git a/sdk/relay/azure-resourcemanager-relay/src/main/java/com/azure/resourcemanager/relay/fluent/models/OperationInner.java b/sdk/relay/azure-resourcemanager-relay/src/main/java/com/azure/resourcemanager/relay/fluent/models/OperationInner.java
index c9fc6467027b..500eef1a0f43 100644
--- a/sdk/relay/azure-resourcemanager-relay/src/main/java/com/azure/resourcemanager/relay/fluent/models/OperationInner.java
+++ b/sdk/relay/azure-resourcemanager-relay/src/main/java/com/azure/resourcemanager/relay/fluent/models/OperationInner.java
@@ -5,16 +5,12 @@
package com.azure.resourcemanager.relay.fluent.models;
import com.azure.core.annotation.Fluent;
-import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.relay.models.OperationDisplay;
-import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
/** A Relay REST API operation. */
@Fluent
public final class OperationInner {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(OperationInner.class);
-
/*
* Operation name: {provider}/{resource}/{operation}
*/
diff --git a/sdk/relay/azure-resourcemanager-relay/src/main/java/com/azure/resourcemanager/relay/fluent/models/RelayNamespaceInner.java b/sdk/relay/azure-resourcemanager-relay/src/main/java/com/azure/resourcemanager/relay/fluent/models/RelayNamespaceInner.java
index fde6b4c20b95..b8994d70ec69 100644
--- a/sdk/relay/azure-resourcemanager-relay/src/main/java/com/azure/resourcemanager/relay/fluent/models/RelayNamespaceInner.java
+++ b/sdk/relay/azure-resourcemanager-relay/src/main/java/com/azure/resourcemanager/relay/fluent/models/RelayNamespaceInner.java
@@ -5,22 +5,16 @@
package com.azure.resourcemanager.relay.fluent.models;
import com.azure.core.annotation.Fluent;
-import com.azure.core.annotation.JsonFlatten;
import com.azure.core.management.Resource;
-import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.relay.models.ProvisioningStateEnum;
import com.azure.resourcemanager.relay.models.Sku;
-import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.time.OffsetDateTime;
import java.util.Map;
/** Description of a namespace resource. */
-@JsonFlatten
@Fluent
-public class RelayNamespaceInner extends Resource {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(RelayNamespaceInner.class);
-
+public final class RelayNamespaceInner extends Resource {
/*
* SKU of the namespace.
*/
@@ -28,34 +22,10 @@ public class RelayNamespaceInner extends Resource {
private Sku sku;
/*
- * The provisioningState property.
- */
- @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY)
- private ProvisioningStateEnum provisioningState;
-
- /*
- * The time the namespace was created.
- */
- @JsonProperty(value = "properties.createdAt", access = JsonProperty.Access.WRITE_ONLY)
- private OffsetDateTime createdAt;
-
- /*
- * The time the namespace was updated.
- */
- @JsonProperty(value = "properties.updatedAt", access = JsonProperty.Access.WRITE_ONLY)
- private OffsetDateTime updatedAt;
-
- /*
- * Endpoint you can use to perform Service Bus operations.
- */
- @JsonProperty(value = "properties.serviceBusEndpoint", access = JsonProperty.Access.WRITE_ONLY)
- private String serviceBusEndpoint;
-
- /*
- * Identifier for Azure Insights metrics.
+ * Description of Relay namespace
*/
- @JsonProperty(value = "properties.metricId", access = JsonProperty.Access.WRITE_ONLY)
- private String metricId;
+ @JsonProperty(value = "properties")
+ private RelayNamespaceProperties innerProperties;
/**
* Get the sku property: SKU of the namespace.
@@ -77,13 +47,36 @@ public RelayNamespaceInner withSku(Sku sku) {
return this;
}
+ /**
+ * Get the innerProperties property: Description of Relay namespace.
+ *
+ * @return the innerProperties value.
+ */
+ private RelayNamespaceProperties innerProperties() {
+ return this.innerProperties;
+ }
+
+ /** {@inheritDoc} */
+ @Override
+ public RelayNamespaceInner withLocation(String location) {
+ super.withLocation(location);
+ return this;
+ }
+
+ /** {@inheritDoc} */
+ @Override
+ public RelayNamespaceInner withTags(Map tags) {
+ super.withTags(tags);
+ return this;
+ }
+
/**
* Get the provisioningState property: The provisioningState property.
*
* @return the provisioningState value.
*/
public ProvisioningStateEnum provisioningState() {
- return this.provisioningState;
+ return this.innerProperties() == null ? null : this.innerProperties().provisioningState();
}
/**
@@ -92,7 +85,7 @@ public ProvisioningStateEnum provisioningState() {
* @return the createdAt value.
*/
public OffsetDateTime createdAt() {
- return this.createdAt;
+ return this.innerProperties() == null ? null : this.innerProperties().createdAt();
}
/**
@@ -101,7 +94,7 @@ public OffsetDateTime createdAt() {
* @return the updatedAt value.
*/
public OffsetDateTime updatedAt() {
- return this.updatedAt;
+ return this.innerProperties() == null ? null : this.innerProperties().updatedAt();
}
/**
@@ -110,7 +103,7 @@ public OffsetDateTime updatedAt() {
* @return the serviceBusEndpoint value.
*/
public String serviceBusEndpoint() {
- return this.serviceBusEndpoint;
+ return this.innerProperties() == null ? null : this.innerProperties().serviceBusEndpoint();
}
/**
@@ -119,21 +112,7 @@ public String serviceBusEndpoint() {
* @return the metricId value.
*/
public String metricId() {
- return this.metricId;
- }
-
- /** {@inheritDoc} */
- @Override
- public RelayNamespaceInner withLocation(String location) {
- super.withLocation(location);
- return this;
- }
-
- /** {@inheritDoc} */
- @Override
- public RelayNamespaceInner withTags(Map tags) {
- super.withTags(tags);
- return this;
+ return this.innerProperties() == null ? null : this.innerProperties().metricId();
}
/**
@@ -145,5 +124,8 @@ public void validate() {
if (sku() != null) {
sku().validate();
}
+ if (innerProperties() != null) {
+ innerProperties().validate();
+ }
}
}
diff --git a/sdk/relay/azure-resourcemanager-relay/src/main/java/com/azure/resourcemanager/relay/fluent/models/RelayNamespaceProperties.java b/sdk/relay/azure-resourcemanager-relay/src/main/java/com/azure/resourcemanager/relay/fluent/models/RelayNamespaceProperties.java
new file mode 100644
index 000000000000..fe0d6148361d
--- /dev/null
+++ b/sdk/relay/azure-resourcemanager-relay/src/main/java/com/azure/resourcemanager/relay/fluent/models/RelayNamespaceProperties.java
@@ -0,0 +1,97 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.relay.fluent.models;
+
+import com.azure.core.annotation.Immutable;
+import com.azure.resourcemanager.relay.models.ProvisioningStateEnum;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.time.OffsetDateTime;
+
+/** Properties of the namespace. */
+@Immutable
+public final class RelayNamespaceProperties {
+ /*
+ * The provisioningState property.
+ */
+ @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY)
+ private ProvisioningStateEnum provisioningState;
+
+ /*
+ * The time the namespace was created.
+ */
+ @JsonProperty(value = "createdAt", access = JsonProperty.Access.WRITE_ONLY)
+ private OffsetDateTime createdAt;
+
+ /*
+ * The time the namespace was updated.
+ */
+ @JsonProperty(value = "updatedAt", access = JsonProperty.Access.WRITE_ONLY)
+ private OffsetDateTime updatedAt;
+
+ /*
+ * Endpoint you can use to perform Service Bus operations.
+ */
+ @JsonProperty(value = "serviceBusEndpoint", access = JsonProperty.Access.WRITE_ONLY)
+ private String serviceBusEndpoint;
+
+ /*
+ * Identifier for Azure Insights metrics.
+ */
+ @JsonProperty(value = "metricId", access = JsonProperty.Access.WRITE_ONLY)
+ private String metricId;
+
+ /**
+ * Get the provisioningState property: The provisioningState property.
+ *
+ * @return the provisioningState value.
+ */
+ public ProvisioningStateEnum provisioningState() {
+ return this.provisioningState;
+ }
+
+ /**
+ * Get the createdAt property: The time the namespace was created.
+ *
+ * @return the createdAt value.
+ */
+ public OffsetDateTime createdAt() {
+ return this.createdAt;
+ }
+
+ /**
+ * Get the updatedAt property: The time the namespace was updated.
+ *
+ * @return the updatedAt value.
+ */
+ public OffsetDateTime updatedAt() {
+ return this.updatedAt;
+ }
+
+ /**
+ * Get the serviceBusEndpoint property: Endpoint you can use to perform Service Bus operations.
+ *
+ * @return the serviceBusEndpoint value.
+ */
+ public String serviceBusEndpoint() {
+ return this.serviceBusEndpoint;
+ }
+
+ /**
+ * Get the metricId property: Identifier for Azure Insights metrics.
+ *
+ * @return the metricId value.
+ */
+ public String metricId() {
+ return this.metricId;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ }
+}
diff --git a/sdk/relay/azure-resourcemanager-relay/src/main/java/com/azure/resourcemanager/relay/fluent/models/WcfRelayInner.java b/sdk/relay/azure-resourcemanager-relay/src/main/java/com/azure/resourcemanager/relay/fluent/models/WcfRelayInner.java
index c7375f4901c6..5d528a9786d5 100644
--- a/sdk/relay/azure-resourcemanager-relay/src/main/java/com/azure/resourcemanager/relay/fluent/models/WcfRelayInner.java
+++ b/sdk/relay/azure-resourcemanager-relay/src/main/java/com/azure/resourcemanager/relay/fluent/models/WcfRelayInner.java
@@ -5,73 +5,28 @@
package com.azure.resourcemanager.relay.fluent.models;
import com.azure.core.annotation.Fluent;
-import com.azure.core.annotation.JsonFlatten;
import com.azure.core.management.ProxyResource;
-import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.relay.models.Relaytype;
-import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.time.OffsetDateTime;
/** Description of the WCF relay resource. */
-@JsonFlatten
@Fluent
-public class WcfRelayInner extends ProxyResource {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(WcfRelayInner.class);
-
- /*
- * Returns true if the relay is dynamic; otherwise, false.
- */
- @JsonProperty(value = "properties.isDynamic", access = JsonProperty.Access.WRITE_ONLY)
- private Boolean isDynamic;
-
- /*
- * The time the WCF relay was created.
- */
- @JsonProperty(value = "properties.createdAt", access = JsonProperty.Access.WRITE_ONLY)
- private OffsetDateTime createdAt;
-
+public final class WcfRelayInner extends ProxyResource {
/*
- * The time the namespace was updated.
+ * Properties of the WCF relay.
*/
- @JsonProperty(value = "properties.updatedAt", access = JsonProperty.Access.WRITE_ONLY)
- private OffsetDateTime updatedAt;
+ @JsonProperty(value = "properties")
+ private WcfRelayProperties innerProperties;
- /*
- * The number of listeners for this relay. Note that min :1 and max:25 are
- * supported.
- */
- @JsonProperty(value = "properties.listenerCount", access = JsonProperty.Access.WRITE_ONLY)
- private Integer listenerCount;
-
- /*
- * WCF relay type.
- */
- @JsonProperty(value = "properties.relayType")
- private Relaytype relayType;
-
- /*
- * Returns true if client authorization is needed for this relay;
- * otherwise, false.
- */
- @JsonProperty(value = "properties.requiresClientAuthorization")
- private Boolean requiresClientAuthorization;
-
- /*
- * Returns true if transport security is needed for this relay; otherwise,
- * false.
- */
- @JsonProperty(value = "properties.requiresTransportSecurity")
- private Boolean requiresTransportSecurity;
-
- /*
- * The usermetadata is a placeholder to store user-defined string data for
- * the WCF Relay endpoint. For example, it can be used to store descriptive
- * data, such as list of teams and their contact information. Also,
- * user-defined configuration settings can be stored.
+ /**
+ * Get the innerProperties property: Properties of the WCF relay.
+ *
+ * @return the innerProperties value.
*/
- @JsonProperty(value = "properties.userMetadata")
- private String userMetadata;
+ private WcfRelayProperties innerProperties() {
+ return this.innerProperties;
+ }
/**
* Get the isDynamic property: Returns true if the relay is dynamic; otherwise, false.
@@ -79,7 +34,7 @@ public class WcfRelayInner extends ProxyResource {
* @return the isDynamic value.
*/
public Boolean isDynamic() {
- return this.isDynamic;
+ return this.innerProperties() == null ? null : this.innerProperties().isDynamic();
}
/**
@@ -88,7 +43,7 @@ public Boolean isDynamic() {
* @return the createdAt value.
*/
public OffsetDateTime createdAt() {
- return this.createdAt;
+ return this.innerProperties() == null ? null : this.innerProperties().createdAt();
}
/**
@@ -97,7 +52,7 @@ public OffsetDateTime createdAt() {
* @return the updatedAt value.
*/
public OffsetDateTime updatedAt() {
- return this.updatedAt;
+ return this.innerProperties() == null ? null : this.innerProperties().updatedAt();
}
/**
@@ -107,7 +62,7 @@ public OffsetDateTime updatedAt() {
* @return the listenerCount value.
*/
public Integer listenerCount() {
- return this.listenerCount;
+ return this.innerProperties() == null ? null : this.innerProperties().listenerCount();
}
/**
@@ -116,7 +71,7 @@ public Integer listenerCount() {
* @return the relayType value.
*/
public Relaytype relayType() {
- return this.relayType;
+ return this.innerProperties() == null ? null : this.innerProperties().relayType();
}
/**
@@ -126,7 +81,10 @@ public Relaytype relayType() {
* @return the WcfRelayInner object itself.
*/
public WcfRelayInner withRelayType(Relaytype relayType) {
- this.relayType = relayType;
+ if (this.innerProperties() == null) {
+ this.innerProperties = new WcfRelayProperties();
+ }
+ this.innerProperties().withRelayType(relayType);
return this;
}
@@ -137,7 +95,7 @@ public WcfRelayInner withRelayType(Relaytype relayType) {
* @return the requiresClientAuthorization value.
*/
public Boolean requiresClientAuthorization() {
- return this.requiresClientAuthorization;
+ return this.innerProperties() == null ? null : this.innerProperties().requiresClientAuthorization();
}
/**
@@ -148,7 +106,10 @@ public Boolean requiresClientAuthorization() {
* @return the WcfRelayInner object itself.
*/
public WcfRelayInner withRequiresClientAuthorization(Boolean requiresClientAuthorization) {
- this.requiresClientAuthorization = requiresClientAuthorization;
+ if (this.innerProperties() == null) {
+ this.innerProperties = new WcfRelayProperties();
+ }
+ this.innerProperties().withRequiresClientAuthorization(requiresClientAuthorization);
return this;
}
@@ -159,7 +120,7 @@ public WcfRelayInner withRequiresClientAuthorization(Boolean requiresClientAutho
* @return the requiresTransportSecurity value.
*/
public Boolean requiresTransportSecurity() {
- return this.requiresTransportSecurity;
+ return this.innerProperties() == null ? null : this.innerProperties().requiresTransportSecurity();
}
/**
@@ -170,7 +131,10 @@ public Boolean requiresTransportSecurity() {
* @return the WcfRelayInner object itself.
*/
public WcfRelayInner withRequiresTransportSecurity(Boolean requiresTransportSecurity) {
- this.requiresTransportSecurity = requiresTransportSecurity;
+ if (this.innerProperties() == null) {
+ this.innerProperties = new WcfRelayProperties();
+ }
+ this.innerProperties().withRequiresTransportSecurity(requiresTransportSecurity);
return this;
}
@@ -182,7 +146,7 @@ public WcfRelayInner withRequiresTransportSecurity(Boolean requiresTransportSecu
* @return the userMetadata value.
*/
public String userMetadata() {
- return this.userMetadata;
+ return this.innerProperties() == null ? null : this.innerProperties().userMetadata();
}
/**
@@ -194,7 +158,10 @@ public String userMetadata() {
* @return the WcfRelayInner object itself.
*/
public WcfRelayInner withUserMetadata(String userMetadata) {
- this.userMetadata = userMetadata;
+ if (this.innerProperties() == null) {
+ this.innerProperties = new WcfRelayProperties();
+ }
+ this.innerProperties().withUserMetadata(userMetadata);
return this;
}
@@ -204,5 +171,8 @@ public WcfRelayInner withUserMetadata(String userMetadata) {
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
public void validate() {
+ if (innerProperties() != null) {
+ innerProperties().validate();
+ }
}
}
diff --git a/sdk/relay/azure-resourcemanager-relay/src/main/java/com/azure/resourcemanager/relay/fluent/models/WcfRelayProperties.java b/sdk/relay/azure-resourcemanager-relay/src/main/java/com/azure/resourcemanager/relay/fluent/models/WcfRelayProperties.java
new file mode 100644
index 000000000000..6d130c8a0dc0
--- /dev/null
+++ b/sdk/relay/azure-resourcemanager-relay/src/main/java/com/azure/resourcemanager/relay/fluent/models/WcfRelayProperties.java
@@ -0,0 +1,201 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.relay.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.resourcemanager.relay.models.Relaytype;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.time.OffsetDateTime;
+
+/** Properties of the WCF relay. */
+@Fluent
+public final class WcfRelayProperties {
+ /*
+ * Returns true if the relay is dynamic; otherwise, false.
+ */
+ @JsonProperty(value = "isDynamic", access = JsonProperty.Access.WRITE_ONLY)
+ private Boolean isDynamic;
+
+ /*
+ * The time the WCF relay was created.
+ */
+ @JsonProperty(value = "createdAt", access = JsonProperty.Access.WRITE_ONLY)
+ private OffsetDateTime createdAt;
+
+ /*
+ * The time the namespace was updated.
+ */
+ @JsonProperty(value = "updatedAt", access = JsonProperty.Access.WRITE_ONLY)
+ private OffsetDateTime updatedAt;
+
+ /*
+ * The number of listeners for this relay. Note that min :1 and max:25 are
+ * supported.
+ */
+ @JsonProperty(value = "listenerCount", access = JsonProperty.Access.WRITE_ONLY)
+ private Integer listenerCount;
+
+ /*
+ * WCF relay type.
+ */
+ @JsonProperty(value = "relayType")
+ private Relaytype relayType;
+
+ /*
+ * Returns true if client authorization is needed for this relay;
+ * otherwise, false.
+ */
+ @JsonProperty(value = "requiresClientAuthorization")
+ private Boolean requiresClientAuthorization;
+
+ /*
+ * Returns true if transport security is needed for this relay; otherwise,
+ * false.
+ */
+ @JsonProperty(value = "requiresTransportSecurity")
+ private Boolean requiresTransportSecurity;
+
+ /*
+ * The usermetadata is a placeholder to store user-defined string data for
+ * the WCF Relay endpoint. For example, it can be used to store descriptive
+ * data, such as list of teams and their contact information. Also,
+ * user-defined configuration settings can be stored.
+ */
+ @JsonProperty(value = "userMetadata")
+ private String userMetadata;
+
+ /**
+ * Get the isDynamic property: Returns true if the relay is dynamic; otherwise, false.
+ *
+ * @return the isDynamic value.
+ */
+ public Boolean isDynamic() {
+ return this.isDynamic;
+ }
+
+ /**
+ * Get the createdAt property: The time the WCF relay was created.
+ *
+ * @return the createdAt value.
+ */
+ public OffsetDateTime createdAt() {
+ return this.createdAt;
+ }
+
+ /**
+ * Get the updatedAt property: The time the namespace was updated.
+ *
+ * @return the updatedAt value.
+ */
+ public OffsetDateTime updatedAt() {
+ return this.updatedAt;
+ }
+
+ /**
+ * Get the listenerCount property: The number of listeners for this relay. Note that min :1 and max:25 are
+ * supported.
+ *
+ * @return the listenerCount value.
+ */
+ public Integer listenerCount() {
+ return this.listenerCount;
+ }
+
+ /**
+ * Get the relayType property: WCF relay type.
+ *
+ * @return the relayType value.
+ */
+ public Relaytype relayType() {
+ return this.relayType;
+ }
+
+ /**
+ * Set the relayType property: WCF relay type.
+ *
+ * @param relayType the relayType value to set.
+ * @return the WcfRelayProperties object itself.
+ */
+ public WcfRelayProperties withRelayType(Relaytype relayType) {
+ this.relayType = relayType;
+ return this;
+ }
+
+ /**
+ * Get the requiresClientAuthorization property: Returns true if client authorization is needed for this relay;
+ * otherwise, false.
+ *
+ * @return the requiresClientAuthorization value.
+ */
+ public Boolean requiresClientAuthorization() {
+ return this.requiresClientAuthorization;
+ }
+
+ /**
+ * Set the requiresClientAuthorization property: Returns true if client authorization is needed for this relay;
+ * otherwise, false.
+ *
+ * @param requiresClientAuthorization the requiresClientAuthorization value to set.
+ * @return the WcfRelayProperties object itself.
+ */
+ public WcfRelayProperties withRequiresClientAuthorization(Boolean requiresClientAuthorization) {
+ this.requiresClientAuthorization = requiresClientAuthorization;
+ return this;
+ }
+
+ /**
+ * Get the requiresTransportSecurity property: Returns true if transport security is needed for this relay;
+ * otherwise, false.
+ *
+ * @return the requiresTransportSecurity value.
+ */
+ public Boolean requiresTransportSecurity() {
+ return this.requiresTransportSecurity;
+ }
+
+ /**
+ * Set the requiresTransportSecurity property: Returns true if transport security is needed for this relay;
+ * otherwise, false.
+ *
+ * @param requiresTransportSecurity the requiresTransportSecurity value to set.
+ * @return the WcfRelayProperties object itself.
+ */
+ public WcfRelayProperties withRequiresTransportSecurity(Boolean requiresTransportSecurity) {
+ this.requiresTransportSecurity = requiresTransportSecurity;
+ return this;
+ }
+
+ /**
+ * Get the userMetadata property: The usermetadata is a placeholder to store user-defined string data for the WCF
+ * Relay endpoint. For example, it can be used to store descriptive data, such as list of teams and their contact
+ * information. Also, user-defined configuration settings can be stored.
+ *
+ * @return the userMetadata value.
+ */
+ public String userMetadata() {
+ return this.userMetadata;
+ }
+
+ /**
+ * Set the userMetadata property: The usermetadata is a placeholder to store user-defined string data for the WCF
+ * Relay endpoint. For example, it can be used to store descriptive data, such as list of teams and their contact
+ * information. Also, user-defined configuration settings can be stored.
+ *
+ * @param userMetadata the userMetadata value to set.
+ * @return the WcfRelayProperties object itself.
+ */
+ public WcfRelayProperties withUserMetadata(String userMetadata) {
+ this.userMetadata = userMetadata;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ }
+}
diff --git a/sdk/relay/azure-resourcemanager-relay/src/main/java/com/azure/resourcemanager/relay/implementation/AccessKeysImpl.java b/sdk/relay/azure-resourcemanager-relay/src/main/java/com/azure/resourcemanager/relay/implementation/AccessKeysImpl.java
index 4bd253cb0628..d28735428fe6 100644
--- a/sdk/relay/azure-resourcemanager-relay/src/main/java/com/azure/resourcemanager/relay/implementation/AccessKeysImpl.java
+++ b/sdk/relay/azure-resourcemanager-relay/src/main/java/com/azure/resourcemanager/relay/implementation/AccessKeysImpl.java
@@ -4,16 +4,15 @@
package com.azure.resourcemanager.relay.implementation;
-import com.azure.resourcemanager.relay.RelayManager;
import com.azure.resourcemanager.relay.fluent.models.AccessKeysInner;
import com.azure.resourcemanager.relay.models.AccessKeys;
public final class AccessKeysImpl implements AccessKeys {
private AccessKeysInner innerObject;
- private final RelayManager serviceManager;
+ private final com.azure.resourcemanager.relay.RelayManager serviceManager;
- AccessKeysImpl(AccessKeysInner innerObject, RelayManager serviceManager) {
+ AccessKeysImpl(AccessKeysInner innerObject, com.azure.resourcemanager.relay.RelayManager serviceManager) {
this.innerObject = innerObject;
this.serviceManager = serviceManager;
}
@@ -42,7 +41,7 @@ public AccessKeysInner innerModel() {
return this.innerObject;
}
- private RelayManager manager() {
+ private com.azure.resourcemanager.relay.RelayManager manager() {
return this.serviceManager;
}
}
diff --git a/sdk/relay/azure-resourcemanager-relay/src/main/java/com/azure/resourcemanager/relay/implementation/AuthorizationRuleImpl.java b/sdk/relay/azure-resourcemanager-relay/src/main/java/com/azure/resourcemanager/relay/implementation/AuthorizationRuleImpl.java
index 7b97159490c4..ba7fdbb10081 100644
--- a/sdk/relay/azure-resourcemanager-relay/src/main/java/com/azure/resourcemanager/relay/implementation/AuthorizationRuleImpl.java
+++ b/sdk/relay/azure-resourcemanager-relay/src/main/java/com/azure/resourcemanager/relay/implementation/AuthorizationRuleImpl.java
@@ -4,11 +4,13 @@
package com.azure.resourcemanager.relay.implementation;
+import com.azure.core.http.rest.Response;
import com.azure.core.util.Context;
-import com.azure.resourcemanager.relay.RelayManager;
import com.azure.resourcemanager.relay.fluent.models.AuthorizationRuleInner;
+import com.azure.resourcemanager.relay.models.AccessKeys;
import com.azure.resourcemanager.relay.models.AccessRights;
import com.azure.resourcemanager.relay.models.AuthorizationRule;
+import com.azure.resourcemanager.relay.models.RegenerateAccessKeyParameters;
import java.util.Collections;
import java.util.List;
@@ -16,7 +18,7 @@ public final class AuthorizationRuleImpl
implements AuthorizationRule, AuthorizationRule.Definition, AuthorizationRule.Update {
private AuthorizationRuleInner innerObject;
- private final RelayManager serviceManager;
+ private final com.azure.resourcemanager.relay.RelayManager serviceManager;
public String id() {
return this.innerModel().id();
@@ -43,7 +45,7 @@ public AuthorizationRuleInner innerModel() {
return this.innerObject;
}
- private RelayManager manager() {
+ private com.azure.resourcemanager.relay.RelayManager manager() {
return this.serviceManager;
}
@@ -81,7 +83,7 @@ public AuthorizationRule create(Context context) {
return this;
}
- AuthorizationRuleImpl(String name, RelayManager serviceManager) {
+ AuthorizationRuleImpl(String name, com.azure.resourcemanager.relay.RelayManager serviceManager) {
this.innerObject = new AuthorizationRuleInner();
this.serviceManager = serviceManager;
this.authorizationRuleName = name;
@@ -113,7 +115,8 @@ public AuthorizationRule apply(Context context) {
return this;
}
- AuthorizationRuleImpl(AuthorizationRuleInner innerObject, RelayManager serviceManager) {
+ AuthorizationRuleImpl(
+ AuthorizationRuleInner innerObject, com.azure.resourcemanager.relay.RelayManager serviceManager) {
this.innerObject = innerObject;
this.serviceManager = serviceManager;
this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups");
@@ -141,6 +144,28 @@ public AuthorizationRule refresh(Context context) {
return this;
}
+ public AccessKeys listKeys() {
+ return serviceManager.namespaces().listKeys(resourceGroupName, namespaceName, authorizationRuleName);
+ }
+
+ public Response listKeysWithResponse(Context context) {
+ return serviceManager
+ .namespaces()
+ .listKeysWithResponse(resourceGroupName, namespaceName, authorizationRuleName, context);
+ }
+
+ public AccessKeys regenerateKeys(RegenerateAccessKeyParameters parameters) {
+ return serviceManager
+ .namespaces()
+ .regenerateKeys(resourceGroupName, namespaceName, authorizationRuleName, parameters);
+ }
+
+ public Response regenerateKeysWithResponse(RegenerateAccessKeyParameters parameters, Context context) {
+ return serviceManager
+ .namespaces()
+ .regenerateKeysWithResponse(resourceGroupName, namespaceName, authorizationRuleName, parameters, context);
+ }
+
public AuthorizationRuleImpl withRights(List rights) {
this.innerModel().withRights(rights);
return this;
diff --git a/sdk/relay/azure-resourcemanager-relay/src/main/java/com/azure/resourcemanager/relay/implementation/CheckNameAvailabilityResultImpl.java b/sdk/relay/azure-resourcemanager-relay/src/main/java/com/azure/resourcemanager/relay/implementation/CheckNameAvailabilityResultImpl.java
index 1e57e3783550..2f26b9b2484e 100644
--- a/sdk/relay/azure-resourcemanager-relay/src/main/java/com/azure/resourcemanager/relay/implementation/CheckNameAvailabilityResultImpl.java
+++ b/sdk/relay/azure-resourcemanager-relay/src/main/java/com/azure/resourcemanager/relay/implementation/CheckNameAvailabilityResultImpl.java
@@ -4,7 +4,6 @@
package com.azure.resourcemanager.relay.implementation;
-import com.azure.resourcemanager.relay.RelayManager;
import com.azure.resourcemanager.relay.fluent.models.CheckNameAvailabilityResultInner;
import com.azure.resourcemanager.relay.models.CheckNameAvailabilityResult;
import com.azure.resourcemanager.relay.models.UnavailableReason;
@@ -12,9 +11,10 @@
public final class CheckNameAvailabilityResultImpl implements CheckNameAvailabilityResult {
private CheckNameAvailabilityResultInner innerObject;
- private final RelayManager serviceManager;
+ private final com.azure.resourcemanager.relay.RelayManager serviceManager;
- CheckNameAvailabilityResultImpl(CheckNameAvailabilityResultInner innerObject, RelayManager serviceManager) {
+ CheckNameAvailabilityResultImpl(
+ CheckNameAvailabilityResultInner innerObject, com.azure.resourcemanager.relay.RelayManager serviceManager) {
this.innerObject = innerObject;
this.serviceManager = serviceManager;
}
@@ -35,7 +35,7 @@ public CheckNameAvailabilityResultInner innerModel() {
return this.innerObject;
}
- private RelayManager manager() {
+ private com.azure.resourcemanager.relay.RelayManager manager() {
return this.serviceManager;
}
}
diff --git a/sdk/relay/azure-resourcemanager-relay/src/main/java/com/azure/resourcemanager/relay/implementation/HybridConnectionImpl.java b/sdk/relay/azure-resourcemanager-relay/src/main/java/com/azure/resourcemanager/relay/implementation/HybridConnectionImpl.java
index eddd11524d60..078e44acfa35 100644
--- a/sdk/relay/azure-resourcemanager-relay/src/main/java/com/azure/resourcemanager/relay/implementation/HybridConnectionImpl.java
+++ b/sdk/relay/azure-resourcemanager-relay/src/main/java/com/azure/resourcemanager/relay/implementation/HybridConnectionImpl.java
@@ -5,7 +5,6 @@
package com.azure.resourcemanager.relay.implementation;
import com.azure.core.util.Context;
-import com.azure.resourcemanager.relay.RelayManager;
import com.azure.resourcemanager.relay.fluent.models.HybridConnectionInner;
import com.azure.resourcemanager.relay.models.HybridConnection;
import java.time.OffsetDateTime;
@@ -14,7 +13,7 @@ public final class HybridConnectionImpl
implements HybridConnection, HybridConnection.Definition, HybridConnection.Update {
private HybridConnectionInner innerObject;
- private final RelayManager serviceManager;
+ private final com.azure.resourcemanager.relay.RelayManager serviceManager;
public String id() {
return this.innerModel().id();
@@ -52,7 +51,7 @@ public HybridConnectionInner innerModel() {
return this.innerObject;
}
- private RelayManager manager() {
+ private com.azure.resourcemanager.relay.RelayManager manager() {
return this.serviceManager;
}
@@ -90,7 +89,7 @@ public HybridConnection create(Context context) {
return this;
}
- HybridConnectionImpl(String name, RelayManager serviceManager) {
+ HybridConnectionImpl(String name, com.azure.resourcemanager.relay.RelayManager serviceManager) {
this.innerObject = new HybridConnectionInner();
this.serviceManager = serviceManager;
this.hybridConnectionName = name;
@@ -122,7 +121,8 @@ public HybridConnection apply(Context context) {
return this;
}
- HybridConnectionImpl(HybridConnectionInner innerObject, RelayManager serviceManager) {
+ HybridConnectionImpl(
+ HybridConnectionInner innerObject, com.azure.resourcemanager.relay.RelayManager serviceManager) {
this.innerObject = innerObject;
this.serviceManager = serviceManager;
this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups");
diff --git a/sdk/relay/azure-resourcemanager-relay/src/main/java/com/azure/resourcemanager/relay/implementation/HybridConnectionsClientImpl.java b/sdk/relay/azure-resourcemanager-relay/src/main/java/com/azure/resourcemanager/relay/implementation/HybridConnectionsClientImpl.java
index 63d9a4f14727..c48b3ba6f398 100644
--- a/sdk/relay/azure-resourcemanager-relay/src/main/java/com/azure/resourcemanager/relay/implementation/HybridConnectionsClientImpl.java
+++ b/sdk/relay/azure-resourcemanager-relay/src/main/java/com/azure/resourcemanager/relay/implementation/HybridConnectionsClientImpl.java
@@ -29,7 +29,6 @@
import com.azure.core.management.exception.ManagementException;
import com.azure.core.util.Context;
import com.azure.core.util.FluxUtil;
-import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.relay.fluent.HybridConnectionsClient;
import com.azure.resourcemanager.relay.fluent.models.AccessKeysInner;
import com.azure.resourcemanager.relay.fluent.models.AuthorizationRuleInner;
@@ -41,8 +40,6 @@
/** An instance of this class provides access to all the operations defined in HybridConnectionsClient. */
public final class HybridConnectionsClientImpl implements HybridConnectionsClient {
- private final ClientLogger logger = new ClientLogger(HybridConnectionsClientImpl.class);
-
/** The proxy service used to perform REST calls. */
private final HybridConnectionsService service;
@@ -268,7 +265,8 @@ Mono> listAuthorizationRulesNext(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the response of the list hybrid connection operation.
+ * @return the response of the list hybrid connection operation along with {@link PagedResponse} on successful
+ * completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> listByNamespaceSinglePageAsync(
@@ -314,7 +312,7 @@ private Mono> listByNamespaceSinglePageAsyn
res.getValue().value(),
res.getValue().nextLink(),
null))
- .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
/**
@@ -326,7 +324,8 @@ private Mono> listByNamespaceSinglePageAsyn
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the response of the list hybrid connection operation.
+ * @return the response of the list hybrid connection operation along with {@link PagedResponse} on successful
+ * completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> listByNamespaceSinglePageAsync(
@@ -380,7 +379,7 @@ private Mono> listByNamespaceSinglePageAsyn
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the response of the list hybrid connection operation.
+ * @return the response of the list hybrid connection operation as paginated response with {@link PagedFlux}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
private PagedFlux listByNamespaceAsync(String resourceGroupName, String namespaceName) {
@@ -398,7 +397,7 @@ private PagedFlux listByNamespaceAsync(String resourceGro
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the response of the list hybrid connection operation.
+ * @return the response of the list hybrid connection operation as paginated response with {@link PagedFlux}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
private PagedFlux listByNamespaceAsync(
@@ -416,7 +415,7 @@ private PagedFlux listByNamespaceAsync(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the response of the list hybrid connection operation.
+ * @return the response of the list hybrid connection operation as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
public PagedIterable listByNamespace(String resourceGroupName, String namespaceName) {
@@ -432,7 +431,7 @@ public PagedIterable listByNamespace(String resourceGroup
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the response of the list hybrid connection operation.
+ * @return the response of the list hybrid connection operation as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
public PagedIterable listByNamespace(
@@ -450,7 +449,8 @@ public PagedIterable listByNamespace(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return description of hybrid connection resource.
+ * @return description of hybrid connection resource along with {@link Response} on successful completion of {@link
+ * Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> createOrUpdateWithResponseAsync(
@@ -498,7 +498,7 @@ private Mono> createOrUpdateWithResponseAsync(
parameters,
accept,
context))
- .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
/**
@@ -512,7 +512,8 @@ private Mono> createOrUpdateWithResponseAsync(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return description of hybrid connection resource.
+ * @return description of hybrid connection resource along with {@link Response} on successful completion of {@link
+ * Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> createOrUpdateWithResponseAsync(
@@ -574,7 +575,7 @@ private Mono> createOrUpdateWithResponseAsync(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return description of hybrid connection resource.
+ * @return description of hybrid connection resource on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono createOrUpdateAsync(
@@ -619,7 +620,7 @@ public HybridConnectionInner createOrUpdate(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return description of hybrid connection resource.
+ * @return description of hybrid connection resource along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public Response createOrUpdateWithResponse(
@@ -642,7 +643,7 @@ public Response createOrUpdateWithResponse(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the completion.
+ * @return the {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> deleteWithResponseAsync(
@@ -684,7 +685,7 @@ private Mono> deleteWithResponseAsync(
this.client.getSubscriptionId(),
accept,
context))
- .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
/**
@@ -697,7 +698,7 @@ private Mono> deleteWithResponseAsync(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the completion.
+ * @return the {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> deleteWithResponseAsync(
@@ -748,7 +749,7 @@ private Mono> deleteWithResponseAsync(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the completion.
+ * @return A {@link Mono} that completes when a successful response is received.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono deleteAsync(String resourceGroupName, String namespaceName, String hybridConnectionName) {
@@ -781,7 +782,7 @@ public void delete(String resourceGroupName, String namespaceName, String hybrid
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the response.
+ * @return the {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public Response deleteWithResponse(
@@ -798,7 +799,8 @@ public Response deleteWithResponse(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return description of hybrid connection resource.
+ * @return description of hybrid connection resource along with {@link Response} on successful completion of {@link
+ * Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> getWithResponseAsync(
@@ -840,7 +842,7 @@ private Mono> getWithResponseAsync(
this.client.getSubscriptionId(),
accept,
context))
- .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
/**
@@ -853,7 +855,8 @@ private Mono> getWithResponseAsync(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return description of hybrid connection resource.
+ * @return description of hybrid connection resource along with {@link Response} on successful completion of {@link
+ * Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> getWithResponseAsync(
@@ -904,7 +907,7 @@ private Mono> getWithResponseAsync(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return description of hybrid connection resource.
+ * @return description of hybrid connection resource on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono getAsync(
@@ -946,7 +949,7 @@ public HybridConnectionInner get(String resourceGroupName, String namespaceName,
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return description of hybrid connection resource.
+ * @return description of hybrid connection resource along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public Response getWithResponse(
@@ -963,7 +966,8 @@ public Response getWithResponse(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the response from the list namespace operation.
+ * @return the response from the list namespace operation along with {@link PagedResponse} on successful completion
+ * of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> listAuthorizationRulesSinglePageAsync(
@@ -1014,7 +1018,7 @@ private Mono> listAuthorizationRulesSingle
res.getValue().value(),
res.getValue().nextLink(),
null))
- .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
/**
@@ -1027,7 +1031,8 @@ private Mono> listAuthorizationRulesSingle
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the response from the list namespace operation.
+ * @return the response from the list namespace operation along with {@link PagedResponse} on successful completion
+ * of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> listAuthorizationRulesSinglePageAsync(
@@ -1087,7 +1092,7 @@ private Mono> listAuthorizationRulesSingle
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the response from the list namespace operation.
+ * @return the response from the list namespace operation as paginated response with {@link PagedFlux}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
private PagedFlux listAuthorizationRulesAsync(
@@ -1107,7 +1112,7 @@ private PagedFlux listAuthorizationRulesAsync(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the response from the list namespace operation.
+ * @return the response from the list namespace operation as paginated response with {@link PagedFlux}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
private PagedFlux listAuthorizationRulesAsync(
@@ -1127,7 +1132,7 @@ private PagedFlux listAuthorizationRulesAsync(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the response from the list namespace operation.
+ * @return the response from the list namespace operation as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
public PagedIterable listAuthorizationRules(
@@ -1145,7 +1150,7 @@ public PagedIterable listAuthorizationRules(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the response from the list namespace operation.
+ * @return the response from the list namespace operation as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
public PagedIterable listAuthorizationRules(
@@ -1165,7 +1170,8 @@ public PagedIterable listAuthorizationRules(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return description of a namespace authorization rule.
+ * @return description of a namespace authorization rule along with {@link Response} on successful completion of
+ * {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> createOrUpdateAuthorizationRuleWithResponseAsync(
@@ -1222,7 +1228,7 @@ private Mono> createOrUpdateAuthorizationRuleWi
parameters,
accept,
context))
- .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
/**
@@ -1237,7 +1243,8 @@ private Mono> createOrUpdateAuthorizationRuleWi
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return description of a namespace authorization rule.
+ * @return description of a namespace authorization rule along with {@link Response} on successful completion of
+ * {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> createOrUpdateAuthorizationRuleWithResponseAsync(
@@ -1306,7 +1313,7 @@ private Mono> createOrUpdateAuthorizationRuleWi
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return description of a namespace authorization rule.
+ * @return description of a namespace authorization rule on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono createOrUpdateAuthorizationRuleAsync(
@@ -1364,7 +1371,7 @@ public AuthorizationRuleInner createOrUpdateAuthorizationRule(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return description of a namespace authorization rule.
+ * @return description of a namespace authorization rule along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public Response createOrUpdateAuthorizationRuleWithResponse(
@@ -1389,7 +1396,7 @@ public Response createOrUpdateAuthorizationRuleWithRespo
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the completion.
+ * @return the {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> deleteAuthorizationRuleWithResponseAsync(
@@ -1436,7 +1443,7 @@ private Mono> deleteAuthorizationRuleWithResponseAsync(
this.client.getSubscriptionId(),
accept,
context))
- .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
/**
@@ -1450,7 +1457,7 @@ private Mono> deleteAuthorizationRuleWithResponseAsync(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the completion.
+ * @return the {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> deleteAuthorizationRuleWithResponseAsync(
@@ -1511,7 +1518,7 @@ private Mono> deleteAuthorizationRuleWithResponseAsync(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the completion.
+ * @return A {@link Mono} that completes when a successful response is received.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono deleteAuthorizationRuleAsync(
@@ -1550,7 +1557,7 @@ public void deleteAuthorizationRule(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the response.
+ * @return the {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public Response deleteAuthorizationRuleWithResponse(
@@ -1574,7 +1581,8 @@ public Response deleteAuthorizationRuleWithResponse(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return description of a namespace authorization rule.
+ * @return description of a namespace authorization rule along with {@link Response} on successful completion of
+ * {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> getAuthorizationRuleWithResponseAsync(
@@ -1621,7 +1629,7 @@ private Mono> getAuthorizationRuleWithResponseA
this.client.getSubscriptionId(),
accept,
context))
- .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
/**
@@ -1635,7 +1643,8 @@ private Mono> getAuthorizationRuleWithResponseA
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return description of a namespace authorization rule.
+ * @return description of a namespace authorization rule along with {@link Response} on successful completion of
+ * {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> getAuthorizationRuleWithResponseAsync(
@@ -1696,7 +1705,7 @@ private Mono> getAuthorizationRuleWithResponseA
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return description of a namespace authorization rule.
+ * @return description of a namespace authorization rule on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono getAuthorizationRuleAsync(
@@ -1743,7 +1752,7 @@ public AuthorizationRuleInner getAuthorizationRule(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return description of a namespace authorization rule.
+ * @return description of a namespace authorization rule along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public Response getAuthorizationRuleWithResponse(
@@ -1767,7 +1776,7 @@ public Response getAuthorizationRuleWithResponse(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return namespace/Relay Connection String.
+ * @return namespace/Relay Connection String along with {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> listKeysWithResponseAsync(
@@ -1814,7 +1823,7 @@ private Mono> listKeysWithResponseAsync(
this.client.getSubscriptionId(),
accept,
context))
- .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
/**
@@ -1828,7 +1837,7 @@ private Mono> listKeysWithResponseAsync(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return namespace/Relay Connection String.
+ * @return namespace/Relay Connection String along with {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> listKeysWithResponseAsync(
@@ -1889,7 +1898,7 @@ private Mono> listKeysWithResponseAsync(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return namespace/Relay Connection String.
+ * @return namespace/Relay Connection String on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono listKeysAsync(
@@ -1934,7 +1943,7 @@ public AccessKeysInner listKeys(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return namespace/Relay Connection String.
+ * @return namespace/Relay Connection String along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public Response listKeysWithResponse(
@@ -1959,7 +1968,7 @@ public Response listKeysWithResponse(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return namespace/Relay Connection String.
+ * @return namespace/Relay Connection String along with {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> regenerateKeysWithResponseAsync(
@@ -2016,7 +2025,7 @@ private Mono> regenerateKeysWithResponseAsync(
parameters,
accept,
context))
- .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
/**
@@ -2031,7 +2040,7 @@ private Mono> regenerateKeysWithResponseAsync(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return namespace/Relay Connection String.
+ * @return namespace/Relay Connection String along with {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> regenerateKeysWithResponseAsync(
@@ -2100,7 +2109,7 @@ private Mono> regenerateKeysWithResponseAsync(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return namespace/Relay Connection String.
+ * @return namespace/Relay Connection String on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono regenerateKeysAsync(
@@ -2158,7 +2167,7 @@ public AccessKeysInner regenerateKeys(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return namespace/Relay Connection String.
+ * @return namespace/Relay Connection String along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public Response regenerateKeysWithResponse(
@@ -2180,7 +2189,8 @@ public Response regenerateKeysWithResponse(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the response of the list hybrid connection operation.
+ * @return the response of the list hybrid connection operation along with {@link PagedResponse} on successful
+ * completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> listByNamespaceNextSinglePageAsync(String nextLink) {
@@ -2205,7 +2215,7 @@ private Mono> listByNamespaceNextSinglePage
res.getValue().value(),
res.getValue().nextLink(),
null))
- .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
/**
@@ -2216,7 +2226,8 @@ private Mono> listByNamespaceNextSinglePage
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the response of the list hybrid connection operation.
+ * @return the response of the list hybrid connection operation along with {@link PagedResponse} on successful
+ * completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> listByNamespaceNextSinglePageAsync(
@@ -2252,7 +2263,8 @@ private Mono> listByNamespaceNextSinglePage
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the response from the list namespace operation.
+ * @return the response from the list namespace operation along with {@link PagedResponse} on successful completion
+ * of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> listAuthorizationRulesNextSinglePageAsync(String nextLink) {
@@ -2278,7 +2290,7 @@ private Mono> listAuthorizationRulesNextSi
res.getValue().value(),
res.getValue().nextLink(),
null))
- .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
/**
@@ -2289,7 +2301,8 @@ private Mono> listAuthorizationRulesNextSi
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the response from the list namespace operation.
+ * @return the response from the list namespace operation along with {@link PagedResponse} on successful completion
+ * of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> listAuthorizationRulesNextSinglePageAsync(
diff --git a/sdk/relay/azure-resourcemanager-relay/src/main/java/com/azure/resourcemanager/relay/implementation/HybridConnectionsImpl.java b/sdk/relay/azure-resourcemanager-relay/src/main/java/com/azure/resourcemanager/relay/implementation/HybridConnectionsImpl.java
index 673552041d26..3529d1e17ef2 100644
--- a/sdk/relay/azure-resourcemanager-relay/src/main/java/com/azure/resourcemanager/relay/implementation/HybridConnectionsImpl.java
+++ b/sdk/relay/azure-resourcemanager-relay/src/main/java/com/azure/resourcemanager/relay/implementation/HybridConnectionsImpl.java
@@ -9,7 +9,6 @@
import com.azure.core.http.rest.SimpleResponse;
import com.azure.core.util.Context;
import com.azure.core.util.logging.ClientLogger;
-import com.azure.resourcemanager.relay.RelayManager;
import com.azure.resourcemanager.relay.fluent.HybridConnectionsClient;
import com.azure.resourcemanager.relay.fluent.models.AccessKeysInner;
import com.azure.resourcemanager.relay.fluent.models.AuthorizationRuleInner;
@@ -19,16 +18,16 @@
import com.azure.resourcemanager.relay.models.HybridConnection;
import com.azure.resourcemanager.relay.models.HybridConnections;
import com.azure.resourcemanager.relay.models.RegenerateAccessKeyParameters;
-import com.fasterxml.jackson.annotation.JsonIgnore;
public final class HybridConnectionsImpl implements HybridConnections {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(HybridConnectionsImpl.class);
+ private static final ClientLogger LOGGER = new ClientLogger(HybridConnectionsImpl.class);
private final HybridConnectionsClient innerClient;
- private final RelayManager serviceManager;
+ private final com.azure.resourcemanager.relay.RelayManager serviceManager;
- public HybridConnectionsImpl(HybridConnectionsClient innerClient, RelayManager serviceManager) {
+ public HybridConnectionsImpl(
+ HybridConnectionsClient innerClient, com.azure.resourcemanager.relay.RelayManager serviceManager) {
this.innerClient = innerClient;
this.serviceManager = serviceManager;
}
@@ -36,14 +35,14 @@ public HybridConnectionsImpl(HybridConnectionsClient innerClient, RelayManager s
public PagedIterable listByNamespace(String resourceGroupName, String namespaceName) {
PagedIterable inner =
this.serviceClient().listByNamespace(resourceGroupName, namespaceName);
- return inner.mapPage(inner1 -> new HybridConnectionImpl(inner1, this.manager()));
+ return Utils.mapPage(inner, inner1 -> new HybridConnectionImpl(inner1, this.manager()));
}
public PagedIterable listByNamespace(
String resourceGroupName, String namespaceName, Context context) {
PagedIterable inner =
this.serviceClient().listByNamespace(resourceGroupName, namespaceName, context);
- return inner.mapPage(inner1 -> new HybridConnectionImpl(inner1, this.manager()));
+ return Utils.mapPage(inner, inner1 -> new HybridConnectionImpl(inner1, this.manager()));
}
public void delete(String resourceGroupName, String namespaceName, String hybridConnectionName) {
@@ -83,7 +82,7 @@ public PagedIterable listAuthorizationRules(
String resourceGroupName, String namespaceName, String hybridConnectionName) {
PagedIterable inner =
this.serviceClient().listAuthorizationRules(resourceGroupName, namespaceName, hybridConnectionName);
- return inner.mapPage(inner1 -> new AuthorizationRuleImpl(inner1, this.manager()));
+ return Utils.mapPage(inner, inner1 -> new AuthorizationRuleImpl(inner1, this.manager()));
}
public PagedIterable listAuthorizationRules(
@@ -92,7 +91,7 @@ public PagedIterable listAuthorizationRules(
this
.serviceClient()
.listAuthorizationRules(resourceGroupName, namespaceName, hybridConnectionName, context);
- return inner.mapPage(inner1 -> new AuthorizationRuleImpl(inner1, this.manager()));
+ return Utils.mapPage(inner, inner1 -> new AuthorizationRuleImpl(inner1, this.manager()));
}
public AuthorizationRule createOrUpdateAuthorizationRule(
@@ -269,7 +268,7 @@ public Response regenerateKeysWithResponse(
public HybridConnection getById(String id) {
String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
if (resourceGroupName == null) {
- throw logger
+ throw LOGGER
.logExceptionAsError(
new IllegalArgumentException(
String
@@ -277,14 +276,14 @@ public HybridConnection getById(String id) {
}
String namespaceName = Utils.getValueFromIdByName(id, "namespaces");
if (namespaceName == null) {
- throw logger
+ throw LOGGER
.logExceptionAsError(
new IllegalArgumentException(
String.format("The resource ID '%s' is not valid. Missing path segment 'namespaces'.", id)));
}
String hybridConnectionName = Utils.getValueFromIdByName(id, "hybridConnections");
if (hybridConnectionName == null) {
- throw logger
+ throw LOGGER
.logExceptionAsError(
new IllegalArgumentException(
String
@@ -297,7 +296,7 @@ public HybridConnection getById(String id) {
public Response getByIdWithResponse(String id, Context context) {
String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
if (resourceGroupName == null) {
- throw logger
+ throw LOGGER
.logExceptionAsError(
new IllegalArgumentException(
String
@@ -305,14 +304,14 @@ public Response getByIdWithResponse(String id, Context context
}
String namespaceName = Utils.getValueFromIdByName(id, "namespaces");
if (namespaceName == null) {
- throw logger
+ throw LOGGER
.logExceptionAsError(
new IllegalArgumentException(
String.format("The resource ID '%s' is not valid. Missing path segment 'namespaces'.", id)));
}
String hybridConnectionName = Utils.getValueFromIdByName(id, "hybridConnections");
if (hybridConnectionName == null) {
- throw logger
+ throw LOGGER
.logExceptionAsError(
new IllegalArgumentException(
String
@@ -325,7 +324,7 @@ public Response getByIdWithResponse(String id, Context context
public void deleteById(String id) {
String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
if (resourceGroupName == null) {
- throw logger
+ throw LOGGER
.logExceptionAsError(
new IllegalArgumentException(
String
@@ -333,27 +332,27 @@ public void deleteById(String id) {
}
String namespaceName = Utils.getValueFromIdByName(id, "namespaces");
if (namespaceName == null) {
- throw logger
+ throw LOGGER
.logExceptionAsError(
new IllegalArgumentException(
String.format("The resource ID '%s' is not valid. Missing path segment 'namespaces'.", id)));
}
String hybridConnectionName = Utils.getValueFromIdByName(id, "hybridConnections");
if (hybridConnectionName == null) {
- throw logger
+ throw LOGGER
.logExceptionAsError(
new IllegalArgumentException(
String
.format(
"The resource ID '%s' is not valid. Missing path segment 'hybridConnections'.", id)));
}
- this.deleteWithResponse(resourceGroupName, namespaceName, hybridConnectionName, Context.NONE).getValue();
+ this.deleteWithResponse(resourceGroupName, namespaceName, hybridConnectionName, Context.NONE);
}
public Response deleteByIdWithResponse(String id, Context context) {
String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
if (resourceGroupName == null) {
- throw logger
+ throw LOGGER
.logExceptionAsError(
new IllegalArgumentException(
String
@@ -361,14 +360,14 @@ public Response deleteByIdWithResponse(String id, Context context) {
}
String namespaceName = Utils.getValueFromIdByName(id, "namespaces");
if (namespaceName == null) {
- throw logger
+ throw LOGGER
.logExceptionAsError(
new IllegalArgumentException(
String.format("The resource ID '%s' is not valid. Missing path segment 'namespaces'.", id)));
}
String hybridConnectionName = Utils.getValueFromIdByName(id, "hybridConnections");
if (hybridConnectionName == null) {
- throw logger
+ throw LOGGER
.logExceptionAsError(
new IllegalArgumentException(
String
@@ -382,7 +381,7 @@ private HybridConnectionsClient serviceClient() {
return this.innerClient;
}
- private RelayManager manager() {
+ private com.azure.resourcemanager.relay.RelayManager manager() {
return this.serviceManager;
}
diff --git a/sdk/relay/azure-resourcemanager-relay/src/main/java/com/azure/resourcemanager/relay/implementation/NamespacesClientImpl.java b/sdk/relay/azure-resourcemanager-relay/src/main/java/com/azure/resourcemanager/relay/implementation/NamespacesClientImpl.java
index 7ca2d69efced..44a8bd74e834 100644
--- a/sdk/relay/azure-resourcemanager-relay/src/main/java/com/azure/resourcemanager/relay/implementation/NamespacesClientImpl.java
+++ b/sdk/relay/azure-resourcemanager-relay/src/main/java/com/azure/resourcemanager/relay/implementation/NamespacesClientImpl.java
@@ -31,7 +31,6 @@
import com.azure.core.management.polling.PollResult;
import com.azure.core.util.Context;
import com.azure.core.util.FluxUtil;
-import com.azure.core.util.logging.ClientLogger;
import com.azure.core.util.polling.PollerFlux;
import com.azure.core.util.polling.SyncPoller;
import com.azure.resourcemanager.relay.fluent.NamespacesClient;
@@ -50,8 +49,6 @@
/** An instance of this class provides access to all the operations defined in NamespacesClient. */
public final class NamespacesClientImpl implements NamespacesClient {
- private final ClientLogger logger = new ClientLogger(NamespacesClientImpl.class);
-
/** The proxy service used to perform REST calls. */
private final NamespacesService service;
@@ -308,7 +305,8 @@ Mono> listAuthorizationRulesNext(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return description of the check name availability request properties.
+ * @return description of the check name availability request properties along with {@link Response} on successful
+ * completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> checkNameAvailabilityWithResponseAsync(
@@ -342,7 +340,7 @@ private Mono> checkNameAvailabilityWi
parameters,
accept,
context))
- .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
/**
@@ -353,7 +351,8 @@ private Mono> checkNameAvailabilityWi
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return description of the check name availability request properties.
+ * @return description of the check name availability request properties along with {@link Response} on successful
+ * completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> checkNameAvailabilityWithResponseAsync(
@@ -394,7 +393,7 @@ private Mono> checkNameAvailabilityWi
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return description of the check name availability request properties.
+ * @return description of the check name availability request properties on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono checkNameAvailabilityAsync(CheckNameAvailability parameters) {
@@ -431,7 +430,7 @@ public CheckNameAvailabilityResultInner checkNameAvailability(CheckNameAvailabil
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return description of the check name availability request properties.
+ * @return description of the check name availability request properties along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public Response checkNameAvailabilityWithResponse(
@@ -444,7 +443,8 @@ public Response checkNameAvailabilityWithRespo
*
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the response from the list namespace operation.
+ * @return the response from the list namespace operation along with {@link PagedResponse} on successful completion
+ * of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> listSinglePageAsync() {
@@ -480,7 +480,7 @@ private Mono> listSinglePageAsync() {
res.getValue().value(),
res.getValue().nextLink(),
null))
- .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
/**
@@ -490,7 +490,8 @@ private Mono> listSinglePageAsync() {
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the response from the list namespace operation.
+ * @return the response from the list namespace operation along with {@link PagedResponse} on successful completion
+ * of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> listSinglePageAsync(Context context) {
@@ -531,7 +532,7 @@ private Mono> listSinglePageAsync(Context con
*
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the response from the list namespace operation.
+ * @return the response from the list namespace operation as paginated response with {@link PagedFlux}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
private PagedFlux listAsync() {
@@ -545,7 +546,7 @@ private PagedFlux listAsync() {
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the response from the list namespace operation.
+ * @return the response from the list namespace operation as paginated response with {@link PagedFlux}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
private PagedFlux listAsync(Context context) {
@@ -558,7 +559,7 @@ private PagedFlux listAsync(Context context) {
*
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the response from the list namespace operation.
+ * @return the response from the list namespace operation as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
public PagedIterable list() {
@@ -572,7 +573,7 @@ public PagedIterable list() {
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the response from the list namespace operation.
+ * @return the response from the list namespace operation as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
public PagedIterable list(Context context) {
@@ -586,7 +587,8 @@ public PagedIterable list(Context context) {
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the response from the list namespace operation.
+ * @return the response from the list namespace operation along with {@link PagedResponse} on successful completion
+ * of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName) {
@@ -627,7 +629,7 @@ private Mono> listByResourceGroupSinglePageAs
res.getValue().value(),
res.getValue().nextLink(),
null))
- .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
/**
@@ -638,7 +640,8 @@ private Mono> listByResourceGroupSinglePageAs
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the response from the list namespace operation.
+ * @return the response from the list namespace operation along with {@link PagedResponse} on successful completion
+ * of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> listByResourceGroupSinglePageAsync(
@@ -687,7 +690,7 @@ private Mono> listByResourceGroupSinglePageAs
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the response from the list namespace operation.
+ * @return the response from the list namespace operation as paginated response with {@link PagedFlux}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
private PagedFlux listByResourceGroupAsync(String resourceGroupName) {
@@ -704,7 +707,7 @@ private PagedFlux listByResourceGroupAsync(String resourceG
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the response from the list namespace operation.
+ * @return the response from the list namespace operation as paginated response with {@link PagedFlux}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) {
@@ -720,7 +723,7 @@ private PagedFlux listByResourceGroupAsync(String resourceG
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the response from the list namespace operation.
+ * @return the response from the list namespace operation as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
public PagedIterable listByResourceGroup(String resourceGroupName) {
@@ -735,7 +738,7 @@ public PagedIterable listByResourceGroup(String resourceGro
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the response from the list namespace operation.
+ * @return the response from the list namespace operation as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
public PagedIterable listByResourceGroup(String resourceGroupName, Context context) {
@@ -751,7 +754,7 @@ public PagedIterable listByResourceGroup(String resourceGro
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return description of a namespace resource.
+ * @return description of a namespace resource along with {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono>> createOrUpdateWithResponseAsync(
@@ -794,7 +797,7 @@ private Mono>> createOrUpdateWithResponseAsync(
parameters,
accept,
context))
- .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
/**
@@ -807,7 +810,7 @@ private Mono>> createOrUpdateWithResponseAsync(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return description of a namespace resource.
+ * @return description of a namespace resource along with {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono>> createOrUpdateWithResponseAsync(
@@ -859,9 +862,9 @@ private Mono>> createOrUpdateWithResponseAsync(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return description of a namespace resource.
+ * @return the {@link PollerFlux} for polling of description of a namespace resource.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
private PollerFlux, RelayNamespaceInner> beginCreateOrUpdateAsync(
String resourceGroupName, String namespaceName, RelayNamespaceInner parameters) {
Mono>> mono =
@@ -873,7 +876,7 @@ private PollerFlux, RelayNamespaceInner> beginCr
this.client.getHttpPipeline(),
RelayNamespaceInner.class,
RelayNamespaceInner.class,
- Context.NONE);
+ this.client.getContext());
}
/**
@@ -886,9 +889,9 @@ private PollerFlux, RelayNamespaceInner> beginCr
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return description of a namespace resource.
+ * @return the {@link PollerFlux} for polling of description of a namespace resource.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
private PollerFlux, RelayNamespaceInner> beginCreateOrUpdateAsync(
String resourceGroupName, String namespaceName, RelayNamespaceInner parameters, Context context) {
context = this.client.mergeContext(context);
@@ -909,9 +912,9 @@ private PollerFlux, RelayNamespaceInner> beginCr
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return description of a namespace resource.
+ * @return the {@link SyncPoller} for polling of description of a namespace resource.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
public SyncPoller, RelayNamespaceInner> beginCreateOrUpdate(
String resourceGroupName, String namespaceName, RelayNamespaceInner parameters) {
return beginCreateOrUpdateAsync(resourceGroupName, namespaceName, parameters).getSyncPoller();
@@ -927,9 +930,9 @@ public SyncPoller, RelayNamespaceInner> beginCre
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return description of a namespace resource.
+ * @return the {@link SyncPoller} for polling of description of a namespace resource.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
public SyncPoller, RelayNamespaceInner> beginCreateOrUpdate(
String resourceGroupName, String namespaceName, RelayNamespaceInner parameters, Context context) {
return beginCreateOrUpdateAsync(resourceGroupName, namespaceName, parameters, context).getSyncPoller();
@@ -944,7 +947,7 @@ public SyncPoller, RelayNamespaceInner> beginCre
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return description of a namespace resource.
+ * @return description of a namespace resource on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono createOrUpdateAsync(
@@ -964,7 +967,7 @@ private Mono createOrUpdateAsync(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return description of a namespace resource.
+ * @return description of a namespace resource on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono createOrUpdateAsync(
@@ -1017,7 +1020,7 @@ public RelayNamespaceInner createOrUpdate(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the completion.
+ * @return the {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono>> deleteWithResponseAsync(String resourceGroupName, String namespaceName) {
@@ -1053,7 +1056,7 @@ private Mono>> deleteWithResponseAsync(String resource
this.client.getSubscriptionId(),
accept,
context))
- .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
/**
@@ -1065,7 +1068,7 @@ private Mono