diff --git a/sdk/digitaltwins/azure-resourcemanager-digitaltwins/CHANGELOG.md b/sdk/digitaltwins/azure-resourcemanager-digitaltwins/CHANGELOG.md
index af87dd1c3163a..7aaf2fcfb1b01 100644
--- a/sdk/digitaltwins/azure-resourcemanager-digitaltwins/CHANGELOG.md
+++ b/sdk/digitaltwins/azure-resourcemanager-digitaltwins/CHANGELOG.md
@@ -1,7 +1,8 @@
# Release History
-## 1.0.0-beta.2 (Unreleased)
+## 1.0.0-beta.1 (2021-11-30)
+- Azure Resource Manager AzureDigitalTwins client library for Java. This package contains Microsoft Azure SDK for AzureDigitalTwins Management SDK. Azure Digital Twins Client for managing DigitalTwinsInstance. Package tag package-2020-12. 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 (2021-03-02)
diff --git a/sdk/digitaltwins/azure-resourcemanager-digitaltwins/README.md b/sdk/digitaltwins/azure-resourcemanager-digitaltwins/README.md
index 08f075b05d678..5a927f4377dac 100644
--- a/sdk/digitaltwins/azure-resourcemanager-digitaltwins/README.md
+++ b/sdk/digitaltwins/azure-resourcemanager-digitaltwins/README.md
@@ -32,7 +32,7 @@ Various documentation is available to help you get started
com.azure.resourcemanager
azure-resourcemanager-digitaltwins
- 1.0.0-beta.1
+ 1.0.0-beta.2
```
[//]: # ({x-version-update-end})
@@ -74,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/digitaltwins/azure-resourcemanager-digitaltwins/SAMPLE.md)
+
+
## Troubleshooting
## Next steps
diff --git a/sdk/digitaltwins/azure-resourcemanager-digitaltwins/SAMPLE.md b/sdk/digitaltwins/azure-resourcemanager-digitaltwins/SAMPLE.md
new file mode 100644
index 0000000000000..ea054ea4081b5
--- /dev/null
+++ b/sdk/digitaltwins/azure-resourcemanager-digitaltwins/SAMPLE.md
@@ -0,0 +1,673 @@
+# Code snippets and samples
+
+
+## DigitalTwins
+
+- [CheckNameAvailability](#digitaltwins_checknameavailability)
+- [CreateOrUpdate](#digitaltwins_createorupdate)
+- [Delete](#digitaltwins_delete)
+- [GetByResourceGroup](#digitaltwins_getbyresourcegroup)
+- [List](#digitaltwins_list)
+- [ListByResourceGroup](#digitaltwins_listbyresourcegroup)
+- [Update](#digitaltwins_update)
+
+## DigitalTwinsEndpoint
+
+- [CreateOrUpdate](#digitaltwinsendpoint_createorupdate)
+- [Delete](#digitaltwinsendpoint_delete)
+- [Get](#digitaltwinsendpoint_get)
+- [List](#digitaltwinsendpoint_list)
+
+## Operations
+
+- [List](#operations_list)
+
+## PrivateEndpointConnections
+
+- [CreateOrUpdate](#privateendpointconnections_createorupdate)
+- [Delete](#privateendpointconnections_delete)
+- [Get](#privateendpointconnections_get)
+- [List](#privateendpointconnections_list)
+
+## PrivateLinkResources
+
+- [Get](#privatelinkresources_get)
+- [List](#privatelinkresources_list)
+### DigitalTwins_CheckNameAvailability
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.digitaltwins.models.CheckNameRequest;
+
+/** Samples for DigitalTwins CheckNameAvailability. */
+public final class DigitalTwinsCheckNameAvailabilitySamples {
+ /*
+ * x-ms-original-file: specification/digitaltwins/resource-manager/Microsoft.DigitalTwins/stable/2020-12-01/examples/DigitalTwinsCheckNameAvailability_example.json
+ */
+ /**
+ * Sample code: Check name Availability.
+ *
+ * @param manager Entry point to AzureDigitalTwinsManager.
+ */
+ public static void checkNameAvailability(com.azure.resourcemanager.digitaltwins.AzureDigitalTwinsManager manager) {
+ manager
+ .digitalTwins()
+ .checkNameAvailabilityWithResponse(
+ "WestUS2", new CheckNameRequest().withName("myadtinstance"), Context.NONE);
+ }
+}
+```
+
+### DigitalTwins_CreateOrUpdate
+
+```java
+import com.azure.resourcemanager.digitaltwins.models.DigitalTwinsIdentity;
+import com.azure.resourcemanager.digitaltwins.models.DigitalTwinsIdentityType;
+import com.azure.resourcemanager.digitaltwins.models.PublicNetworkAccess;
+
+/** Samples for DigitalTwins CreateOrUpdate. */
+public final class DigitalTwinsCreateOrUpdateSamples {
+ /*
+ * x-ms-original-file: specification/digitaltwins/resource-manager/Microsoft.DigitalTwins/stable/2020-12-01/examples/DigitalTwinsPut_example.json
+ */
+ /**
+ * Sample code: Put a DigitalTwinsInstance resource.
+ *
+ * @param manager Entry point to AzureDigitalTwinsManager.
+ */
+ public static void putADigitalTwinsInstanceResource(
+ com.azure.resourcemanager.digitaltwins.AzureDigitalTwinsManager manager) {
+ manager
+ .digitalTwins()
+ .define("myDigitalTwinsService")
+ .withRegion("WestUS2")
+ .withExistingResourceGroup("resRg")
+ .create();
+ }
+
+ /*
+ * x-ms-original-file: specification/digitaltwins/resource-manager/Microsoft.DigitalTwins/stable/2020-12-01/examples/DigitalTwinsPut_WithPublicNetworkAccess.json
+ */
+ /**
+ * Sample code: Put a DigitalTwinsInstance resource with publicNetworkAccess property.
+ *
+ * @param manager Entry point to AzureDigitalTwinsManager.
+ */
+ public static void putADigitalTwinsInstanceResourceWithPublicNetworkAccessProperty(
+ com.azure.resourcemanager.digitaltwins.AzureDigitalTwinsManager manager) {
+ manager
+ .digitalTwins()
+ .define("myDigitalTwinsService")
+ .withRegion("WestUS2")
+ .withExistingResourceGroup("resRg")
+ .withPublicNetworkAccess(PublicNetworkAccess.ENABLED)
+ .create();
+ }
+
+ /*
+ * x-ms-original-file: specification/digitaltwins/resource-manager/Microsoft.DigitalTwins/stable/2020-12-01/examples/DigitalTwinsPut_WithIdentity_example.json
+ */
+ /**
+ * Sample code: Put a DigitalTwinsInstance resource with identity.
+ *
+ * @param manager Entry point to AzureDigitalTwinsManager.
+ */
+ public static void putADigitalTwinsInstanceResourceWithIdentity(
+ com.azure.resourcemanager.digitaltwins.AzureDigitalTwinsManager manager) {
+ manager
+ .digitalTwins()
+ .define("myDigitalTwinsService")
+ .withRegion("WestUS2")
+ .withExistingResourceGroup("resRg")
+ .withIdentity(new DigitalTwinsIdentity().withType(DigitalTwinsIdentityType.SYSTEM_ASSIGNED))
+ .create();
+ }
+}
+```
+
+### DigitalTwins_Delete
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for DigitalTwins Delete. */
+public final class DigitalTwinsDeleteSamples {
+ /*
+ * x-ms-original-file: specification/digitaltwins/resource-manager/Microsoft.DigitalTwins/stable/2020-12-01/examples/DigitalTwinsDelete_example.json
+ */
+ /**
+ * Sample code: Delete a DigitalTwinsInstance resource.
+ *
+ * @param manager Entry point to AzureDigitalTwinsManager.
+ */
+ public static void deleteADigitalTwinsInstanceResource(
+ com.azure.resourcemanager.digitaltwins.AzureDigitalTwinsManager manager) {
+ manager.digitalTwins().delete("resRg", "myDigitalTwinsService", Context.NONE);
+ }
+
+ /*
+ * x-ms-original-file: specification/digitaltwins/resource-manager/Microsoft.DigitalTwins/stable/2020-12-01/examples/DigitalTwinsDelete_WithIdentity_example.json
+ */
+ /**
+ * Sample code: Delete a DigitalTwinsInstance resource with identity.
+ *
+ * @param manager Entry point to AzureDigitalTwinsManager.
+ */
+ public static void deleteADigitalTwinsInstanceResourceWithIdentity(
+ com.azure.resourcemanager.digitaltwins.AzureDigitalTwinsManager manager) {
+ manager.digitalTwins().delete("resRg", "myDigitalTwinsService", Context.NONE);
+ }
+}
+```
+
+### DigitalTwins_GetByResourceGroup
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for DigitalTwins GetByResourceGroup. */
+public final class DigitalTwinsGetByResourceGroupSamples {
+ /*
+ * x-ms-original-file: specification/digitaltwins/resource-manager/Microsoft.DigitalTwins/stable/2020-12-01/examples/DigitalTwinsGet_WithIdentity_example.json
+ */
+ /**
+ * Sample code: Get a DigitalTwinsInstance resource with identity.
+ *
+ * @param manager Entry point to AzureDigitalTwinsManager.
+ */
+ public static void getADigitalTwinsInstanceResourceWithIdentity(
+ com.azure.resourcemanager.digitaltwins.AzureDigitalTwinsManager manager) {
+ manager.digitalTwins().getByResourceGroupWithResponse("resRg", "myDigitalTwinsService", Context.NONE);
+ }
+
+ /*
+ * x-ms-original-file: specification/digitaltwins/resource-manager/Microsoft.DigitalTwins/stable/2020-12-01/examples/DigitalTwinsGet_WithPrivateEndpointConnection_example.json
+ */
+ /**
+ * Sample code: Get a DigitalTwinsInstance resource with a private endpoint connection.
+ *
+ * @param manager Entry point to AzureDigitalTwinsManager.
+ */
+ public static void getADigitalTwinsInstanceResourceWithAPrivateEndpointConnection(
+ com.azure.resourcemanager.digitaltwins.AzureDigitalTwinsManager manager) {
+ manager.digitalTwins().getByResourceGroupWithResponse("resRg", "myDigitalTwinsService", Context.NONE);
+ }
+
+ /*
+ * x-ms-original-file: specification/digitaltwins/resource-manager/Microsoft.DigitalTwins/stable/2020-12-01/examples/DigitalTwinsGet_example.json
+ */
+ /**
+ * Sample code: Get a DigitalTwinsInstance resource.
+ *
+ * @param manager Entry point to AzureDigitalTwinsManager.
+ */
+ public static void getADigitalTwinsInstanceResource(
+ com.azure.resourcemanager.digitaltwins.AzureDigitalTwinsManager manager) {
+ manager.digitalTwins().getByResourceGroupWithResponse("resRg", "myDigitalTwinsService", Context.NONE);
+ }
+}
+```
+
+### DigitalTwins_List
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for DigitalTwins List. */
+public final class DigitalTwinsListSamples {
+ /*
+ * x-ms-original-file: specification/digitaltwins/resource-manager/Microsoft.DigitalTwins/stable/2020-12-01/examples/DigitalTwinsList_example.json
+ */
+ /**
+ * Sample code: Get DigitalTwinsInstance resources by subscription.
+ *
+ * @param manager Entry point to AzureDigitalTwinsManager.
+ */
+ public static void getDigitalTwinsInstanceResourcesBySubscription(
+ com.azure.resourcemanager.digitaltwins.AzureDigitalTwinsManager manager) {
+ manager.digitalTwins().list(Context.NONE);
+ }
+}
+```
+
+### DigitalTwins_ListByResourceGroup
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for DigitalTwins ListByResourceGroup. */
+public final class DigitalTwinsListByResourceGroupSamples {
+ /*
+ * x-ms-original-file: specification/digitaltwins/resource-manager/Microsoft.DigitalTwins/stable/2020-12-01/examples/DigitalTwinsListByResourceGroup_example.json
+ */
+ /**
+ * Sample code: Get DigitalTwinsInstance resources by resource group.
+ *
+ * @param manager Entry point to AzureDigitalTwinsManager.
+ */
+ public static void getDigitalTwinsInstanceResourcesByResourceGroup(
+ com.azure.resourcemanager.digitaltwins.AzureDigitalTwinsManager manager) {
+ manager.digitalTwins().listByResourceGroup("resRg", Context.NONE);
+ }
+}
+```
+
+### DigitalTwins_Update
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.digitaltwins.models.DigitalTwinsDescription;
+import com.azure.resourcemanager.digitaltwins.models.DigitalTwinsIdentity;
+import com.azure.resourcemanager.digitaltwins.models.DigitalTwinsIdentityType;
+import com.azure.resourcemanager.digitaltwins.models.DigitalTwinsPatchProperties;
+import com.azure.resourcemanager.digitaltwins.models.PublicNetworkAccess;
+import java.util.HashMap;
+import java.util.Map;
+
+/** Samples for DigitalTwins Update. */
+public final class DigitalTwinsUpdateSamples {
+ /*
+ * x-ms-original-file: specification/digitaltwins/resource-manager/Microsoft.DigitalTwins/stable/2020-12-01/examples/DigitalTwinsPatch_example.json
+ */
+ /**
+ * Sample code: Patch a DigitalTwinsInstance resource.
+ *
+ * @param manager Entry point to AzureDigitalTwinsManager.
+ */
+ public static void patchADigitalTwinsInstanceResource(
+ com.azure.resourcemanager.digitaltwins.AzureDigitalTwinsManager manager) {
+ DigitalTwinsDescription resource =
+ manager
+ .digitalTwins()
+ .getByResourceGroupWithResponse("resRg", "myDigitalTwinsService", Context.NONE)
+ .getValue();
+ resource.update().withTags(mapOf("purpose", "dev")).apply();
+ }
+
+ /*
+ * x-ms-original-file: specification/digitaltwins/resource-manager/Microsoft.DigitalTwins/stable/2020-12-01/examples/DigitalTwinsPatch_WithPublicNetworkAccess.json
+ */
+ /**
+ * Sample code: Patch a DigitalTwinsInstance resource with publicNetworkAccess property.
+ *
+ * @param manager Entry point to AzureDigitalTwinsManager.
+ */
+ public static void patchADigitalTwinsInstanceResourceWithPublicNetworkAccessProperty(
+ com.azure.resourcemanager.digitaltwins.AzureDigitalTwinsManager manager) {
+ DigitalTwinsDescription resource =
+ manager
+ .digitalTwins()
+ .getByResourceGroupWithResponse("resRg", "myDigitalTwinsService", Context.NONE)
+ .getValue();
+ resource
+ .update()
+ .withProperties(new DigitalTwinsPatchProperties().withPublicNetworkAccess(PublicNetworkAccess.DISABLED))
+ .apply();
+ }
+
+ /*
+ * x-ms-original-file: specification/digitaltwins/resource-manager/Microsoft.DigitalTwins/stable/2020-12-01/examples/DigitalTwinsPatch_WithIdentity_example.json
+ */
+ /**
+ * Sample code: Patch a DigitalTwinsInstance resource with identity.
+ *
+ * @param manager Entry point to AzureDigitalTwinsManager.
+ */
+ public static void patchADigitalTwinsInstanceResourceWithIdentity(
+ com.azure.resourcemanager.digitaltwins.AzureDigitalTwinsManager manager) {
+ DigitalTwinsDescription resource =
+ manager
+ .digitalTwins()
+ .getByResourceGroupWithResponse("resRg", "myDigitalTwinsService", Context.NONE)
+ .getValue();
+ resource.update().withIdentity(new DigitalTwinsIdentity().withType(DigitalTwinsIdentityType.NONE)).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;
+ }
+}
+```
+
+### DigitalTwinsEndpoint_CreateOrUpdate
+
+```java
+import com.azure.resourcemanager.digitaltwins.models.AuthenticationType;
+import com.azure.resourcemanager.digitaltwins.models.ServiceBus;
+
+/** Samples for DigitalTwinsEndpoint CreateOrUpdate. */
+public final class DigitalTwinsEndpointCreateOrUpdateSamples {
+ /*
+ * x-ms-original-file: specification/digitaltwins/resource-manager/Microsoft.DigitalTwins/stable/2020-12-01/examples/DigitalTwinsEndpointPut_example.json
+ */
+ /**
+ * Sample code: Put a DigitalTwinsInstance resource.
+ *
+ * @param manager Entry point to AzureDigitalTwinsManager.
+ */
+ public static void putADigitalTwinsInstanceResource(
+ com.azure.resourcemanager.digitaltwins.AzureDigitalTwinsManager manager) {
+ manager
+ .digitalTwinsEndpoints()
+ .define("myServiceBus")
+ .withExistingDigitalTwinsInstance("resRg", "myDigitalTwinsService")
+ .withProperties(
+ new ServiceBus()
+ .withAuthenticationType(AuthenticationType.KEY_BASED)
+ .withPrimaryConnectionString(
+ "Endpoint=sb://mysb.servicebus.windows.net/;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=xyzxyzoX4=;EntityPath=abcabc")
+ .withSecondaryConnectionString(
+ "Endpoint=sb://mysb.servicebus.windows.net/;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=xyzxyzoX4=;EntityPath=abcabc"))
+ .create();
+ }
+
+ /*
+ * x-ms-original-file: specification/digitaltwins/resource-manager/Microsoft.DigitalTwins/stable/2020-12-01/examples/DigitalTwinsEndpointPut_WithIdentity_example.json
+ */
+ /**
+ * Sample code: Put a DigitalTwinsInstance resource with identity.
+ *
+ * @param manager Entry point to AzureDigitalTwinsManager.
+ */
+ public static void putADigitalTwinsInstanceResourceWithIdentity(
+ com.azure.resourcemanager.digitaltwins.AzureDigitalTwinsManager manager) {
+ manager
+ .digitalTwinsEndpoints()
+ .define("myServiceBus")
+ .withExistingDigitalTwinsInstance("resRg", "myDigitalTwinsService")
+ .withProperties(
+ new ServiceBus()
+ .withAuthenticationType(AuthenticationType.IDENTITY_BASED)
+ .withEndpointUri("sb://mysb.servicebus.windows.net/")
+ .withEntityPath("mysbtopic"))
+ .create();
+ }
+}
+```
+
+### DigitalTwinsEndpoint_Delete
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for DigitalTwinsEndpoint Delete. */
+public final class DigitalTwinsEndpointDeleteSamples {
+ /*
+ * x-ms-original-file: specification/digitaltwins/resource-manager/Microsoft.DigitalTwins/stable/2020-12-01/examples/DigitalTwinsEndpointDelete_example.json
+ */
+ /**
+ * Sample code: Delete a DigitalTwinsInstance endpoint.
+ *
+ * @param manager Entry point to AzureDigitalTwinsManager.
+ */
+ public static void deleteADigitalTwinsInstanceEndpoint(
+ com.azure.resourcemanager.digitaltwins.AzureDigitalTwinsManager manager) {
+ manager.digitalTwinsEndpoints().delete("resRg", "myDigitalTwinsService", "myendpoint", Context.NONE);
+ }
+
+ /*
+ * x-ms-original-file: specification/digitaltwins/resource-manager/Microsoft.DigitalTwins/stable/2020-12-01/examples/DigitalTwinsEndpointDelete_WithIdentity_example.json
+ */
+ /**
+ * Sample code: Delete a DigitalTwinsInstance endpoint with identity.
+ *
+ * @param manager Entry point to AzureDigitalTwinsManager.
+ */
+ public static void deleteADigitalTwinsInstanceEndpointWithIdentity(
+ com.azure.resourcemanager.digitaltwins.AzureDigitalTwinsManager manager) {
+ manager.digitalTwinsEndpoints().delete("resRg", "myDigitalTwinsService", "myendpoint", Context.NONE);
+ }
+}
+```
+
+### DigitalTwinsEndpoint_Get
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for DigitalTwinsEndpoint Get. */
+public final class DigitalTwinsEndpointGetSamples {
+ /*
+ * x-ms-original-file: specification/digitaltwins/resource-manager/Microsoft.DigitalTwins/stable/2020-12-01/examples/DigitalTwinsEndpointGet_example.json
+ */
+ /**
+ * Sample code: Get a DigitalTwinsInstance endpoint.
+ *
+ * @param manager Entry point to AzureDigitalTwinsManager.
+ */
+ public static void getADigitalTwinsInstanceEndpoint(
+ com.azure.resourcemanager.digitaltwins.AzureDigitalTwinsManager manager) {
+ manager.digitalTwinsEndpoints().getWithResponse("resRg", "myDigitalTwinsService", "myServiceBus", Context.NONE);
+ }
+
+ /*
+ * x-ms-original-file: specification/digitaltwins/resource-manager/Microsoft.DigitalTwins/stable/2020-12-01/examples/DigitalTwinsEndpointGet_WithIdentity_example.json
+ */
+ /**
+ * Sample code: Get a DigitalTwinsInstance endpoint with identity.
+ *
+ * @param manager Entry point to AzureDigitalTwinsManager.
+ */
+ public static void getADigitalTwinsInstanceEndpointWithIdentity(
+ com.azure.resourcemanager.digitaltwins.AzureDigitalTwinsManager manager) {
+ manager.digitalTwinsEndpoints().getWithResponse("resRg", "myDigitalTwinsService", "myServiceBus", Context.NONE);
+ }
+}
+```
+
+### DigitalTwinsEndpoint_List
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for DigitalTwinsEndpoint List. */
+public final class DigitalTwinsEndpointListSamples {
+ /*
+ * x-ms-original-file: specification/digitaltwins/resource-manager/Microsoft.DigitalTwins/stable/2020-12-01/examples/DigitalTwinsEndpointsGet_example.json
+ */
+ /**
+ * Sample code: Get a DigitalTwinsInstance endpoints.
+ *
+ * @param manager Entry point to AzureDigitalTwinsManager.
+ */
+ public static void getADigitalTwinsInstanceEndpoints(
+ com.azure.resourcemanager.digitaltwins.AzureDigitalTwinsManager manager) {
+ manager.digitalTwinsEndpoints().list("resRg", "myDigitalTwinsService", Context.NONE);
+ }
+
+ /*
+ * x-ms-original-file: specification/digitaltwins/resource-manager/Microsoft.DigitalTwins/stable/2020-12-01/examples/DigitalTwinsEndpointsGet_WithIdentity_example.json
+ */
+ /**
+ * Sample code: Get a DigitalTwinsInstance endpoints with identity.
+ *
+ * @param manager Entry point to AzureDigitalTwinsManager.
+ */
+ public static void getADigitalTwinsInstanceEndpointsWithIdentity(
+ com.azure.resourcemanager.digitaltwins.AzureDigitalTwinsManager manager) {
+ manager.digitalTwinsEndpoints().list("resRg", "myDigitalTwinsService", Context.NONE);
+ }
+}
+```
+
+### Operations_List
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Operations List. */
+public final class OperationsListSamples {
+ /*
+ * x-ms-original-file: specification/digitaltwins/resource-manager/Microsoft.DigitalTwins/stable/2020-12-01/examples/DigitalTwinsOperationsList_example.json
+ */
+ /**
+ * Sample code: Get available operations.
+ *
+ * @param manager Entry point to AzureDigitalTwinsManager.
+ */
+ public static void getAvailableOperations(com.azure.resourcemanager.digitaltwins.AzureDigitalTwinsManager manager) {
+ manager.operations().list(Context.NONE);
+ }
+}
+```
+
+### PrivateEndpointConnections_CreateOrUpdate
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.digitaltwins.models.ConnectionPropertiesPrivateLinkServiceConnectionState;
+import com.azure.resourcemanager.digitaltwins.models.PrivateEndpointConnection;
+import com.azure.resourcemanager.digitaltwins.models.PrivateEndpointConnectionProperties;
+import com.azure.resourcemanager.digitaltwins.models.PrivateLinkServiceConnectionStatus;
+
+/** Samples for PrivateEndpointConnections CreateOrUpdate. */
+public final class PrivateEndpointConnectionsCreateOrUpdateSamples {
+ /*
+ * x-ms-original-file: specification/digitaltwins/resource-manager/Microsoft.DigitalTwins/stable/2020-12-01/examples/PrivateEndpointConnectionPut_example.json
+ */
+ /**
+ * Sample code: Update the status of a private endpoint connection with the given name.
+ *
+ * @param manager Entry point to AzureDigitalTwinsManager.
+ */
+ public static void updateTheStatusOfAPrivateEndpointConnectionWithTheGivenName(
+ com.azure.resourcemanager.digitaltwins.AzureDigitalTwinsManager manager) {
+ PrivateEndpointConnection resource =
+ manager
+ .privateEndpointConnections()
+ .getWithResponse("resRg", "myDigitalTwinsService", "myPrivateConnection", Context.NONE)
+ .getValue();
+ resource
+ .update()
+ .withProperties(
+ new PrivateEndpointConnectionProperties()
+ .withPrivateLinkServiceConnectionState(
+ new ConnectionPropertiesPrivateLinkServiceConnectionState()
+ .withStatus(PrivateLinkServiceConnectionStatus.APPROVED)
+ .withDescription("Approved by johndoe@company.com.")))
+ .apply();
+ }
+}
+```
+
+### PrivateEndpointConnections_Delete
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for PrivateEndpointConnections Delete. */
+public final class PrivateEndpointConnectionsDeleteSamples {
+ /*
+ * x-ms-original-file: specification/digitaltwins/resource-manager/Microsoft.DigitalTwins/stable/2020-12-01/examples/PrivateEndpointConnectionDelete_example.json
+ */
+ /**
+ * Sample code: Delete private endpoint connection with the specified name.
+ *
+ * @param manager Entry point to AzureDigitalTwinsManager.
+ */
+ public static void deletePrivateEndpointConnectionWithTheSpecifiedName(
+ com.azure.resourcemanager.digitaltwins.AzureDigitalTwinsManager manager) {
+ manager
+ .privateEndpointConnections()
+ .delete("resRg", "myDigitalTwinsService", "myPrivateConnection", Context.NONE);
+ }
+}
+```
+
+### PrivateEndpointConnections_Get
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for PrivateEndpointConnections Get. */
+public final class PrivateEndpointConnectionsGetSamples {
+ /*
+ * x-ms-original-file: specification/digitaltwins/resource-manager/Microsoft.DigitalTwins/stable/2020-12-01/examples/PrivateEndpointConnectionByConnectionName_example.json
+ */
+ /**
+ * Sample code: Get private endpoint connection properties for the given private endpoint.
+ *
+ * @param manager Entry point to AzureDigitalTwinsManager.
+ */
+ public static void getPrivateEndpointConnectionPropertiesForTheGivenPrivateEndpoint(
+ com.azure.resourcemanager.digitaltwins.AzureDigitalTwinsManager manager) {
+ manager
+ .privateEndpointConnections()
+ .getWithResponse("resRg", "myDigitalTwinsService", "myPrivateConnection", Context.NONE);
+ }
+}
+```
+
+### PrivateEndpointConnections_List
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for PrivateEndpointConnections List. */
+public final class PrivateEndpointConnectionsListSamples {
+ /*
+ * x-ms-original-file: specification/digitaltwins/resource-manager/Microsoft.DigitalTwins/stable/2020-12-01/examples/PrivateEndpointConnectionsList_example.json
+ */
+ /**
+ * Sample code: List private endpoint connection properties.
+ *
+ * @param manager Entry point to AzureDigitalTwinsManager.
+ */
+ public static void listPrivateEndpointConnectionProperties(
+ com.azure.resourcemanager.digitaltwins.AzureDigitalTwinsManager manager) {
+ manager.privateEndpointConnections().listWithResponse("resRg", "myDigitalTwinsService", Context.NONE);
+ }
+}
+```
+
+### PrivateLinkResources_Get
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for PrivateLinkResources Get. */
+public final class PrivateLinkResourcesGetSamples {
+ /*
+ * x-ms-original-file: specification/digitaltwins/resource-manager/Microsoft.DigitalTwins/stable/2020-12-01/examples/PrivateLinkResourcesByGroupId_example.json
+ */
+ /**
+ * Sample code: Get the specified private link resource for the given Digital Twin.
+ *
+ * @param manager Entry point to AzureDigitalTwinsManager.
+ */
+ public static void getTheSpecifiedPrivateLinkResourceForTheGivenDigitalTwin(
+ com.azure.resourcemanager.digitaltwins.AzureDigitalTwinsManager manager) {
+ manager.privateLinkResources().getWithResponse("resRg", "myDigitalTwinsService", "subResource", Context.NONE);
+ }
+}
+```
+
+### PrivateLinkResources_List
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for PrivateLinkResources List. */
+public final class PrivateLinkResourcesListSamples {
+ /*
+ * x-ms-original-file: specification/digitaltwins/resource-manager/Microsoft.DigitalTwins/stable/2020-12-01/examples/PrivateLinkResourcesList_example.json
+ */
+ /**
+ * Sample code: List private link resources for given Digital Twin.
+ *
+ * @param manager Entry point to AzureDigitalTwinsManager.
+ */
+ public static void listPrivateLinkResourcesForGivenDigitalTwin(
+ com.azure.resourcemanager.digitaltwins.AzureDigitalTwinsManager manager) {
+ manager.privateLinkResources().listWithResponse("resRg", "myDigitalTwinsService", Context.NONE);
+ }
+}
+```
+
diff --git a/sdk/digitaltwins/azure-resourcemanager-digitaltwins/pom.xml b/sdk/digitaltwins/azure-resourcemanager-digitaltwins/pom.xml
index d67f946370fe5..c67095f72023e 100644
--- a/sdk/digitaltwins/azure-resourcemanager-digitaltwins/pom.xml
+++ b/sdk/digitaltwins/azure-resourcemanager-digitaltwins/pom.xml
@@ -1,85 +1,105 @@
- 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-digitaltwins
- 1.0.0-beta.2
- jar
+ com.azure.resourcemanager
+ azure-resourcemanager-digitaltwins
+ 1.0.0-beta.2
+ jar
- Microsoft Azure SDK for AzureDigitalTwins Management
- This package contains Microsoft Azure SDK for AzureDigitalTwins Management SDK. Azure Digital Twins Client for managing DigitalTwinsInstance. Package tag package-2020-12. 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 AzureDigitalTwins Management
+ This package contains Microsoft Azure SDK for AzureDigitalTwins Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Azure Digital Twins Client for managing DigitalTwinsInstance. Package tag package-2020-12.
+ 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
+
+ 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
false
- false
-
-
-
-
-
- com.azure
- azure-core
- 1.23.0
-
-
- com.azure
- azure-core-management
- 1.4.3
-
-
- com.azure
- azure-identity
- 1.4.2
- test
-
-
- com.azure.resourcemanager
- azure-resourcemanager-resources
- 2.10.0
- test
-
-
- com.azure
- azure-core-test
- 1.7.4
- test
-
-
- org.slf4j
- slf4j-simple
- 1.7.32
- test
-
-
+
+
+
+ com.azure
+ azure-core
+ 1.23.0
+
+
+ com.azure
+ azure-core-management
+ 1.4.3
+
+
+ com.azure
+ azure-identity
+ 1.4.2
+ test
+
+
+ com.azure.resourcemanager
+ azure-resourcemanager-resources
+ 2.10.0
+ test
+
+
+ com.azure
+ azure-core-test
+ 1.7.4
+ test
+
+
+ org.slf4j
+ slf4j-simple
+ 1.7.32
+ test
+
+
+
+
+
+ org.revapi
+ revapi-maven-plugin
+ 0.11.2
+
+
+
+ -
+
java.method.addedToInterface
+
+ -
+ true
+
.*
+ com\.azure\.resourcemanager(\.[^.]+)+\.fluent(\.[^.]+)*
+
+
+
+
+
+
+
diff --git a/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/main/java/com/azure/resourcemanager/digitaltwins/AzureDigitalTwinsManager.java b/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/main/java/com/azure/resourcemanager/digitaltwins/AzureDigitalTwinsManager.java
index 97d2461043489..80f413270d1a0 100644
--- a/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/main/java/com/azure/resourcemanager/digitaltwins/AzureDigitalTwinsManager.java
+++ b/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/main/java/com/azure/resourcemanager/digitaltwins/AzureDigitalTwinsManager.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;
@@ -37,6 +38,7 @@
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;
+import java.util.stream.Collectors;
/** Entry point to AzureDigitalTwinsManager. Azure Digital Twins Client for managing DigitalTwinsInstance. */
public final class AzureDigitalTwinsManager {
@@ -93,6 +95,7 @@ public static final class Configurable {
private HttpClient httpClient;
private HttpLogOptions httpLogOptions;
private final List policies = new ArrayList<>();
+ private final List scopes = new ArrayList<>();
private RetryPolicy retryPolicy;
private Duration defaultPollInterval;
@@ -132,6 +135,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.
*
@@ -188,19 +202,33 @@ public AzureDigitalTwinsManager authenticate(TokenCredential credential, AzurePr
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(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/digitaltwins/azure-resourcemanager-digitaltwins/src/main/java/com/azure/resourcemanager/digitaltwins/fluent/DigitalTwinsClient.java b/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/main/java/com/azure/resourcemanager/digitaltwins/fluent/DigitalTwinsClient.java
index a140b4d27b1a7..bbae548f11fe0 100644
--- a/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/main/java/com/azure/resourcemanager/digitaltwins/fluent/DigitalTwinsClient.java
+++ b/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/main/java/com/azure/resourcemanager/digitaltwins/fluent/DigitalTwinsClient.java
@@ -59,7 +59,7 @@ Response getByResourceGroupWithResponse(
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the description of the DigitalTwins service.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, DigitalTwinsDescriptionInner> beginCreateOrUpdate(
String resourceGroupName, String resourceName, DigitalTwinsDescriptionInner digitalTwinsCreate);
@@ -77,7 +77,7 @@ SyncPoller, DigitalTwinsDescriptionInne
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the description of the DigitalTwins service.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, DigitalTwinsDescriptionInner> beginCreateOrUpdate(
String resourceGroupName,
String resourceName,
@@ -133,7 +133,7 @@ DigitalTwinsDescriptionInner createOrUpdate(
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the description of the DigitalTwins service.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, DigitalTwinsDescriptionInner> beginUpdate(
String resourceGroupName, String resourceName, DigitalTwinsPatchDescription digitalTwinsPatchDescription);
@@ -149,7 +149,7 @@ SyncPoller, DigitalTwinsDescriptionInne
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the description of the DigitalTwins service.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, DigitalTwinsDescriptionInner> beginUpdate(
String resourceGroupName,
String resourceName,
@@ -200,7 +200,7 @@ DigitalTwinsDescriptionInner update(
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the description of the DigitalTwins service.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, DigitalTwinsDescriptionInner> beginDelete(
String resourceGroupName, String resourceName);
@@ -215,7 +215,7 @@ SyncPoller, DigitalTwinsDescriptionInne
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the description of the DigitalTwins service.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, DigitalTwinsDescriptionInner> beginDelete(
String resourceGroupName, String resourceName, Context context);
diff --git a/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/main/java/com/azure/resourcemanager/digitaltwins/fluent/DigitalTwinsEndpointsClient.java b/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/main/java/com/azure/resourcemanager/digitaltwins/fluent/DigitalTwinsEndpointsClient.java
index 82562c1533530..37582c768f835 100644
--- a/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/main/java/com/azure/resourcemanager/digitaltwins/fluent/DigitalTwinsEndpointsClient.java
+++ b/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/main/java/com/azure/resourcemanager/digitaltwins/fluent/DigitalTwinsEndpointsClient.java
@@ -85,7 +85,7 @@ Response getWithResponse(
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return digitalTwinsInstance endpoint resource.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, DigitalTwinsEndpointResourceInner> beginCreateOrUpdate(
String resourceGroupName,
String resourceName,
@@ -105,7 +105,7 @@ SyncPoller, DigitalTwinsEndpointRe
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return digitalTwinsInstance endpoint resource.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, DigitalTwinsEndpointResourceInner> beginCreateOrUpdate(
String resourceGroupName,
String resourceName,
@@ -164,7 +164,7 @@ DigitalTwinsEndpointResourceInner createOrUpdate(
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return digitalTwinsInstance endpoint resource.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, DigitalTwinsEndpointResourceInner> beginDelete(
String resourceGroupName, String resourceName, String endpointName);
@@ -180,7 +180,7 @@ SyncPoller, DigitalTwinsEndpointRe
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return digitalTwinsInstance endpoint resource.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, DigitalTwinsEndpointResourceInner> beginDelete(
String resourceGroupName, String resourceName, String endpointName, Context context);
diff --git a/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/main/java/com/azure/resourcemanager/digitaltwins/fluent/PrivateEndpointConnectionsClient.java b/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/main/java/com/azure/resourcemanager/digitaltwins/fluent/PrivateEndpointConnectionsClient.java
index a64b17e56a4a7..db8b31d060d5d 100644
--- a/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/main/java/com/azure/resourcemanager/digitaltwins/fluent/PrivateEndpointConnectionsClient.java
+++ b/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/main/java/com/azure/resourcemanager/digitaltwins/fluent/PrivateEndpointConnectionsClient.java
@@ -85,7 +85,7 @@ Response getWithResponse(
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the completion.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, Void> beginDelete(
String resourceGroupName, String resourceName, String privateEndpointConnectionName);
@@ -101,7 +101,7 @@ SyncPoller, Void> beginDelete(
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the completion.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, Void> beginDelete(
String resourceGroupName, String resourceName, String privateEndpointConnectionName, Context context);
@@ -144,7 +144,7 @@ SyncPoller, Void> beginDelete(
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the private endpoint connection of a Digital Twin.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, PrivateEndpointConnectionInner> beginCreateOrUpdate(
String resourceGroupName,
String resourceName,
@@ -164,7 +164,7 @@ SyncPoller, PrivateEndpointConnection
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the private endpoint connection of a Digital Twin.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, PrivateEndpointConnectionInner> beginCreateOrUpdate(
String resourceGroupName,
String resourceName,
diff --git a/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/main/java/com/azure/resourcemanager/digitaltwins/fluent/models/DigitalTwinsDescriptionInner.java b/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/main/java/com/azure/resourcemanager/digitaltwins/fluent/models/DigitalTwinsDescriptionInner.java
index ca6e348287f76..1e652c6615fd2 100644
--- a/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/main/java/com/azure/resourcemanager/digitaltwins/fluent/models/DigitalTwinsDescriptionInner.java
+++ b/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/main/java/com/azure/resourcemanager/digitaltwins/fluent/models/DigitalTwinsDescriptionInner.java
@@ -5,7 +5,6 @@
package com.azure.resourcemanager.digitaltwins.fluent.models;
import com.azure.core.annotation.Fluent;
-import com.azure.core.annotation.JsonFlatten;
import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.digitaltwins.models.DigitalTwinsIdentity;
import com.azure.resourcemanager.digitaltwins.models.DigitalTwinsResource;
@@ -18,46 +17,45 @@
import java.util.Map;
/** The description of the DigitalTwins service. */
-@JsonFlatten
@Fluent
-public class DigitalTwinsDescriptionInner extends DigitalTwinsResource {
+public final class DigitalTwinsDescriptionInner extends DigitalTwinsResource {
@JsonIgnore private final ClientLogger logger = new ClientLogger(DigitalTwinsDescriptionInner.class);
/*
- * Time when DigitalTwinsInstance was created.
+ * DigitalTwins instance properties.
*/
- @JsonProperty(value = "properties.createdTime", access = JsonProperty.Access.WRITE_ONLY)
- private OffsetDateTime createdTime;
+ @JsonProperty(value = "properties")
+ private DigitalTwinsProperties innerProperties;
- /*
- * Time when DigitalTwinsInstance was updated.
- */
- @JsonProperty(value = "properties.lastUpdatedTime", access = JsonProperty.Access.WRITE_ONLY)
- private OffsetDateTime lastUpdatedTime;
-
- /*
- * The provisioning state.
+ /**
+ * Get the innerProperties property: DigitalTwins instance properties.
+ *
+ * @return the innerProperties value.
*/
- @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY)
- private ProvisioningState provisioningState;
+ private DigitalTwinsProperties innerProperties() {
+ return this.innerProperties;
+ }
- /*
- * Api endpoint to work with DigitalTwinsInstance.
- */
- @JsonProperty(value = "properties.hostName", access = JsonProperty.Access.WRITE_ONLY)
- private String hostname;
+ /** {@inheritDoc} */
+ @Override
+ public DigitalTwinsDescriptionInner withIdentity(DigitalTwinsIdentity identity) {
+ super.withIdentity(identity);
+ return this;
+ }
- /*
- * The privateEndpointConnections property.
- */
- @JsonProperty(value = "properties.privateEndpointConnections")
- private List privateEndpointConnections;
+ /** {@inheritDoc} */
+ @Override
+ public DigitalTwinsDescriptionInner withLocation(String location) {
+ super.withLocation(location);
+ return this;
+ }
- /*
- * Public network access for the DigitalTwinsInstance.
- */
- @JsonProperty(value = "properties.publicNetworkAccess")
- private PublicNetworkAccess publicNetworkAccess;
+ /** {@inheritDoc} */
+ @Override
+ public DigitalTwinsDescriptionInner withTags(Map tags) {
+ super.withTags(tags);
+ return this;
+ }
/**
* Get the createdTime property: Time when DigitalTwinsInstance was created.
@@ -65,7 +63,7 @@ public class DigitalTwinsDescriptionInner extends DigitalTwinsResource {
* @return the createdTime value.
*/
public OffsetDateTime createdTime() {
- return this.createdTime;
+ return this.innerProperties() == null ? null : this.innerProperties().createdTime();
}
/**
@@ -74,7 +72,7 @@ public OffsetDateTime createdTime() {
* @return the lastUpdatedTime value.
*/
public OffsetDateTime lastUpdatedTime() {
- return this.lastUpdatedTime;
+ return this.innerProperties() == null ? null : this.innerProperties().lastUpdatedTime();
}
/**
@@ -83,7 +81,7 @@ public OffsetDateTime lastUpdatedTime() {
* @return the provisioningState value.
*/
public ProvisioningState provisioningState() {
- return this.provisioningState;
+ return this.innerProperties() == null ? null : this.innerProperties().provisioningState();
}
/**
@@ -92,7 +90,7 @@ public ProvisioningState provisioningState() {
* @return the hostname value.
*/
public String hostname() {
- return this.hostname;
+ return this.innerProperties() == null ? null : this.innerProperties().hostname();
}
/**
@@ -101,7 +99,7 @@ public String hostname() {
* @return the privateEndpointConnections value.
*/
public List privateEndpointConnections() {
- return this.privateEndpointConnections;
+ return this.innerProperties() == null ? null : this.innerProperties().privateEndpointConnections();
}
/**
@@ -112,7 +110,10 @@ public List privateEndpointConnections() {
*/
public DigitalTwinsDescriptionInner withPrivateEndpointConnections(
List privateEndpointConnections) {
- this.privateEndpointConnections = privateEndpointConnections;
+ if (this.innerProperties() == null) {
+ this.innerProperties = new DigitalTwinsProperties();
+ }
+ this.innerProperties().withPrivateEndpointConnections(privateEndpointConnections);
return this;
}
@@ -122,7 +123,7 @@ public DigitalTwinsDescriptionInner withPrivateEndpointConnections(
* @return the publicNetworkAccess value.
*/
public PublicNetworkAccess publicNetworkAccess() {
- return this.publicNetworkAccess;
+ return this.innerProperties() == null ? null : this.innerProperties().publicNetworkAccess();
}
/**
@@ -132,28 +133,10 @@ public PublicNetworkAccess publicNetworkAccess() {
* @return the DigitalTwinsDescriptionInner object itself.
*/
public DigitalTwinsDescriptionInner withPublicNetworkAccess(PublicNetworkAccess publicNetworkAccess) {
- this.publicNetworkAccess = publicNetworkAccess;
- return this;
- }
-
- /** {@inheritDoc} */
- @Override
- public DigitalTwinsDescriptionInner withIdentity(DigitalTwinsIdentity identity) {
- super.withIdentity(identity);
- return this;
- }
-
- /** {@inheritDoc} */
- @Override
- public DigitalTwinsDescriptionInner withLocation(String location) {
- super.withLocation(location);
- return this;
- }
-
- /** {@inheritDoc} */
- @Override
- public DigitalTwinsDescriptionInner withTags(Map tags) {
- super.withTags(tags);
+ if (this.innerProperties() == null) {
+ this.innerProperties = new DigitalTwinsProperties();
+ }
+ this.innerProperties().withPublicNetworkAccess(publicNetworkAccess);
return this;
}
@@ -165,8 +148,8 @@ public DigitalTwinsDescriptionInner withTags(Map tags) {
@Override
public void validate() {
super.validate();
- if (privateEndpointConnections() != null) {
- privateEndpointConnections().forEach(e -> e.validate());
+ if (innerProperties() != null) {
+ innerProperties().validate();
}
}
}
diff --git a/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/main/java/com/azure/resourcemanager/digitaltwins/fluent/models/DigitalTwinsProperties.java b/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/main/java/com/azure/resourcemanager/digitaltwins/fluent/models/DigitalTwinsProperties.java
new file mode 100644
index 0000000000000..b99b4b6f29d9f
--- /dev/null
+++ b/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/main/java/com/azure/resourcemanager/digitaltwins/fluent/models/DigitalTwinsProperties.java
@@ -0,0 +1,144 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.digitaltwins.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.digitaltwins.models.ProvisioningState;
+import com.azure.resourcemanager.digitaltwins.models.PublicNetworkAccess;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.time.OffsetDateTime;
+import java.util.List;
+
+/** The properties of a DigitalTwinsInstance. */
+@Fluent
+public final class DigitalTwinsProperties {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(DigitalTwinsProperties.class);
+
+ /*
+ * Time when DigitalTwinsInstance was created.
+ */
+ @JsonProperty(value = "createdTime", access = JsonProperty.Access.WRITE_ONLY)
+ private OffsetDateTime createdTime;
+
+ /*
+ * Time when DigitalTwinsInstance was updated.
+ */
+ @JsonProperty(value = "lastUpdatedTime", access = JsonProperty.Access.WRITE_ONLY)
+ private OffsetDateTime lastUpdatedTime;
+
+ /*
+ * The provisioning state.
+ */
+ @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY)
+ private ProvisioningState provisioningState;
+
+ /*
+ * Api endpoint to work with DigitalTwinsInstance.
+ */
+ @JsonProperty(value = "hostName", access = JsonProperty.Access.WRITE_ONLY)
+ private String hostname;
+
+ /*
+ * The privateEndpointConnections property.
+ */
+ @JsonProperty(value = "privateEndpointConnections")
+ private List privateEndpointConnections;
+
+ /*
+ * Public network access for the DigitalTwinsInstance.
+ */
+ @JsonProperty(value = "publicNetworkAccess")
+ private PublicNetworkAccess publicNetworkAccess;
+
+ /**
+ * Get the createdTime property: Time when DigitalTwinsInstance was created.
+ *
+ * @return the createdTime value.
+ */
+ public OffsetDateTime createdTime() {
+ return this.createdTime;
+ }
+
+ /**
+ * Get the lastUpdatedTime property: Time when DigitalTwinsInstance was updated.
+ *
+ * @return the lastUpdatedTime value.
+ */
+ public OffsetDateTime lastUpdatedTime() {
+ return this.lastUpdatedTime;
+ }
+
+ /**
+ * Get the provisioningState property: The provisioning state.
+ *
+ * @return the provisioningState value.
+ */
+ public ProvisioningState provisioningState() {
+ return this.provisioningState;
+ }
+
+ /**
+ * Get the hostname property: Api endpoint to work with DigitalTwinsInstance.
+ *
+ * @return the hostname value.
+ */
+ public String hostname() {
+ return this.hostname;
+ }
+
+ /**
+ * Get the privateEndpointConnections property: The privateEndpointConnections property.
+ *
+ * @return the privateEndpointConnections value.
+ */
+ public List privateEndpointConnections() {
+ return this.privateEndpointConnections;
+ }
+
+ /**
+ * Set the privateEndpointConnections property: The privateEndpointConnections property.
+ *
+ * @param privateEndpointConnections the privateEndpointConnections value to set.
+ * @return the DigitalTwinsProperties object itself.
+ */
+ public DigitalTwinsProperties withPrivateEndpointConnections(
+ List privateEndpointConnections) {
+ this.privateEndpointConnections = privateEndpointConnections;
+ return this;
+ }
+
+ /**
+ * Get the publicNetworkAccess property: Public network access for the DigitalTwinsInstance.
+ *
+ * @return the publicNetworkAccess value.
+ */
+ public PublicNetworkAccess publicNetworkAccess() {
+ return this.publicNetworkAccess;
+ }
+
+ /**
+ * Set the publicNetworkAccess property: Public network access for the DigitalTwinsInstance.
+ *
+ * @param publicNetworkAccess the publicNetworkAccess value to set.
+ * @return the DigitalTwinsProperties object itself.
+ */
+ public DigitalTwinsProperties withPublicNetworkAccess(PublicNetworkAccess publicNetworkAccess) {
+ this.publicNetworkAccess = publicNetworkAccess;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (privateEndpointConnections() != null) {
+ privateEndpointConnections().forEach(e -> e.validate());
+ }
+ }
+}
diff --git a/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/main/java/com/azure/resourcemanager/digitaltwins/fluent/models/GroupIdInformationInner.java b/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/main/java/com/azure/resourcemanager/digitaltwins/fluent/models/GroupIdInformationInner.java
index 6db04ec52cba9..b14688b3abaf0 100644
--- a/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/main/java/com/azure/resourcemanager/digitaltwins/fluent/models/GroupIdInformationInner.java
+++ b/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/main/java/com/azure/resourcemanager/digitaltwins/fluent/models/GroupIdInformationInner.java
@@ -16,7 +16,7 @@ public final class GroupIdInformationInner {
@JsonIgnore private final ClientLogger logger = new ClientLogger(GroupIdInformationInner.class);
/*
- * The properties for a group information object.
+ * The properties property.
*/
@JsonProperty(value = "properties", required = true)
private GroupIdInformationProperties properties;
@@ -40,7 +40,7 @@ public final class GroupIdInformationInner {
private String type;
/**
- * Get the properties property: The properties for a group information object.
+ * Get the properties property: The properties property.
*
* @return the properties value.
*/
@@ -49,7 +49,7 @@ public GroupIdInformationProperties properties() {
}
/**
- * Set the properties property: The properties for a group information object.
+ * Set the properties property: The properties property.
*
* @param properties the properties value to set.
* @return the GroupIdInformationInner object itself.
diff --git a/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/main/java/com/azure/resourcemanager/digitaltwins/fluent/models/PrivateEndpointConnectionInner.java b/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/main/java/com/azure/resourcemanager/digitaltwins/fluent/models/PrivateEndpointConnectionInner.java
index 4f634cdc13419..af89a37db1209 100644
--- a/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/main/java/com/azure/resourcemanager/digitaltwins/fluent/models/PrivateEndpointConnectionInner.java
+++ b/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/main/java/com/azure/resourcemanager/digitaltwins/fluent/models/PrivateEndpointConnectionInner.java
@@ -7,7 +7,7 @@
import com.azure.core.annotation.Fluent;
import com.azure.core.management.ProxyResource;
import com.azure.core.util.logging.ClientLogger;
-import com.azure.resourcemanager.digitaltwins.models.ConnectionProperties;
+import com.azure.resourcemanager.digitaltwins.models.PrivateEndpointConnectionProperties;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
@@ -17,27 +17,27 @@ public final class PrivateEndpointConnectionInner extends ProxyResource {
@JsonIgnore private final ClientLogger logger = new ClientLogger(PrivateEndpointConnectionInner.class);
/*
- * The properties of a private endpoint connection.
+ * The properties property.
*/
@JsonProperty(value = "properties", required = true)
- private ConnectionProperties properties;
+ private PrivateEndpointConnectionProperties properties;
/**
- * Get the properties property: The properties of a private endpoint connection.
+ * Get the properties property: The properties property.
*
* @return the properties value.
*/
- public ConnectionProperties properties() {
+ public PrivateEndpointConnectionProperties properties() {
return this.properties;
}
/**
- * Set the properties property: The properties of a private endpoint connection.
+ * Set the properties property: The properties property.
*
* @param properties the properties value to set.
* @return the PrivateEndpointConnectionInner object itself.
*/
- public PrivateEndpointConnectionInner withProperties(ConnectionProperties properties) {
+ public PrivateEndpointConnectionInner withProperties(PrivateEndpointConnectionProperties properties) {
this.properties = properties;
return this;
}
diff --git a/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/main/java/com/azure/resourcemanager/digitaltwins/implementation/CheckNameResultImpl.java b/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/main/java/com/azure/resourcemanager/digitaltwins/implementation/CheckNameResultImpl.java
index f353ff6c4c552..4dfb86b9b1b3b 100644
--- a/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/main/java/com/azure/resourcemanager/digitaltwins/implementation/CheckNameResultImpl.java
+++ b/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/main/java/com/azure/resourcemanager/digitaltwins/implementation/CheckNameResultImpl.java
@@ -4,7 +4,6 @@
package com.azure.resourcemanager.digitaltwins.implementation;
-import com.azure.resourcemanager.digitaltwins.AzureDigitalTwinsManager;
import com.azure.resourcemanager.digitaltwins.fluent.models.CheckNameResultInner;
import com.azure.resourcemanager.digitaltwins.models.CheckNameResult;
import com.azure.resourcemanager.digitaltwins.models.Reason;
@@ -12,9 +11,11 @@
public final class CheckNameResultImpl implements CheckNameResult {
private CheckNameResultInner innerObject;
- private final AzureDigitalTwinsManager serviceManager;
+ private final com.azure.resourcemanager.digitaltwins.AzureDigitalTwinsManager serviceManager;
- CheckNameResultImpl(CheckNameResultInner innerObject, AzureDigitalTwinsManager serviceManager) {
+ CheckNameResultImpl(
+ CheckNameResultInner innerObject,
+ com.azure.resourcemanager.digitaltwins.AzureDigitalTwinsManager serviceManager) {
this.innerObject = innerObject;
this.serviceManager = serviceManager;
}
@@ -35,7 +36,7 @@ public CheckNameResultInner innerModel() {
return this.innerObject;
}
- private AzureDigitalTwinsManager manager() {
+ private com.azure.resourcemanager.digitaltwins.AzureDigitalTwinsManager manager() {
return this.serviceManager;
}
}
diff --git a/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/main/java/com/azure/resourcemanager/digitaltwins/implementation/DigitalTwinsClientImpl.java b/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/main/java/com/azure/resourcemanager/digitaltwins/implementation/DigitalTwinsClientImpl.java
index d208510051d98..80157d0b24443 100644
--- a/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/main/java/com/azure/resourcemanager/digitaltwins/implementation/DigitalTwinsClientImpl.java
+++ b/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/main/java/com/azure/resourcemanager/digitaltwins/implementation/DigitalTwinsClientImpl.java
@@ -240,7 +240,7 @@ private Mono> getByResourceGroupWithRespo
resourceName,
accept,
context))
- .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
/**
@@ -399,7 +399,7 @@ private Mono>> createOrUpdateWithResponseAsync(
digitalTwinsCreate,
accept,
context))
- .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
/**
@@ -474,7 +474,7 @@ private Mono>> createOrUpdateWithResponseAsync(
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the description of the DigitalTwins service.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
private PollerFlux, DigitalTwinsDescriptionInner> beginCreateOrUpdateAsync(
String resourceGroupName, String resourceName, DigitalTwinsDescriptionInner digitalTwinsCreate) {
Mono>> mono =
@@ -486,7 +486,7 @@ private PollerFlux, DigitalTwinsDescrip
this.client.getHttpPipeline(),
DigitalTwinsDescriptionInner.class,
DigitalTwinsDescriptionInner.class,
- Context.NONE);
+ this.client.getContext());
}
/**
@@ -503,7 +503,7 @@ private PollerFlux, DigitalTwinsDescrip
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the description of the DigitalTwins service.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
private PollerFlux, DigitalTwinsDescriptionInner> beginCreateOrUpdateAsync(
String resourceGroupName,
String resourceName,
@@ -535,7 +535,7 @@ private PollerFlux, DigitalTwinsDescrip
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the description of the DigitalTwins service.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
public SyncPoller, DigitalTwinsDescriptionInner> beginCreateOrUpdate(
String resourceGroupName, String resourceName, DigitalTwinsDescriptionInner digitalTwinsCreate) {
return beginCreateOrUpdateAsync(resourceGroupName, resourceName, digitalTwinsCreate).getSyncPoller();
@@ -555,7 +555,7 @@ public SyncPoller, DigitalTwinsDescript
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the description of the DigitalTwins service.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
public SyncPoller, DigitalTwinsDescriptionInner> beginCreateOrUpdate(
String resourceGroupName,
String resourceName,
@@ -707,7 +707,7 @@ private Mono>> updateWithResponseAsync(
digitalTwinsPatchDescription,
accept,
context))
- .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
/**
@@ -780,7 +780,7 @@ private Mono>> updateWithResponseAsync(
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the description of the DigitalTwins service.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
private PollerFlux, DigitalTwinsDescriptionInner> beginUpdateAsync(
String resourceGroupName, String resourceName, DigitalTwinsPatchDescription digitalTwinsPatchDescription) {
Mono>> mono =
@@ -792,7 +792,7 @@ private PollerFlux, DigitalTwinsDescrip
this.client.getHttpPipeline(),
DigitalTwinsDescriptionInner.class,
DigitalTwinsDescriptionInner.class,
- Context.NONE);
+ this.client.getContext());
}
/**
@@ -807,7 +807,7 @@ private PollerFlux, DigitalTwinsDescrip
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the description of the DigitalTwins service.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
private PollerFlux, DigitalTwinsDescriptionInner> beginUpdateAsync(
String resourceGroupName,
String resourceName,
@@ -837,7 +837,7 @@ private PollerFlux, DigitalTwinsDescrip
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the description of the DigitalTwins service.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
public SyncPoller, DigitalTwinsDescriptionInner> beginUpdate(
String resourceGroupName, String resourceName, DigitalTwinsPatchDescription digitalTwinsPatchDescription) {
return beginUpdateAsync(resourceGroupName, resourceName, digitalTwinsPatchDescription).getSyncPoller();
@@ -855,7 +855,7 @@ public SyncPoller, DigitalTwinsDescript
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the description of the DigitalTwins service.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
public SyncPoller, DigitalTwinsDescriptionInner> beginUpdate(
String resourceGroupName,
String resourceName,
@@ -988,7 +988,7 @@ private Mono>> deleteWithResponseAsync(String resource
resourceName,
accept,
context))
- .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
/**
@@ -1047,7 +1047,7 @@ private Mono>> deleteWithResponseAsync(
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the description of the DigitalTwins service.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
private PollerFlux, DigitalTwinsDescriptionInner> beginDeleteAsync(
String resourceGroupName, String resourceName) {
Mono>> mono = deleteWithResponseAsync(resourceGroupName, resourceName);
@@ -1058,7 +1058,7 @@ private PollerFlux, DigitalTwinsDescrip
this.client.getHttpPipeline(),
DigitalTwinsDescriptionInner.class,
DigitalTwinsDescriptionInner.class,
- Context.NONE);
+ this.client.getContext());
}
/**
@@ -1072,7 +1072,7 @@ private PollerFlux, DigitalTwinsDescrip
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the description of the DigitalTwins service.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
private PollerFlux, DigitalTwinsDescriptionInner> beginDeleteAsync(
String resourceGroupName, String resourceName, Context context) {
context = this.client.mergeContext(context);
@@ -1097,7 +1097,7 @@ private PollerFlux, DigitalTwinsDescrip
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the description of the DigitalTwins service.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
public SyncPoller, DigitalTwinsDescriptionInner> beginDelete(
String resourceGroupName, String resourceName) {
return beginDeleteAsync(resourceGroupName, resourceName).getSyncPoller();
@@ -1114,7 +1114,7 @@ public SyncPoller, DigitalTwinsDescript
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the description of the DigitalTwins service.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
public SyncPoller, DigitalTwinsDescriptionInner> beginDelete(
String resourceGroupName, String resourceName, Context context) {
return beginDeleteAsync(resourceGroupName, resourceName, context).getSyncPoller();
@@ -1226,7 +1226,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()));
}
/**
@@ -1374,7 +1374,7 @@ private Mono> listByResourceGroupSin
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()));
}
/**
@@ -1540,7 +1540,7 @@ private Mono> checkNameAvailabilityWithResponseAs
digitalTwinsInstanceCheckName,
accept,
context))
- .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
/**
@@ -1685,7 +1685,7 @@ private Mono> listNextSinglePageAsyn
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()));
}
/**
@@ -1758,7 +1758,7 @@ private Mono> listByResourceGroupNex
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()));
}
/**
diff --git a/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/main/java/com/azure/resourcemanager/digitaltwins/implementation/DigitalTwinsDescriptionImpl.java b/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/main/java/com/azure/resourcemanager/digitaltwins/implementation/DigitalTwinsDescriptionImpl.java
index f2ea083b97c0a..416116378ce4e 100644
--- a/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/main/java/com/azure/resourcemanager/digitaltwins/implementation/DigitalTwinsDescriptionImpl.java
+++ b/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/main/java/com/azure/resourcemanager/digitaltwins/implementation/DigitalTwinsDescriptionImpl.java
@@ -6,7 +6,6 @@
import com.azure.core.management.Region;
import com.azure.core.util.Context;
-import com.azure.resourcemanager.digitaltwins.AzureDigitalTwinsManager;
import com.azure.resourcemanager.digitaltwins.fluent.models.DigitalTwinsDescriptionInner;
import com.azure.resourcemanager.digitaltwins.fluent.models.PrivateEndpointConnectionInner;
import com.azure.resourcemanager.digitaltwins.models.DigitalTwinsDescription;
@@ -26,7 +25,7 @@ public final class DigitalTwinsDescriptionImpl
implements DigitalTwinsDescription, DigitalTwinsDescription.Definition, DigitalTwinsDescription.Update {
private DigitalTwinsDescriptionInner innerObject;
- private final AzureDigitalTwinsManager serviceManager;
+ private final com.azure.resourcemanager.digitaltwins.AzureDigitalTwinsManager serviceManager;
public String id() {
return this.innerModel().id();
@@ -103,7 +102,7 @@ public DigitalTwinsDescriptionInner innerModel() {
return this.innerObject;
}
- private AzureDigitalTwinsManager manager() {
+ private com.azure.resourcemanager.digitaltwins.AzureDigitalTwinsManager manager() {
return this.serviceManager;
}
@@ -136,7 +135,8 @@ public DigitalTwinsDescription create(Context context) {
return this;
}
- DigitalTwinsDescriptionImpl(String name, AzureDigitalTwinsManager serviceManager) {
+ DigitalTwinsDescriptionImpl(
+ String name, com.azure.resourcemanager.digitaltwins.AzureDigitalTwinsManager serviceManager) {
this.innerObject = new DigitalTwinsDescriptionInner();
this.serviceManager = serviceManager;
this.resourceName = name;
@@ -165,7 +165,9 @@ public DigitalTwinsDescription apply(Context context) {
return this;
}
- DigitalTwinsDescriptionImpl(DigitalTwinsDescriptionInner innerObject, AzureDigitalTwinsManager serviceManager) {
+ DigitalTwinsDescriptionImpl(
+ DigitalTwinsDescriptionInner innerObject,
+ com.azure.resourcemanager.digitaltwins.AzureDigitalTwinsManager serviceManager) {
this.innerObject = innerObject;
this.serviceManager = serviceManager;
this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups");
diff --git a/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/main/java/com/azure/resourcemanager/digitaltwins/implementation/DigitalTwinsEndpointResourceImpl.java b/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/main/java/com/azure/resourcemanager/digitaltwins/implementation/DigitalTwinsEndpointResourceImpl.java
index d48210617c3b9..4bf42ad17a06f 100644
--- a/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/main/java/com/azure/resourcemanager/digitaltwins/implementation/DigitalTwinsEndpointResourceImpl.java
+++ b/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/main/java/com/azure/resourcemanager/digitaltwins/implementation/DigitalTwinsEndpointResourceImpl.java
@@ -5,7 +5,6 @@
package com.azure.resourcemanager.digitaltwins.implementation;
import com.azure.core.util.Context;
-import com.azure.resourcemanager.digitaltwins.AzureDigitalTwinsManager;
import com.azure.resourcemanager.digitaltwins.fluent.models.DigitalTwinsEndpointResourceInner;
import com.azure.resourcemanager.digitaltwins.models.DigitalTwinsEndpointResource;
import com.azure.resourcemanager.digitaltwins.models.DigitalTwinsEndpointResourceProperties;
@@ -16,7 +15,7 @@ public final class DigitalTwinsEndpointResourceImpl
DigitalTwinsEndpointResource.Update {
private DigitalTwinsEndpointResourceInner innerObject;
- private final AzureDigitalTwinsManager serviceManager;
+ private final com.azure.resourcemanager.digitaltwins.AzureDigitalTwinsManager serviceManager;
public String id() {
return this.innerModel().id();
@@ -38,7 +37,7 @@ public DigitalTwinsEndpointResourceInner innerModel() {
return this.innerObject;
}
- private AzureDigitalTwinsManager manager() {
+ private com.azure.resourcemanager.digitaltwins.AzureDigitalTwinsManager manager() {
return this.serviceManager;
}
@@ -73,7 +72,8 @@ public DigitalTwinsEndpointResource create(Context context) {
return this;
}
- DigitalTwinsEndpointResourceImpl(String name, AzureDigitalTwinsManager serviceManager) {
+ DigitalTwinsEndpointResourceImpl(
+ String name, com.azure.resourcemanager.digitaltwins.AzureDigitalTwinsManager serviceManager) {
this.innerObject = new DigitalTwinsEndpointResourceInner();
this.serviceManager = serviceManager;
this.endpointName = name;
@@ -102,7 +102,8 @@ public DigitalTwinsEndpointResource apply(Context context) {
}
DigitalTwinsEndpointResourceImpl(
- DigitalTwinsEndpointResourceInner innerObject, AzureDigitalTwinsManager serviceManager) {
+ DigitalTwinsEndpointResourceInner innerObject,
+ com.azure.resourcemanager.digitaltwins.AzureDigitalTwinsManager serviceManager) {
this.innerObject = innerObject;
this.serviceManager = serviceManager;
this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups");
diff --git a/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/main/java/com/azure/resourcemanager/digitaltwins/implementation/DigitalTwinsEndpointsClientImpl.java b/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/main/java/com/azure/resourcemanager/digitaltwins/implementation/DigitalTwinsEndpointsClientImpl.java
index 299947372e564..542ba35a3c0e6 100644
--- a/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/main/java/com/azure/resourcemanager/digitaltwins/implementation/DigitalTwinsEndpointsClientImpl.java
+++ b/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/main/java/com/azure/resourcemanager/digitaltwins/implementation/DigitalTwinsEndpointsClientImpl.java
@@ -197,7 +197,7 @@ private Mono> listSinglePageAsy
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()));
}
/**
@@ -372,7 +372,7 @@ private Mono> getWithResponseAsync(
endpointName,
accept,
context))
- .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
/**
@@ -546,7 +546,7 @@ private Mono>> createOrUpdateWithResponseAsync(
endpointDescription,
accept,
context))
- .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
/**
@@ -624,7 +624,7 @@ private Mono>> createOrUpdateWithResponseAsync(
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return digitalTwinsInstance endpoint resource.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
private PollerFlux, DigitalTwinsEndpointResourceInner>
beginCreateOrUpdateAsync(
String resourceGroupName,
@@ -640,7 +640,7 @@ private Mono>> createOrUpdateWithResponseAsync(
this.client.getHttpPipeline(),
DigitalTwinsEndpointResourceInner.class,
DigitalTwinsEndpointResourceInner.class,
- Context.NONE);
+ this.client.getContext());
}
/**
@@ -656,7 +656,7 @@ private Mono>> createOrUpdateWithResponseAsync(
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return digitalTwinsInstance endpoint resource.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
private PollerFlux, DigitalTwinsEndpointResourceInner>
beginCreateOrUpdateAsync(
String resourceGroupName,
@@ -690,7 +690,7 @@ private Mono>> createOrUpdateWithResponseAsync(
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return digitalTwinsInstance endpoint resource.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
public SyncPoller, DigitalTwinsEndpointResourceInner>
beginCreateOrUpdate(
String resourceGroupName,
@@ -714,7 +714,7 @@ private Mono>> createOrUpdateWithResponseAsync(
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return digitalTwinsInstance endpoint resource.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
public SyncPoller, DigitalTwinsEndpointResourceInner>
beginCreateOrUpdate(
String resourceGroupName,
@@ -868,7 +868,7 @@ private Mono>> deleteWithResponseAsync(
endpointName,
accept,
context))
- .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
/**
@@ -933,7 +933,7 @@ private Mono>> deleteWithResponseAsync(
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return digitalTwinsInstance endpoint resource.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
private PollerFlux, DigitalTwinsEndpointResourceInner>
beginDeleteAsync(String resourceGroupName, String resourceName, String endpointName) {
Mono>> mono = deleteWithResponseAsync(resourceGroupName, resourceName, endpointName);
@@ -944,7 +944,7 @@ private Mono>> deleteWithResponseAsync(
this.client.getHttpPipeline(),
DigitalTwinsEndpointResourceInner.class,
DigitalTwinsEndpointResourceInner.class,
- Context.NONE);
+ this.client.getContext());
}
/**
@@ -959,7 +959,7 @@ private Mono>> deleteWithResponseAsync(
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return digitalTwinsInstance endpoint resource.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
private PollerFlux, DigitalTwinsEndpointResourceInner>
beginDeleteAsync(String resourceGroupName, String resourceName, String endpointName, Context context) {
context = this.client.mergeContext(context);
@@ -986,7 +986,7 @@ private Mono>> deleteWithResponseAsync(
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return digitalTwinsInstance endpoint resource.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
public SyncPoller, DigitalTwinsEndpointResourceInner> beginDelete(
String resourceGroupName, String resourceName, String endpointName) {
return beginDeleteAsync(resourceGroupName, resourceName, endpointName).getSyncPoller();
@@ -1004,7 +1004,7 @@ public SyncPoller, DigitalTwinsEnd
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return digitalTwinsInstance endpoint resource.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
public SyncPoller, DigitalTwinsEndpointResourceInner> beginDelete(
String resourceGroupName, String resourceName, String endpointName, Context context) {
return beginDeleteAsync(resourceGroupName, resourceName, endpointName, context).getSyncPoller();
@@ -1116,7 +1116,7 @@ private Mono> listNextSinglePag
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()));
}
/**
diff --git a/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/main/java/com/azure/resourcemanager/digitaltwins/implementation/DigitalTwinsEndpointsImpl.java b/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/main/java/com/azure/resourcemanager/digitaltwins/implementation/DigitalTwinsEndpointsImpl.java
index b10c3413772d9..bf997c9d25dc0 100644
--- a/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/main/java/com/azure/resourcemanager/digitaltwins/implementation/DigitalTwinsEndpointsImpl.java
+++ b/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/main/java/com/azure/resourcemanager/digitaltwins/implementation/DigitalTwinsEndpointsImpl.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.digitaltwins.AzureDigitalTwinsManager;
import com.azure.resourcemanager.digitaltwins.fluent.DigitalTwinsEndpointsClient;
import com.azure.resourcemanager.digitaltwins.fluent.models.DigitalTwinsEndpointResourceInner;
import com.azure.resourcemanager.digitaltwins.models.DigitalTwinsEndpointResource;
@@ -21,9 +20,11 @@ public final class DigitalTwinsEndpointsImpl implements DigitalTwinsEndpoints {
private final DigitalTwinsEndpointsClient innerClient;
- private final AzureDigitalTwinsManager serviceManager;
+ private final com.azure.resourcemanager.digitaltwins.AzureDigitalTwinsManager serviceManager;
- public DigitalTwinsEndpointsImpl(DigitalTwinsEndpointsClient innerClient, AzureDigitalTwinsManager serviceManager) {
+ public DigitalTwinsEndpointsImpl(
+ DigitalTwinsEndpointsClient innerClient,
+ com.azure.resourcemanager.digitaltwins.AzureDigitalTwinsManager serviceManager) {
this.innerClient = innerClient;
this.serviceManager = serviceManager;
}
@@ -207,7 +208,7 @@ private DigitalTwinsEndpointsClient serviceClient() {
return this.innerClient;
}
- private AzureDigitalTwinsManager manager() {
+ private com.azure.resourcemanager.digitaltwins.AzureDigitalTwinsManager manager() {
return this.serviceManager;
}
diff --git a/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/main/java/com/azure/resourcemanager/digitaltwins/implementation/DigitalTwinsImpl.java b/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/main/java/com/azure/resourcemanager/digitaltwins/implementation/DigitalTwinsImpl.java
index 33e3ebc04012b..46156d72416e1 100644
--- a/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/main/java/com/azure/resourcemanager/digitaltwins/implementation/DigitalTwinsImpl.java
+++ b/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/main/java/com/azure/resourcemanager/digitaltwins/implementation/DigitalTwinsImpl.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.digitaltwins.AzureDigitalTwinsManager;
import com.azure.resourcemanager.digitaltwins.fluent.DigitalTwinsClient;
import com.azure.resourcemanager.digitaltwins.fluent.models.CheckNameResultInner;
import com.azure.resourcemanager.digitaltwins.fluent.models.DigitalTwinsDescriptionInner;
@@ -24,9 +23,11 @@ public final class DigitalTwinsImpl implements DigitalTwins {
private final DigitalTwinsClient innerClient;
- private final AzureDigitalTwinsManager serviceManager;
+ private final com.azure.resourcemanager.digitaltwins.AzureDigitalTwinsManager serviceManager;
- public DigitalTwinsImpl(DigitalTwinsClient innerClient, AzureDigitalTwinsManager serviceManager) {
+ public DigitalTwinsImpl(
+ DigitalTwinsClient innerClient,
+ com.azure.resourcemanager.digitaltwins.AzureDigitalTwinsManager serviceManager) {
this.innerClient = innerClient;
this.serviceManager = serviceManager;
}
@@ -211,7 +212,7 @@ private DigitalTwinsClient serviceClient() {
return this.innerClient;
}
- private AzureDigitalTwinsManager manager() {
+ private com.azure.resourcemanager.digitaltwins.AzureDigitalTwinsManager manager() {
return this.serviceManager;
}
diff --git a/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/main/java/com/azure/resourcemanager/digitaltwins/implementation/GroupIdInformationImpl.java b/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/main/java/com/azure/resourcemanager/digitaltwins/implementation/GroupIdInformationImpl.java
index 0078089e381f2..08bbff8ff0036 100644
--- a/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/main/java/com/azure/resourcemanager/digitaltwins/implementation/GroupIdInformationImpl.java
+++ b/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/main/java/com/azure/resourcemanager/digitaltwins/implementation/GroupIdInformationImpl.java
@@ -4,7 +4,6 @@
package com.azure.resourcemanager.digitaltwins.implementation;
-import com.azure.resourcemanager.digitaltwins.AzureDigitalTwinsManager;
import com.azure.resourcemanager.digitaltwins.fluent.models.GroupIdInformationInner;
import com.azure.resourcemanager.digitaltwins.models.GroupIdInformation;
import com.azure.resourcemanager.digitaltwins.models.GroupIdInformationProperties;
@@ -12,9 +11,11 @@
public final class GroupIdInformationImpl implements GroupIdInformation {
private GroupIdInformationInner innerObject;
- private final AzureDigitalTwinsManager serviceManager;
+ private final com.azure.resourcemanager.digitaltwins.AzureDigitalTwinsManager serviceManager;
- GroupIdInformationImpl(GroupIdInformationInner innerObject, AzureDigitalTwinsManager serviceManager) {
+ GroupIdInformationImpl(
+ GroupIdInformationInner innerObject,
+ com.azure.resourcemanager.digitaltwins.AzureDigitalTwinsManager serviceManager) {
this.innerObject = innerObject;
this.serviceManager = serviceManager;
}
@@ -39,7 +40,7 @@ public GroupIdInformationInner innerModel() {
return this.innerObject;
}
- private AzureDigitalTwinsManager manager() {
+ private com.azure.resourcemanager.digitaltwins.AzureDigitalTwinsManager manager() {
return this.serviceManager;
}
}
diff --git a/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/main/java/com/azure/resourcemanager/digitaltwins/implementation/GroupIdInformationResponseImpl.java b/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/main/java/com/azure/resourcemanager/digitaltwins/implementation/GroupIdInformationResponseImpl.java
index f43ef6f61d5d5..f262fca7d0d47 100644
--- a/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/main/java/com/azure/resourcemanager/digitaltwins/implementation/GroupIdInformationResponseImpl.java
+++ b/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/main/java/com/azure/resourcemanager/digitaltwins/implementation/GroupIdInformationResponseImpl.java
@@ -4,7 +4,6 @@
package com.azure.resourcemanager.digitaltwins.implementation;
-import com.azure.resourcemanager.digitaltwins.AzureDigitalTwinsManager;
import com.azure.resourcemanager.digitaltwins.fluent.models.GroupIdInformationInner;
import com.azure.resourcemanager.digitaltwins.fluent.models.GroupIdInformationResponseInner;
import com.azure.resourcemanager.digitaltwins.models.GroupIdInformation;
@@ -16,10 +15,11 @@
public final class GroupIdInformationResponseImpl implements GroupIdInformationResponse {
private GroupIdInformationResponseInner innerObject;
- private final AzureDigitalTwinsManager serviceManager;
+ private final com.azure.resourcemanager.digitaltwins.AzureDigitalTwinsManager serviceManager;
GroupIdInformationResponseImpl(
- GroupIdInformationResponseInner innerObject, AzureDigitalTwinsManager serviceManager) {
+ GroupIdInformationResponseInner innerObject,
+ com.azure.resourcemanager.digitaltwins.AzureDigitalTwinsManager serviceManager) {
this.innerObject = innerObject;
this.serviceManager = serviceManager;
}
@@ -42,7 +42,7 @@ public GroupIdInformationResponseInner innerModel() {
return this.innerObject;
}
- private AzureDigitalTwinsManager manager() {
+ private com.azure.resourcemanager.digitaltwins.AzureDigitalTwinsManager manager() {
return this.serviceManager;
}
}
diff --git a/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/main/java/com/azure/resourcemanager/digitaltwins/implementation/OperationImpl.java b/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/main/java/com/azure/resourcemanager/digitaltwins/implementation/OperationImpl.java
index b193db5133820..821e7e9921964 100644
--- a/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/main/java/com/azure/resourcemanager/digitaltwins/implementation/OperationImpl.java
+++ b/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/main/java/com/azure/resourcemanager/digitaltwins/implementation/OperationImpl.java
@@ -4,7 +4,6 @@
package com.azure.resourcemanager.digitaltwins.implementation;
-import com.azure.resourcemanager.digitaltwins.AzureDigitalTwinsManager;
import com.azure.resourcemanager.digitaltwins.fluent.models.OperationInner;
import com.azure.resourcemanager.digitaltwins.models.Operation;
import com.azure.resourcemanager.digitaltwins.models.OperationDisplay;
@@ -12,9 +11,10 @@
public final class OperationImpl implements Operation {
private OperationInner innerObject;
- private final AzureDigitalTwinsManager serviceManager;
+ private final com.azure.resourcemanager.digitaltwins.AzureDigitalTwinsManager serviceManager;
- OperationImpl(OperationInner innerObject, AzureDigitalTwinsManager serviceManager) {
+ OperationImpl(
+ OperationInner innerObject, com.azure.resourcemanager.digitaltwins.AzureDigitalTwinsManager serviceManager) {
this.innerObject = innerObject;
this.serviceManager = serviceManager;
}
@@ -39,7 +39,7 @@ public OperationInner innerModel() {
return this.innerObject;
}
- private AzureDigitalTwinsManager manager() {
+ private com.azure.resourcemanager.digitaltwins.AzureDigitalTwinsManager manager() {
return this.serviceManager;
}
}
diff --git a/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/main/java/com/azure/resourcemanager/digitaltwins/implementation/OperationsClientImpl.java b/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/main/java/com/azure/resourcemanager/digitaltwins/implementation/OperationsClientImpl.java
index f9c1dbe8fb44e..b7f8e7507ebe5 100644
--- a/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/main/java/com/azure/resourcemanager/digitaltwins/implementation/OperationsClientImpl.java
+++ b/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/main/java/com/azure/resourcemanager/digitaltwins/implementation/OperationsClientImpl.java
@@ -108,7 +108,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()));
}
/**
@@ -228,7 +228,7 @@ private Mono> listNextSinglePageAsync(String nextL
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()));
}
/**
diff --git a/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/main/java/com/azure/resourcemanager/digitaltwins/implementation/OperationsImpl.java b/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/main/java/com/azure/resourcemanager/digitaltwins/implementation/OperationsImpl.java
index 9b0c2f4c671f6..24212674fce58 100644
--- a/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/main/java/com/azure/resourcemanager/digitaltwins/implementation/OperationsImpl.java
+++ b/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/main/java/com/azure/resourcemanager/digitaltwins/implementation/OperationsImpl.java
@@ -7,7 +7,6 @@
import com.azure.core.http.rest.PagedIterable;
import com.azure.core.util.Context;
import com.azure.core.util.logging.ClientLogger;
-import com.azure.resourcemanager.digitaltwins.AzureDigitalTwinsManager;
import com.azure.resourcemanager.digitaltwins.fluent.OperationsClient;
import com.azure.resourcemanager.digitaltwins.fluent.models.OperationInner;
import com.azure.resourcemanager.digitaltwins.models.Operation;
@@ -19,9 +18,10 @@ public final class OperationsImpl implements Operations {
private final OperationsClient innerClient;
- private final AzureDigitalTwinsManager serviceManager;
+ private final com.azure.resourcemanager.digitaltwins.AzureDigitalTwinsManager serviceManager;
- public OperationsImpl(OperationsClient innerClient, AzureDigitalTwinsManager serviceManager) {
+ public OperationsImpl(
+ OperationsClient innerClient, com.azure.resourcemanager.digitaltwins.AzureDigitalTwinsManager serviceManager) {
this.innerClient = innerClient;
this.serviceManager = serviceManager;
}
@@ -40,7 +40,7 @@ private OperationsClient serviceClient() {
return this.innerClient;
}
- private AzureDigitalTwinsManager manager() {
+ private com.azure.resourcemanager.digitaltwins.AzureDigitalTwinsManager manager() {
return this.serviceManager;
}
}
diff --git a/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/main/java/com/azure/resourcemanager/digitaltwins/implementation/PrivateEndpointConnectionImpl.java b/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/main/java/com/azure/resourcemanager/digitaltwins/implementation/PrivateEndpointConnectionImpl.java
index 513fb62cdd44b..e36da15f84e6c 100644
--- a/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/main/java/com/azure/resourcemanager/digitaltwins/implementation/PrivateEndpointConnectionImpl.java
+++ b/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/main/java/com/azure/resourcemanager/digitaltwins/implementation/PrivateEndpointConnectionImpl.java
@@ -5,16 +5,15 @@
package com.azure.resourcemanager.digitaltwins.implementation;
import com.azure.core.util.Context;
-import com.azure.resourcemanager.digitaltwins.AzureDigitalTwinsManager;
import com.azure.resourcemanager.digitaltwins.fluent.models.PrivateEndpointConnectionInner;
-import com.azure.resourcemanager.digitaltwins.models.ConnectionProperties;
import com.azure.resourcemanager.digitaltwins.models.PrivateEndpointConnection;
+import com.azure.resourcemanager.digitaltwins.models.PrivateEndpointConnectionProperties;
public final class PrivateEndpointConnectionImpl
implements PrivateEndpointConnection, PrivateEndpointConnection.Definition, PrivateEndpointConnection.Update {
private PrivateEndpointConnectionInner innerObject;
- private final AzureDigitalTwinsManager serviceManager;
+ private final com.azure.resourcemanager.digitaltwins.AzureDigitalTwinsManager serviceManager;
public String id() {
return this.innerModel().id();
@@ -28,7 +27,7 @@ public String type() {
return this.innerModel().type();
}
- public ConnectionProperties properties() {
+ public PrivateEndpointConnectionProperties properties() {
return this.innerModel().properties();
}
@@ -36,7 +35,7 @@ public PrivateEndpointConnectionInner innerModel() {
return this.innerObject;
}
- private AzureDigitalTwinsManager manager() {
+ private com.azure.resourcemanager.digitaltwins.AzureDigitalTwinsManager manager() {
return this.serviceManager;
}
@@ -73,7 +72,8 @@ public PrivateEndpointConnection create(Context context) {
return this;
}
- PrivateEndpointConnectionImpl(String name, AzureDigitalTwinsManager serviceManager) {
+ PrivateEndpointConnectionImpl(
+ String name, com.azure.resourcemanager.digitaltwins.AzureDigitalTwinsManager serviceManager) {
this.innerObject = new PrivateEndpointConnectionInner();
this.serviceManager = serviceManager;
this.privateEndpointConnectionName = name;
@@ -103,7 +103,9 @@ public PrivateEndpointConnection apply(Context context) {
return this;
}
- PrivateEndpointConnectionImpl(PrivateEndpointConnectionInner innerObject, AzureDigitalTwinsManager serviceManager) {
+ PrivateEndpointConnectionImpl(
+ PrivateEndpointConnectionInner innerObject,
+ com.azure.resourcemanager.digitaltwins.AzureDigitalTwinsManager serviceManager) {
this.innerObject = innerObject;
this.serviceManager = serviceManager;
this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups");
@@ -131,7 +133,7 @@ public PrivateEndpointConnection refresh(Context context) {
return this;
}
- public PrivateEndpointConnectionImpl withProperties(ConnectionProperties properties) {
+ public PrivateEndpointConnectionImpl withProperties(PrivateEndpointConnectionProperties properties) {
this.innerModel().withProperties(properties);
return this;
}
diff --git a/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/main/java/com/azure/resourcemanager/digitaltwins/implementation/PrivateEndpointConnectionsClientImpl.java b/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/main/java/com/azure/resourcemanager/digitaltwins/implementation/PrivateEndpointConnectionsClientImpl.java
index 84c7e607c16f5..7c398879e8a48 100644
--- a/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/main/java/com/azure/resourcemanager/digitaltwins/implementation/PrivateEndpointConnectionsClientImpl.java
+++ b/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/main/java/com/azure/resourcemanager/digitaltwins/implementation/PrivateEndpointConnectionsClientImpl.java
@@ -175,7 +175,7 @@ private Mono> listWithResponse
resourceName,
accept,
context))
- .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
/**
@@ -332,7 +332,7 @@ private Mono> getWithResponseAsync(
privateEndpointConnectionName,
accept,
context))
- .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
/**
@@ -502,7 +502,7 @@ private Mono>> deleteWithResponseAsync(
privateEndpointConnectionName,
accept,
context))
- .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
/**
@@ -570,14 +570,15 @@ private Mono>> deleteWithResponseAsync(
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the completion.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
private PollerFlux, Void> beginDeleteAsync(
String resourceGroupName, String resourceName, String privateEndpointConnectionName) {
Mono>> mono =
deleteWithResponseAsync(resourceGroupName, resourceName, privateEndpointConnectionName);
return this
.client
- .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, Context.NONE);
+ .getLroResult(
+ mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext());
}
/**
@@ -592,7 +593,7 @@ private PollerFlux, Void> beginDeleteAsync(
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the completion.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
private PollerFlux, Void> beginDeleteAsync(
String resourceGroupName, String resourceName, String privateEndpointConnectionName, Context context) {
context = this.client.mergeContext(context);
@@ -614,7 +615,7 @@ private PollerFlux, Void> beginDeleteAsync(
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the completion.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
public SyncPoller, Void> beginDelete(
String resourceGroupName, String resourceName, String privateEndpointConnectionName) {
return beginDeleteAsync(resourceGroupName, resourceName, privateEndpointConnectionName).getSyncPoller();
@@ -632,7 +633,7 @@ public SyncPoller, Void> beginDelete(
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the completion.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
public SyncPoller, Void> beginDelete(
String resourceGroupName, String resourceName, String privateEndpointConnectionName, Context context) {
return beginDeleteAsync(resourceGroupName, resourceName, privateEndpointConnectionName, context)
@@ -776,7 +777,7 @@ private Mono>> createOrUpdateWithResponseAsync(
privateEndpointConnection,
accept,
context))
- .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
/**
@@ -859,7 +860,7 @@ private Mono>> createOrUpdateWithResponseAsync(
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the private endpoint connection of a Digital Twin.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
private PollerFlux, PrivateEndpointConnectionInner>
beginCreateOrUpdateAsync(
String resourceGroupName,
@@ -876,7 +877,7 @@ private Mono>> createOrUpdateWithResponseAsync(
this.client.getHttpPipeline(),
PrivateEndpointConnectionInner.class,
PrivateEndpointConnectionInner.class,
- Context.NONE);
+ this.client.getContext());
}
/**
@@ -892,7 +893,7 @@ private Mono>> createOrUpdateWithResponseAsync(
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the private endpoint connection of a Digital Twin.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
private PollerFlux, PrivateEndpointConnectionInner>
beginCreateOrUpdateAsync(
String resourceGroupName,
@@ -926,7 +927,7 @@ private Mono>> createOrUpdateWithResponseAsync(
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the private endpoint connection of a Digital Twin.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
public SyncPoller, PrivateEndpointConnectionInner> beginCreateOrUpdate(
String resourceGroupName,
String resourceName,
@@ -950,7 +951,7 @@ public SyncPoller, PrivateEndpointCon
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the private endpoint connection of a Digital Twin.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
public SyncPoller, PrivateEndpointConnectionInner> beginCreateOrUpdate(
String resourceGroupName,
String resourceName,
diff --git a/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/main/java/com/azure/resourcemanager/digitaltwins/implementation/PrivateEndpointConnectionsImpl.java b/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/main/java/com/azure/resourcemanager/digitaltwins/implementation/PrivateEndpointConnectionsImpl.java
index 1b1c604262da9..f51514e912b46 100644
--- a/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/main/java/com/azure/resourcemanager/digitaltwins/implementation/PrivateEndpointConnectionsImpl.java
+++ b/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/main/java/com/azure/resourcemanager/digitaltwins/implementation/PrivateEndpointConnectionsImpl.java
@@ -8,7 +8,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.digitaltwins.AzureDigitalTwinsManager;
import com.azure.resourcemanager.digitaltwins.fluent.PrivateEndpointConnectionsClient;
import com.azure.resourcemanager.digitaltwins.fluent.models.PrivateEndpointConnectionInner;
import com.azure.resourcemanager.digitaltwins.fluent.models.PrivateEndpointConnectionsResponseInner;
@@ -22,10 +21,11 @@ public final class PrivateEndpointConnectionsImpl implements PrivateEndpointConn
private final PrivateEndpointConnectionsClient innerClient;
- private final AzureDigitalTwinsManager serviceManager;
+ private final com.azure.resourcemanager.digitaltwins.AzureDigitalTwinsManager serviceManager;
public PrivateEndpointConnectionsImpl(
- PrivateEndpointConnectionsClient innerClient, AzureDigitalTwinsManager serviceManager) {
+ PrivateEndpointConnectionsClient innerClient,
+ com.azure.resourcemanager.digitaltwins.AzureDigitalTwinsManager serviceManager) {
this.innerClient = innerClient;
this.serviceManager = serviceManager;
}
@@ -225,7 +225,7 @@ private PrivateEndpointConnectionsClient serviceClient() {
return this.innerClient;
}
- private AzureDigitalTwinsManager manager() {
+ private com.azure.resourcemanager.digitaltwins.AzureDigitalTwinsManager manager() {
return this.serviceManager;
}
diff --git a/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/main/java/com/azure/resourcemanager/digitaltwins/implementation/PrivateEndpointConnectionsResponseImpl.java b/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/main/java/com/azure/resourcemanager/digitaltwins/implementation/PrivateEndpointConnectionsResponseImpl.java
index 5652bbf880d5e..da0d86788c266 100644
--- a/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/main/java/com/azure/resourcemanager/digitaltwins/implementation/PrivateEndpointConnectionsResponseImpl.java
+++ b/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/main/java/com/azure/resourcemanager/digitaltwins/implementation/PrivateEndpointConnectionsResponseImpl.java
@@ -4,7 +4,6 @@
package com.azure.resourcemanager.digitaltwins.implementation;
-import com.azure.resourcemanager.digitaltwins.AzureDigitalTwinsManager;
import com.azure.resourcemanager.digitaltwins.fluent.models.PrivateEndpointConnectionInner;
import com.azure.resourcemanager.digitaltwins.fluent.models.PrivateEndpointConnectionsResponseInner;
import com.azure.resourcemanager.digitaltwins.models.PrivateEndpointConnection;
@@ -16,10 +15,11 @@
public final class PrivateEndpointConnectionsResponseImpl implements PrivateEndpointConnectionsResponse {
private PrivateEndpointConnectionsResponseInner innerObject;
- private final AzureDigitalTwinsManager serviceManager;
+ private final com.azure.resourcemanager.digitaltwins.AzureDigitalTwinsManager serviceManager;
PrivateEndpointConnectionsResponseImpl(
- PrivateEndpointConnectionsResponseInner innerObject, AzureDigitalTwinsManager serviceManager) {
+ PrivateEndpointConnectionsResponseInner innerObject,
+ com.azure.resourcemanager.digitaltwins.AzureDigitalTwinsManager serviceManager) {
this.innerObject = innerObject;
this.serviceManager = serviceManager;
}
@@ -42,7 +42,7 @@ public PrivateEndpointConnectionsResponseInner innerModel() {
return this.innerObject;
}
- private AzureDigitalTwinsManager manager() {
+ private com.azure.resourcemanager.digitaltwins.AzureDigitalTwinsManager manager() {
return this.serviceManager;
}
}
diff --git a/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/main/java/com/azure/resourcemanager/digitaltwins/implementation/PrivateLinkResourcesClientImpl.java b/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/main/java/com/azure/resourcemanager/digitaltwins/implementation/PrivateLinkResourcesClientImpl.java
index 25dcb163a2f56..c334446aa2557 100644
--- a/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/main/java/com/azure/resourcemanager/digitaltwins/implementation/PrivateLinkResourcesClientImpl.java
+++ b/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/main/java/com/azure/resourcemanager/digitaltwins/implementation/PrivateLinkResourcesClientImpl.java
@@ -133,7 +133,7 @@ private Mono> listWithResponseAsync(
resourceName,
accept,
context))
- .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
/**
@@ -287,7 +287,7 @@ private Mono> getWithResponseAsync(
resourceId,
accept,
context))
- .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
/**
diff --git a/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/main/java/com/azure/resourcemanager/digitaltwins/implementation/PrivateLinkResourcesImpl.java b/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/main/java/com/azure/resourcemanager/digitaltwins/implementation/PrivateLinkResourcesImpl.java
index f5823d045743d..89605bd86496b 100644
--- a/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/main/java/com/azure/resourcemanager/digitaltwins/implementation/PrivateLinkResourcesImpl.java
+++ b/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/main/java/com/azure/resourcemanager/digitaltwins/implementation/PrivateLinkResourcesImpl.java
@@ -8,7 +8,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.digitaltwins.AzureDigitalTwinsManager;
import com.azure.resourcemanager.digitaltwins.fluent.PrivateLinkResourcesClient;
import com.azure.resourcemanager.digitaltwins.fluent.models.GroupIdInformationInner;
import com.azure.resourcemanager.digitaltwins.fluent.models.GroupIdInformationResponseInner;
@@ -22,9 +21,11 @@ public final class PrivateLinkResourcesImpl implements PrivateLinkResources {
private final PrivateLinkResourcesClient innerClient;
- private final AzureDigitalTwinsManager serviceManager;
+ private final com.azure.resourcemanager.digitaltwins.AzureDigitalTwinsManager serviceManager;
- public PrivateLinkResourcesImpl(PrivateLinkResourcesClient innerClient, AzureDigitalTwinsManager serviceManager) {
+ public PrivateLinkResourcesImpl(
+ PrivateLinkResourcesClient innerClient,
+ com.azure.resourcemanager.digitaltwins.AzureDigitalTwinsManager serviceManager) {
this.innerClient = innerClient;
this.serviceManager = serviceManager;
}
@@ -81,7 +82,7 @@ private PrivateLinkResourcesClient serviceClient() {
return this.innerClient;
}
- private AzureDigitalTwinsManager manager() {
+ private com.azure.resourcemanager.digitaltwins.AzureDigitalTwinsManager manager() {
return this.serviceManager;
}
}
diff --git a/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/main/java/com/azure/resourcemanager/digitaltwins/implementation/Utils.java b/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/main/java/com/azure/resourcemanager/digitaltwins/implementation/Utils.java
index 4cc0600d8d382..c4d4bc812a6aa 100644
--- a/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/main/java/com/azure/resourcemanager/digitaltwins/implementation/Utils.java
+++ b/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/main/java/com/azure/resourcemanager/digitaltwins/implementation/Utils.java
@@ -9,8 +9,6 @@
import com.azure.core.http.rest.PagedResponse;
import com.azure.core.http.rest.PagedResponseBase;
import com.azure.core.util.CoreUtils;
-import reactor.core.publisher.Mono;
-
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
@@ -19,6 +17,7 @@
import java.util.function.Function;
import java.util.stream.Collectors;
import java.util.stream.Stream;
+import reactor.core.publisher.Flux;
final class Utils {
static String getValueFromIdByName(String id, String name) {
@@ -80,76 +79,84 @@ static PagedIterable mapPage(PagedIterable pageIterable, Function extends PagedIterable {
- private final PagedIterable pageIterable;
+ private final PagedIterable pagedIterable;
private final Function mapper;
private final Function, PagedResponse> pageMapper;
- private PagedIterableImpl(PagedIterable pageIterable, Function mapper) {
- super(new PagedFlux(() -> Mono.empty()));
- this.pageIterable = pageIterable;
+ private PagedIterableImpl(PagedIterable pagedIterable, Function mapper) {
+ super(
+ PagedFlux
+ .create(
+ () ->
+ (continuationToken, pageSize) ->
+ Flux.fromStream(pagedIterable.streamByPage().map(getPageMapper(mapper)))));
+ this.pagedIterable = pagedIterable;
this.mapper = mapper;
- this.pageMapper =
- page ->
- new PagedResponseBase(
- page.getRequest(),
- page.getStatusCode(),
- page.getHeaders(),
- page.getElements().stream().map(mapper).collect(Collectors.toList()),
- page.getContinuationToken(),
- null);
+ this.pageMapper = getPageMapper(mapper);
+ }
+
+ private static Function, PagedResponse> getPageMapper(Function mapper) {
+ return page ->
+ new PagedResponseBase(
+ page.getRequest(),
+ page.getStatusCode(),
+ page.getHeaders(),
+ page.getElements().stream().map(mapper).collect(Collectors.toList()),
+ page.getContinuationToken(),
+ null);
}
@Override
public Stream stream() {
- return pageIterable.stream().map(mapper);
+ return pagedIterable.stream().map(mapper);
}
@Override
public Stream> streamByPage() {
- return pageIterable.streamByPage().map(pageMapper);
+ return pagedIterable.streamByPage().map(pageMapper);
}
@Override
public Stream> streamByPage(String continuationToken) {
- return pageIterable.streamByPage(continuationToken).map(pageMapper);
+ return pagedIterable.streamByPage(continuationToken).map(pageMapper);
}
@Override
public Stream> streamByPage(int preferredPageSize) {
- return pageIterable.streamByPage(preferredPageSize).map(pageMapper);
+ return pagedIterable.streamByPage(preferredPageSize).map(pageMapper);
}
@Override
public Stream> streamByPage(String continuationToken, int preferredPageSize) {
- return pageIterable.streamByPage(continuationToken, preferredPageSize).map(pageMapper);
+ return pagedIterable.streamByPage(continuationToken, preferredPageSize).map(pageMapper);
}
@Override
public Iterator iterator() {
- return new IteratorImpl(pageIterable.iterator(), mapper);
+ return new IteratorImpl(pagedIterable.iterator(), mapper);
}
@Override
public Iterable> iterableByPage() {
- return new IterableImpl, PagedResponse>(pageIterable.iterableByPage(), pageMapper);
+ return new IterableImpl, PagedResponse>(pagedIterable.iterableByPage(), pageMapper);
}
@Override
public Iterable> iterableByPage(String continuationToken) {
return new IterableImpl, PagedResponse>(
- pageIterable.iterableByPage(continuationToken), pageMapper);
+ pagedIterable.iterableByPage(continuationToken), pageMapper);
}
@Override
public Iterable> iterableByPage(int preferredPageSize) {
return new IterableImpl, PagedResponse>(
- pageIterable.iterableByPage(preferredPageSize), pageMapper);
+ pagedIterable.iterableByPage(preferredPageSize), pageMapper);
}
@Override
public Iterable> iterableByPage(String continuationToken, int preferredPageSize) {
return new IterableImpl, PagedResponse>(
- pageIterable.iterableByPage(continuationToken, preferredPageSize), pageMapper);
+ pagedIterable.iterableByPage(continuationToken, preferredPageSize), pageMapper);
}
}
diff --git a/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/main/java/com/azure/resourcemanager/digitaltwins/models/CheckNameRequest.java b/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/main/java/com/azure/resourcemanager/digitaltwins/models/CheckNameRequest.java
index edfafed90939d..cf2d8941316b5 100644
--- a/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/main/java/com/azure/resourcemanager/digitaltwins/models/CheckNameRequest.java
+++ b/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/main/java/com/azure/resourcemanager/digitaltwins/models/CheckNameRequest.java
@@ -25,7 +25,7 @@ public final class CheckNameRequest {
* Microsoft.DigitalTwins/digitalTwinsInstances.
*/
@JsonProperty(value = "type", required = true)
- private String type;
+ private String type = "Microsoft.DigitalTwins/digitalTwinsInstances";
/** Creates an instance of CheckNameRequest class. */
public CheckNameRequest() {
diff --git a/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/main/java/com/azure/resourcemanager/digitaltwins/models/ConnectionProperties.java b/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/main/java/com/azure/resourcemanager/digitaltwins/models/ConnectionProperties.java
index 63fc1cc5fc5e4..7571e4ca81164 100644
--- a/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/main/java/com/azure/resourcemanager/digitaltwins/models/ConnectionProperties.java
+++ b/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/main/java/com/azure/resourcemanager/digitaltwins/models/ConnectionProperties.java
@@ -22,10 +22,10 @@ public class ConnectionProperties {
private ConnectionPropertiesProvisioningState provisioningState;
/*
- * The private endpoint property of a private endpoint connection.
+ * The privateEndpoint property.
*/
@JsonProperty(value = "privateEndpoint")
- private PrivateEndpoint privateEndpoint;
+ private ConnectionPropertiesPrivateEndpoint privateEndpoint;
/*
* The list of group ids for the private endpoint connection.
@@ -34,10 +34,10 @@ public class ConnectionProperties {
private List groupIds;
/*
- * The current state of a private endpoint connection.
+ * The privateLinkServiceConnectionState property.
*/
@JsonProperty(value = "privateLinkServiceConnectionState")
- private ConnectionState privateLinkServiceConnectionState;
+ private ConnectionPropertiesPrivateLinkServiceConnectionState privateLinkServiceConnectionState;
/**
* Get the provisioningState property: The provisioning state.
@@ -49,21 +49,21 @@ public ConnectionPropertiesProvisioningState provisioningState() {
}
/**
- * Get the privateEndpoint property: The private endpoint property of a private endpoint connection.
+ * Get the privateEndpoint property: The privateEndpoint property.
*
* @return the privateEndpoint value.
*/
- public PrivateEndpoint privateEndpoint() {
+ public ConnectionPropertiesPrivateEndpoint privateEndpoint() {
return this.privateEndpoint;
}
/**
- * Set the privateEndpoint property: The private endpoint property of a private endpoint connection.
+ * Set the privateEndpoint property: The privateEndpoint property.
*
* @param privateEndpoint the privateEndpoint value to set.
* @return the ConnectionProperties object itself.
*/
- public ConnectionProperties withPrivateEndpoint(PrivateEndpoint privateEndpoint) {
+ public ConnectionProperties withPrivateEndpoint(ConnectionPropertiesPrivateEndpoint privateEndpoint) {
this.privateEndpoint = privateEndpoint;
return this;
}
@@ -89,22 +89,22 @@ public ConnectionProperties withGroupIds(List groupIds) {
}
/**
- * Get the privateLinkServiceConnectionState property: The current state of a private endpoint connection.
+ * Get the privateLinkServiceConnectionState property: The privateLinkServiceConnectionState property.
*
* @return the privateLinkServiceConnectionState value.
*/
- public ConnectionState privateLinkServiceConnectionState() {
+ public ConnectionPropertiesPrivateLinkServiceConnectionState privateLinkServiceConnectionState() {
return this.privateLinkServiceConnectionState;
}
/**
- * Set the privateLinkServiceConnectionState property: The current state of a private endpoint connection.
+ * Set the privateLinkServiceConnectionState property: The privateLinkServiceConnectionState property.
*
* @param privateLinkServiceConnectionState the privateLinkServiceConnectionState value to set.
* @return the ConnectionProperties object itself.
*/
public ConnectionProperties withPrivateLinkServiceConnectionState(
- ConnectionState privateLinkServiceConnectionState) {
+ ConnectionPropertiesPrivateLinkServiceConnectionState privateLinkServiceConnectionState) {
this.privateLinkServiceConnectionState = privateLinkServiceConnectionState;
return this;
}
diff --git a/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/main/java/com/azure/resourcemanager/digitaltwins/models/ConnectionPropertiesPrivateLinkServiceConnectionState.java b/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/main/java/com/azure/resourcemanager/digitaltwins/models/ConnectionPropertiesPrivateLinkServiceConnectionState.java
index ccf8f5b305056..778459d7e443f 100644
--- a/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/main/java/com/azure/resourcemanager/digitaltwins/models/ConnectionPropertiesPrivateLinkServiceConnectionState.java
+++ b/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/main/java/com/azure/resourcemanager/digitaltwins/models/ConnectionPropertiesPrivateLinkServiceConnectionState.java
@@ -4,12 +4,12 @@
package com.azure.resourcemanager.digitaltwins.models;
-import com.azure.core.annotation.Immutable;
+import com.azure.core.annotation.Fluent;
import com.azure.core.util.logging.ClientLogger;
import com.fasterxml.jackson.annotation.JsonIgnore;
/** The ConnectionPropertiesPrivateLinkServiceConnectionState model. */
-@Immutable
+@Fluent
public final class ConnectionPropertiesPrivateLinkServiceConnectionState extends ConnectionState {
@JsonIgnore
private final ClientLogger logger = new ClientLogger(ConnectionPropertiesPrivateLinkServiceConnectionState.class);
diff --git a/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/main/java/com/azure/resourcemanager/digitaltwins/models/DigitalTwinsPatchDescription.java b/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/main/java/com/azure/resourcemanager/digitaltwins/models/DigitalTwinsPatchDescription.java
index c2675797ad9a1..6bca67cfc7dd3 100644
--- a/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/main/java/com/azure/resourcemanager/digitaltwins/models/DigitalTwinsPatchDescription.java
+++ b/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/main/java/com/azure/resourcemanager/digitaltwins/models/DigitalTwinsPatchDescription.java
@@ -7,6 +7,7 @@
import com.azure.core.annotation.Fluent;
import com.azure.core.util.logging.ClientLogger;
import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.Map;
@@ -19,6 +20,7 @@ public final class DigitalTwinsPatchDescription {
* Instance patch properties
*/
@JsonProperty(value = "tags")
+ @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS)
private Map tags;
/*
diff --git a/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/main/java/com/azure/resourcemanager/digitaltwins/models/GroupIdInformation.java b/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/main/java/com/azure/resourcemanager/digitaltwins/models/GroupIdInformation.java
index 5e04b2b5220cf..9a6cec43ed569 100644
--- a/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/main/java/com/azure/resourcemanager/digitaltwins/models/GroupIdInformation.java
+++ b/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/main/java/com/azure/resourcemanager/digitaltwins/models/GroupIdInformation.java
@@ -9,7 +9,7 @@
/** An immutable client-side representation of GroupIdInformation. */
public interface GroupIdInformation {
/**
- * Gets the properties property: The properties for a group information object.
+ * Gets the properties property: The properties property.
*
* @return the properties value.
*/
diff --git a/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/main/java/com/azure/resourcemanager/digitaltwins/models/GroupIdInformationProperties.java b/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/main/java/com/azure/resourcemanager/digitaltwins/models/GroupIdInformationProperties.java
index ed94b1594b298..c70f67fd9e8c2 100644
--- a/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/main/java/com/azure/resourcemanager/digitaltwins/models/GroupIdInformationProperties.java
+++ b/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/main/java/com/azure/resourcemanager/digitaltwins/models/GroupIdInformationProperties.java
@@ -7,89 +7,31 @@
import com.azure.core.annotation.Fluent;
import com.azure.core.util.logging.ClientLogger;
import com.fasterxml.jackson.annotation.JsonIgnore;
-import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;
-/** The properties for a group information object. */
+/** The GroupIdInformationProperties model. */
@Fluent
-public class GroupIdInformationProperties {
+public final class GroupIdInformationProperties extends GroupIdInformationPropertiesAutoGenerated {
@JsonIgnore private final ClientLogger logger = new ClientLogger(GroupIdInformationProperties.class);
- /*
- * The group id
- */
- @JsonProperty(value = "groupId")
- private String groupId;
-
- /*
- * The required members for a specific group id.
- */
- @JsonProperty(value = "requiredMembers")
- private List requiredMembers;
-
- /*
- * The required DNS zones for a specific group id.
- */
- @JsonProperty(value = "requiredZoneNames")
- private List requiredZoneNames;
-
- /**
- * Get the groupId property: The group id.
- *
- * @return the groupId value.
- */
- public String groupId() {
- return this.groupId;
- }
-
- /**
- * Set the groupId property: The group id.
- *
- * @param groupId the groupId value to set.
- * @return the GroupIdInformationProperties object itself.
- */
+ /** {@inheritDoc} */
+ @Override
public GroupIdInformationProperties withGroupId(String groupId) {
- this.groupId = groupId;
+ super.withGroupId(groupId);
return this;
}
- /**
- * Get the requiredMembers property: The required members for a specific group id.
- *
- * @return the requiredMembers value.
- */
- public List requiredMembers() {
- return this.requiredMembers;
- }
-
- /**
- * Set the requiredMembers property: The required members for a specific group id.
- *
- * @param requiredMembers the requiredMembers value to set.
- * @return the GroupIdInformationProperties object itself.
- */
+ /** {@inheritDoc} */
+ @Override
public GroupIdInformationProperties withRequiredMembers(List requiredMembers) {
- this.requiredMembers = requiredMembers;
+ super.withRequiredMembers(requiredMembers);
return this;
}
- /**
- * Get the requiredZoneNames property: The required DNS zones for a specific group id.
- *
- * @return the requiredZoneNames value.
- */
- public List requiredZoneNames() {
- return this.requiredZoneNames;
- }
-
- /**
- * Set the requiredZoneNames property: The required DNS zones for a specific group id.
- *
- * @param requiredZoneNames the requiredZoneNames value to set.
- * @return the GroupIdInformationProperties object itself.
- */
+ /** {@inheritDoc} */
+ @Override
public GroupIdInformationProperties withRequiredZoneNames(List requiredZoneNames) {
- this.requiredZoneNames = requiredZoneNames;
+ super.withRequiredZoneNames(requiredZoneNames);
return this;
}
@@ -98,6 +40,8 @@ public GroupIdInformationProperties withRequiredZoneNames(List requiredZ
*
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
+ @Override
public void validate() {
+ super.validate();
}
}
diff --git a/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/main/java/com/azure/resourcemanager/digitaltwins/models/GroupIdInformationPropertiesAutoGenerated.java b/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/main/java/com/azure/resourcemanager/digitaltwins/models/GroupIdInformationPropertiesAutoGenerated.java
new file mode 100644
index 0000000000000..b863c9acaf505
--- /dev/null
+++ b/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/main/java/com/azure/resourcemanager/digitaltwins/models/GroupIdInformationPropertiesAutoGenerated.java
@@ -0,0 +1,103 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.digitaltwins.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.util.logging.ClientLogger;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.List;
+
+/** The properties for a group information object. */
+@Fluent
+public class GroupIdInformationPropertiesAutoGenerated {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(GroupIdInformationPropertiesAutoGenerated.class);
+
+ /*
+ * The group id
+ */
+ @JsonProperty(value = "groupId")
+ private String groupId;
+
+ /*
+ * The required members for a specific group id.
+ */
+ @JsonProperty(value = "requiredMembers")
+ private List requiredMembers;
+
+ /*
+ * The required DNS zones for a specific group id.
+ */
+ @JsonProperty(value = "requiredZoneNames")
+ private List requiredZoneNames;
+
+ /**
+ * Get the groupId property: The group id.
+ *
+ * @return the groupId value.
+ */
+ public String groupId() {
+ return this.groupId;
+ }
+
+ /**
+ * Set the groupId property: The group id.
+ *
+ * @param groupId the groupId value to set.
+ * @return the GroupIdInformationPropertiesAutoGenerated object itself.
+ */
+ public GroupIdInformationPropertiesAutoGenerated withGroupId(String groupId) {
+ this.groupId = groupId;
+ return this;
+ }
+
+ /**
+ * Get the requiredMembers property: The required members for a specific group id.
+ *
+ * @return the requiredMembers value.
+ */
+ public List requiredMembers() {
+ return this.requiredMembers;
+ }
+
+ /**
+ * Set the requiredMembers property: The required members for a specific group id.
+ *
+ * @param requiredMembers the requiredMembers value to set.
+ * @return the GroupIdInformationPropertiesAutoGenerated object itself.
+ */
+ public GroupIdInformationPropertiesAutoGenerated withRequiredMembers(List requiredMembers) {
+ this.requiredMembers = requiredMembers;
+ return this;
+ }
+
+ /**
+ * Get the requiredZoneNames property: The required DNS zones for a specific group id.
+ *
+ * @return the requiredZoneNames value.
+ */
+ public List requiredZoneNames() {
+ return this.requiredZoneNames;
+ }
+
+ /**
+ * Set the requiredZoneNames property: The required DNS zones for a specific group id.
+ *
+ * @param requiredZoneNames the requiredZoneNames value to set.
+ * @return the GroupIdInformationPropertiesAutoGenerated object itself.
+ */
+ public GroupIdInformationPropertiesAutoGenerated withRequiredZoneNames(List requiredZoneNames) {
+ this.requiredZoneNames = requiredZoneNames;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ }
+}
diff --git a/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/main/java/com/azure/resourcemanager/digitaltwins/models/PrivateEndpointConnection.java b/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/main/java/com/azure/resourcemanager/digitaltwins/models/PrivateEndpointConnection.java
index 5e9b88d1e94d8..bcf6555ad6b13 100644
--- a/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/main/java/com/azure/resourcemanager/digitaltwins/models/PrivateEndpointConnection.java
+++ b/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/main/java/com/azure/resourcemanager/digitaltwins/models/PrivateEndpointConnection.java
@@ -31,11 +31,11 @@ public interface PrivateEndpointConnection {
String type();
/**
- * Gets the properties property: The properties of a private endpoint connection.
+ * Gets the properties property: The properties property.
*
* @return the properties value.
*/
- ConnectionProperties properties();
+ PrivateEndpointConnectionProperties properties();
/**
* Gets the inner com.azure.resourcemanager.digitaltwins.fluent.models.PrivateEndpointConnectionInner object.
@@ -70,12 +70,12 @@ interface WithParentResource {
/** The stage of the PrivateEndpointConnection definition allowing to specify properties. */
interface WithProperties {
/**
- * Specifies the properties property: The properties of a private endpoint connection..
+ * Specifies the properties property: The properties property..
*
- * @param properties The properties of a private endpoint connection.
+ * @param properties The properties property.
* @return the next definition stage.
*/
- WithCreate withProperties(ConnectionProperties properties);
+ WithCreate withProperties(PrivateEndpointConnectionProperties properties);
}
/**
* The stage of the PrivateEndpointConnection definition which contains all the minimum required properties for
@@ -127,12 +127,12 @@ interface UpdateStages {
/** The stage of the PrivateEndpointConnection update allowing to specify properties. */
interface WithProperties {
/**
- * Specifies the properties property: The properties of a private endpoint connection..
+ * Specifies the properties property: The properties property..
*
- * @param properties The properties of a private endpoint connection.
+ * @param properties The properties property.
* @return the next definition stage.
*/
- Update withProperties(ConnectionProperties properties);
+ Update withProperties(PrivateEndpointConnectionProperties properties);
}
}
/**
diff --git a/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/main/java/com/azure/resourcemanager/digitaltwins/models/PrivateEndpointConnectionProperties.java b/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/main/java/com/azure/resourcemanager/digitaltwins/models/PrivateEndpointConnectionProperties.java
index 77e388ec2e4f6..8ac87ad5dedfd 100644
--- a/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/main/java/com/azure/resourcemanager/digitaltwins/models/PrivateEndpointConnectionProperties.java
+++ b/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/main/java/com/azure/resourcemanager/digitaltwins/models/PrivateEndpointConnectionProperties.java
@@ -4,19 +4,20 @@
package com.azure.resourcemanager.digitaltwins.models;
-import com.azure.core.annotation.Immutable;
+import com.azure.core.annotation.Fluent;
import com.azure.core.util.logging.ClientLogger;
import com.fasterxml.jackson.annotation.JsonIgnore;
import java.util.List;
/** The PrivateEndpointConnectionProperties model. */
-@Immutable
+@Fluent
public final class PrivateEndpointConnectionProperties extends ConnectionProperties {
@JsonIgnore private final ClientLogger logger = new ClientLogger(PrivateEndpointConnectionProperties.class);
/** {@inheritDoc} */
@Override
- public PrivateEndpointConnectionProperties withPrivateEndpoint(PrivateEndpoint privateEndpoint) {
+ public PrivateEndpointConnectionProperties withPrivateEndpoint(
+ ConnectionPropertiesPrivateEndpoint privateEndpoint) {
super.withPrivateEndpoint(privateEndpoint);
return this;
}
@@ -31,7 +32,7 @@ public PrivateEndpointConnectionProperties withGroupIds(List groupIds) {
/** {@inheritDoc} */
@Override
public PrivateEndpointConnectionProperties withPrivateLinkServiceConnectionState(
- ConnectionState privateLinkServiceConnectionState) {
+ ConnectionPropertiesPrivateLinkServiceConnectionState privateLinkServiceConnectionState) {
super.withPrivateLinkServiceConnectionState(privateLinkServiceConnectionState);
return this;
}
diff --git a/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/samples/java/com/azure/resourcemanager/digitaltwins/generated/DigitalTwinsCheckNameAvailabilitySamples.java b/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/samples/java/com/azure/resourcemanager/digitaltwins/generated/DigitalTwinsCheckNameAvailabilitySamples.java
new file mode 100644
index 0000000000000..d2bb9728c36fe
--- /dev/null
+++ b/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/samples/java/com/azure/resourcemanager/digitaltwins/generated/DigitalTwinsCheckNameAvailabilitySamples.java
@@ -0,0 +1,26 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.digitaltwins.generated;
+
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.digitaltwins.models.CheckNameRequest;
+
+/** Samples for DigitalTwins CheckNameAvailability. */
+public final class DigitalTwinsCheckNameAvailabilitySamples {
+ /*
+ * x-ms-original-file: specification/digitaltwins/resource-manager/Microsoft.DigitalTwins/stable/2020-12-01/examples/DigitalTwinsCheckNameAvailability_example.json
+ */
+ /**
+ * Sample code: Check name Availability.
+ *
+ * @param manager Entry point to AzureDigitalTwinsManager.
+ */
+ public static void checkNameAvailability(com.azure.resourcemanager.digitaltwins.AzureDigitalTwinsManager manager) {
+ manager
+ .digitalTwins()
+ .checkNameAvailabilityWithResponse(
+ "WestUS2", new CheckNameRequest().withName("myadtinstance"), Context.NONE);
+ }
+}
diff --git a/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/samples/java/com/azure/resourcemanager/digitaltwins/generated/DigitalTwinsCreateOrUpdateSamples.java b/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/samples/java/com/azure/resourcemanager/digitaltwins/generated/DigitalTwinsCreateOrUpdateSamples.java
new file mode 100644
index 0000000000000..e1d787b2066e2
--- /dev/null
+++ b/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/samples/java/com/azure/resourcemanager/digitaltwins/generated/DigitalTwinsCreateOrUpdateSamples.java
@@ -0,0 +1,68 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.digitaltwins.generated;
+
+import com.azure.resourcemanager.digitaltwins.models.DigitalTwinsIdentity;
+import com.azure.resourcemanager.digitaltwins.models.DigitalTwinsIdentityType;
+import com.azure.resourcemanager.digitaltwins.models.PublicNetworkAccess;
+
+/** Samples for DigitalTwins CreateOrUpdate. */
+public final class DigitalTwinsCreateOrUpdateSamples {
+ /*
+ * x-ms-original-file: specification/digitaltwins/resource-manager/Microsoft.DigitalTwins/stable/2020-12-01/examples/DigitalTwinsPut_example.json
+ */
+ /**
+ * Sample code: Put a DigitalTwinsInstance resource.
+ *
+ * @param manager Entry point to AzureDigitalTwinsManager.
+ */
+ public static void putADigitalTwinsInstanceResource(
+ com.azure.resourcemanager.digitaltwins.AzureDigitalTwinsManager manager) {
+ manager
+ .digitalTwins()
+ .define("myDigitalTwinsService")
+ .withRegion("WestUS2")
+ .withExistingResourceGroup("resRg")
+ .create();
+ }
+
+ /*
+ * x-ms-original-file: specification/digitaltwins/resource-manager/Microsoft.DigitalTwins/stable/2020-12-01/examples/DigitalTwinsPut_WithPublicNetworkAccess.json
+ */
+ /**
+ * Sample code: Put a DigitalTwinsInstance resource with publicNetworkAccess property.
+ *
+ * @param manager Entry point to AzureDigitalTwinsManager.
+ */
+ public static void putADigitalTwinsInstanceResourceWithPublicNetworkAccessProperty(
+ com.azure.resourcemanager.digitaltwins.AzureDigitalTwinsManager manager) {
+ manager
+ .digitalTwins()
+ .define("myDigitalTwinsService")
+ .withRegion("WestUS2")
+ .withExistingResourceGroup("resRg")
+ .withPublicNetworkAccess(PublicNetworkAccess.ENABLED)
+ .create();
+ }
+
+ /*
+ * x-ms-original-file: specification/digitaltwins/resource-manager/Microsoft.DigitalTwins/stable/2020-12-01/examples/DigitalTwinsPut_WithIdentity_example.json
+ */
+ /**
+ * Sample code: Put a DigitalTwinsInstance resource with identity.
+ *
+ * @param manager Entry point to AzureDigitalTwinsManager.
+ */
+ public static void putADigitalTwinsInstanceResourceWithIdentity(
+ com.azure.resourcemanager.digitaltwins.AzureDigitalTwinsManager manager) {
+ manager
+ .digitalTwins()
+ .define("myDigitalTwinsService")
+ .withRegion("WestUS2")
+ .withExistingResourceGroup("resRg")
+ .withIdentity(new DigitalTwinsIdentity().withType(DigitalTwinsIdentityType.SYSTEM_ASSIGNED))
+ .create();
+ }
+}
diff --git a/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/samples/java/com/azure/resourcemanager/digitaltwins/generated/DigitalTwinsDeleteSamples.java b/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/samples/java/com/azure/resourcemanager/digitaltwins/generated/DigitalTwinsDeleteSamples.java
new file mode 100644
index 0000000000000..13a7b9a63fcee
--- /dev/null
+++ b/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/samples/java/com/azure/resourcemanager/digitaltwins/generated/DigitalTwinsDeleteSamples.java
@@ -0,0 +1,36 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.digitaltwins.generated;
+
+import com.azure.core.util.Context;
+
+/** Samples for DigitalTwins Delete. */
+public final class DigitalTwinsDeleteSamples {
+ /*
+ * x-ms-original-file: specification/digitaltwins/resource-manager/Microsoft.DigitalTwins/stable/2020-12-01/examples/DigitalTwinsDelete_example.json
+ */
+ /**
+ * Sample code: Delete a DigitalTwinsInstance resource.
+ *
+ * @param manager Entry point to AzureDigitalTwinsManager.
+ */
+ public static void deleteADigitalTwinsInstanceResource(
+ com.azure.resourcemanager.digitaltwins.AzureDigitalTwinsManager manager) {
+ manager.digitalTwins().delete("resRg", "myDigitalTwinsService", Context.NONE);
+ }
+
+ /*
+ * x-ms-original-file: specification/digitaltwins/resource-manager/Microsoft.DigitalTwins/stable/2020-12-01/examples/DigitalTwinsDelete_WithIdentity_example.json
+ */
+ /**
+ * Sample code: Delete a DigitalTwinsInstance resource with identity.
+ *
+ * @param manager Entry point to AzureDigitalTwinsManager.
+ */
+ public static void deleteADigitalTwinsInstanceResourceWithIdentity(
+ com.azure.resourcemanager.digitaltwins.AzureDigitalTwinsManager manager) {
+ manager.digitalTwins().delete("resRg", "myDigitalTwinsService", Context.NONE);
+ }
+}
diff --git a/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/samples/java/com/azure/resourcemanager/digitaltwins/generated/DigitalTwinsEndpointCreateOrUpdateSamples.java b/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/samples/java/com/azure/resourcemanager/digitaltwins/generated/DigitalTwinsEndpointCreateOrUpdateSamples.java
new file mode 100644
index 0000000000000..44ee8f6244050
--- /dev/null
+++ b/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/samples/java/com/azure/resourcemanager/digitaltwins/generated/DigitalTwinsEndpointCreateOrUpdateSamples.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.digitaltwins.generated;
+
+import com.azure.resourcemanager.digitaltwins.models.AuthenticationType;
+import com.azure.resourcemanager.digitaltwins.models.ServiceBus;
+
+/** Samples for DigitalTwinsEndpoint CreateOrUpdate. */
+public final class DigitalTwinsEndpointCreateOrUpdateSamples {
+ /*
+ * x-ms-original-file: specification/digitaltwins/resource-manager/Microsoft.DigitalTwins/stable/2020-12-01/examples/DigitalTwinsEndpointPut_example.json
+ */
+ /**
+ * Sample code: Put a DigitalTwinsInstance resource.
+ *
+ * @param manager Entry point to AzureDigitalTwinsManager.
+ */
+ public static void putADigitalTwinsInstanceResource(
+ com.azure.resourcemanager.digitaltwins.AzureDigitalTwinsManager manager) {
+ manager
+ .digitalTwinsEndpoints()
+ .define("myServiceBus")
+ .withExistingDigitalTwinsInstance("resRg", "myDigitalTwinsService")
+ .withProperties(
+ new ServiceBus()
+ .withAuthenticationType(AuthenticationType.KEY_BASED)
+ .withPrimaryConnectionString(
+ "Endpoint=sb://mysb.servicebus.windows.net/;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=xyzxyzoX4=;EntityPath=abcabc")
+ .withSecondaryConnectionString(
+ "Endpoint=sb://mysb.servicebus.windows.net/;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=xyzxyzoX4=;EntityPath=abcabc"))
+ .create();
+ }
+
+ /*
+ * x-ms-original-file: specification/digitaltwins/resource-manager/Microsoft.DigitalTwins/stable/2020-12-01/examples/DigitalTwinsEndpointPut_WithIdentity_example.json
+ */
+ /**
+ * Sample code: Put a DigitalTwinsInstance resource with identity.
+ *
+ * @param manager Entry point to AzureDigitalTwinsManager.
+ */
+ public static void putADigitalTwinsInstanceResourceWithIdentity(
+ com.azure.resourcemanager.digitaltwins.AzureDigitalTwinsManager manager) {
+ manager
+ .digitalTwinsEndpoints()
+ .define("myServiceBus")
+ .withExistingDigitalTwinsInstance("resRg", "myDigitalTwinsService")
+ .withProperties(
+ new ServiceBus()
+ .withAuthenticationType(AuthenticationType.IDENTITY_BASED)
+ .withEndpointUri("sb://mysb.servicebus.windows.net/")
+ .withEntityPath("mysbtopic"))
+ .create();
+ }
+}
diff --git a/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/samples/java/com/azure/resourcemanager/digitaltwins/generated/DigitalTwinsEndpointDeleteSamples.java b/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/samples/java/com/azure/resourcemanager/digitaltwins/generated/DigitalTwinsEndpointDeleteSamples.java
new file mode 100644
index 0000000000000..a19903e972761
--- /dev/null
+++ b/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/samples/java/com/azure/resourcemanager/digitaltwins/generated/DigitalTwinsEndpointDeleteSamples.java
@@ -0,0 +1,36 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.digitaltwins.generated;
+
+import com.azure.core.util.Context;
+
+/** Samples for DigitalTwinsEndpoint Delete. */
+public final class DigitalTwinsEndpointDeleteSamples {
+ /*
+ * x-ms-original-file: specification/digitaltwins/resource-manager/Microsoft.DigitalTwins/stable/2020-12-01/examples/DigitalTwinsEndpointDelete_example.json
+ */
+ /**
+ * Sample code: Delete a DigitalTwinsInstance endpoint.
+ *
+ * @param manager Entry point to AzureDigitalTwinsManager.
+ */
+ public static void deleteADigitalTwinsInstanceEndpoint(
+ com.azure.resourcemanager.digitaltwins.AzureDigitalTwinsManager manager) {
+ manager.digitalTwinsEndpoints().delete("resRg", "myDigitalTwinsService", "myendpoint", Context.NONE);
+ }
+
+ /*
+ * x-ms-original-file: specification/digitaltwins/resource-manager/Microsoft.DigitalTwins/stable/2020-12-01/examples/DigitalTwinsEndpointDelete_WithIdentity_example.json
+ */
+ /**
+ * Sample code: Delete a DigitalTwinsInstance endpoint with identity.
+ *
+ * @param manager Entry point to AzureDigitalTwinsManager.
+ */
+ public static void deleteADigitalTwinsInstanceEndpointWithIdentity(
+ com.azure.resourcemanager.digitaltwins.AzureDigitalTwinsManager manager) {
+ manager.digitalTwinsEndpoints().delete("resRg", "myDigitalTwinsService", "myendpoint", Context.NONE);
+ }
+}
diff --git a/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/samples/java/com/azure/resourcemanager/digitaltwins/generated/DigitalTwinsEndpointGetSamples.java b/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/samples/java/com/azure/resourcemanager/digitaltwins/generated/DigitalTwinsEndpointGetSamples.java
new file mode 100644
index 0000000000000..646871045215d
--- /dev/null
+++ b/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/samples/java/com/azure/resourcemanager/digitaltwins/generated/DigitalTwinsEndpointGetSamples.java
@@ -0,0 +1,36 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.digitaltwins.generated;
+
+import com.azure.core.util.Context;
+
+/** Samples for DigitalTwinsEndpoint Get. */
+public final class DigitalTwinsEndpointGetSamples {
+ /*
+ * x-ms-original-file: specification/digitaltwins/resource-manager/Microsoft.DigitalTwins/stable/2020-12-01/examples/DigitalTwinsEndpointGet_example.json
+ */
+ /**
+ * Sample code: Get a DigitalTwinsInstance endpoint.
+ *
+ * @param manager Entry point to AzureDigitalTwinsManager.
+ */
+ public static void getADigitalTwinsInstanceEndpoint(
+ com.azure.resourcemanager.digitaltwins.AzureDigitalTwinsManager manager) {
+ manager.digitalTwinsEndpoints().getWithResponse("resRg", "myDigitalTwinsService", "myServiceBus", Context.NONE);
+ }
+
+ /*
+ * x-ms-original-file: specification/digitaltwins/resource-manager/Microsoft.DigitalTwins/stable/2020-12-01/examples/DigitalTwinsEndpointGet_WithIdentity_example.json
+ */
+ /**
+ * Sample code: Get a DigitalTwinsInstance endpoint with identity.
+ *
+ * @param manager Entry point to AzureDigitalTwinsManager.
+ */
+ public static void getADigitalTwinsInstanceEndpointWithIdentity(
+ com.azure.resourcemanager.digitaltwins.AzureDigitalTwinsManager manager) {
+ manager.digitalTwinsEndpoints().getWithResponse("resRg", "myDigitalTwinsService", "myServiceBus", Context.NONE);
+ }
+}
diff --git a/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/samples/java/com/azure/resourcemanager/digitaltwins/generated/DigitalTwinsEndpointListSamples.java b/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/samples/java/com/azure/resourcemanager/digitaltwins/generated/DigitalTwinsEndpointListSamples.java
new file mode 100644
index 0000000000000..f7666dd7ab4d1
--- /dev/null
+++ b/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/samples/java/com/azure/resourcemanager/digitaltwins/generated/DigitalTwinsEndpointListSamples.java
@@ -0,0 +1,36 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.digitaltwins.generated;
+
+import com.azure.core.util.Context;
+
+/** Samples for DigitalTwinsEndpoint List. */
+public final class DigitalTwinsEndpointListSamples {
+ /*
+ * x-ms-original-file: specification/digitaltwins/resource-manager/Microsoft.DigitalTwins/stable/2020-12-01/examples/DigitalTwinsEndpointsGet_example.json
+ */
+ /**
+ * Sample code: Get a DigitalTwinsInstance endpoints.
+ *
+ * @param manager Entry point to AzureDigitalTwinsManager.
+ */
+ public static void getADigitalTwinsInstanceEndpoints(
+ com.azure.resourcemanager.digitaltwins.AzureDigitalTwinsManager manager) {
+ manager.digitalTwinsEndpoints().list("resRg", "myDigitalTwinsService", Context.NONE);
+ }
+
+ /*
+ * x-ms-original-file: specification/digitaltwins/resource-manager/Microsoft.DigitalTwins/stable/2020-12-01/examples/DigitalTwinsEndpointsGet_WithIdentity_example.json
+ */
+ /**
+ * Sample code: Get a DigitalTwinsInstance endpoints with identity.
+ *
+ * @param manager Entry point to AzureDigitalTwinsManager.
+ */
+ public static void getADigitalTwinsInstanceEndpointsWithIdentity(
+ com.azure.resourcemanager.digitaltwins.AzureDigitalTwinsManager manager) {
+ manager.digitalTwinsEndpoints().list("resRg", "myDigitalTwinsService", Context.NONE);
+ }
+}
diff --git a/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/samples/java/com/azure/resourcemanager/digitaltwins/generated/DigitalTwinsGetByResourceGroupSamples.java b/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/samples/java/com/azure/resourcemanager/digitaltwins/generated/DigitalTwinsGetByResourceGroupSamples.java
new file mode 100644
index 0000000000000..dafd3cc0e42dc
--- /dev/null
+++ b/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/samples/java/com/azure/resourcemanager/digitaltwins/generated/DigitalTwinsGetByResourceGroupSamples.java
@@ -0,0 +1,49 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.digitaltwins.generated;
+
+import com.azure.core.util.Context;
+
+/** Samples for DigitalTwins GetByResourceGroup. */
+public final class DigitalTwinsGetByResourceGroupSamples {
+ /*
+ * x-ms-original-file: specification/digitaltwins/resource-manager/Microsoft.DigitalTwins/stable/2020-12-01/examples/DigitalTwinsGet_WithIdentity_example.json
+ */
+ /**
+ * Sample code: Get a DigitalTwinsInstance resource with identity.
+ *
+ * @param manager Entry point to AzureDigitalTwinsManager.
+ */
+ public static void getADigitalTwinsInstanceResourceWithIdentity(
+ com.azure.resourcemanager.digitaltwins.AzureDigitalTwinsManager manager) {
+ manager.digitalTwins().getByResourceGroupWithResponse("resRg", "myDigitalTwinsService", Context.NONE);
+ }
+
+ /*
+ * x-ms-original-file: specification/digitaltwins/resource-manager/Microsoft.DigitalTwins/stable/2020-12-01/examples/DigitalTwinsGet_WithPrivateEndpointConnection_example.json
+ */
+ /**
+ * Sample code: Get a DigitalTwinsInstance resource with a private endpoint connection.
+ *
+ * @param manager Entry point to AzureDigitalTwinsManager.
+ */
+ public static void getADigitalTwinsInstanceResourceWithAPrivateEndpointConnection(
+ com.azure.resourcemanager.digitaltwins.AzureDigitalTwinsManager manager) {
+ manager.digitalTwins().getByResourceGroupWithResponse("resRg", "myDigitalTwinsService", Context.NONE);
+ }
+
+ /*
+ * x-ms-original-file: specification/digitaltwins/resource-manager/Microsoft.DigitalTwins/stable/2020-12-01/examples/DigitalTwinsGet_example.json
+ */
+ /**
+ * Sample code: Get a DigitalTwinsInstance resource.
+ *
+ * @param manager Entry point to AzureDigitalTwinsManager.
+ */
+ public static void getADigitalTwinsInstanceResource(
+ com.azure.resourcemanager.digitaltwins.AzureDigitalTwinsManager manager) {
+ manager.digitalTwins().getByResourceGroupWithResponse("resRg", "myDigitalTwinsService", Context.NONE);
+ }
+}
diff --git a/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/samples/java/com/azure/resourcemanager/digitaltwins/generated/DigitalTwinsListByResourceGroupSamples.java b/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/samples/java/com/azure/resourcemanager/digitaltwins/generated/DigitalTwinsListByResourceGroupSamples.java
new file mode 100644
index 0000000000000..accf8d2f9ccd8
--- /dev/null
+++ b/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/samples/java/com/azure/resourcemanager/digitaltwins/generated/DigitalTwinsListByResourceGroupSamples.java
@@ -0,0 +1,23 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.digitaltwins.generated;
+
+import com.azure.core.util.Context;
+
+/** Samples for DigitalTwins ListByResourceGroup. */
+public final class DigitalTwinsListByResourceGroupSamples {
+ /*
+ * x-ms-original-file: specification/digitaltwins/resource-manager/Microsoft.DigitalTwins/stable/2020-12-01/examples/DigitalTwinsListByResourceGroup_example.json
+ */
+ /**
+ * Sample code: Get DigitalTwinsInstance resources by resource group.
+ *
+ * @param manager Entry point to AzureDigitalTwinsManager.
+ */
+ public static void getDigitalTwinsInstanceResourcesByResourceGroup(
+ com.azure.resourcemanager.digitaltwins.AzureDigitalTwinsManager manager) {
+ manager.digitalTwins().listByResourceGroup("resRg", Context.NONE);
+ }
+}
diff --git a/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/samples/java/com/azure/resourcemanager/digitaltwins/generated/DigitalTwinsListSamples.java b/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/samples/java/com/azure/resourcemanager/digitaltwins/generated/DigitalTwinsListSamples.java
new file mode 100644
index 0000000000000..48560e010bf68
--- /dev/null
+++ b/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/samples/java/com/azure/resourcemanager/digitaltwins/generated/DigitalTwinsListSamples.java
@@ -0,0 +1,23 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.digitaltwins.generated;
+
+import com.azure.core.util.Context;
+
+/** Samples for DigitalTwins List. */
+public final class DigitalTwinsListSamples {
+ /*
+ * x-ms-original-file: specification/digitaltwins/resource-manager/Microsoft.DigitalTwins/stable/2020-12-01/examples/DigitalTwinsList_example.json
+ */
+ /**
+ * Sample code: Get DigitalTwinsInstance resources by subscription.
+ *
+ * @param manager Entry point to AzureDigitalTwinsManager.
+ */
+ public static void getDigitalTwinsInstanceResourcesBySubscription(
+ com.azure.resourcemanager.digitaltwins.AzureDigitalTwinsManager manager) {
+ manager.digitalTwins().list(Context.NONE);
+ }
+}
diff --git a/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/samples/java/com/azure/resourcemanager/digitaltwins/generated/DigitalTwinsUpdateSamples.java b/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/samples/java/com/azure/resourcemanager/digitaltwins/generated/DigitalTwinsUpdateSamples.java
new file mode 100644
index 0000000000000..38b0c055a0137
--- /dev/null
+++ b/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/samples/java/com/azure/resourcemanager/digitaltwins/generated/DigitalTwinsUpdateSamples.java
@@ -0,0 +1,85 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.digitaltwins.generated;
+
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.digitaltwins.models.DigitalTwinsDescription;
+import com.azure.resourcemanager.digitaltwins.models.DigitalTwinsIdentity;
+import com.azure.resourcemanager.digitaltwins.models.DigitalTwinsIdentityType;
+import com.azure.resourcemanager.digitaltwins.models.DigitalTwinsPatchProperties;
+import com.azure.resourcemanager.digitaltwins.models.PublicNetworkAccess;
+import java.util.HashMap;
+import java.util.Map;
+
+/** Samples for DigitalTwins Update. */
+public final class DigitalTwinsUpdateSamples {
+ /*
+ * x-ms-original-file: specification/digitaltwins/resource-manager/Microsoft.DigitalTwins/stable/2020-12-01/examples/DigitalTwinsPatch_example.json
+ */
+ /**
+ * Sample code: Patch a DigitalTwinsInstance resource.
+ *
+ * @param manager Entry point to AzureDigitalTwinsManager.
+ */
+ public static void patchADigitalTwinsInstanceResource(
+ com.azure.resourcemanager.digitaltwins.AzureDigitalTwinsManager manager) {
+ DigitalTwinsDescription resource =
+ manager
+ .digitalTwins()
+ .getByResourceGroupWithResponse("resRg", "myDigitalTwinsService", Context.NONE)
+ .getValue();
+ resource.update().withTags(mapOf("purpose", "dev")).apply();
+ }
+
+ /*
+ * x-ms-original-file: specification/digitaltwins/resource-manager/Microsoft.DigitalTwins/stable/2020-12-01/examples/DigitalTwinsPatch_WithPublicNetworkAccess.json
+ */
+ /**
+ * Sample code: Patch a DigitalTwinsInstance resource with publicNetworkAccess property.
+ *
+ * @param manager Entry point to AzureDigitalTwinsManager.
+ */
+ public static void patchADigitalTwinsInstanceResourceWithPublicNetworkAccessProperty(
+ com.azure.resourcemanager.digitaltwins.AzureDigitalTwinsManager manager) {
+ DigitalTwinsDescription resource =
+ manager
+ .digitalTwins()
+ .getByResourceGroupWithResponse("resRg", "myDigitalTwinsService", Context.NONE)
+ .getValue();
+ resource
+ .update()
+ .withProperties(new DigitalTwinsPatchProperties().withPublicNetworkAccess(PublicNetworkAccess.DISABLED))
+ .apply();
+ }
+
+ /*
+ * x-ms-original-file: specification/digitaltwins/resource-manager/Microsoft.DigitalTwins/stable/2020-12-01/examples/DigitalTwinsPatch_WithIdentity_example.json
+ */
+ /**
+ * Sample code: Patch a DigitalTwinsInstance resource with identity.
+ *
+ * @param manager Entry point to AzureDigitalTwinsManager.
+ */
+ public static void patchADigitalTwinsInstanceResourceWithIdentity(
+ com.azure.resourcemanager.digitaltwins.AzureDigitalTwinsManager manager) {
+ DigitalTwinsDescription resource =
+ manager
+ .digitalTwins()
+ .getByResourceGroupWithResponse("resRg", "myDigitalTwinsService", Context.NONE)
+ .getValue();
+ resource.update().withIdentity(new DigitalTwinsIdentity().withType(DigitalTwinsIdentityType.NONE)).apply();
+ }
+
+ @SuppressWarnings("unchecked")
+ private static Map mapOf(Object... inputs) {
+ Map map = new HashMap<>();
+ for (int i = 0; i < inputs.length; i += 2) {
+ String key = (String) inputs[i];
+ T value = (T) inputs[i + 1];
+ map.put(key, value);
+ }
+ return map;
+ }
+}
diff --git a/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/samples/java/com/azure/resourcemanager/digitaltwins/generated/OperationsListSamples.java b/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/samples/java/com/azure/resourcemanager/digitaltwins/generated/OperationsListSamples.java
new file mode 100644
index 0000000000000..67a322fdef5c7
--- /dev/null
+++ b/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/samples/java/com/azure/resourcemanager/digitaltwins/generated/OperationsListSamples.java
@@ -0,0 +1,22 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.digitaltwins.generated;
+
+import com.azure.core.util.Context;
+
+/** Samples for Operations List. */
+public final class OperationsListSamples {
+ /*
+ * x-ms-original-file: specification/digitaltwins/resource-manager/Microsoft.DigitalTwins/stable/2020-12-01/examples/DigitalTwinsOperationsList_example.json
+ */
+ /**
+ * Sample code: Get available operations.
+ *
+ * @param manager Entry point to AzureDigitalTwinsManager.
+ */
+ public static void getAvailableOperations(com.azure.resourcemanager.digitaltwins.AzureDigitalTwinsManager manager) {
+ manager.operations().list(Context.NONE);
+ }
+}
diff --git a/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/samples/java/com/azure/resourcemanager/digitaltwins/generated/PrivateEndpointConnectionsCreateOrUpdateSamples.java b/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/samples/java/com/azure/resourcemanager/digitaltwins/generated/PrivateEndpointConnectionsCreateOrUpdateSamples.java
new file mode 100644
index 0000000000000..9187d74577f17
--- /dev/null
+++ b/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/samples/java/com/azure/resourcemanager/digitaltwins/generated/PrivateEndpointConnectionsCreateOrUpdateSamples.java
@@ -0,0 +1,40 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.digitaltwins.generated;
+
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.digitaltwins.models.ConnectionPropertiesPrivateLinkServiceConnectionState;
+import com.azure.resourcemanager.digitaltwins.models.PrivateEndpointConnection;
+import com.azure.resourcemanager.digitaltwins.models.PrivateEndpointConnectionProperties;
+import com.azure.resourcemanager.digitaltwins.models.PrivateLinkServiceConnectionStatus;
+
+/** Samples for PrivateEndpointConnections CreateOrUpdate. */
+public final class PrivateEndpointConnectionsCreateOrUpdateSamples {
+ /*
+ * x-ms-original-file: specification/digitaltwins/resource-manager/Microsoft.DigitalTwins/stable/2020-12-01/examples/PrivateEndpointConnectionPut_example.json
+ */
+ /**
+ * Sample code: Update the status of a private endpoint connection with the given name.
+ *
+ * @param manager Entry point to AzureDigitalTwinsManager.
+ */
+ public static void updateTheStatusOfAPrivateEndpointConnectionWithTheGivenName(
+ com.azure.resourcemanager.digitaltwins.AzureDigitalTwinsManager manager) {
+ PrivateEndpointConnection resource =
+ manager
+ .privateEndpointConnections()
+ .getWithResponse("resRg", "myDigitalTwinsService", "myPrivateConnection", Context.NONE)
+ .getValue();
+ resource
+ .update()
+ .withProperties(
+ new PrivateEndpointConnectionProperties()
+ .withPrivateLinkServiceConnectionState(
+ new ConnectionPropertiesPrivateLinkServiceConnectionState()
+ .withStatus(PrivateLinkServiceConnectionStatus.APPROVED)
+ .withDescription("Approved by johndoe@company.com.")))
+ .apply();
+ }
+}
diff --git a/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/samples/java/com/azure/resourcemanager/digitaltwins/generated/PrivateEndpointConnectionsDeleteSamples.java b/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/samples/java/com/azure/resourcemanager/digitaltwins/generated/PrivateEndpointConnectionsDeleteSamples.java
new file mode 100644
index 0000000000000..23d14abbd1f0b
--- /dev/null
+++ b/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/samples/java/com/azure/resourcemanager/digitaltwins/generated/PrivateEndpointConnectionsDeleteSamples.java
@@ -0,0 +1,25 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.digitaltwins.generated;
+
+import com.azure.core.util.Context;
+
+/** Samples for PrivateEndpointConnections Delete. */
+public final class PrivateEndpointConnectionsDeleteSamples {
+ /*
+ * x-ms-original-file: specification/digitaltwins/resource-manager/Microsoft.DigitalTwins/stable/2020-12-01/examples/PrivateEndpointConnectionDelete_example.json
+ */
+ /**
+ * Sample code: Delete private endpoint connection with the specified name.
+ *
+ * @param manager Entry point to AzureDigitalTwinsManager.
+ */
+ public static void deletePrivateEndpointConnectionWithTheSpecifiedName(
+ com.azure.resourcemanager.digitaltwins.AzureDigitalTwinsManager manager) {
+ manager
+ .privateEndpointConnections()
+ .delete("resRg", "myDigitalTwinsService", "myPrivateConnection", Context.NONE);
+ }
+}
diff --git a/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/samples/java/com/azure/resourcemanager/digitaltwins/generated/PrivateEndpointConnectionsGetSamples.java b/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/samples/java/com/azure/resourcemanager/digitaltwins/generated/PrivateEndpointConnectionsGetSamples.java
new file mode 100644
index 0000000000000..8f4ebdd5c5368
--- /dev/null
+++ b/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/samples/java/com/azure/resourcemanager/digitaltwins/generated/PrivateEndpointConnectionsGetSamples.java
@@ -0,0 +1,25 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.digitaltwins.generated;
+
+import com.azure.core.util.Context;
+
+/** Samples for PrivateEndpointConnections Get. */
+public final class PrivateEndpointConnectionsGetSamples {
+ /*
+ * x-ms-original-file: specification/digitaltwins/resource-manager/Microsoft.DigitalTwins/stable/2020-12-01/examples/PrivateEndpointConnectionByConnectionName_example.json
+ */
+ /**
+ * Sample code: Get private endpoint connection properties for the given private endpoint.
+ *
+ * @param manager Entry point to AzureDigitalTwinsManager.
+ */
+ public static void getPrivateEndpointConnectionPropertiesForTheGivenPrivateEndpoint(
+ com.azure.resourcemanager.digitaltwins.AzureDigitalTwinsManager manager) {
+ manager
+ .privateEndpointConnections()
+ .getWithResponse("resRg", "myDigitalTwinsService", "myPrivateConnection", Context.NONE);
+ }
+}
diff --git a/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/samples/java/com/azure/resourcemanager/digitaltwins/generated/PrivateEndpointConnectionsListSamples.java b/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/samples/java/com/azure/resourcemanager/digitaltwins/generated/PrivateEndpointConnectionsListSamples.java
new file mode 100644
index 0000000000000..162d3e7128cc6
--- /dev/null
+++ b/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/samples/java/com/azure/resourcemanager/digitaltwins/generated/PrivateEndpointConnectionsListSamples.java
@@ -0,0 +1,23 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.digitaltwins.generated;
+
+import com.azure.core.util.Context;
+
+/** Samples for PrivateEndpointConnections List. */
+public final class PrivateEndpointConnectionsListSamples {
+ /*
+ * x-ms-original-file: specification/digitaltwins/resource-manager/Microsoft.DigitalTwins/stable/2020-12-01/examples/PrivateEndpointConnectionsList_example.json
+ */
+ /**
+ * Sample code: List private endpoint connection properties.
+ *
+ * @param manager Entry point to AzureDigitalTwinsManager.
+ */
+ public static void listPrivateEndpointConnectionProperties(
+ com.azure.resourcemanager.digitaltwins.AzureDigitalTwinsManager manager) {
+ manager.privateEndpointConnections().listWithResponse("resRg", "myDigitalTwinsService", Context.NONE);
+ }
+}
diff --git a/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/samples/java/com/azure/resourcemanager/digitaltwins/generated/PrivateLinkResourcesGetSamples.java b/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/samples/java/com/azure/resourcemanager/digitaltwins/generated/PrivateLinkResourcesGetSamples.java
new file mode 100644
index 0000000000000..064ec37ca7b55
--- /dev/null
+++ b/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/samples/java/com/azure/resourcemanager/digitaltwins/generated/PrivateLinkResourcesGetSamples.java
@@ -0,0 +1,23 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.digitaltwins.generated;
+
+import com.azure.core.util.Context;
+
+/** Samples for PrivateLinkResources Get. */
+public final class PrivateLinkResourcesGetSamples {
+ /*
+ * x-ms-original-file: specification/digitaltwins/resource-manager/Microsoft.DigitalTwins/stable/2020-12-01/examples/PrivateLinkResourcesByGroupId_example.json
+ */
+ /**
+ * Sample code: Get the specified private link resource for the given Digital Twin.
+ *
+ * @param manager Entry point to AzureDigitalTwinsManager.
+ */
+ public static void getTheSpecifiedPrivateLinkResourceForTheGivenDigitalTwin(
+ com.azure.resourcemanager.digitaltwins.AzureDigitalTwinsManager manager) {
+ manager.privateLinkResources().getWithResponse("resRg", "myDigitalTwinsService", "subResource", Context.NONE);
+ }
+}
diff --git a/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/samples/java/com/azure/resourcemanager/digitaltwins/generated/PrivateLinkResourcesListSamples.java b/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/samples/java/com/azure/resourcemanager/digitaltwins/generated/PrivateLinkResourcesListSamples.java
new file mode 100644
index 0000000000000..165af22c9afd0
--- /dev/null
+++ b/sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/samples/java/com/azure/resourcemanager/digitaltwins/generated/PrivateLinkResourcesListSamples.java
@@ -0,0 +1,23 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.digitaltwins.generated;
+
+import com.azure.core.util.Context;
+
+/** Samples for PrivateLinkResources List. */
+public final class PrivateLinkResourcesListSamples {
+ /*
+ * x-ms-original-file: specification/digitaltwins/resource-manager/Microsoft.DigitalTwins/stable/2020-12-01/examples/PrivateLinkResourcesList_example.json
+ */
+ /**
+ * Sample code: List private link resources for given Digital Twin.
+ *
+ * @param manager Entry point to AzureDigitalTwinsManager.
+ */
+ public static void listPrivateLinkResourcesForGivenDigitalTwin(
+ com.azure.resourcemanager.digitaltwins.AzureDigitalTwinsManager manager) {
+ manager.privateLinkResources().listWithResponse("resRg", "myDigitalTwinsService", Context.NONE);
+ }
+}