diff --git a/sdk/mixedreality/azure-resourcemanager-mixedreality/CHANGELOG.md b/sdk/mixedreality/azure-resourcemanager-mixedreality/CHANGELOG.md
index 9e27e57f9a809..e5e02d9596409 100644
--- a/sdk/mixedreality/azure-resourcemanager-mixedreality/CHANGELOG.md
+++ b/sdk/mixedreality/azure-resourcemanager-mixedreality/CHANGELOG.md
@@ -1,7 +1,8 @@
# Release History
-## 1.0.0-beta.2 (Unreleased)
+## 1.0.0-beta.1 (2022-01-06)
+- Azure Resource Manager MixedReality client library for Java. This package contains Microsoft Azure SDK for MixedReality Management SDK. Mixed Reality Client. Package tag package-2021-03-01-preview. 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-04-27)
diff --git a/sdk/mixedreality/azure-resourcemanager-mixedreality/README.md b/sdk/mixedreality/azure-resourcemanager-mixedreality/README.md
index d632500de9eb2..e509cf8ac391e 100644
--- a/sdk/mixedreality/azure-resourcemanager-mixedreality/README.md
+++ b/sdk/mixedreality/azure-resourcemanager-mixedreality/README.md
@@ -2,7 +2,7 @@
Azure Resource Manager MixedReality client library for Java.
-This package contains Microsoft Azure SDK for MixedReality Management SDK. Mixed Reality Client. Package tag package-2021-01. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
+This package contains Microsoft Azure SDK for MixedReality Management SDK. Mixed Reality Client. Package tag package-2021-03-01-preview. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
## We'd love to hear your feedback
@@ -32,7 +32,7 @@ Various documentation is available to help you get started
com.azure.resourcemanager
azure-resourcemanager-mixedreality
- 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/mixedreality/azure-resourcemanager-mixedreality/SAMPLE.md)
+
+
## Troubleshooting
## Next steps
diff --git a/sdk/mixedreality/azure-resourcemanager-mixedreality/SAMPLE.md b/sdk/mixedreality/azure-resourcemanager-mixedreality/SAMPLE.md
new file mode 100644
index 0000000000000..cede21d2011e5
--- /dev/null
+++ b/sdk/mixedreality/azure-resourcemanager-mixedreality/SAMPLE.md
@@ -0,0 +1,711 @@
+# Code snippets and samples
+
+
+## ObjectAnchorsAccounts
+
+- [Create](#objectanchorsaccounts_create)
+- [Delete](#objectanchorsaccounts_delete)
+- [GetByResourceGroup](#objectanchorsaccounts_getbyresourcegroup)
+- [List](#objectanchorsaccounts_list)
+- [ListByResourceGroup](#objectanchorsaccounts_listbyresourcegroup)
+- [ListKeys](#objectanchorsaccounts_listkeys)
+- [RegenerateKeys](#objectanchorsaccounts_regeneratekeys)
+- [Update](#objectanchorsaccounts_update)
+
+## Operations
+
+- [List](#operations_list)
+
+## RemoteRenderingAccounts
+
+- [Create](#remoterenderingaccounts_create)
+- [Delete](#remoterenderingaccounts_delete)
+- [GetByResourceGroup](#remoterenderingaccounts_getbyresourcegroup)
+- [List](#remoterenderingaccounts_list)
+- [ListByResourceGroup](#remoterenderingaccounts_listbyresourcegroup)
+- [ListKeys](#remoterenderingaccounts_listkeys)
+- [RegenerateKeys](#remoterenderingaccounts_regeneratekeys)
+- [Update](#remoterenderingaccounts_update)
+
+## ResourceProvider
+
+- [CheckNameAvailabilityLocal](#resourceprovider_checknameavailabilitylocal)
+
+## SpatialAnchorsAccounts
+
+- [Create](#spatialanchorsaccounts_create)
+- [Delete](#spatialanchorsaccounts_delete)
+- [GetByResourceGroup](#spatialanchorsaccounts_getbyresourcegroup)
+- [List](#spatialanchorsaccounts_list)
+- [ListByResourceGroup](#spatialanchorsaccounts_listbyresourcegroup)
+- [ListKeys](#spatialanchorsaccounts_listkeys)
+- [RegenerateKeys](#spatialanchorsaccounts_regeneratekeys)
+- [Update](#spatialanchorsaccounts_update)
+### ObjectAnchorsAccounts_Create
+
+```java
+import com.azure.resourcemanager.mixedreality.models.ObjectAnchorsAccountIdentity;
+import com.azure.resourcemanager.mixedreality.models.ResourceIdentityType;
+
+/** Samples for ObjectAnchorsAccounts Create. */
+public final class ObjectAnchorsAccountsCreateSamples {
+ /*
+ * x-ms-original-file: specification/mixedreality/resource-manager/Microsoft.MixedReality/preview/2021-03-01-preview/examples/object-anchors/Put.json
+ */
+ /**
+ * Sample code: Create object anchors account.
+ *
+ * @param manager Entry point to MixedRealityManager.
+ */
+ public static void createObjectAnchorsAccount(com.azure.resourcemanager.mixedreality.MixedRealityManager manager) {
+ manager
+ .objectAnchorsAccounts()
+ .define("MyAccount")
+ .withRegion("eastus2euap")
+ .withExistingResourceGroup("MyResourceGroup")
+ .withIdentity(new ObjectAnchorsAccountIdentity().withType(ResourceIdentityType.SYSTEM_ASSIGNED))
+ .create();
+ }
+}
+```
+
+### ObjectAnchorsAccounts_Delete
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for ObjectAnchorsAccounts Delete. */
+public final class ObjectAnchorsAccountsDeleteSamples {
+ /*
+ * x-ms-original-file: specification/mixedreality/resource-manager/Microsoft.MixedReality/preview/2021-03-01-preview/examples/object-anchors/Delete.json
+ */
+ /**
+ * Sample code: Delete object anchors account.
+ *
+ * @param manager Entry point to MixedRealityManager.
+ */
+ public static void deleteObjectAnchorsAccount(com.azure.resourcemanager.mixedreality.MixedRealityManager manager) {
+ manager.objectAnchorsAccounts().deleteWithResponse("MyResourceGroup", "MyAccount", Context.NONE);
+ }
+}
+```
+
+### ObjectAnchorsAccounts_GetByResourceGroup
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for ObjectAnchorsAccounts GetByResourceGroup. */
+public final class ObjectAnchorsAccountsGetByResourceGroupSamples {
+ /*
+ * x-ms-original-file: specification/mixedreality/resource-manager/Microsoft.MixedReality/preview/2021-03-01-preview/examples/object-anchors/Get.json
+ */
+ /**
+ * Sample code: Get object anchors account.
+ *
+ * @param manager Entry point to MixedRealityManager.
+ */
+ public static void getObjectAnchorsAccount(com.azure.resourcemanager.mixedreality.MixedRealityManager manager) {
+ manager.objectAnchorsAccounts().getByResourceGroupWithResponse("MyResourceGroup", "MyAccount", Context.NONE);
+ }
+}
+```
+
+### ObjectAnchorsAccounts_List
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for ObjectAnchorsAccounts List. */
+public final class ObjectAnchorsAccountsListSamples {
+ /*
+ * x-ms-original-file: specification/mixedreality/resource-manager/Microsoft.MixedReality/preview/2021-03-01-preview/examples/object-anchors/GetBySubscription.json
+ */
+ /**
+ * Sample code: List object anchors accounts by subscription.
+ *
+ * @param manager Entry point to MixedRealityManager.
+ */
+ public static void listObjectAnchorsAccountsBySubscription(
+ com.azure.resourcemanager.mixedreality.MixedRealityManager manager) {
+ manager.objectAnchorsAccounts().list(Context.NONE);
+ }
+}
+```
+
+### ObjectAnchorsAccounts_ListByResourceGroup
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for ObjectAnchorsAccounts ListByResourceGroup. */
+public final class ObjectAnchorsAccountsListByResourceGroupSamples {
+ /*
+ * x-ms-original-file: specification/mixedreality/resource-manager/Microsoft.MixedReality/preview/2021-03-01-preview/examples/object-anchors/GetByResourceGroup.json
+ */
+ /**
+ * Sample code: List object anchors accounts by resource group.
+ *
+ * @param manager Entry point to MixedRealityManager.
+ */
+ public static void listObjectAnchorsAccountsByResourceGroup(
+ com.azure.resourcemanager.mixedreality.MixedRealityManager manager) {
+ manager.objectAnchorsAccounts().listByResourceGroup("MyResourceGroup", Context.NONE);
+ }
+}
+```
+
+### ObjectAnchorsAccounts_ListKeys
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for ObjectAnchorsAccounts ListKeys. */
+public final class ObjectAnchorsAccountsListKeysSamples {
+ /*
+ * x-ms-original-file: specification/mixedreality/resource-manager/Microsoft.MixedReality/preview/2021-03-01-preview/examples/object-anchors/ListKeys.json
+ */
+ /**
+ * Sample code: List object anchors account key.
+ *
+ * @param manager Entry point to MixedRealityManager.
+ */
+ public static void listObjectAnchorsAccountKey(com.azure.resourcemanager.mixedreality.MixedRealityManager manager) {
+ manager.objectAnchorsAccounts().listKeysWithResponse("MyResourceGroup", "MyAccount", Context.NONE);
+ }
+}
+```
+
+### ObjectAnchorsAccounts_RegenerateKeys
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.mixedreality.models.AccountKeyRegenerateRequest;
+import com.azure.resourcemanager.mixedreality.models.Serial;
+
+/** Samples for ObjectAnchorsAccounts RegenerateKeys. */
+public final class ObjectAnchorsAccountsRegenerateKeysSamples {
+ /*
+ * x-ms-original-file: specification/mixedreality/resource-manager/Microsoft.MixedReality/preview/2021-03-01-preview/examples/object-anchors/RegenerateKey.json
+ */
+ /**
+ * Sample code: Regenerate object anchors account keys.
+ *
+ * @param manager Entry point to MixedRealityManager.
+ */
+ public static void regenerateObjectAnchorsAccountKeys(
+ com.azure.resourcemanager.mixedreality.MixedRealityManager manager) {
+ manager
+ .objectAnchorsAccounts()
+ .regenerateKeysWithResponse(
+ "MyResourceGroup", "MyAccount", new AccountKeyRegenerateRequest().withSerial(Serial.ONE), Context.NONE);
+ }
+}
+```
+
+### ObjectAnchorsAccounts_Update
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.mixedreality.models.ObjectAnchorsAccount;
+import com.azure.resourcemanager.mixedreality.models.ObjectAnchorsAccountIdentity;
+import com.azure.resourcemanager.mixedreality.models.ResourceIdentityType;
+import java.util.HashMap;
+import java.util.Map;
+
+/** Samples for ObjectAnchorsAccounts Update. */
+public final class ObjectAnchorsAccountsUpdateSamples {
+ /*
+ * x-ms-original-file: specification/mixedreality/resource-manager/Microsoft.MixedReality/preview/2021-03-01-preview/examples/object-anchors/Patch.json
+ */
+ /**
+ * Sample code: Update object anchors account.
+ *
+ * @param manager Entry point to MixedRealityManager.
+ */
+ public static void updateObjectAnchorsAccount(com.azure.resourcemanager.mixedreality.MixedRealityManager manager) {
+ ObjectAnchorsAccount resource =
+ manager
+ .objectAnchorsAccounts()
+ .getByResourceGroupWithResponse("MyResourceGroup", "MyAccount", Context.NONE)
+ .getValue();
+ resource
+ .update()
+ .withTags(mapOf("hero", "romeo", "heroine", "juliet"))
+ .withIdentity(new ObjectAnchorsAccountIdentity().withType(ResourceIdentityType.SYSTEM_ASSIGNED))
+ .apply();
+ }
+
+ @SuppressWarnings("unchecked")
+ private static Map mapOf(Object... inputs) {
+ Map map = new HashMap<>();
+ for (int i = 0; i < inputs.length; i += 2) {
+ String key = (String) inputs[i];
+ T value = (T) inputs[i + 1];
+ map.put(key, value);
+ }
+ return map;
+ }
+}
+```
+
+### Operations_List
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Operations List. */
+public final class OperationsListSamples {
+ /*
+ * x-ms-original-file: specification/mixedreality/resource-manager/Microsoft.MixedReality/preview/2021-03-01-preview/examples/proxy/ExposingAvailableOperations.json
+ */
+ /**
+ * Sample code: List available operations.
+ *
+ * @param manager Entry point to MixedRealityManager.
+ */
+ public static void listAvailableOperations(com.azure.resourcemanager.mixedreality.MixedRealityManager manager) {
+ manager.operations().list(Context.NONE);
+ }
+}
+```
+
+### RemoteRenderingAccounts_Create
+
+```java
+import com.azure.resourcemanager.mixedreality.models.Identity;
+import com.azure.resourcemanager.mixedreality.models.ResourceIdentityType;
+
+/** Samples for RemoteRenderingAccounts Create. */
+public final class RemoteRenderingAccountsCreateSamples {
+ /*
+ * x-ms-original-file: specification/mixedreality/resource-manager/Microsoft.MixedReality/preview/2021-03-01-preview/examples/remote-rendering/Put.json
+ */
+ /**
+ * Sample code: Create remote rendering account.
+ *
+ * @param manager Entry point to MixedRealityManager.
+ */
+ public static void createRemoteRenderingAccount(
+ com.azure.resourcemanager.mixedreality.MixedRealityManager manager) {
+ manager
+ .remoteRenderingAccounts()
+ .define("MyAccount")
+ .withRegion("eastus2euap")
+ .withExistingResourceGroup("MyResourceGroup")
+ .withIdentity(new Identity().withType(ResourceIdentityType.SYSTEM_ASSIGNED))
+ .create();
+ }
+}
+```
+
+### RemoteRenderingAccounts_Delete
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for RemoteRenderingAccounts Delete. */
+public final class RemoteRenderingAccountsDeleteSamples {
+ /*
+ * x-ms-original-file: specification/mixedreality/resource-manager/Microsoft.MixedReality/preview/2021-03-01-preview/examples/remote-rendering/Delete.json
+ */
+ /**
+ * Sample code: Delete remote rendering account.
+ *
+ * @param manager Entry point to MixedRealityManager.
+ */
+ public static void deleteRemoteRenderingAccount(
+ com.azure.resourcemanager.mixedreality.MixedRealityManager manager) {
+ manager.remoteRenderingAccounts().deleteWithResponse("MyResourceGroup", "MyAccount", Context.NONE);
+ }
+}
+```
+
+### RemoteRenderingAccounts_GetByResourceGroup
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for RemoteRenderingAccounts GetByResourceGroup. */
+public final class RemoteRenderingAccountsGetByResourceGroupSamples {
+ /*
+ * x-ms-original-file: specification/mixedreality/resource-manager/Microsoft.MixedReality/preview/2021-03-01-preview/examples/remote-rendering/Get.json
+ */
+ /**
+ * Sample code: Get remote rendering account.
+ *
+ * @param manager Entry point to MixedRealityManager.
+ */
+ public static void getRemoteRenderingAccount(com.azure.resourcemanager.mixedreality.MixedRealityManager manager) {
+ manager.remoteRenderingAccounts().getByResourceGroupWithResponse("MyResourceGroup", "MyAccount", Context.NONE);
+ }
+}
+```
+
+### RemoteRenderingAccounts_List
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for RemoteRenderingAccounts List. */
+public final class RemoteRenderingAccountsListSamples {
+ /*
+ * x-ms-original-file: specification/mixedreality/resource-manager/Microsoft.MixedReality/preview/2021-03-01-preview/examples/remote-rendering/GetBySubscription.json
+ */
+ /**
+ * Sample code: List remote rendering accounts by subscription.
+ *
+ * @param manager Entry point to MixedRealityManager.
+ */
+ public static void listRemoteRenderingAccountsBySubscription(
+ com.azure.resourcemanager.mixedreality.MixedRealityManager manager) {
+ manager.remoteRenderingAccounts().list(Context.NONE);
+ }
+}
+```
+
+### RemoteRenderingAccounts_ListByResourceGroup
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for RemoteRenderingAccounts ListByResourceGroup. */
+public final class RemoteRenderingAccountsListByResourceGroupSamples {
+ /*
+ * x-ms-original-file: specification/mixedreality/resource-manager/Microsoft.MixedReality/preview/2021-03-01-preview/examples/remote-rendering/GetByResourceGroup.json
+ */
+ /**
+ * Sample code: List remote rendering accounts by resource group.
+ *
+ * @param manager Entry point to MixedRealityManager.
+ */
+ public static void listRemoteRenderingAccountsByResourceGroup(
+ com.azure.resourcemanager.mixedreality.MixedRealityManager manager) {
+ manager.remoteRenderingAccounts().listByResourceGroup("MyResourceGroup", Context.NONE);
+ }
+}
+```
+
+### RemoteRenderingAccounts_ListKeys
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for RemoteRenderingAccounts ListKeys. */
+public final class RemoteRenderingAccountsListKeysSamples {
+ /*
+ * x-ms-original-file: specification/mixedreality/resource-manager/Microsoft.MixedReality/preview/2021-03-01-preview/examples/remote-rendering/ListKeys.json
+ */
+ /**
+ * Sample code: List remote rendering account key.
+ *
+ * @param manager Entry point to MixedRealityManager.
+ */
+ public static void listRemoteRenderingAccountKey(
+ com.azure.resourcemanager.mixedreality.MixedRealityManager manager) {
+ manager.remoteRenderingAccounts().listKeysWithResponse("MyResourceGroup", "MyAccount", Context.NONE);
+ }
+}
+```
+
+### RemoteRenderingAccounts_RegenerateKeys
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.mixedreality.models.AccountKeyRegenerateRequest;
+import com.azure.resourcemanager.mixedreality.models.Serial;
+
+/** Samples for RemoteRenderingAccounts RegenerateKeys. */
+public final class RemoteRenderingAccountsRegenerateKeysSamples {
+ /*
+ * x-ms-original-file: specification/mixedreality/resource-manager/Microsoft.MixedReality/preview/2021-03-01-preview/examples/remote-rendering/RegenerateKey.json
+ */
+ /**
+ * Sample code: Regenerate remote rendering account keys.
+ *
+ * @param manager Entry point to MixedRealityManager.
+ */
+ public static void regenerateRemoteRenderingAccountKeys(
+ com.azure.resourcemanager.mixedreality.MixedRealityManager manager) {
+ manager
+ .remoteRenderingAccounts()
+ .regenerateKeysWithResponse(
+ "MyResourceGroup", "MyAccount", new AccountKeyRegenerateRequest().withSerial(Serial.ONE), Context.NONE);
+ }
+}
+```
+
+### RemoteRenderingAccounts_Update
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.mixedreality.models.Identity;
+import com.azure.resourcemanager.mixedreality.models.RemoteRenderingAccount;
+import com.azure.resourcemanager.mixedreality.models.ResourceIdentityType;
+import java.util.HashMap;
+import java.util.Map;
+
+/** Samples for RemoteRenderingAccounts Update. */
+public final class RemoteRenderingAccountsUpdateSamples {
+ /*
+ * x-ms-original-file: specification/mixedreality/resource-manager/Microsoft.MixedReality/preview/2021-03-01-preview/examples/remote-rendering/Patch.json
+ */
+ /**
+ * Sample code: Update remote rendering account.
+ *
+ * @param manager Entry point to MixedRealityManager.
+ */
+ public static void updateRemoteRenderingAccount(
+ com.azure.resourcemanager.mixedreality.MixedRealityManager manager) {
+ RemoteRenderingAccount resource =
+ manager
+ .remoteRenderingAccounts()
+ .getByResourceGroupWithResponse("MyResourceGroup", "MyAccount", Context.NONE)
+ .getValue();
+ resource
+ .update()
+ .withTags(mapOf("hero", "romeo", "heroine", "juliet"))
+ .withIdentity(new Identity().withType(ResourceIdentityType.SYSTEM_ASSIGNED))
+ .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;
+ }
+}
+```
+
+### ResourceProvider_CheckNameAvailabilityLocal
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.mixedreality.models.CheckNameAvailabilityRequest;
+
+/** Samples for ResourceProvider CheckNameAvailabilityLocal. */
+public final class ResourceProviderCheckNameAvailabilityLocalSamples {
+ /*
+ * x-ms-original-file: specification/mixedreality/resource-manager/Microsoft.MixedReality/preview/2021-03-01-preview/examples/proxy/CheckNameAvailabilityForLocalUniqueness.json
+ */
+ /**
+ * Sample code: CheckLocalNameAvailability.
+ *
+ * @param manager Entry point to MixedRealityManager.
+ */
+ public static void checkLocalNameAvailability(com.azure.resourcemanager.mixedreality.MixedRealityManager manager) {
+ manager
+ .resourceProviders()
+ .checkNameAvailabilityLocalWithResponse(
+ "eastus2euap",
+ new CheckNameAvailabilityRequest()
+ .withName("MyAccount")
+ .withType("Microsoft.MixedReality/spatialAnchorsAccounts"),
+ Context.NONE);
+ }
+}
+```
+
+### SpatialAnchorsAccounts_Create
+
+```java
+/** Samples for SpatialAnchorsAccounts Create. */
+public final class SpatialAnchorsAccountsCreateSamples {
+ /*
+ * x-ms-original-file: specification/mixedreality/resource-manager/Microsoft.MixedReality/preview/2021-03-01-preview/examples/spatial-anchors/Put.json
+ */
+ /**
+ * Sample code: Create spatial anchor account.
+ *
+ * @param manager Entry point to MixedRealityManager.
+ */
+ public static void createSpatialAnchorAccount(com.azure.resourcemanager.mixedreality.MixedRealityManager manager) {
+ manager
+ .spatialAnchorsAccounts()
+ .define("MyAccount")
+ .withRegion("eastus2euap")
+ .withExistingResourceGroup("MyResourceGroup")
+ .create();
+ }
+}
+```
+
+### SpatialAnchorsAccounts_Delete
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for SpatialAnchorsAccounts Delete. */
+public final class SpatialAnchorsAccountsDeleteSamples {
+ /*
+ * x-ms-original-file: specification/mixedreality/resource-manager/Microsoft.MixedReality/preview/2021-03-01-preview/examples/spatial-anchors/Delete.json
+ */
+ /**
+ * Sample code: Delete spatial anchors account.
+ *
+ * @param manager Entry point to MixedRealityManager.
+ */
+ public static void deleteSpatialAnchorsAccount(com.azure.resourcemanager.mixedreality.MixedRealityManager manager) {
+ manager.spatialAnchorsAccounts().deleteWithResponse("MyResourceGroup", "MyAccount", Context.NONE);
+ }
+}
+```
+
+### SpatialAnchorsAccounts_GetByResourceGroup
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for SpatialAnchorsAccounts GetByResourceGroup. */
+public final class SpatialAnchorsAccountsGetByResourceGroupSamples {
+ /*
+ * x-ms-original-file: specification/mixedreality/resource-manager/Microsoft.MixedReality/preview/2021-03-01-preview/examples/spatial-anchors/Get.json
+ */
+ /**
+ * Sample code: Get spatial anchors account.
+ *
+ * @param manager Entry point to MixedRealityManager.
+ */
+ public static void getSpatialAnchorsAccount(com.azure.resourcemanager.mixedreality.MixedRealityManager manager) {
+ manager.spatialAnchorsAccounts().getByResourceGroupWithResponse("MyResourceGroup", "MyAccount", Context.NONE);
+ }
+}
+```
+
+### SpatialAnchorsAccounts_List
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for SpatialAnchorsAccounts List. */
+public final class SpatialAnchorsAccountsListSamples {
+ /*
+ * x-ms-original-file: specification/mixedreality/resource-manager/Microsoft.MixedReality/preview/2021-03-01-preview/examples/spatial-anchors/GetBySubscription.json
+ */
+ /**
+ * Sample code: List spatial anchors accounts by subscription.
+ *
+ * @param manager Entry point to MixedRealityManager.
+ */
+ public static void listSpatialAnchorsAccountsBySubscription(
+ com.azure.resourcemanager.mixedreality.MixedRealityManager manager) {
+ manager.spatialAnchorsAccounts().list(Context.NONE);
+ }
+}
+```
+
+### SpatialAnchorsAccounts_ListByResourceGroup
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for SpatialAnchorsAccounts ListByResourceGroup. */
+public final class SpatialAnchorsAccountsListByResourceGroupSamples {
+ /*
+ * x-ms-original-file: specification/mixedreality/resource-manager/Microsoft.MixedReality/preview/2021-03-01-preview/examples/spatial-anchors/GetByResourceGroup.json
+ */
+ /**
+ * Sample code: List spatial anchor accounts by resource group.
+ *
+ * @param manager Entry point to MixedRealityManager.
+ */
+ public static void listSpatialAnchorAccountsByResourceGroup(
+ com.azure.resourcemanager.mixedreality.MixedRealityManager manager) {
+ manager.spatialAnchorsAccounts().listByResourceGroup("MyResourceGroup", Context.NONE);
+ }
+}
+```
+
+### SpatialAnchorsAccounts_ListKeys
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for SpatialAnchorsAccounts ListKeys. */
+public final class SpatialAnchorsAccountsListKeysSamples {
+ /*
+ * x-ms-original-file: specification/mixedreality/resource-manager/Microsoft.MixedReality/preview/2021-03-01-preview/examples/spatial-anchors/ListKeys.json
+ */
+ /**
+ * Sample code: List spatial anchor account key.
+ *
+ * @param manager Entry point to MixedRealityManager.
+ */
+ public static void listSpatialAnchorAccountKey(com.azure.resourcemanager.mixedreality.MixedRealityManager manager) {
+ manager.spatialAnchorsAccounts().listKeysWithResponse("MyResourceGroup", "MyAccount", Context.NONE);
+ }
+}
+```
+
+### SpatialAnchorsAccounts_RegenerateKeys
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.mixedreality.models.AccountKeyRegenerateRequest;
+import com.azure.resourcemanager.mixedreality.models.Serial;
+
+/** Samples for SpatialAnchorsAccounts RegenerateKeys. */
+public final class SpatialAnchorsAccountsRegenerateKeysSamples {
+ /*
+ * x-ms-original-file: specification/mixedreality/resource-manager/Microsoft.MixedReality/preview/2021-03-01-preview/examples/spatial-anchors/RegenerateKey.json
+ */
+ /**
+ * Sample code: Regenerate spatial anchors account keys.
+ *
+ * @param manager Entry point to MixedRealityManager.
+ */
+ public static void regenerateSpatialAnchorsAccountKeys(
+ com.azure.resourcemanager.mixedreality.MixedRealityManager manager) {
+ manager
+ .spatialAnchorsAccounts()
+ .regenerateKeysWithResponse(
+ "MyResourceGroup", "MyAccount", new AccountKeyRegenerateRequest().withSerial(Serial.ONE), Context.NONE);
+ }
+}
+```
+
+### SpatialAnchorsAccounts_Update
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.mixedreality.models.SpatialAnchorsAccount;
+import java.util.HashMap;
+import java.util.Map;
+
+/** Samples for SpatialAnchorsAccounts Update. */
+public final class SpatialAnchorsAccountsUpdateSamples {
+ /*
+ * x-ms-original-file: specification/mixedreality/resource-manager/Microsoft.MixedReality/preview/2021-03-01-preview/examples/spatial-anchors/Patch.json
+ */
+ /**
+ * Sample code: Update spatial anchors account.
+ *
+ * @param manager Entry point to MixedRealityManager.
+ */
+ public static void updateSpatialAnchorsAccount(com.azure.resourcemanager.mixedreality.MixedRealityManager manager) {
+ SpatialAnchorsAccount resource =
+ manager
+ .spatialAnchorsAccounts()
+ .getByResourceGroupWithResponse("MyResourceGroup", "MyAccount", Context.NONE)
+ .getValue();
+ resource.update().withTags(mapOf("hero", "romeo", "heroine", "juliet")).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/mixedreality/azure-resourcemanager-mixedreality/pom.xml b/sdk/mixedreality/azure-resourcemanager-mixedreality/pom.xml
index 2cec303b2bd07..cb9e1c2b7bd77 100644
--- a/sdk/mixedreality/azure-resourcemanager-mixedreality/pom.xml
+++ b/sdk/mixedreality/azure-resourcemanager-mixedreality/pom.xml
@@ -1,58 +1,81 @@
- 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-mixedreality
- 1.0.0-beta.2
- jar
+ com.azure.resourcemanager
+ azure-resourcemanager-mixedreality
+ 1.0.0-beta.2
+ jar
- Microsoft Azure SDK for MixedReality Management
- This package contains Microsoft Azure SDK for MixedReality Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Mixed Reality Client. Package tag package-2021-01.
- https://github.com/Azure/azure-sdk-for-java
+ Microsoft Azure SDK for MixedReality Management
+ This package contains Microsoft Azure SDK for MixedReality Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Mixed Reality Client. Package tag package-2021-03-01-preview.
+ 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
-
-
-
- com.azure
- azure-core
- 1.23.1
-
-
- com.azure
- azure-core-management
- 1.4.4
-
-
+
+
+
+ com.azure
+ azure-core
+ 1.23.1
+
+
+ com.azure
+ azure-core-management
+ 1.4.4
+
+
+
+
+
+ org.revapi
+ revapi-maven-plugin
+ 0.11.2
+
+
+
+ -
+
java.method.addedToInterface
+
+ -
+ true
+
.*
+ com\.azure\.resourcemanager(\.[^.]+)+\.fluent(\.[^.]+)*
+
+
+
+
+
+
+
diff --git a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/MixedRealityManager.java b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/MixedRealityManager.java
index 030f4b2c59116..d1b7bbc4fa319 100644
--- a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/MixedRealityManager.java
+++ b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/MixedRealityManager.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,15 +17,18 @@
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;
import com.azure.resourcemanager.mixedreality.fluent.MixedRealityClient;
import com.azure.resourcemanager.mixedreality.implementation.MixedRealityClientBuilder;
+import com.azure.resourcemanager.mixedreality.implementation.ObjectAnchorsAccountsImpl;
import com.azure.resourcemanager.mixedreality.implementation.OperationsImpl;
import com.azure.resourcemanager.mixedreality.implementation.RemoteRenderingAccountsImpl;
import com.azure.resourcemanager.mixedreality.implementation.ResourceProvidersImpl;
import com.azure.resourcemanager.mixedreality.implementation.SpatialAnchorsAccountsImpl;
+import com.azure.resourcemanager.mixedreality.models.ObjectAnchorsAccounts;
import com.azure.resourcemanager.mixedreality.models.Operations;
import com.azure.resourcemanager.mixedreality.models.RemoteRenderingAccounts;
import com.azure.resourcemanager.mixedreality.models.ResourceProviders;
@@ -35,6 +38,7 @@
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;
+import java.util.stream.Collectors;
/** Entry point to MixedRealityManager. Mixed Reality Client. */
public final class MixedRealityManager {
@@ -46,6 +50,8 @@ public final class MixedRealityManager {
private RemoteRenderingAccounts remoteRenderingAccounts;
+ private ObjectAnchorsAccounts objectAnchorsAccounts;
+
private final MixedRealityClient clientObject;
private MixedRealityManager(HttpPipeline httpPipeline, AzureProfile profile, Duration defaultPollInterval) {
@@ -89,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;
@@ -128,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.
*
@@ -184,20 +202,33 @@ public MixedRealityManager authenticate(TokenCredential credential, AzureProfile
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"));
- policies.addAll(this.policies);
+ .addAll(
+ this
+ .policies
+ .stream()
+ .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY)
+ .collect(Collectors.toList()));
HttpPolicyProviders.addAfterRetryPolicies(policies);
policies.add(new HttpLoggingPolicy(httpLogOptions));
HttpPipeline httpPipeline =
@@ -243,6 +274,14 @@ public RemoteRenderingAccounts remoteRenderingAccounts() {
return remoteRenderingAccounts;
}
+ /** @return Resource collection API of ObjectAnchorsAccounts. */
+ public ObjectAnchorsAccounts objectAnchorsAccounts() {
+ if (this.objectAnchorsAccounts == null) {
+ this.objectAnchorsAccounts = new ObjectAnchorsAccountsImpl(clientObject.getObjectAnchorsAccounts(), this);
+ }
+ return objectAnchorsAccounts;
+ }
+
/**
* @return Wrapped service client MixedRealityClient providing direct access to the underlying auto-generated API
* implementation, based on Azure REST API.
diff --git a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/fluent/MixedRealityClient.java b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/fluent/MixedRealityClient.java
index 83ac188059365..14ab8e52adcdd 100644
--- a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/fluent/MixedRealityClient.java
+++ b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/fluent/MixedRealityClient.java
@@ -71,4 +71,11 @@ public interface MixedRealityClient {
* @return the RemoteRenderingAccountsClient object.
*/
RemoteRenderingAccountsClient getRemoteRenderingAccounts();
+
+ /**
+ * Gets the ObjectAnchorsAccountsClient object to access its operations.
+ *
+ * @return the ObjectAnchorsAccountsClient object.
+ */
+ ObjectAnchorsAccountsClient getObjectAnchorsAccounts();
}
diff --git a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/fluent/ObjectAnchorsAccountsClient.java b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/fluent/ObjectAnchorsAccountsClient.java
new file mode 100644
index 0000000000000..9732317d80817
--- /dev/null
+++ b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/fluent/ObjectAnchorsAccountsClient.java
@@ -0,0 +1,238 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.mixedreality.fluent;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.Response;
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.mixedreality.fluent.models.AccountKeysInner;
+import com.azure.resourcemanager.mixedreality.fluent.models.ObjectAnchorsAccountInner;
+import com.azure.resourcemanager.mixedreality.models.AccountKeyRegenerateRequest;
+
+/** An instance of this class provides access to all the operations defined in ObjectAnchorsAccountsClient. */
+public interface ObjectAnchorsAccountsClient {
+ /**
+ * List Object Anchors Accounts by Subscription.
+ *
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return result of the request to get resource collection.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list();
+
+ /**
+ * List Object Anchors Accounts by Subscription.
+ *
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return result of the request to get resource collection.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(Context context);
+
+ /**
+ * List Resources by Resource Group.
+ *
+ * @param resourceGroupName Name of an Azure resource group.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return result of the request to get resource collection.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByResourceGroup(String resourceGroupName);
+
+ /**
+ * List Resources by Resource Group.
+ *
+ * @param resourceGroupName Name of an Azure resource group.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return result of the request to get resource collection.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByResourceGroup(String resourceGroupName, Context context);
+
+ /**
+ * Delete an Object Anchors Account.
+ *
+ * @param resourceGroupName Name of an Azure resource group.
+ * @param accountName Name of an Mixed Reality Account.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void delete(String resourceGroupName, String accountName);
+
+ /**
+ * Delete an Object Anchors Account.
+ *
+ * @param resourceGroupName Name of an Azure resource group.
+ * @param accountName Name of an Mixed Reality Account.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response deleteWithResponse(String resourceGroupName, String accountName, Context context);
+
+ /**
+ * Retrieve an Object Anchors Account.
+ *
+ * @param resourceGroupName Name of an Azure resource group.
+ * @param accountName Name of an Mixed Reality Account.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return objectAnchorsAccount Response.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ObjectAnchorsAccountInner getByResourceGroup(String resourceGroupName, String accountName);
+
+ /**
+ * Retrieve an Object Anchors Account.
+ *
+ * @param resourceGroupName Name of an Azure resource group.
+ * @param accountName Name of an Mixed Reality Account.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return objectAnchorsAccount Response.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getByResourceGroupWithResponse(
+ String resourceGroupName, String accountName, Context context);
+
+ /**
+ * Updating an Object Anchors Account.
+ *
+ * @param resourceGroupName Name of an Azure resource group.
+ * @param accountName Name of an Mixed Reality Account.
+ * @param objectAnchorsAccount Object Anchors Account parameter.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return objectAnchorsAccount Response.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ObjectAnchorsAccountInner update(
+ String resourceGroupName, String accountName, ObjectAnchorsAccountInner objectAnchorsAccount);
+
+ /**
+ * Updating an Object Anchors Account.
+ *
+ * @param resourceGroupName Name of an Azure resource group.
+ * @param accountName Name of an Mixed Reality Account.
+ * @param objectAnchorsAccount Object Anchors Account parameter.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return objectAnchorsAccount Response.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response updateWithResponse(
+ String resourceGroupName, String accountName, ObjectAnchorsAccountInner objectAnchorsAccount, Context context);
+
+ /**
+ * Creating or Updating an object anchors Account.
+ *
+ * @param resourceGroupName Name of an Azure resource group.
+ * @param accountName Name of an Mixed Reality Account.
+ * @param objectAnchorsAccount Object Anchors Account parameter.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return objectAnchorsAccount Response.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ObjectAnchorsAccountInner create(
+ String resourceGroupName, String accountName, ObjectAnchorsAccountInner objectAnchorsAccount);
+
+ /**
+ * Creating or Updating an object anchors Account.
+ *
+ * @param resourceGroupName Name of an Azure resource group.
+ * @param accountName Name of an Mixed Reality Account.
+ * @param objectAnchorsAccount Object Anchors Account parameter.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return objectAnchorsAccount Response.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response createWithResponse(
+ String resourceGroupName, String accountName, ObjectAnchorsAccountInner objectAnchorsAccount, Context context);
+
+ /**
+ * List Both of the 2 Keys of an object anchors Account.
+ *
+ * @param resourceGroupName Name of an Azure resource group.
+ * @param accountName Name of an Mixed Reality Account.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return developer Keys of account.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ AccountKeysInner listKeys(String resourceGroupName, String accountName);
+
+ /**
+ * List Both of the 2 Keys of an object anchors Account.
+ *
+ * @param resourceGroupName Name of an Azure resource group.
+ * @param accountName Name of an Mixed Reality Account.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return developer Keys of account.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response listKeysWithResponse(String resourceGroupName, String accountName, Context context);
+
+ /**
+ * Regenerate specified Key of an object anchors Account.
+ *
+ * @param resourceGroupName Name of an Azure resource group.
+ * @param accountName Name of an Mixed Reality Account.
+ * @param regenerate Required information for key regeneration.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return developer Keys of account.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ AccountKeysInner regenerateKeys(
+ String resourceGroupName, String accountName, AccountKeyRegenerateRequest regenerate);
+
+ /**
+ * Regenerate specified Key of an object anchors Account.
+ *
+ * @param resourceGroupName Name of an Azure resource group.
+ * @param accountName Name of an Mixed Reality Account.
+ * @param regenerate Required information for key regeneration.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return developer Keys of account.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response regenerateKeysWithResponse(
+ String resourceGroupName, String accountName, AccountKeyRegenerateRequest regenerate, Context context);
+}
diff --git a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/fluent/models/MixedRealityAccountProperties.java b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/fluent/models/MixedRealityAccountProperties.java
new file mode 100644
index 0000000000000..9729ab9d1d72a
--- /dev/null
+++ b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/fluent/models/MixedRealityAccountProperties.java
@@ -0,0 +1,80 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.mixedreality.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.util.logging.ClientLogger;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** Common Properties shared by Mixed Reality Accounts. */
+@Fluent
+public final class MixedRealityAccountProperties {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(MixedRealityAccountProperties.class);
+
+ /*
+ * The name of the storage account associated with this accountId
+ */
+ @JsonProperty(value = "storageAccountName")
+ private String storageAccountName;
+
+ /*
+ * unique id of certain account.
+ */
+ @JsonProperty(value = "accountId", access = JsonProperty.Access.WRITE_ONLY)
+ private String accountId;
+
+ /*
+ * Correspond domain name of certain Spatial Anchors Account
+ */
+ @JsonProperty(value = "accountDomain", access = JsonProperty.Access.WRITE_ONLY)
+ private String accountDomain;
+
+ /**
+ * Get the storageAccountName property: The name of the storage account associated with this accountId.
+ *
+ * @return the storageAccountName value.
+ */
+ public String storageAccountName() {
+ return this.storageAccountName;
+ }
+
+ /**
+ * Set the storageAccountName property: The name of the storage account associated with this accountId.
+ *
+ * @param storageAccountName the storageAccountName value to set.
+ * @return the MixedRealityAccountProperties object itself.
+ */
+ public MixedRealityAccountProperties withStorageAccountName(String storageAccountName) {
+ this.storageAccountName = storageAccountName;
+ return this;
+ }
+
+ /**
+ * Get the accountId property: unique id of certain account.
+ *
+ * @return the accountId value.
+ */
+ public String accountId() {
+ return this.accountId;
+ }
+
+ /**
+ * Get the accountDomain property: Correspond domain name of certain Spatial Anchors Account.
+ *
+ * @return the accountDomain value.
+ */
+ public String accountDomain() {
+ return this.accountDomain;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ }
+}
diff --git a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/fluent/models/ObjectAnchorsAccountInner.java b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/fluent/models/ObjectAnchorsAccountInner.java
new file mode 100644
index 0000000000000..634ee38e4500f
--- /dev/null
+++ b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/fluent/models/ObjectAnchorsAccountInner.java
@@ -0,0 +1,234 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.mixedreality.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.management.Resource;
+import com.azure.core.management.SystemData;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.mixedreality.models.Identity;
+import com.azure.resourcemanager.mixedreality.models.ObjectAnchorsAccountIdentity;
+import com.azure.resourcemanager.mixedreality.models.Sku;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.Map;
+
+/** ObjectAnchorsAccount Response. */
+@Fluent
+public final class ObjectAnchorsAccountInner extends Resource {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(ObjectAnchorsAccountInner.class);
+
+ /*
+ * The identity property.
+ */
+ @JsonProperty(value = "identity")
+ private ObjectAnchorsAccountIdentity identity;
+
+ /*
+ * Property bag.
+ */
+ @JsonProperty(value = "properties")
+ private MixedRealityAccountProperties innerProperties;
+
+ /*
+ * The plan associated with this account
+ */
+ @JsonProperty(value = "plan")
+ private Identity plan;
+
+ /*
+ * The sku associated with this account
+ */
+ @JsonProperty(value = "sku")
+ private Sku sku;
+
+ /*
+ * The kind of account, if supported
+ */
+ @JsonProperty(value = "kind")
+ private Sku kind;
+
+ /*
+ * The system metadata related to an object anchors account.
+ */
+ @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY)
+ private SystemData systemData;
+
+ /**
+ * Get the identity property: The identity property.
+ *
+ * @return the identity value.
+ */
+ public ObjectAnchorsAccountIdentity identity() {
+ return this.identity;
+ }
+
+ /**
+ * Set the identity property: The identity property.
+ *
+ * @param identity the identity value to set.
+ * @return the ObjectAnchorsAccountInner object itself.
+ */
+ public ObjectAnchorsAccountInner withIdentity(ObjectAnchorsAccountIdentity identity) {
+ this.identity = identity;
+ return this;
+ }
+
+ /**
+ * Get the innerProperties property: Property bag.
+ *
+ * @return the innerProperties value.
+ */
+ private MixedRealityAccountProperties innerProperties() {
+ return this.innerProperties;
+ }
+
+ /**
+ * Get the plan property: The plan associated with this account.
+ *
+ * @return the plan value.
+ */
+ public Identity plan() {
+ return this.plan;
+ }
+
+ /**
+ * Set the plan property: The plan associated with this account.
+ *
+ * @param plan the plan value to set.
+ * @return the ObjectAnchorsAccountInner object itself.
+ */
+ public ObjectAnchorsAccountInner withPlan(Identity plan) {
+ this.plan = plan;
+ return this;
+ }
+
+ /**
+ * Get the sku property: The sku associated with this account.
+ *
+ * @return the sku value.
+ */
+ public Sku sku() {
+ return this.sku;
+ }
+
+ /**
+ * Set the sku property: The sku associated with this account.
+ *
+ * @param sku the sku value to set.
+ * @return the ObjectAnchorsAccountInner object itself.
+ */
+ public ObjectAnchorsAccountInner withSku(Sku sku) {
+ this.sku = sku;
+ return this;
+ }
+
+ /**
+ * Get the kind property: The kind of account, if supported.
+ *
+ * @return the kind value.
+ */
+ public Sku kind() {
+ return this.kind;
+ }
+
+ /**
+ * Set the kind property: The kind of account, if supported.
+ *
+ * @param kind the kind value to set.
+ * @return the ObjectAnchorsAccountInner object itself.
+ */
+ public ObjectAnchorsAccountInner withKind(Sku kind) {
+ this.kind = kind;
+ return this;
+ }
+
+ /**
+ * Get the systemData property: The system metadata related to an object anchors account.
+ *
+ * @return the systemData value.
+ */
+ public SystemData systemData() {
+ return this.systemData;
+ }
+
+ /** {@inheritDoc} */
+ @Override
+ public ObjectAnchorsAccountInner withLocation(String location) {
+ super.withLocation(location);
+ return this;
+ }
+
+ /** {@inheritDoc} */
+ @Override
+ public ObjectAnchorsAccountInner withTags(Map tags) {
+ super.withTags(tags);
+ return this;
+ }
+
+ /**
+ * Get the storageAccountName property: The name of the storage account associated with this accountId.
+ *
+ * @return the storageAccountName value.
+ */
+ public String storageAccountName() {
+ return this.innerProperties() == null ? null : this.innerProperties().storageAccountName();
+ }
+
+ /**
+ * Set the storageAccountName property: The name of the storage account associated with this accountId.
+ *
+ * @param storageAccountName the storageAccountName value to set.
+ * @return the ObjectAnchorsAccountInner object itself.
+ */
+ public ObjectAnchorsAccountInner withStorageAccountName(String storageAccountName) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new MixedRealityAccountProperties();
+ }
+ this.innerProperties().withStorageAccountName(storageAccountName);
+ return this;
+ }
+
+ /**
+ * Get the accountId property: unique id of certain account.
+ *
+ * @return the accountId value.
+ */
+ public String accountId() {
+ return this.innerProperties() == null ? null : this.innerProperties().accountId();
+ }
+
+ /**
+ * Get the accountDomain property: Correspond domain name of certain Spatial Anchors Account.
+ *
+ * @return the accountDomain value.
+ */
+ public String accountDomain() {
+ return this.innerProperties() == null ? null : this.innerProperties().accountDomain();
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (identity() != null) {
+ identity().validate();
+ }
+ if (innerProperties() != null) {
+ innerProperties().validate();
+ }
+ if (plan() != null) {
+ plan().validate();
+ }
+ if (sku() != null) {
+ sku().validate();
+ }
+ if (kind() != null) {
+ kind().validate();
+ }
+ }
+}
diff --git a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/fluent/models/RemoteRenderingAccountInner.java b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/fluent/models/RemoteRenderingAccountInner.java
index 7269022b859ea..a70180d9f2920 100644
--- a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/fluent/models/RemoteRenderingAccountInner.java
+++ b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/fluent/models/RemoteRenderingAccountInner.java
@@ -5,7 +5,6 @@
package com.azure.resourcemanager.mixedreality.fluent.models;
import com.azure.core.annotation.Fluent;
-import com.azure.core.annotation.JsonFlatten;
import com.azure.core.management.Resource;
import com.azure.core.management.SystemData;
import com.azure.core.util.logging.ClientLogger;
@@ -16,11 +15,16 @@
import java.util.Map;
/** RemoteRenderingAccount Response. */
-@JsonFlatten
@Fluent
-public class RemoteRenderingAccountInner extends Resource {
+public final class RemoteRenderingAccountInner extends Resource {
@JsonIgnore private final ClientLogger logger = new ClientLogger(RemoteRenderingAccountInner.class);
+ /*
+ * Property bag.
+ */
+ @JsonProperty(value = "properties")
+ private MixedRealityAccountProperties innerProperties;
+
/*
* The identity associated with this account
*/
@@ -51,23 +55,14 @@ public class RemoteRenderingAccountInner extends Resource {
@JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY)
private SystemData systemData;
- /*
- * The name of the storage account associated with this accountId
- */
- @JsonProperty(value = "properties.storageAccountName")
- private String storageAccountName;
-
- /*
- * unique id of certain account.
- */
- @JsonProperty(value = "properties.accountId", access = JsonProperty.Access.WRITE_ONLY)
- private String accountId;
-
- /*
- * Correspond domain name of certain Spatial Anchors Account
+ /**
+ * Get the innerProperties property: Property bag.
+ *
+ * @return the innerProperties value.
*/
- @JsonProperty(value = "properties.accountDomain", access = JsonProperty.Access.WRITE_ONLY)
- private String accountDomain;
+ private MixedRealityAccountProperties innerProperties() {
+ return this.innerProperties;
+ }
/**
* Get the identity property: The identity associated with this account.
@@ -158,13 +153,27 @@ public SystemData systemData() {
return this.systemData;
}
+ /** {@inheritDoc} */
+ @Override
+ public RemoteRenderingAccountInner withLocation(String location) {
+ super.withLocation(location);
+ return this;
+ }
+
+ /** {@inheritDoc} */
+ @Override
+ public RemoteRenderingAccountInner withTags(Map tags) {
+ super.withTags(tags);
+ return this;
+ }
+
/**
* Get the storageAccountName property: The name of the storage account associated with this accountId.
*
* @return the storageAccountName value.
*/
public String storageAccountName() {
- return this.storageAccountName;
+ return this.innerProperties() == null ? null : this.innerProperties().storageAccountName();
}
/**
@@ -174,7 +183,10 @@ public String storageAccountName() {
* @return the RemoteRenderingAccountInner object itself.
*/
public RemoteRenderingAccountInner withStorageAccountName(String storageAccountName) {
- this.storageAccountName = storageAccountName;
+ if (this.innerProperties() == null) {
+ this.innerProperties = new MixedRealityAccountProperties();
+ }
+ this.innerProperties().withStorageAccountName(storageAccountName);
return this;
}
@@ -184,7 +196,7 @@ public RemoteRenderingAccountInner withStorageAccountName(String storageAccountN
* @return the accountId value.
*/
public String accountId() {
- return this.accountId;
+ return this.innerProperties() == null ? null : this.innerProperties().accountId();
}
/**
@@ -193,21 +205,7 @@ public String accountId() {
* @return the accountDomain value.
*/
public String accountDomain() {
- return this.accountDomain;
- }
-
- /** {@inheritDoc} */
- @Override
- public RemoteRenderingAccountInner withLocation(String location) {
- super.withLocation(location);
- return this;
- }
-
- /** {@inheritDoc} */
- @Override
- public RemoteRenderingAccountInner withTags(Map tags) {
- super.withTags(tags);
- return this;
+ return this.innerProperties() == null ? null : this.innerProperties().accountDomain();
}
/**
@@ -216,6 +214,9 @@ public RemoteRenderingAccountInner withTags(Map tags) {
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
public void validate() {
+ if (innerProperties() != null) {
+ innerProperties().validate();
+ }
if (identity() != null) {
identity().validate();
}
diff --git a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/fluent/models/SpatialAnchorsAccountInner.java b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/fluent/models/SpatialAnchorsAccountInner.java
index 66e8b5e768f96..d81fdbb8fc908 100644
--- a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/fluent/models/SpatialAnchorsAccountInner.java
+++ b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/fluent/models/SpatialAnchorsAccountInner.java
@@ -5,7 +5,6 @@
package com.azure.resourcemanager.mixedreality.fluent.models;
import com.azure.core.annotation.Fluent;
-import com.azure.core.annotation.JsonFlatten;
import com.azure.core.management.Resource;
import com.azure.core.management.SystemData;
import com.azure.core.util.logging.ClientLogger;
@@ -16,11 +15,16 @@
import java.util.Map;
/** SpatialAnchorsAccount Response. */
-@JsonFlatten
@Fluent
-public class SpatialAnchorsAccountInner extends Resource {
+public final class SpatialAnchorsAccountInner extends Resource {
@JsonIgnore private final ClientLogger logger = new ClientLogger(SpatialAnchorsAccountInner.class);
+ /*
+ * Property bag.
+ */
+ @JsonProperty(value = "properties")
+ private MixedRealityAccountProperties innerProperties;
+
/*
* The identity associated with this account
*/
@@ -51,23 +55,14 @@ public class SpatialAnchorsAccountInner extends Resource {
@JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY)
private SystemData systemData;
- /*
- * The name of the storage account associated with this accountId
- */
- @JsonProperty(value = "properties.storageAccountName")
- private String storageAccountName;
-
- /*
- * unique id of certain account.
- */
- @JsonProperty(value = "properties.accountId", access = JsonProperty.Access.WRITE_ONLY)
- private String accountId;
-
- /*
- * Correspond domain name of certain Spatial Anchors Account
+ /**
+ * Get the innerProperties property: Property bag.
+ *
+ * @return the innerProperties value.
*/
- @JsonProperty(value = "properties.accountDomain", access = JsonProperty.Access.WRITE_ONLY)
- private String accountDomain;
+ private MixedRealityAccountProperties innerProperties() {
+ return this.innerProperties;
+ }
/**
* Get the identity property: The identity associated with this account.
@@ -158,13 +153,27 @@ public SystemData systemData() {
return this.systemData;
}
+ /** {@inheritDoc} */
+ @Override
+ public SpatialAnchorsAccountInner withLocation(String location) {
+ super.withLocation(location);
+ return this;
+ }
+
+ /** {@inheritDoc} */
+ @Override
+ public SpatialAnchorsAccountInner withTags(Map tags) {
+ super.withTags(tags);
+ return this;
+ }
+
/**
* Get the storageAccountName property: The name of the storage account associated with this accountId.
*
* @return the storageAccountName value.
*/
public String storageAccountName() {
- return this.storageAccountName;
+ return this.innerProperties() == null ? null : this.innerProperties().storageAccountName();
}
/**
@@ -174,7 +183,10 @@ public String storageAccountName() {
* @return the SpatialAnchorsAccountInner object itself.
*/
public SpatialAnchorsAccountInner withStorageAccountName(String storageAccountName) {
- this.storageAccountName = storageAccountName;
+ if (this.innerProperties() == null) {
+ this.innerProperties = new MixedRealityAccountProperties();
+ }
+ this.innerProperties().withStorageAccountName(storageAccountName);
return this;
}
@@ -184,7 +196,7 @@ public SpatialAnchorsAccountInner withStorageAccountName(String storageAccountNa
* @return the accountId value.
*/
public String accountId() {
- return this.accountId;
+ return this.innerProperties() == null ? null : this.innerProperties().accountId();
}
/**
@@ -193,21 +205,7 @@ public String accountId() {
* @return the accountDomain value.
*/
public String accountDomain() {
- return this.accountDomain;
- }
-
- /** {@inheritDoc} */
- @Override
- public SpatialAnchorsAccountInner withLocation(String location) {
- super.withLocation(location);
- return this;
- }
-
- /** {@inheritDoc} */
- @Override
- public SpatialAnchorsAccountInner withTags(Map tags) {
- super.withTags(tags);
- return this;
+ return this.innerProperties() == null ? null : this.innerProperties().accountDomain();
}
/**
@@ -216,6 +214,9 @@ public SpatialAnchorsAccountInner withTags(Map tags) {
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
public void validate() {
+ if (innerProperties() != null) {
+ innerProperties().validate();
+ }
if (identity() != null) {
identity().validate();
}
diff --git a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/implementation/MixedRealityClientImpl.java b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/implementation/MixedRealityClientImpl.java
index 15870ed443522..40b0c4a7d3b57 100644
--- a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/implementation/MixedRealityClientImpl.java
+++ b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/implementation/MixedRealityClientImpl.java
@@ -22,6 +22,7 @@
import com.azure.core.util.serializer.SerializerAdapter;
import com.azure.core.util.serializer.SerializerEncoding;
import com.azure.resourcemanager.mixedreality.fluent.MixedRealityClient;
+import com.azure.resourcemanager.mixedreality.fluent.ObjectAnchorsAccountsClient;
import com.azure.resourcemanager.mixedreality.fluent.OperationsClient;
import com.azure.resourcemanager.mixedreality.fluent.RemoteRenderingAccountsClient;
import com.azure.resourcemanager.mixedreality.fluent.ResourceProvidersClient;
@@ -161,6 +162,18 @@ public RemoteRenderingAccountsClient getRemoteRenderingAccounts() {
return this.remoteRenderingAccounts;
}
+ /** The ObjectAnchorsAccountsClient object to access its operations. */
+ private final ObjectAnchorsAccountsClient objectAnchorsAccounts;
+
+ /**
+ * Gets the ObjectAnchorsAccountsClient object to access its operations.
+ *
+ * @return the ObjectAnchorsAccountsClient object.
+ */
+ public ObjectAnchorsAccountsClient getObjectAnchorsAccounts() {
+ return this.objectAnchorsAccounts;
+ }
+
/**
* Initializes an instance of MixedRealityClient client.
*
@@ -184,11 +197,12 @@ public RemoteRenderingAccountsClient getRemoteRenderingAccounts() {
this.defaultPollInterval = defaultPollInterval;
this.subscriptionId = subscriptionId;
this.endpoint = endpoint;
- this.apiVersion = "2021-01-01";
+ this.apiVersion = "2021-03-01-preview";
this.operations = new OperationsClientImpl(this);
this.resourceProviders = new ResourceProvidersClientImpl(this);
this.spatialAnchorsAccounts = new SpatialAnchorsAccountsClientImpl(this);
this.remoteRenderingAccounts = new RemoteRenderingAccountsClientImpl(this);
+ this.objectAnchorsAccounts = new ObjectAnchorsAccountsClientImpl(this);
}
/**
diff --git a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/implementation/ObjectAnchorsAccountImpl.java b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/implementation/ObjectAnchorsAccountImpl.java
new file mode 100644
index 0000000000000..d4a454c951b10
--- /dev/null
+++ b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/implementation/ObjectAnchorsAccountImpl.java
@@ -0,0 +1,245 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.mixedreality.implementation;
+
+import com.azure.core.http.rest.Response;
+import com.azure.core.management.Region;
+import com.azure.core.management.SystemData;
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.mixedreality.fluent.models.ObjectAnchorsAccountInner;
+import com.azure.resourcemanager.mixedreality.models.AccountKeyRegenerateRequest;
+import com.azure.resourcemanager.mixedreality.models.AccountKeys;
+import com.azure.resourcemanager.mixedreality.models.Identity;
+import com.azure.resourcemanager.mixedreality.models.ObjectAnchorsAccount;
+import com.azure.resourcemanager.mixedreality.models.ObjectAnchorsAccountIdentity;
+import com.azure.resourcemanager.mixedreality.models.Sku;
+import java.util.Collections;
+import java.util.Map;
+
+public final class ObjectAnchorsAccountImpl
+ implements ObjectAnchorsAccount, ObjectAnchorsAccount.Definition, ObjectAnchorsAccount.Update {
+ private ObjectAnchorsAccountInner innerObject;
+
+ private final com.azure.resourcemanager.mixedreality.MixedRealityManager serviceManager;
+
+ public String id() {
+ return this.innerModel().id();
+ }
+
+ public String name() {
+ return this.innerModel().name();
+ }
+
+ public String type() {
+ return this.innerModel().type();
+ }
+
+ public String location() {
+ return this.innerModel().location();
+ }
+
+ public Map tags() {
+ Map inner = this.innerModel().tags();
+ if (inner != null) {
+ return Collections.unmodifiableMap(inner);
+ } else {
+ return Collections.emptyMap();
+ }
+ }
+
+ public ObjectAnchorsAccountIdentity identity() {
+ return this.innerModel().identity();
+ }
+
+ public Identity plan() {
+ return this.innerModel().plan();
+ }
+
+ public Sku sku() {
+ return this.innerModel().sku();
+ }
+
+ public Sku kind() {
+ return this.innerModel().kind();
+ }
+
+ public SystemData systemData() {
+ return this.innerModel().systemData();
+ }
+
+ public String storageAccountName() {
+ return this.innerModel().storageAccountName();
+ }
+
+ public String accountId() {
+ return this.innerModel().accountId();
+ }
+
+ public String accountDomain() {
+ return this.innerModel().accountDomain();
+ }
+
+ public Region region() {
+ return Region.fromName(this.regionName());
+ }
+
+ public String regionName() {
+ return this.location();
+ }
+
+ public ObjectAnchorsAccountInner innerModel() {
+ return this.innerObject;
+ }
+
+ private com.azure.resourcemanager.mixedreality.MixedRealityManager manager() {
+ return this.serviceManager;
+ }
+
+ private String resourceGroupName;
+
+ private String accountName;
+
+ public ObjectAnchorsAccountImpl withExistingResourceGroup(String resourceGroupName) {
+ this.resourceGroupName = resourceGroupName;
+ return this;
+ }
+
+ public ObjectAnchorsAccount create() {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getObjectAnchorsAccounts()
+ .createWithResponse(resourceGroupName, accountName, this.innerModel(), Context.NONE)
+ .getValue();
+ return this;
+ }
+
+ public ObjectAnchorsAccount create(Context context) {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getObjectAnchorsAccounts()
+ .createWithResponse(resourceGroupName, accountName, this.innerModel(), context)
+ .getValue();
+ return this;
+ }
+
+ ObjectAnchorsAccountImpl(String name, com.azure.resourcemanager.mixedreality.MixedRealityManager serviceManager) {
+ this.innerObject = new ObjectAnchorsAccountInner();
+ this.serviceManager = serviceManager;
+ this.accountName = name;
+ }
+
+ public ObjectAnchorsAccountImpl update() {
+ return this;
+ }
+
+ public ObjectAnchorsAccount apply() {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getObjectAnchorsAccounts()
+ .updateWithResponse(resourceGroupName, accountName, this.innerModel(), Context.NONE)
+ .getValue();
+ return this;
+ }
+
+ public ObjectAnchorsAccount apply(Context context) {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getObjectAnchorsAccounts()
+ .updateWithResponse(resourceGroupName, accountName, this.innerModel(), context)
+ .getValue();
+ return this;
+ }
+
+ ObjectAnchorsAccountImpl(
+ ObjectAnchorsAccountInner innerObject,
+ com.azure.resourcemanager.mixedreality.MixedRealityManager serviceManager) {
+ this.innerObject = innerObject;
+ this.serviceManager = serviceManager;
+ this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups");
+ this.accountName = Utils.getValueFromIdByName(innerObject.id(), "objectAnchorsAccounts");
+ }
+
+ public ObjectAnchorsAccount refresh() {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getObjectAnchorsAccounts()
+ .getByResourceGroupWithResponse(resourceGroupName, accountName, Context.NONE)
+ .getValue();
+ return this;
+ }
+
+ public ObjectAnchorsAccount refresh(Context context) {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getObjectAnchorsAccounts()
+ .getByResourceGroupWithResponse(resourceGroupName, accountName, context)
+ .getValue();
+ return this;
+ }
+
+ public AccountKeys listKeys() {
+ return serviceManager.objectAnchorsAccounts().listKeys(resourceGroupName, accountName);
+ }
+
+ public Response listKeysWithResponse(Context context) {
+ return serviceManager.objectAnchorsAccounts().listKeysWithResponse(resourceGroupName, accountName, context);
+ }
+
+ public AccountKeys regenerateKeys(AccountKeyRegenerateRequest regenerate) {
+ return serviceManager.objectAnchorsAccounts().regenerateKeys(resourceGroupName, accountName, regenerate);
+ }
+
+ public Response regenerateKeysWithResponse(AccountKeyRegenerateRequest regenerate, Context context) {
+ return serviceManager
+ .objectAnchorsAccounts()
+ .regenerateKeysWithResponse(resourceGroupName, accountName, regenerate, context);
+ }
+
+ public ObjectAnchorsAccountImpl withRegion(Region location) {
+ this.innerModel().withLocation(location.toString());
+ return this;
+ }
+
+ public ObjectAnchorsAccountImpl withRegion(String location) {
+ this.innerModel().withLocation(location);
+ return this;
+ }
+
+ public ObjectAnchorsAccountImpl withTags(Map tags) {
+ this.innerModel().withTags(tags);
+ return this;
+ }
+
+ public ObjectAnchorsAccountImpl withIdentity(ObjectAnchorsAccountIdentity identity) {
+ this.innerModel().withIdentity(identity);
+ return this;
+ }
+
+ public ObjectAnchorsAccountImpl withPlan(Identity plan) {
+ this.innerModel().withPlan(plan);
+ return this;
+ }
+
+ public ObjectAnchorsAccountImpl withSku(Sku sku) {
+ this.innerModel().withSku(sku);
+ return this;
+ }
+
+ public ObjectAnchorsAccountImpl withKind(Sku kind) {
+ this.innerModel().withKind(kind);
+ return this;
+ }
+
+ public ObjectAnchorsAccountImpl withStorageAccountName(String storageAccountName) {
+ this.innerModel().withStorageAccountName(storageAccountName);
+ return this;
+ }
+}
diff --git a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/implementation/ObjectAnchorsAccountsClientImpl.java b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/implementation/ObjectAnchorsAccountsClientImpl.java
new file mode 100644
index 0000000000000..30e8129a5ef49
--- /dev/null
+++ b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/implementation/ObjectAnchorsAccountsClientImpl.java
@@ -0,0 +1,1602 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.mixedreality.implementation;
+
+import com.azure.core.annotation.BodyParam;
+import com.azure.core.annotation.Delete;
+import com.azure.core.annotation.ExpectedResponses;
+import com.azure.core.annotation.Get;
+import com.azure.core.annotation.HeaderParam;
+import com.azure.core.annotation.Headers;
+import com.azure.core.annotation.Host;
+import com.azure.core.annotation.HostParam;
+import com.azure.core.annotation.Patch;
+import com.azure.core.annotation.PathParam;
+import com.azure.core.annotation.Post;
+import com.azure.core.annotation.Put;
+import com.azure.core.annotation.QueryParam;
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceInterface;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.annotation.UnexpectedResponseExceptionType;
+import com.azure.core.http.rest.PagedFlux;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.PagedResponse;
+import com.azure.core.http.rest.PagedResponseBase;
+import com.azure.core.http.rest.Response;
+import com.azure.core.http.rest.RestProxy;
+import com.azure.core.management.exception.ManagementException;
+import com.azure.core.util.Context;
+import com.azure.core.util.FluxUtil;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.mixedreality.fluent.ObjectAnchorsAccountsClient;
+import com.azure.resourcemanager.mixedreality.fluent.models.AccountKeysInner;
+import com.azure.resourcemanager.mixedreality.fluent.models.ObjectAnchorsAccountInner;
+import com.azure.resourcemanager.mixedreality.models.AccountKeyRegenerateRequest;
+import com.azure.resourcemanager.mixedreality.models.ObjectAnchorsAccountPage;
+import reactor.core.publisher.Mono;
+
+/** An instance of this class provides access to all the operations defined in ObjectAnchorsAccountsClient. */
+public final class ObjectAnchorsAccountsClientImpl implements ObjectAnchorsAccountsClient {
+ private final ClientLogger logger = new ClientLogger(ObjectAnchorsAccountsClientImpl.class);
+
+ /** The proxy service used to perform REST calls. */
+ private final ObjectAnchorsAccountsService service;
+
+ /** The service client containing this operation class. */
+ private final MixedRealityClientImpl client;
+
+ /**
+ * Initializes an instance of ObjectAnchorsAccountsClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ ObjectAnchorsAccountsClientImpl(MixedRealityClientImpl client) {
+ this.service =
+ RestProxy
+ .create(ObjectAnchorsAccountsService.class, client.getHttpPipeline(), client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for MixedRealityClientObjectAnchorsAccounts to be used by the proxy
+ * service to perform REST calls.
+ */
+ @Host("{$host}")
+ @ServiceInterface(name = "MixedRealityClientOb")
+ private interface ObjectAnchorsAccountsService {
+ @Headers({"Content-Type: application/json"})
+ @Get("/subscriptions/{subscriptionId}/providers/Microsoft.MixedReality/objectAnchorsAccounts")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> list(
+ @HostParam("$host") String endpoint,
+ @PathParam("subscriptionId") String subscriptionId,
+ @QueryParam("api-version") String apiVersion,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MixedReality"
+ + "/objectAnchorsAccounts")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listByResourceGroup(
+ @HostParam("$host") String endpoint,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @QueryParam("api-version") String apiVersion,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Delete(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MixedReality"
+ + "/objectAnchorsAccounts/{accountName}")
+ @ExpectedResponses({200, 204})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> delete(
+ @HostParam("$host") String endpoint,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("accountName") String accountName,
+ @QueryParam("api-version") String apiVersion,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MixedReality"
+ + "/objectAnchorsAccounts/{accountName}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> getByResourceGroup(
+ @HostParam("$host") String endpoint,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("accountName") String accountName,
+ @QueryParam("api-version") String apiVersion,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Patch(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MixedReality"
+ + "/objectAnchorsAccounts/{accountName}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> update(
+ @HostParam("$host") String endpoint,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("accountName") String accountName,
+ @QueryParam("api-version") String apiVersion,
+ @BodyParam("application/json") ObjectAnchorsAccountInner objectAnchorsAccount,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Put(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MixedReality"
+ + "/objectAnchorsAccounts/{accountName}")
+ @ExpectedResponses({200, 201})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> create(
+ @HostParam("$host") String endpoint,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("accountName") String accountName,
+ @QueryParam("api-version") String apiVersion,
+ @BodyParam("application/json") ObjectAnchorsAccountInner objectAnchorsAccount,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Post(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MixedReality"
+ + "/objectAnchorsAccounts/{accountName}/listKeys")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listKeys(
+ @HostParam("$host") String endpoint,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("accountName") String accountName,
+ @QueryParam("api-version") String apiVersion,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Post(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MixedReality"
+ + "/objectAnchorsAccounts/{accountName}/regenerateKeys")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> regenerateKeys(
+ @HostParam("$host") String endpoint,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("accountName") String accountName,
+ @QueryParam("api-version") String apiVersion,
+ @BodyParam("application/json") AccountKeyRegenerateRequest regenerate,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get("{nextLink}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listBySubscriptionNext(
+ @PathParam(value = "nextLink", encoded = true) String nextLink,
+ @HostParam("$host") String endpoint,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get("{nextLink}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listByResourceGroupNext(
+ @PathParam(value = "nextLink", encoded = true) String nextLink,
+ @HostParam("$host") String endpoint,
+ @HeaderParam("Accept") String accept,
+ Context context);
+ }
+
+ /**
+ * List Object Anchors Accounts by Subscription.
+ *
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return result of the request to get resource collection.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listSinglePageAsync() {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .list(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ this.client.getApiVersion(),
+ accept,
+ context))
+ .>map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * List Object Anchors Accounts by Subscription.
+ *
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return result of the request to get resource collection.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listSinglePageAsync(Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .list(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ this.client.getApiVersion(),
+ accept,
+ context)
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null));
+ }
+
+ /**
+ * List Object Anchors Accounts by Subscription.
+ *
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return result of the request to get resource collection.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync() {
+ return new PagedFlux<>(
+ () -> listSinglePageAsync(), nextLink -> listBySubscriptionNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * List Object Anchors Accounts by Subscription.
+ *
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return result of the request to get resource collection.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync(Context context) {
+ return new PagedFlux<>(
+ () -> listSinglePageAsync(context), nextLink -> listBySubscriptionNextSinglePageAsync(nextLink, context));
+ }
+
+ /**
+ * List Object Anchors Accounts by Subscription.
+ *
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return result of the request to get resource collection.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list() {
+ return new PagedIterable<>(listAsync());
+ }
+
+ /**
+ * List Object Anchors Accounts by Subscription.
+ *
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return result of the request to get resource collection.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list(Context context) {
+ return new PagedIterable<>(listAsync(context));
+ }
+
+ /**
+ * List Resources by Resource Group.
+ *
+ * @param resourceGroupName Name of an Azure resource group.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return result of the request to get resource collection.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listByResourceGroupSinglePageAsync(
+ String resourceGroupName) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .listByResourceGroup(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ this.client.getApiVersion(),
+ accept,
+ context))
+ .>map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * List Resources by Resource Group.
+ *
+ * @param resourceGroupName Name of an Azure resource group.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return result of the request to get resource collection.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listByResourceGroupSinglePageAsync(
+ String resourceGroupName, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .listByResourceGroup(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ this.client.getApiVersion(),
+ accept,
+ context)
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null));
+ }
+
+ /**
+ * List Resources by Resource Group.
+ *
+ * @param resourceGroupName Name of an Azure resource group.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return result of the request to get resource collection.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listByResourceGroupAsync(String resourceGroupName) {
+ return new PagedFlux<>(
+ () -> listByResourceGroupSinglePageAsync(resourceGroupName),
+ nextLink -> listByResourceGroupNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * List Resources by Resource Group.
+ *
+ * @param resourceGroupName Name of an Azure resource group.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return result of the request to get resource collection.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) {
+ return new PagedFlux<>(
+ () -> listByResourceGroupSinglePageAsync(resourceGroupName, context),
+ nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context));
+ }
+
+ /**
+ * List Resources by Resource Group.
+ *
+ * @param resourceGroupName Name of an Azure resource group.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return result of the request to get resource collection.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listByResourceGroup(String resourceGroupName) {
+ return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName));
+ }
+
+ /**
+ * List Resources by Resource Group.
+ *
+ * @param resourceGroupName Name of an Azure resource group.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return result of the request to get resource collection.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listByResourceGroup(String resourceGroupName, Context context) {
+ return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, context));
+ }
+
+ /**
+ * Delete an Object Anchors Account.
+ *
+ * @param resourceGroupName Name of an Azure resource group.
+ * @param accountName Name of an Mixed Reality Account.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> deleteWithResponseAsync(String resourceGroupName, String accountName) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (accountName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .delete(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ accountName,
+ this.client.getApiVersion(),
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Delete an Object Anchors Account.
+ *
+ * @param resourceGroupName Name of an Azure resource group.
+ * @param accountName Name of an Mixed Reality Account.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> deleteWithResponseAsync(
+ String resourceGroupName, String accountName, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (accountName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .delete(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ accountName,
+ this.client.getApiVersion(),
+ accept,
+ context);
+ }
+
+ /**
+ * Delete an Object Anchors Account.
+ *
+ * @param resourceGroupName Name of an Azure resource group.
+ * @param accountName Name of an Mixed Reality Account.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono deleteAsync(String resourceGroupName, String accountName) {
+ return deleteWithResponseAsync(resourceGroupName, accountName).flatMap((Response res) -> Mono.empty());
+ }
+
+ /**
+ * Delete an Object Anchors Account.
+ *
+ * @param resourceGroupName Name of an Azure resource group.
+ * @param accountName Name of an Mixed Reality Account.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public void delete(String resourceGroupName, String accountName) {
+ deleteAsync(resourceGroupName, accountName).block();
+ }
+
+ /**
+ * Delete an Object Anchors Account.
+ *
+ * @param resourceGroupName Name of an Azure resource group.
+ * @param accountName Name of an Mixed Reality Account.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response deleteWithResponse(String resourceGroupName, String accountName, Context context) {
+ return deleteWithResponseAsync(resourceGroupName, accountName, context).block();
+ }
+
+ /**
+ * Retrieve an Object Anchors Account.
+ *
+ * @param resourceGroupName Name of an Azure resource group.
+ * @param accountName Name of an Mixed Reality Account.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return objectAnchorsAccount Response.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getByResourceGroupWithResponseAsync(
+ String resourceGroupName, String accountName) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (accountName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .getByResourceGroup(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ accountName,
+ this.client.getApiVersion(),
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Retrieve an Object Anchors Account.
+ *
+ * @param resourceGroupName Name of an Azure resource group.
+ * @param accountName Name of an Mixed Reality Account.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return objectAnchorsAccount Response.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getByResourceGroupWithResponseAsync(
+ String resourceGroupName, String accountName, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (accountName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .getByResourceGroup(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ accountName,
+ this.client.getApiVersion(),
+ accept,
+ context);
+ }
+
+ /**
+ * Retrieve an Object Anchors Account.
+ *
+ * @param resourceGroupName Name of an Azure resource group.
+ * @param accountName Name of an Mixed Reality Account.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return objectAnchorsAccount Response.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono getByResourceGroupAsync(String resourceGroupName, String accountName) {
+ return getByResourceGroupWithResponseAsync(resourceGroupName, accountName)
+ .flatMap(
+ (Response res) -> {
+ if (res.getValue() != null) {
+ return Mono.just(res.getValue());
+ } else {
+ return Mono.empty();
+ }
+ });
+ }
+
+ /**
+ * Retrieve an Object Anchors Account.
+ *
+ * @param resourceGroupName Name of an Azure resource group.
+ * @param accountName Name of an Mixed Reality Account.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return objectAnchorsAccount Response.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public ObjectAnchorsAccountInner getByResourceGroup(String resourceGroupName, String accountName) {
+ return getByResourceGroupAsync(resourceGroupName, accountName).block();
+ }
+
+ /**
+ * Retrieve an Object Anchors Account.
+ *
+ * @param resourceGroupName Name of an Azure resource group.
+ * @param accountName Name of an Mixed Reality Account.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return objectAnchorsAccount Response.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response getByResourceGroupWithResponse(
+ String resourceGroupName, String accountName, Context context) {
+ return getByResourceGroupWithResponseAsync(resourceGroupName, accountName, context).block();
+ }
+
+ /**
+ * Updating an Object Anchors Account.
+ *
+ * @param resourceGroupName Name of an Azure resource group.
+ * @param accountName Name of an Mixed Reality Account.
+ * @param objectAnchorsAccount Object Anchors Account parameter.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return objectAnchorsAccount Response.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> updateWithResponseAsync(
+ String resourceGroupName, String accountName, ObjectAnchorsAccountInner objectAnchorsAccount) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (accountName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null."));
+ }
+ if (objectAnchorsAccount == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter objectAnchorsAccount is required and cannot be null."));
+ } else {
+ objectAnchorsAccount.validate();
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .update(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ accountName,
+ this.client.getApiVersion(),
+ objectAnchorsAccount,
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Updating an Object Anchors Account.
+ *
+ * @param resourceGroupName Name of an Azure resource group.
+ * @param accountName Name of an Mixed Reality Account.
+ * @param objectAnchorsAccount Object Anchors Account parameter.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return objectAnchorsAccount Response.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> updateWithResponseAsync(
+ String resourceGroupName, String accountName, ObjectAnchorsAccountInner objectAnchorsAccount, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (accountName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null."));
+ }
+ if (objectAnchorsAccount == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter objectAnchorsAccount is required and cannot be null."));
+ } else {
+ objectAnchorsAccount.validate();
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .update(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ accountName,
+ this.client.getApiVersion(),
+ objectAnchorsAccount,
+ accept,
+ context);
+ }
+
+ /**
+ * Updating an Object Anchors Account.
+ *
+ * @param resourceGroupName Name of an Azure resource group.
+ * @param accountName Name of an Mixed Reality Account.
+ * @param objectAnchorsAccount Object Anchors Account parameter.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return objectAnchorsAccount Response.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono updateAsync(
+ String resourceGroupName, String accountName, ObjectAnchorsAccountInner objectAnchorsAccount) {
+ return updateWithResponseAsync(resourceGroupName, accountName, objectAnchorsAccount)
+ .flatMap(
+ (Response res) -> {
+ if (res.getValue() != null) {
+ return Mono.just(res.getValue());
+ } else {
+ return Mono.empty();
+ }
+ });
+ }
+
+ /**
+ * Updating an Object Anchors Account.
+ *
+ * @param resourceGroupName Name of an Azure resource group.
+ * @param accountName Name of an Mixed Reality Account.
+ * @param objectAnchorsAccount Object Anchors Account parameter.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return objectAnchorsAccount Response.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public ObjectAnchorsAccountInner update(
+ String resourceGroupName, String accountName, ObjectAnchorsAccountInner objectAnchorsAccount) {
+ return updateAsync(resourceGroupName, accountName, objectAnchorsAccount).block();
+ }
+
+ /**
+ * Updating an Object Anchors Account.
+ *
+ * @param resourceGroupName Name of an Azure resource group.
+ * @param accountName Name of an Mixed Reality Account.
+ * @param objectAnchorsAccount Object Anchors Account parameter.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return objectAnchorsAccount Response.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response updateWithResponse(
+ String resourceGroupName, String accountName, ObjectAnchorsAccountInner objectAnchorsAccount, Context context) {
+ return updateWithResponseAsync(resourceGroupName, accountName, objectAnchorsAccount, context).block();
+ }
+
+ /**
+ * Creating or Updating an object anchors Account.
+ *
+ * @param resourceGroupName Name of an Azure resource group.
+ * @param accountName Name of an Mixed Reality Account.
+ * @param objectAnchorsAccount Object Anchors Account parameter.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return objectAnchorsAccount Response.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> createWithResponseAsync(
+ String resourceGroupName, String accountName, ObjectAnchorsAccountInner objectAnchorsAccount) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (accountName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null."));
+ }
+ if (objectAnchorsAccount == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter objectAnchorsAccount is required and cannot be null."));
+ } else {
+ objectAnchorsAccount.validate();
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .create(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ accountName,
+ this.client.getApiVersion(),
+ objectAnchorsAccount,
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Creating or Updating an object anchors Account.
+ *
+ * @param resourceGroupName Name of an Azure resource group.
+ * @param accountName Name of an Mixed Reality Account.
+ * @param objectAnchorsAccount Object Anchors Account parameter.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return objectAnchorsAccount Response.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> createWithResponseAsync(
+ String resourceGroupName, String accountName, ObjectAnchorsAccountInner objectAnchorsAccount, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (accountName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null."));
+ }
+ if (objectAnchorsAccount == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter objectAnchorsAccount is required and cannot be null."));
+ } else {
+ objectAnchorsAccount.validate();
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .create(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ accountName,
+ this.client.getApiVersion(),
+ objectAnchorsAccount,
+ accept,
+ context);
+ }
+
+ /**
+ * Creating or Updating an object anchors Account.
+ *
+ * @param resourceGroupName Name of an Azure resource group.
+ * @param accountName Name of an Mixed Reality Account.
+ * @param objectAnchorsAccount Object Anchors Account parameter.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return objectAnchorsAccount Response.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono createAsync(
+ String resourceGroupName, String accountName, ObjectAnchorsAccountInner objectAnchorsAccount) {
+ return createWithResponseAsync(resourceGroupName, accountName, objectAnchorsAccount)
+ .flatMap(
+ (Response res) -> {
+ if (res.getValue() != null) {
+ return Mono.just(res.getValue());
+ } else {
+ return Mono.empty();
+ }
+ });
+ }
+
+ /**
+ * Creating or Updating an object anchors Account.
+ *
+ * @param resourceGroupName Name of an Azure resource group.
+ * @param accountName Name of an Mixed Reality Account.
+ * @param objectAnchorsAccount Object Anchors Account parameter.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return objectAnchorsAccount Response.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public ObjectAnchorsAccountInner create(
+ String resourceGroupName, String accountName, ObjectAnchorsAccountInner objectAnchorsAccount) {
+ return createAsync(resourceGroupName, accountName, objectAnchorsAccount).block();
+ }
+
+ /**
+ * Creating or Updating an object anchors Account.
+ *
+ * @param resourceGroupName Name of an Azure resource group.
+ * @param accountName Name of an Mixed Reality Account.
+ * @param objectAnchorsAccount Object Anchors Account parameter.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return objectAnchorsAccount Response.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response createWithResponse(
+ String resourceGroupName, String accountName, ObjectAnchorsAccountInner objectAnchorsAccount, Context context) {
+ return createWithResponseAsync(resourceGroupName, accountName, objectAnchorsAccount, context).block();
+ }
+
+ /**
+ * List Both of the 2 Keys of an object anchors Account.
+ *
+ * @param resourceGroupName Name of an Azure resource group.
+ * @param accountName Name of an Mixed Reality Account.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return developer Keys of account.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listKeysWithResponseAsync(String resourceGroupName, String accountName) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (accountName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .listKeys(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ accountName,
+ this.client.getApiVersion(),
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * List Both of the 2 Keys of an object anchors Account.
+ *
+ * @param resourceGroupName Name of an Azure resource group.
+ * @param accountName Name of an Mixed Reality Account.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return developer Keys of account.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listKeysWithResponseAsync(
+ String resourceGroupName, String accountName, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (accountName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .listKeys(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ accountName,
+ this.client.getApiVersion(),
+ accept,
+ context);
+ }
+
+ /**
+ * List Both of the 2 Keys of an object anchors Account.
+ *
+ * @param resourceGroupName Name of an Azure resource group.
+ * @param accountName Name of an Mixed Reality Account.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return developer Keys of account.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono listKeysAsync(String resourceGroupName, String accountName) {
+ return listKeysWithResponseAsync(resourceGroupName, accountName)
+ .flatMap(
+ (Response res) -> {
+ if (res.getValue() != null) {
+ return Mono.just(res.getValue());
+ } else {
+ return Mono.empty();
+ }
+ });
+ }
+
+ /**
+ * List Both of the 2 Keys of an object anchors Account.
+ *
+ * @param resourceGroupName Name of an Azure resource group.
+ * @param accountName Name of an Mixed Reality Account.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return developer Keys of account.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public AccountKeysInner listKeys(String resourceGroupName, String accountName) {
+ return listKeysAsync(resourceGroupName, accountName).block();
+ }
+
+ /**
+ * List Both of the 2 Keys of an object anchors Account.
+ *
+ * @param resourceGroupName Name of an Azure resource group.
+ * @param accountName Name of an Mixed Reality Account.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return developer Keys of account.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response listKeysWithResponse(
+ String resourceGroupName, String accountName, Context context) {
+ return listKeysWithResponseAsync(resourceGroupName, accountName, context).block();
+ }
+
+ /**
+ * Regenerate specified Key of an object anchors Account.
+ *
+ * @param resourceGroupName Name of an Azure resource group.
+ * @param accountName Name of an Mixed Reality Account.
+ * @param regenerate Required information for key regeneration.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return developer Keys of account.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> regenerateKeysWithResponseAsync(
+ String resourceGroupName, String accountName, AccountKeyRegenerateRequest regenerate) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (accountName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null."));
+ }
+ if (regenerate == null) {
+ return Mono.error(new IllegalArgumentException("Parameter regenerate is required and cannot be null."));
+ } else {
+ regenerate.validate();
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .regenerateKeys(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ accountName,
+ this.client.getApiVersion(),
+ regenerate,
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Regenerate specified Key of an object anchors Account.
+ *
+ * @param resourceGroupName Name of an Azure resource group.
+ * @param accountName Name of an Mixed Reality Account.
+ * @param regenerate Required information for key regeneration.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return developer Keys of account.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> regenerateKeysWithResponseAsync(
+ String resourceGroupName, String accountName, AccountKeyRegenerateRequest regenerate, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (accountName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null."));
+ }
+ if (regenerate == null) {
+ return Mono.error(new IllegalArgumentException("Parameter regenerate is required and cannot be null."));
+ } else {
+ regenerate.validate();
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .regenerateKeys(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ accountName,
+ this.client.getApiVersion(),
+ regenerate,
+ accept,
+ context);
+ }
+
+ /**
+ * Regenerate specified Key of an object anchors Account.
+ *
+ * @param resourceGroupName Name of an Azure resource group.
+ * @param accountName Name of an Mixed Reality Account.
+ * @param regenerate Required information for key regeneration.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return developer Keys of account.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono regenerateKeysAsync(
+ String resourceGroupName, String accountName, AccountKeyRegenerateRequest regenerate) {
+ return regenerateKeysWithResponseAsync(resourceGroupName, accountName, regenerate)
+ .flatMap(
+ (Response res) -> {
+ if (res.getValue() != null) {
+ return Mono.just(res.getValue());
+ } else {
+ return Mono.empty();
+ }
+ });
+ }
+
+ /**
+ * Regenerate specified Key of an object anchors Account.
+ *
+ * @param resourceGroupName Name of an Azure resource group.
+ * @param accountName Name of an Mixed Reality Account.
+ * @param regenerate Required information for key regeneration.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return developer Keys of account.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public AccountKeysInner regenerateKeys(
+ String resourceGroupName, String accountName, AccountKeyRegenerateRequest regenerate) {
+ return regenerateKeysAsync(resourceGroupName, accountName, regenerate).block();
+ }
+
+ /**
+ * Regenerate specified Key of an object anchors Account.
+ *
+ * @param resourceGroupName Name of an Azure resource group.
+ * @param accountName Name of an Mixed Reality Account.
+ * @param regenerate Required information for key regeneration.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return developer Keys of account.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response regenerateKeysWithResponse(
+ String resourceGroupName, String accountName, AccountKeyRegenerateRequest regenerate, Context context) {
+ return regenerateKeysWithResponseAsync(resourceGroupName, accountName, regenerate, context).block();
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The nextLink parameter.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return result of the request to get resource collection.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listBySubscriptionNextSinglePageAsync(String nextLink) {
+ if (nextLink == null) {
+ return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
+ }
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context -> service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context))
+ .>map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The nextLink parameter.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return result of the request to get resource collection.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listBySubscriptionNextSinglePageAsync(
+ String nextLink, Context context) {
+ if (nextLink == null) {
+ return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
+ }
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context)
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null));
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The nextLink parameter.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return result of the request to get resource collection.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) {
+ if (nextLink == null) {
+ return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
+ }
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context -> service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context))
+ .>map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The nextLink parameter.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return result of the request to get resource collection.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listByResourceGroupNextSinglePageAsync(
+ String nextLink, Context context) {
+ if (nextLink == null) {
+ return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
+ }
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context)
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null));
+ }
+}
diff --git a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/implementation/ObjectAnchorsAccountsImpl.java b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/implementation/ObjectAnchorsAccountsImpl.java
new file mode 100644
index 0000000000000..827e2baa701c0
--- /dev/null
+++ b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/implementation/ObjectAnchorsAccountsImpl.java
@@ -0,0 +1,235 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.mixedreality.implementation;
+
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.Response;
+import com.azure.core.http.rest.SimpleResponse;
+import com.azure.core.util.Context;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.mixedreality.fluent.ObjectAnchorsAccountsClient;
+import com.azure.resourcemanager.mixedreality.fluent.models.AccountKeysInner;
+import com.azure.resourcemanager.mixedreality.fluent.models.ObjectAnchorsAccountInner;
+import com.azure.resourcemanager.mixedreality.models.AccountKeyRegenerateRequest;
+import com.azure.resourcemanager.mixedreality.models.AccountKeys;
+import com.azure.resourcemanager.mixedreality.models.ObjectAnchorsAccount;
+import com.azure.resourcemanager.mixedreality.models.ObjectAnchorsAccounts;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+
+public final class ObjectAnchorsAccountsImpl implements ObjectAnchorsAccounts {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(ObjectAnchorsAccountsImpl.class);
+
+ private final ObjectAnchorsAccountsClient innerClient;
+
+ private final com.azure.resourcemanager.mixedreality.MixedRealityManager serviceManager;
+
+ public ObjectAnchorsAccountsImpl(
+ ObjectAnchorsAccountsClient innerClient,
+ com.azure.resourcemanager.mixedreality.MixedRealityManager serviceManager) {
+ this.innerClient = innerClient;
+ this.serviceManager = serviceManager;
+ }
+
+ public PagedIterable list() {
+ PagedIterable inner = this.serviceClient().list();
+ return Utils.mapPage(inner, inner1 -> new ObjectAnchorsAccountImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable list(Context context) {
+ PagedIterable inner = this.serviceClient().list(context);
+ return Utils.mapPage(inner, inner1 -> new ObjectAnchorsAccountImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable listByResourceGroup(String resourceGroupName) {
+ PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName);
+ return Utils.mapPage(inner, inner1 -> new ObjectAnchorsAccountImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable listByResourceGroup(String resourceGroupName, Context context) {
+ PagedIterable inner =
+ this.serviceClient().listByResourceGroup(resourceGroupName, context);
+ return Utils.mapPage(inner, inner1 -> new ObjectAnchorsAccountImpl(inner1, this.manager()));
+ }
+
+ public void deleteByResourceGroup(String resourceGroupName, String accountName) {
+ this.serviceClient().delete(resourceGroupName, accountName);
+ }
+
+ public Response deleteWithResponse(String resourceGroupName, String accountName, Context context) {
+ return this.serviceClient().deleteWithResponse(resourceGroupName, accountName, context);
+ }
+
+ public ObjectAnchorsAccount getByResourceGroup(String resourceGroupName, String accountName) {
+ ObjectAnchorsAccountInner inner = this.serviceClient().getByResourceGroup(resourceGroupName, accountName);
+ if (inner != null) {
+ return new ObjectAnchorsAccountImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public Response getByResourceGroupWithResponse(
+ String resourceGroupName, String accountName, Context context) {
+ Response inner =
+ this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, accountName, context);
+ if (inner != null) {
+ return new SimpleResponse<>(
+ inner.getRequest(),
+ inner.getStatusCode(),
+ inner.getHeaders(),
+ new ObjectAnchorsAccountImpl(inner.getValue(), this.manager()));
+ } else {
+ return null;
+ }
+ }
+
+ public AccountKeys listKeys(String resourceGroupName, String accountName) {
+ AccountKeysInner inner = this.serviceClient().listKeys(resourceGroupName, accountName);
+ if (inner != null) {
+ return new AccountKeysImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public Response listKeysWithResponse(String resourceGroupName, String accountName, Context context) {
+ Response inner =
+ this.serviceClient().listKeysWithResponse(resourceGroupName, accountName, context);
+ if (inner != null) {
+ return new SimpleResponse<>(
+ inner.getRequest(),
+ inner.getStatusCode(),
+ inner.getHeaders(),
+ new AccountKeysImpl(inner.getValue(), this.manager()));
+ } else {
+ return null;
+ }
+ }
+
+ public AccountKeys regenerateKeys(
+ String resourceGroupName, String accountName, AccountKeyRegenerateRequest regenerate) {
+ AccountKeysInner inner = this.serviceClient().regenerateKeys(resourceGroupName, accountName, regenerate);
+ if (inner != null) {
+ return new AccountKeysImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public Response regenerateKeysWithResponse(
+ String resourceGroupName, String accountName, AccountKeyRegenerateRequest regenerate, Context context) {
+ Response inner =
+ this.serviceClient().regenerateKeysWithResponse(resourceGroupName, accountName, regenerate, context);
+ if (inner != null) {
+ return new SimpleResponse<>(
+ inner.getRequest(),
+ inner.getStatusCode(),
+ inner.getHeaders(),
+ new AccountKeysImpl(inner.getValue(), this.manager()));
+ } else {
+ return null;
+ }
+ }
+
+ public ObjectAnchorsAccount getById(String id) {
+ String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
+ if (resourceGroupName == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
+ }
+ String accountName = Utils.getValueFromIdByName(id, "objectAnchorsAccounts");
+ if (accountName == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format(
+ "The resource ID '%s' is not valid. Missing path segment 'objectAnchorsAccounts'.",
+ id)));
+ }
+ return this.getByResourceGroupWithResponse(resourceGroupName, accountName, Context.NONE).getValue();
+ }
+
+ public Response getByIdWithResponse(String id, Context context) {
+ String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
+ if (resourceGroupName == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
+ }
+ String accountName = Utils.getValueFromIdByName(id, "objectAnchorsAccounts");
+ if (accountName == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format(
+ "The resource ID '%s' is not valid. Missing path segment 'objectAnchorsAccounts'.",
+ id)));
+ }
+ return this.getByResourceGroupWithResponse(resourceGroupName, accountName, context);
+ }
+
+ public void deleteById(String id) {
+ String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
+ if (resourceGroupName == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
+ }
+ String accountName = Utils.getValueFromIdByName(id, "objectAnchorsAccounts");
+ if (accountName == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format(
+ "The resource ID '%s' is not valid. Missing path segment 'objectAnchorsAccounts'.",
+ id)));
+ }
+ this.deleteWithResponse(resourceGroupName, accountName, Context.NONE);
+ }
+
+ public Response deleteByIdWithResponse(String id, Context context) {
+ String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
+ if (resourceGroupName == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
+ }
+ String accountName = Utils.getValueFromIdByName(id, "objectAnchorsAccounts");
+ if (accountName == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format(
+ "The resource ID '%s' is not valid. Missing path segment 'objectAnchorsAccounts'.",
+ id)));
+ }
+ return this.deleteWithResponse(resourceGroupName, accountName, context);
+ }
+
+ private ObjectAnchorsAccountsClient serviceClient() {
+ return this.innerClient;
+ }
+
+ private com.azure.resourcemanager.mixedreality.MixedRealityManager manager() {
+ return this.serviceManager;
+ }
+
+ public ObjectAnchorsAccountImpl define(String name) {
+ return new ObjectAnchorsAccountImpl(name, this.manager());
+ }
+}
diff --git a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/implementation/RemoteRenderingAccountsImpl.java b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/implementation/RemoteRenderingAccountsImpl.java
index 069e366d0673e..aca957ec08e50 100644
--- a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/implementation/RemoteRenderingAccountsImpl.java
+++ b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/implementation/RemoteRenderingAccountsImpl.java
@@ -196,7 +196,7 @@ public void deleteById(String id) {
"The resource ID '%s' is not valid. Missing path segment 'remoteRenderingAccounts'.",
id)));
}
- this.deleteWithResponse(resourceGroupName, accountName, Context.NONE).getValue();
+ this.deleteWithResponse(resourceGroupName, accountName, Context.NONE);
}
public Response deleteByIdWithResponse(String id, Context context) {
diff --git a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/implementation/SpatialAnchorsAccountsImpl.java b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/implementation/SpatialAnchorsAccountsImpl.java
index 5432195eb1506..5dd990ad91cb4 100644
--- a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/implementation/SpatialAnchorsAccountsImpl.java
+++ b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/implementation/SpatialAnchorsAccountsImpl.java
@@ -196,7 +196,7 @@ public void deleteById(String id) {
"The resource ID '%s' is not valid. Missing path segment 'spatialAnchorsAccounts'.",
id)));
}
- this.deleteWithResponse(resourceGroupName, accountName, Context.NONE).getValue();
+ this.deleteWithResponse(resourceGroupName, accountName, Context.NONE);
}
public Response deleteByIdWithResponse(String id, Context context) {
diff --git a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/models/AccountKeyRegenerateRequest.java b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/models/AccountKeyRegenerateRequest.java
index 6d7bcba560a6e..139fb8a0458b6 100644
--- a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/models/AccountKeyRegenerateRequest.java
+++ b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/models/AccountKeyRegenerateRequest.java
@@ -15,13 +15,13 @@ public final class AccountKeyRegenerateRequest {
@JsonIgnore private final ClientLogger logger = new ClientLogger(AccountKeyRegenerateRequest.class);
/*
- * serial of key to be regenerated
+ * Serial of key to be regenerated
*/
@JsonProperty(value = "serial")
private Serial serial;
/**
- * Get the serial property: serial of key to be regenerated.
+ * Get the serial property: Serial of key to be regenerated.
*
* @return the serial value.
*/
@@ -30,7 +30,7 @@ public Serial serial() {
}
/**
- * Set the serial property: serial of key to be regenerated.
+ * Set the serial property: Serial of key to be regenerated.
*
* @param serial the serial value to set.
* @return the AccountKeyRegenerateRequest object itself.
diff --git a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/models/MetricDimension.java b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/models/MetricDimension.java
index 697973d407b67..9785b3dd8650b 100644
--- a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/models/MetricDimension.java
+++ b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/models/MetricDimension.java
@@ -32,6 +32,12 @@ public final class MetricDimension {
@JsonProperty(value = "internalName")
private String internalName;
+ /*
+ * Flag to indicate export for Shoebox
+ */
+ @JsonProperty(value = "toBeExportedForShoebox")
+ private Boolean toBeExportedForShoebox;
+
/**
* Get the name property: Name of the dimension.
*
@@ -92,6 +98,26 @@ public MetricDimension withInternalName(String internalName) {
return this;
}
+ /**
+ * Get the toBeExportedForShoebox property: Flag to indicate export for Shoebox.
+ *
+ * @return the toBeExportedForShoebox value.
+ */
+ public Boolean toBeExportedForShoebox() {
+ return this.toBeExportedForShoebox;
+ }
+
+ /**
+ * Set the toBeExportedForShoebox property: Flag to indicate export for Shoebox.
+ *
+ * @param toBeExportedForShoebox the toBeExportedForShoebox value to set.
+ * @return the MetricDimension object itself.
+ */
+ public MetricDimension withToBeExportedForShoebox(Boolean toBeExportedForShoebox) {
+ this.toBeExportedForShoebox = toBeExportedForShoebox;
+ return this;
+ }
+
/**
* Validates the instance.
*
diff --git a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/models/MetricSpecification.java b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/models/MetricSpecification.java
index 929f90474b1d0..7695ca27065b2 100644
--- a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/models/MetricSpecification.java
+++ b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/models/MetricSpecification.java
@@ -46,6 +46,57 @@ public final class MetricSpecification {
@JsonProperty(value = "aggregationType")
private String aggregationType;
+ /*
+ * Supported aggregation types. Valid values: Average, Minimum, Maximum,
+ * Total, Count.
+ */
+ @JsonProperty(value = "supportedAggregationTypes")
+ private List supportedAggregationTypes;
+
+ /*
+ * Supported time grains. Valid values: PT1M, PT5M, PT15M, PT30M, PT1H,
+ * PT6H, PT12H, P1D
+ */
+ @JsonProperty(value = "supportedTimeGrainTypes")
+ private List supportedTimeGrainTypes;
+
+ /*
+ * Flag to indicate use of regional Mdm accounts
+ */
+ @JsonProperty(value = "enableRegionalMdmAccount")
+ private Boolean enableRegionalMdmAccount;
+
+ /*
+ * Source mdm account
+ */
+ @JsonProperty(value = "sourceMdmAccount")
+ private String sourceMdmAccount;
+
+ /*
+ * Source mdm namespace
+ */
+ @JsonProperty(value = "sourceMdmNamespace")
+ private String sourceMdmNamespace;
+
+ /*
+ * Metric filter regex pattern
+ */
+ @JsonProperty(value = "metricFilterPattern")
+ private String metricFilterPattern;
+
+ /*
+ * Flag to determine is Zero is returned for time duration where no metric
+ * is emitted
+ */
+ @JsonProperty(value = "fillGapWithZero")
+ private Boolean fillGapWithZero;
+
+ /*
+ * Metric category
+ */
+ @JsonProperty(value = "category")
+ private String category;
+
/*
* Internal metric name.
*/
@@ -58,6 +109,12 @@ public final class MetricSpecification {
@JsonProperty(value = "dimensions")
private List dimensions;
+ /*
+ * Locked aggregation type of the metric
+ */
+ @JsonProperty(value = "lockedAggregationType")
+ private String lockedAggregationType;
+
/**
* Get the name property: Name of the metric.
*
@@ -160,6 +217,172 @@ public MetricSpecification withAggregationType(String aggregationType) {
return this;
}
+ /**
+ * Get the supportedAggregationTypes property: Supported aggregation types. Valid values: Average, Minimum, Maximum,
+ * Total, Count.
+ *
+ * @return the supportedAggregationTypes value.
+ */
+ public List supportedAggregationTypes() {
+ return this.supportedAggregationTypes;
+ }
+
+ /**
+ * Set the supportedAggregationTypes property: Supported aggregation types. Valid values: Average, Minimum, Maximum,
+ * Total, Count.
+ *
+ * @param supportedAggregationTypes the supportedAggregationTypes value to set.
+ * @return the MetricSpecification object itself.
+ */
+ public MetricSpecification withSupportedAggregationTypes(List supportedAggregationTypes) {
+ this.supportedAggregationTypes = supportedAggregationTypes;
+ return this;
+ }
+
+ /**
+ * Get the supportedTimeGrainTypes property: Supported time grains. Valid values: PT1M, PT5M, PT15M, PT30M, PT1H,
+ * PT6H, PT12H, P1D.
+ *
+ * @return the supportedTimeGrainTypes value.
+ */
+ public List supportedTimeGrainTypes() {
+ return this.supportedTimeGrainTypes;
+ }
+
+ /**
+ * Set the supportedTimeGrainTypes property: Supported time grains. Valid values: PT1M, PT5M, PT15M, PT30M, PT1H,
+ * PT6H, PT12H, P1D.
+ *
+ * @param supportedTimeGrainTypes the supportedTimeGrainTypes value to set.
+ * @return the MetricSpecification object itself.
+ */
+ public MetricSpecification withSupportedTimeGrainTypes(List supportedTimeGrainTypes) {
+ this.supportedTimeGrainTypes = supportedTimeGrainTypes;
+ return this;
+ }
+
+ /**
+ * Get the enableRegionalMdmAccount property: Flag to indicate use of regional Mdm accounts.
+ *
+ * @return the enableRegionalMdmAccount value.
+ */
+ public Boolean enableRegionalMdmAccount() {
+ return this.enableRegionalMdmAccount;
+ }
+
+ /**
+ * Set the enableRegionalMdmAccount property: Flag to indicate use of regional Mdm accounts.
+ *
+ * @param enableRegionalMdmAccount the enableRegionalMdmAccount value to set.
+ * @return the MetricSpecification object itself.
+ */
+ public MetricSpecification withEnableRegionalMdmAccount(Boolean enableRegionalMdmAccount) {
+ this.enableRegionalMdmAccount = enableRegionalMdmAccount;
+ return this;
+ }
+
+ /**
+ * Get the sourceMdmAccount property: Source mdm account.
+ *
+ * @return the sourceMdmAccount value.
+ */
+ public String sourceMdmAccount() {
+ return this.sourceMdmAccount;
+ }
+
+ /**
+ * Set the sourceMdmAccount property: Source mdm account.
+ *
+ * @param sourceMdmAccount the sourceMdmAccount value to set.
+ * @return the MetricSpecification object itself.
+ */
+ public MetricSpecification withSourceMdmAccount(String sourceMdmAccount) {
+ this.sourceMdmAccount = sourceMdmAccount;
+ return this;
+ }
+
+ /**
+ * Get the sourceMdmNamespace property: Source mdm namespace.
+ *
+ * @return the sourceMdmNamespace value.
+ */
+ public String sourceMdmNamespace() {
+ return this.sourceMdmNamespace;
+ }
+
+ /**
+ * Set the sourceMdmNamespace property: Source mdm namespace.
+ *
+ * @param sourceMdmNamespace the sourceMdmNamespace value to set.
+ * @return the MetricSpecification object itself.
+ */
+ public MetricSpecification withSourceMdmNamespace(String sourceMdmNamespace) {
+ this.sourceMdmNamespace = sourceMdmNamespace;
+ return this;
+ }
+
+ /**
+ * Get the metricFilterPattern property: Metric filter regex pattern.
+ *
+ * @return the metricFilterPattern value.
+ */
+ public String metricFilterPattern() {
+ return this.metricFilterPattern;
+ }
+
+ /**
+ * Set the metricFilterPattern property: Metric filter regex pattern.
+ *
+ * @param metricFilterPattern the metricFilterPattern value to set.
+ * @return the MetricSpecification object itself.
+ */
+ public MetricSpecification withMetricFilterPattern(String metricFilterPattern) {
+ this.metricFilterPattern = metricFilterPattern;
+ return this;
+ }
+
+ /**
+ * Get the fillGapWithZero property: Flag to determine is Zero is returned for time duration where no metric is
+ * emitted.
+ *
+ * @return the fillGapWithZero value.
+ */
+ public Boolean fillGapWithZero() {
+ return this.fillGapWithZero;
+ }
+
+ /**
+ * Set the fillGapWithZero property: Flag to determine is Zero is returned for time duration where no metric is
+ * emitted.
+ *
+ * @param fillGapWithZero the fillGapWithZero value to set.
+ * @return the MetricSpecification object itself.
+ */
+ public MetricSpecification withFillGapWithZero(Boolean fillGapWithZero) {
+ this.fillGapWithZero = fillGapWithZero;
+ return this;
+ }
+
+ /**
+ * Get the category property: Metric category.
+ *
+ * @return the category value.
+ */
+ public String category() {
+ return this.category;
+ }
+
+ /**
+ * Set the category property: Metric category.
+ *
+ * @param category the category value to set.
+ * @return the MetricSpecification object itself.
+ */
+ public MetricSpecification withCategory(String category) {
+ this.category = category;
+ return this;
+ }
+
/**
* Get the internalMetricName property: Internal metric name.
*
@@ -200,6 +423,26 @@ public MetricSpecification withDimensions(List dimensions) {
return this;
}
+ /**
+ * Get the lockedAggregationType property: Locked aggregation type of the metric.
+ *
+ * @return the lockedAggregationType value.
+ */
+ public String lockedAggregationType() {
+ return this.lockedAggregationType;
+ }
+
+ /**
+ * Set the lockedAggregationType property: Locked aggregation type of the metric.
+ *
+ * @param lockedAggregationType the lockedAggregationType value to set.
+ * @return the MetricSpecification object itself.
+ */
+ public MetricSpecification withLockedAggregationType(String lockedAggregationType) {
+ this.lockedAggregationType = lockedAggregationType;
+ return this;
+ }
+
/**
* Validates the instance.
*
diff --git a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/models/ObjectAnchorsAccount.java b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/models/ObjectAnchorsAccount.java
new file mode 100644
index 0000000000000..9935fa66f66ac
--- /dev/null
+++ b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/models/ObjectAnchorsAccount.java
@@ -0,0 +1,407 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.mixedreality.models;
+
+import com.azure.core.http.rest.Response;
+import com.azure.core.management.Region;
+import com.azure.core.management.SystemData;
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.mixedreality.fluent.models.ObjectAnchorsAccountInner;
+import java.util.Map;
+
+/** An immutable client-side representation of ObjectAnchorsAccount. */
+public interface ObjectAnchorsAccount {
+ /**
+ * Gets the id property: Fully qualified resource Id for the resource.
+ *
+ * @return the id value.
+ */
+ String id();
+
+ /**
+ * Gets the name property: The name of the resource.
+ *
+ * @return the name value.
+ */
+ String name();
+
+ /**
+ * Gets the type property: The type of the resource.
+ *
+ * @return the type value.
+ */
+ String type();
+
+ /**
+ * Gets the location property: The geo-location where the resource lives.
+ *
+ * @return the location value.
+ */
+ String location();
+
+ /**
+ * Gets the tags property: Resource tags.
+ *
+ * @return the tags value.
+ */
+ Map tags();
+
+ /**
+ * Gets the identity property: The identity property.
+ *
+ * @return the identity value.
+ */
+ ObjectAnchorsAccountIdentity identity();
+
+ /**
+ * Gets the plan property: The plan associated with this account.
+ *
+ * @return the plan value.
+ */
+ Identity plan();
+
+ /**
+ * Gets the sku property: The sku associated with this account.
+ *
+ * @return the sku value.
+ */
+ Sku sku();
+
+ /**
+ * Gets the kind property: The kind of account, if supported.
+ *
+ * @return the kind value.
+ */
+ Sku kind();
+
+ /**
+ * Gets the systemData property: The system metadata related to an object anchors account.
+ *
+ * @return the systemData value.
+ */
+ SystemData systemData();
+
+ /**
+ * Gets the storageAccountName property: The name of the storage account associated with this accountId.
+ *
+ * @return the storageAccountName value.
+ */
+ String storageAccountName();
+
+ /**
+ * Gets the accountId property: unique id of certain account.
+ *
+ * @return the accountId value.
+ */
+ String accountId();
+
+ /**
+ * Gets the accountDomain property: Correspond domain name of certain Spatial Anchors Account.
+ *
+ * @return the accountDomain value.
+ */
+ String accountDomain();
+
+ /**
+ * Gets the region of the resource.
+ *
+ * @return the region of the resource.
+ */
+ Region region();
+
+ /**
+ * Gets the name of the resource region.
+ *
+ * @return the name of the resource region.
+ */
+ String regionName();
+
+ /**
+ * Gets the inner com.azure.resourcemanager.mixedreality.fluent.models.ObjectAnchorsAccountInner object.
+ *
+ * @return the inner object.
+ */
+ ObjectAnchorsAccountInner innerModel();
+
+ /** The entirety of the ObjectAnchorsAccount definition. */
+ interface Definition
+ extends DefinitionStages.Blank,
+ DefinitionStages.WithLocation,
+ DefinitionStages.WithResourceGroup,
+ DefinitionStages.WithCreate {
+ }
+ /** The ObjectAnchorsAccount definition stages. */
+ interface DefinitionStages {
+ /** The first stage of the ObjectAnchorsAccount definition. */
+ interface Blank extends WithLocation {
+ }
+ /** The stage of the ObjectAnchorsAccount definition allowing to specify location. */
+ interface WithLocation {
+ /**
+ * Specifies the region for the resource.
+ *
+ * @param location The geo-location where the resource lives.
+ * @return the next definition stage.
+ */
+ WithResourceGroup withRegion(Region location);
+
+ /**
+ * Specifies the region for the resource.
+ *
+ * @param location The geo-location where the resource lives.
+ * @return the next definition stage.
+ */
+ WithResourceGroup withRegion(String location);
+ }
+ /** The stage of the ObjectAnchorsAccount definition allowing to specify parent resource. */
+ interface WithResourceGroup {
+ /**
+ * Specifies resourceGroupName.
+ *
+ * @param resourceGroupName Name of an Azure resource group.
+ * @return the next definition stage.
+ */
+ WithCreate withExistingResourceGroup(String resourceGroupName);
+ }
+ /**
+ * The stage of the ObjectAnchorsAccount definition which contains all the minimum required properties for the
+ * resource to be created, but also allows for any other optional properties to be specified.
+ */
+ interface WithCreate
+ extends DefinitionStages.WithTags,
+ DefinitionStages.WithIdentity,
+ DefinitionStages.WithPlan,
+ DefinitionStages.WithSku,
+ DefinitionStages.WithKind,
+ DefinitionStages.WithStorageAccountName {
+ /**
+ * Executes the create request.
+ *
+ * @return the created resource.
+ */
+ ObjectAnchorsAccount create();
+
+ /**
+ * Executes the create request.
+ *
+ * @param context The context to associate with this operation.
+ * @return the created resource.
+ */
+ ObjectAnchorsAccount create(Context context);
+ }
+ /** The stage of the ObjectAnchorsAccount definition allowing to specify tags. */
+ interface WithTags {
+ /**
+ * Specifies the tags property: Resource tags..
+ *
+ * @param tags Resource tags.
+ * @return the next definition stage.
+ */
+ WithCreate withTags(Map tags);
+ }
+ /** The stage of the ObjectAnchorsAccount definition allowing to specify identity. */
+ interface WithIdentity {
+ /**
+ * Specifies the identity property: The identity property..
+ *
+ * @param identity The identity property.
+ * @return the next definition stage.
+ */
+ WithCreate withIdentity(ObjectAnchorsAccountIdentity identity);
+ }
+ /** The stage of the ObjectAnchorsAccount definition allowing to specify plan. */
+ interface WithPlan {
+ /**
+ * Specifies the plan property: The plan associated with this account.
+ *
+ * @param plan The plan associated with this account.
+ * @return the next definition stage.
+ */
+ WithCreate withPlan(Identity plan);
+ }
+ /** The stage of the ObjectAnchorsAccount definition allowing to specify sku. */
+ interface WithSku {
+ /**
+ * Specifies the sku property: The sku associated with this account.
+ *
+ * @param sku The sku associated with this account.
+ * @return the next definition stage.
+ */
+ WithCreate withSku(Sku sku);
+ }
+ /** The stage of the ObjectAnchorsAccount definition allowing to specify kind. */
+ interface WithKind {
+ /**
+ * Specifies the kind property: The kind of account, if supported.
+ *
+ * @param kind The kind of account, if supported.
+ * @return the next definition stage.
+ */
+ WithCreate withKind(Sku kind);
+ }
+ /** The stage of the ObjectAnchorsAccount definition allowing to specify storageAccountName. */
+ interface WithStorageAccountName {
+ /**
+ * Specifies the storageAccountName property: The name of the storage account associated with this
+ * accountId.
+ *
+ * @param storageAccountName The name of the storage account associated with this accountId.
+ * @return the next definition stage.
+ */
+ WithCreate withStorageAccountName(String storageAccountName);
+ }
+ }
+ /**
+ * Begins update for the ObjectAnchorsAccount resource.
+ *
+ * @return the stage of resource update.
+ */
+ ObjectAnchorsAccount.Update update();
+
+ /** The template for ObjectAnchorsAccount update. */
+ interface Update
+ extends UpdateStages.WithTags,
+ UpdateStages.WithIdentity,
+ UpdateStages.WithPlan,
+ UpdateStages.WithSku,
+ UpdateStages.WithKind,
+ UpdateStages.WithStorageAccountName {
+ /**
+ * Executes the update request.
+ *
+ * @return the updated resource.
+ */
+ ObjectAnchorsAccount apply();
+
+ /**
+ * Executes the update request.
+ *
+ * @param context The context to associate with this operation.
+ * @return the updated resource.
+ */
+ ObjectAnchorsAccount apply(Context context);
+ }
+ /** The ObjectAnchorsAccount update stages. */
+ interface UpdateStages {
+ /** The stage of the ObjectAnchorsAccount update allowing to specify tags. */
+ interface WithTags {
+ /**
+ * Specifies the tags property: Resource tags..
+ *
+ * @param tags Resource tags.
+ * @return the next definition stage.
+ */
+ Update withTags(Map tags);
+ }
+ /** The stage of the ObjectAnchorsAccount update allowing to specify identity. */
+ interface WithIdentity {
+ /**
+ * Specifies the identity property: The identity property..
+ *
+ * @param identity The identity property.
+ * @return the next definition stage.
+ */
+ Update withIdentity(ObjectAnchorsAccountIdentity identity);
+ }
+ /** The stage of the ObjectAnchorsAccount update allowing to specify plan. */
+ interface WithPlan {
+ /**
+ * Specifies the plan property: The plan associated with this account.
+ *
+ * @param plan The plan associated with this account.
+ * @return the next definition stage.
+ */
+ Update withPlan(Identity plan);
+ }
+ /** The stage of the ObjectAnchorsAccount update allowing to specify sku. */
+ interface WithSku {
+ /**
+ * Specifies the sku property: The sku associated with this account.
+ *
+ * @param sku The sku associated with this account.
+ * @return the next definition stage.
+ */
+ Update withSku(Sku sku);
+ }
+ /** The stage of the ObjectAnchorsAccount update allowing to specify kind. */
+ interface WithKind {
+ /**
+ * Specifies the kind property: The kind of account, if supported.
+ *
+ * @param kind The kind of account, if supported.
+ * @return the next definition stage.
+ */
+ Update withKind(Sku kind);
+ }
+ /** The stage of the ObjectAnchorsAccount update allowing to specify storageAccountName. */
+ interface WithStorageAccountName {
+ /**
+ * Specifies the storageAccountName property: The name of the storage account associated with this
+ * accountId.
+ *
+ * @param storageAccountName The name of the storage account associated with this accountId.
+ * @return the next definition stage.
+ */
+ Update withStorageAccountName(String storageAccountName);
+ }
+ }
+ /**
+ * Refreshes the resource to sync with Azure.
+ *
+ * @return the refreshed resource.
+ */
+ ObjectAnchorsAccount refresh();
+
+ /**
+ * Refreshes the resource to sync with Azure.
+ *
+ * @param context The context to associate with this operation.
+ * @return the refreshed resource.
+ */
+ ObjectAnchorsAccount refresh(Context context);
+
+ /**
+ * List Both of the 2 Keys of an object anchors Account.
+ *
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return developer Keys of account.
+ */
+ AccountKeys listKeys();
+
+ /**
+ * List Both of the 2 Keys of an object anchors Account.
+ *
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return developer Keys of account.
+ */
+ Response listKeysWithResponse(Context context);
+
+ /**
+ * Regenerate specified Key of an object anchors Account.
+ *
+ * @param regenerate Required information for key regeneration.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return developer Keys of account.
+ */
+ AccountKeys regenerateKeys(AccountKeyRegenerateRequest regenerate);
+
+ /**
+ * Regenerate specified Key of an object anchors Account.
+ *
+ * @param regenerate Required information for key regeneration.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return developer Keys of account.
+ */
+ Response regenerateKeysWithResponse(AccountKeyRegenerateRequest regenerate, Context context);
+}
diff --git a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/models/ObjectAnchorsAccountIdentity.java b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/models/ObjectAnchorsAccountIdentity.java
new file mode 100644
index 0000000000000..ac439f3331323
--- /dev/null
+++ b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/models/ObjectAnchorsAccountIdentity.java
@@ -0,0 +1,32 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.mixedreality.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.util.logging.ClientLogger;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+
+/** The ObjectAnchorsAccountIdentity model. */
+@Fluent
+public class ObjectAnchorsAccountIdentity extends Identity {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(ObjectAnchorsAccountIdentity.class);
+
+ /** {@inheritDoc} */
+ @Override
+ public ObjectAnchorsAccountIdentity withType(ResourceIdentityType type) {
+ super.withType(type);
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ @Override
+ public void validate() {
+ super.validate();
+ }
+}
diff --git a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/models/ObjectAnchorsAccountPage.java b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/models/ObjectAnchorsAccountPage.java
new file mode 100644
index 0000000000000..dc2ae58c72c17
--- /dev/null
+++ b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/models/ObjectAnchorsAccountPage.java
@@ -0,0 +1,84 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.mixedreality.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.mixedreality.fluent.models.ObjectAnchorsAccountInner;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.List;
+
+/**
+ * Result of the request to get resource collection. It contains a list of resources and a URL link to get the next set
+ * of results.
+ */
+@Fluent
+public final class ObjectAnchorsAccountPage {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(ObjectAnchorsAccountPage.class);
+
+ /*
+ * List of resources supported by the Resource Provider.
+ */
+ @JsonProperty(value = "value")
+ private List value;
+
+ /*
+ * URL to get the next set of resource list results if there are any.
+ */
+ @JsonProperty(value = "nextLink")
+ private String nextLink;
+
+ /**
+ * Get the value property: List of resources supported by the Resource Provider.
+ *
+ * @return the value value.
+ */
+ public List value() {
+ return this.value;
+ }
+
+ /**
+ * Set the value property: List of resources supported by the Resource Provider.
+ *
+ * @param value the value value to set.
+ * @return the ObjectAnchorsAccountPage object itself.
+ */
+ public ObjectAnchorsAccountPage withValue(List value) {
+ this.value = value;
+ return this;
+ }
+
+ /**
+ * Get the nextLink property: URL to get the next set of resource list results if there are any.
+ *
+ * @return the nextLink value.
+ */
+ public String nextLink() {
+ return this.nextLink;
+ }
+
+ /**
+ * Set the nextLink property: URL to get the next set of resource list results if there are any.
+ *
+ * @param nextLink the nextLink value to set.
+ * @return the ObjectAnchorsAccountPage object itself.
+ */
+ public ObjectAnchorsAccountPage withNextLink(String nextLink) {
+ this.nextLink = nextLink;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (value() != null) {
+ value().forEach(e -> e.validate());
+ }
+ }
+}
diff --git a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/models/ObjectAnchorsAccounts.java b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/models/ObjectAnchorsAccounts.java
new file mode 100644
index 0000000000000..00fa8e69133db
--- /dev/null
+++ b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/models/ObjectAnchorsAccounts.java
@@ -0,0 +1,211 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.mixedreality.models;
+
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.Response;
+import com.azure.core.util.Context;
+
+/** Resource collection API of ObjectAnchorsAccounts. */
+public interface ObjectAnchorsAccounts {
+ /**
+ * List Object Anchors Accounts by Subscription.
+ *
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return result of the request to get resource collection.
+ */
+ PagedIterable list();
+
+ /**
+ * List Object Anchors Accounts by Subscription.
+ *
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return result of the request to get resource collection.
+ */
+ PagedIterable list(Context context);
+
+ /**
+ * List Resources by Resource Group.
+ *
+ * @param resourceGroupName Name of an Azure resource group.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return result of the request to get resource collection.
+ */
+ PagedIterable listByResourceGroup(String resourceGroupName);
+
+ /**
+ * List Resources by Resource Group.
+ *
+ * @param resourceGroupName Name of an Azure resource group.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return result of the request to get resource collection.
+ */
+ PagedIterable listByResourceGroup(String resourceGroupName, Context context);
+
+ /**
+ * Delete an Object Anchors Account.
+ *
+ * @param resourceGroupName Name of an Azure resource group.
+ * @param accountName Name of an Mixed Reality Account.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ void deleteByResourceGroup(String resourceGroupName, String accountName);
+
+ /**
+ * Delete an Object Anchors Account.
+ *
+ * @param resourceGroupName Name of an Azure resource group.
+ * @param accountName Name of an Mixed Reality Account.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response.
+ */
+ Response deleteWithResponse(String resourceGroupName, String accountName, Context context);
+
+ /**
+ * Retrieve an Object Anchors Account.
+ *
+ * @param resourceGroupName Name of an Azure resource group.
+ * @param accountName Name of an Mixed Reality Account.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return objectAnchorsAccount Response.
+ */
+ ObjectAnchorsAccount getByResourceGroup(String resourceGroupName, String accountName);
+
+ /**
+ * Retrieve an Object Anchors Account.
+ *
+ * @param resourceGroupName Name of an Azure resource group.
+ * @param accountName Name of an Mixed Reality Account.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return objectAnchorsAccount Response.
+ */
+ Response getByResourceGroupWithResponse(
+ String resourceGroupName, String accountName, Context context);
+
+ /**
+ * List Both of the 2 Keys of an object anchors Account.
+ *
+ * @param resourceGroupName Name of an Azure resource group.
+ * @param accountName Name of an Mixed Reality Account.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return developer Keys of account.
+ */
+ AccountKeys listKeys(String resourceGroupName, String accountName);
+
+ /**
+ * List Both of the 2 Keys of an object anchors Account.
+ *
+ * @param resourceGroupName Name of an Azure resource group.
+ * @param accountName Name of an Mixed Reality Account.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return developer Keys of account.
+ */
+ Response listKeysWithResponse(String resourceGroupName, String accountName, Context context);
+
+ /**
+ * Regenerate specified Key of an object anchors Account.
+ *
+ * @param resourceGroupName Name of an Azure resource group.
+ * @param accountName Name of an Mixed Reality Account.
+ * @param regenerate Required information for key regeneration.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return developer Keys of account.
+ */
+ AccountKeys regenerateKeys(String resourceGroupName, String accountName, AccountKeyRegenerateRequest regenerate);
+
+ /**
+ * Regenerate specified Key of an object anchors Account.
+ *
+ * @param resourceGroupName Name of an Azure resource group.
+ * @param accountName Name of an Mixed Reality Account.
+ * @param regenerate Required information for key regeneration.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return developer Keys of account.
+ */
+ Response regenerateKeysWithResponse(
+ String resourceGroupName, String accountName, AccountKeyRegenerateRequest regenerate, Context context);
+
+ /**
+ * Retrieve an Object Anchors Account.
+ *
+ * @param id the resource ID.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return objectAnchorsAccount Response.
+ */
+ ObjectAnchorsAccount getById(String id);
+
+ /**
+ * Retrieve an Object Anchors Account.
+ *
+ * @param id the resource ID.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return objectAnchorsAccount Response.
+ */
+ Response getByIdWithResponse(String id, Context context);
+
+ /**
+ * Delete an Object Anchors Account.
+ *
+ * @param id the resource ID.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ void deleteById(String id);
+
+ /**
+ * Delete an Object Anchors Account.
+ *
+ * @param id the resource ID.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response.
+ */
+ Response deleteByIdWithResponse(String id, Context context);
+
+ /**
+ * Begins definition for a new ObjectAnchorsAccount resource.
+ *
+ * @param name resource name.
+ * @return the first stage of the new ObjectAnchorsAccount definition.
+ */
+ ObjectAnchorsAccount.DefinitionStages.Blank define(String name);
+}
diff --git a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/samples/java/com/azure/resourcemanager/mixedreality/generated/ObjectAnchorsAccountsCreateSamples.java b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/samples/java/com/azure/resourcemanager/mixedreality/generated/ObjectAnchorsAccountsCreateSamples.java
new file mode 100644
index 0000000000000..290fc894fa7f2
--- /dev/null
+++ b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/samples/java/com/azure/resourcemanager/mixedreality/generated/ObjectAnchorsAccountsCreateSamples.java
@@ -0,0 +1,29 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.mixedreality.generated;
+
+import com.azure.resourcemanager.mixedreality.models.ObjectAnchorsAccountIdentity;
+import com.azure.resourcemanager.mixedreality.models.ResourceIdentityType;
+
+/** Samples for ObjectAnchorsAccounts Create. */
+public final class ObjectAnchorsAccountsCreateSamples {
+ /*
+ * x-ms-original-file: specification/mixedreality/resource-manager/Microsoft.MixedReality/preview/2021-03-01-preview/examples/object-anchors/Put.json
+ */
+ /**
+ * Sample code: Create object anchors account.
+ *
+ * @param manager Entry point to MixedRealityManager.
+ */
+ public static void createObjectAnchorsAccount(com.azure.resourcemanager.mixedreality.MixedRealityManager manager) {
+ manager
+ .objectAnchorsAccounts()
+ .define("MyAccount")
+ .withRegion("eastus2euap")
+ .withExistingResourceGroup("MyResourceGroup")
+ .withIdentity(new ObjectAnchorsAccountIdentity().withType(ResourceIdentityType.SYSTEM_ASSIGNED))
+ .create();
+ }
+}
diff --git a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/samples/java/com/azure/resourcemanager/mixedreality/generated/ObjectAnchorsAccountsDeleteSamples.java b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/samples/java/com/azure/resourcemanager/mixedreality/generated/ObjectAnchorsAccountsDeleteSamples.java
new file mode 100644
index 0000000000000..68bb5d316f656
--- /dev/null
+++ b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/samples/java/com/azure/resourcemanager/mixedreality/generated/ObjectAnchorsAccountsDeleteSamples.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.mixedreality.generated;
+
+import com.azure.core.util.Context;
+
+/** Samples for ObjectAnchorsAccounts Delete. */
+public final class ObjectAnchorsAccountsDeleteSamples {
+ /*
+ * x-ms-original-file: specification/mixedreality/resource-manager/Microsoft.MixedReality/preview/2021-03-01-preview/examples/object-anchors/Delete.json
+ */
+ /**
+ * Sample code: Delete object anchors account.
+ *
+ * @param manager Entry point to MixedRealityManager.
+ */
+ public static void deleteObjectAnchorsAccount(com.azure.resourcemanager.mixedreality.MixedRealityManager manager) {
+ manager.objectAnchorsAccounts().deleteWithResponse("MyResourceGroup", "MyAccount", Context.NONE);
+ }
+}
diff --git a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/samples/java/com/azure/resourcemanager/mixedreality/generated/ObjectAnchorsAccountsGetByResourceGroupSamples.java b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/samples/java/com/azure/resourcemanager/mixedreality/generated/ObjectAnchorsAccountsGetByResourceGroupSamples.java
new file mode 100644
index 0000000000000..1e102787e9d34
--- /dev/null
+++ b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/samples/java/com/azure/resourcemanager/mixedreality/generated/ObjectAnchorsAccountsGetByResourceGroupSamples.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.mixedreality.generated;
+
+import com.azure.core.util.Context;
+
+/** Samples for ObjectAnchorsAccounts GetByResourceGroup. */
+public final class ObjectAnchorsAccountsGetByResourceGroupSamples {
+ /*
+ * x-ms-original-file: specification/mixedreality/resource-manager/Microsoft.MixedReality/preview/2021-03-01-preview/examples/object-anchors/Get.json
+ */
+ /**
+ * Sample code: Get object anchors account.
+ *
+ * @param manager Entry point to MixedRealityManager.
+ */
+ public static void getObjectAnchorsAccount(com.azure.resourcemanager.mixedreality.MixedRealityManager manager) {
+ manager.objectAnchorsAccounts().getByResourceGroupWithResponse("MyResourceGroup", "MyAccount", Context.NONE);
+ }
+}
diff --git a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/samples/java/com/azure/resourcemanager/mixedreality/generated/ObjectAnchorsAccountsListByResourceGroupSamples.java b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/samples/java/com/azure/resourcemanager/mixedreality/generated/ObjectAnchorsAccountsListByResourceGroupSamples.java
new file mode 100644
index 0000000000000..ff0caa280845b
--- /dev/null
+++ b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/samples/java/com/azure/resourcemanager/mixedreality/generated/ObjectAnchorsAccountsListByResourceGroupSamples.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.mixedreality.generated;
+
+import com.azure.core.util.Context;
+
+/** Samples for ObjectAnchorsAccounts ListByResourceGroup. */
+public final class ObjectAnchorsAccountsListByResourceGroupSamples {
+ /*
+ * x-ms-original-file: specification/mixedreality/resource-manager/Microsoft.MixedReality/preview/2021-03-01-preview/examples/object-anchors/GetByResourceGroup.json
+ */
+ /**
+ * Sample code: List object anchors accounts by resource group.
+ *
+ * @param manager Entry point to MixedRealityManager.
+ */
+ public static void listObjectAnchorsAccountsByResourceGroup(
+ com.azure.resourcemanager.mixedreality.MixedRealityManager manager) {
+ manager.objectAnchorsAccounts().listByResourceGroup("MyResourceGroup", Context.NONE);
+ }
+}
diff --git a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/samples/java/com/azure/resourcemanager/mixedreality/generated/ObjectAnchorsAccountsListKeysSamples.java b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/samples/java/com/azure/resourcemanager/mixedreality/generated/ObjectAnchorsAccountsListKeysSamples.java
new file mode 100644
index 0000000000000..af03693443a80
--- /dev/null
+++ b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/samples/java/com/azure/resourcemanager/mixedreality/generated/ObjectAnchorsAccountsListKeysSamples.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.mixedreality.generated;
+
+import com.azure.core.util.Context;
+
+/** Samples for ObjectAnchorsAccounts ListKeys. */
+public final class ObjectAnchorsAccountsListKeysSamples {
+ /*
+ * x-ms-original-file: specification/mixedreality/resource-manager/Microsoft.MixedReality/preview/2021-03-01-preview/examples/object-anchors/ListKeys.json
+ */
+ /**
+ * Sample code: List object anchors account key.
+ *
+ * @param manager Entry point to MixedRealityManager.
+ */
+ public static void listObjectAnchorsAccountKey(com.azure.resourcemanager.mixedreality.MixedRealityManager manager) {
+ manager.objectAnchorsAccounts().listKeysWithResponse("MyResourceGroup", "MyAccount", Context.NONE);
+ }
+}
diff --git a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/samples/java/com/azure/resourcemanager/mixedreality/generated/ObjectAnchorsAccountsListSamples.java b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/samples/java/com/azure/resourcemanager/mixedreality/generated/ObjectAnchorsAccountsListSamples.java
new file mode 100644
index 0000000000000..ae86c72e0207e
--- /dev/null
+++ b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/samples/java/com/azure/resourcemanager/mixedreality/generated/ObjectAnchorsAccountsListSamples.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.mixedreality.generated;
+
+import com.azure.core.util.Context;
+
+/** Samples for ObjectAnchorsAccounts List. */
+public final class ObjectAnchorsAccountsListSamples {
+ /*
+ * x-ms-original-file: specification/mixedreality/resource-manager/Microsoft.MixedReality/preview/2021-03-01-preview/examples/object-anchors/GetBySubscription.json
+ */
+ /**
+ * Sample code: List object anchors accounts by subscription.
+ *
+ * @param manager Entry point to MixedRealityManager.
+ */
+ public static void listObjectAnchorsAccountsBySubscription(
+ com.azure.resourcemanager.mixedreality.MixedRealityManager manager) {
+ manager.objectAnchorsAccounts().list(Context.NONE);
+ }
+}
diff --git a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/samples/java/com/azure/resourcemanager/mixedreality/generated/ObjectAnchorsAccountsRegenerateKeysSamples.java b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/samples/java/com/azure/resourcemanager/mixedreality/generated/ObjectAnchorsAccountsRegenerateKeysSamples.java
new file mode 100644
index 0000000000000..1808558092649
--- /dev/null
+++ b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/samples/java/com/azure/resourcemanager/mixedreality/generated/ObjectAnchorsAccountsRegenerateKeysSamples.java
@@ -0,0 +1,28 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.mixedreality.generated;
+
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.mixedreality.models.AccountKeyRegenerateRequest;
+import com.azure.resourcemanager.mixedreality.models.Serial;
+
+/** Samples for ObjectAnchorsAccounts RegenerateKeys. */
+public final class ObjectAnchorsAccountsRegenerateKeysSamples {
+ /*
+ * x-ms-original-file: specification/mixedreality/resource-manager/Microsoft.MixedReality/preview/2021-03-01-preview/examples/object-anchors/RegenerateKey.json
+ */
+ /**
+ * Sample code: Regenerate object anchors account keys.
+ *
+ * @param manager Entry point to MixedRealityManager.
+ */
+ public static void regenerateObjectAnchorsAccountKeys(
+ com.azure.resourcemanager.mixedreality.MixedRealityManager manager) {
+ manager
+ .objectAnchorsAccounts()
+ .regenerateKeysWithResponse(
+ "MyResourceGroup", "MyAccount", new AccountKeyRegenerateRequest().withSerial(Serial.ONE), Context.NONE);
+ }
+}
diff --git a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/samples/java/com/azure/resourcemanager/mixedreality/generated/ObjectAnchorsAccountsUpdateSamples.java b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/samples/java/com/azure/resourcemanager/mixedreality/generated/ObjectAnchorsAccountsUpdateSamples.java
new file mode 100644
index 0000000000000..450da972170b2
--- /dev/null
+++ b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/samples/java/com/azure/resourcemanager/mixedreality/generated/ObjectAnchorsAccountsUpdateSamples.java
@@ -0,0 +1,47 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.mixedreality.generated;
+
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.mixedreality.models.ObjectAnchorsAccount;
+import com.azure.resourcemanager.mixedreality.models.ObjectAnchorsAccountIdentity;
+import com.azure.resourcemanager.mixedreality.models.ResourceIdentityType;
+import java.util.HashMap;
+import java.util.Map;
+
+/** Samples for ObjectAnchorsAccounts Update. */
+public final class ObjectAnchorsAccountsUpdateSamples {
+ /*
+ * x-ms-original-file: specification/mixedreality/resource-manager/Microsoft.MixedReality/preview/2021-03-01-preview/examples/object-anchors/Patch.json
+ */
+ /**
+ * Sample code: Update object anchors account.
+ *
+ * @param manager Entry point to MixedRealityManager.
+ */
+ public static void updateObjectAnchorsAccount(com.azure.resourcemanager.mixedreality.MixedRealityManager manager) {
+ ObjectAnchorsAccount resource =
+ manager
+ .objectAnchorsAccounts()
+ .getByResourceGroupWithResponse("MyResourceGroup", "MyAccount", Context.NONE)
+ .getValue();
+ resource
+ .update()
+ .withTags(mapOf("hero", "romeo", "heroine", "juliet"))
+ .withIdentity(new ObjectAnchorsAccountIdentity().withType(ResourceIdentityType.SYSTEM_ASSIGNED))
+ .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/mixedreality/azure-resourcemanager-mixedreality/src/samples/java/com/azure/resourcemanager/mixedreality/generated/OperationsListSamples.java b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/samples/java/com/azure/resourcemanager/mixedreality/generated/OperationsListSamples.java
new file mode 100644
index 0000000000000..a009dc8a68386
--- /dev/null
+++ b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/samples/java/com/azure/resourcemanager/mixedreality/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.mixedreality.generated;
+
+import com.azure.core.util.Context;
+
+/** Samples for Operations List. */
+public final class OperationsListSamples {
+ /*
+ * x-ms-original-file: specification/mixedreality/resource-manager/Microsoft.MixedReality/preview/2021-03-01-preview/examples/proxy/ExposingAvailableOperations.json
+ */
+ /**
+ * Sample code: List available operations.
+ *
+ * @param manager Entry point to MixedRealityManager.
+ */
+ public static void listAvailableOperations(com.azure.resourcemanager.mixedreality.MixedRealityManager manager) {
+ manager.operations().list(Context.NONE);
+ }
+}
diff --git a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/samples/java/com/azure/resourcemanager/mixedreality/generated/RemoteRenderingAccountsCreateSamples.java b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/samples/java/com/azure/resourcemanager/mixedreality/generated/RemoteRenderingAccountsCreateSamples.java
new file mode 100644
index 0000000000000..47fd9c7fd233b
--- /dev/null
+++ b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/samples/java/com/azure/resourcemanager/mixedreality/generated/RemoteRenderingAccountsCreateSamples.java
@@ -0,0 +1,30 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.mixedreality.generated;
+
+import com.azure.resourcemanager.mixedreality.models.Identity;
+import com.azure.resourcemanager.mixedreality.models.ResourceIdentityType;
+
+/** Samples for RemoteRenderingAccounts Create. */
+public final class RemoteRenderingAccountsCreateSamples {
+ /*
+ * x-ms-original-file: specification/mixedreality/resource-manager/Microsoft.MixedReality/preview/2021-03-01-preview/examples/remote-rendering/Put.json
+ */
+ /**
+ * Sample code: Create remote rendering account.
+ *
+ * @param manager Entry point to MixedRealityManager.
+ */
+ public static void createRemoteRenderingAccount(
+ com.azure.resourcemanager.mixedreality.MixedRealityManager manager) {
+ manager
+ .remoteRenderingAccounts()
+ .define("MyAccount")
+ .withRegion("eastus2euap")
+ .withExistingResourceGroup("MyResourceGroup")
+ .withIdentity(new Identity().withType(ResourceIdentityType.SYSTEM_ASSIGNED))
+ .create();
+ }
+}
diff --git a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/samples/java/com/azure/resourcemanager/mixedreality/generated/RemoteRenderingAccountsDeleteSamples.java b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/samples/java/com/azure/resourcemanager/mixedreality/generated/RemoteRenderingAccountsDeleteSamples.java
new file mode 100644
index 0000000000000..bf6102cad074b
--- /dev/null
+++ b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/samples/java/com/azure/resourcemanager/mixedreality/generated/RemoteRenderingAccountsDeleteSamples.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.mixedreality.generated;
+
+import com.azure.core.util.Context;
+
+/** Samples for RemoteRenderingAccounts Delete. */
+public final class RemoteRenderingAccountsDeleteSamples {
+ /*
+ * x-ms-original-file: specification/mixedreality/resource-manager/Microsoft.MixedReality/preview/2021-03-01-preview/examples/remote-rendering/Delete.json
+ */
+ /**
+ * Sample code: Delete remote rendering account.
+ *
+ * @param manager Entry point to MixedRealityManager.
+ */
+ public static void deleteRemoteRenderingAccount(
+ com.azure.resourcemanager.mixedreality.MixedRealityManager manager) {
+ manager.remoteRenderingAccounts().deleteWithResponse("MyResourceGroup", "MyAccount", Context.NONE);
+ }
+}
diff --git a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/samples/java/com/azure/resourcemanager/mixedreality/generated/RemoteRenderingAccountsGetByResourceGroupSamples.java b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/samples/java/com/azure/resourcemanager/mixedreality/generated/RemoteRenderingAccountsGetByResourceGroupSamples.java
new file mode 100644
index 0000000000000..bf2db448612b6
--- /dev/null
+++ b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/samples/java/com/azure/resourcemanager/mixedreality/generated/RemoteRenderingAccountsGetByResourceGroupSamples.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.mixedreality.generated;
+
+import com.azure.core.util.Context;
+
+/** Samples for RemoteRenderingAccounts GetByResourceGroup. */
+public final class RemoteRenderingAccountsGetByResourceGroupSamples {
+ /*
+ * x-ms-original-file: specification/mixedreality/resource-manager/Microsoft.MixedReality/preview/2021-03-01-preview/examples/remote-rendering/Get.json
+ */
+ /**
+ * Sample code: Get remote rendering account.
+ *
+ * @param manager Entry point to MixedRealityManager.
+ */
+ public static void getRemoteRenderingAccount(com.azure.resourcemanager.mixedreality.MixedRealityManager manager) {
+ manager.remoteRenderingAccounts().getByResourceGroupWithResponse("MyResourceGroup", "MyAccount", Context.NONE);
+ }
+}
diff --git a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/samples/java/com/azure/resourcemanager/mixedreality/generated/RemoteRenderingAccountsListByResourceGroupSamples.java b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/samples/java/com/azure/resourcemanager/mixedreality/generated/RemoteRenderingAccountsListByResourceGroupSamples.java
new file mode 100644
index 0000000000000..b9263ab8d8778
--- /dev/null
+++ b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/samples/java/com/azure/resourcemanager/mixedreality/generated/RemoteRenderingAccountsListByResourceGroupSamples.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.mixedreality.generated;
+
+import com.azure.core.util.Context;
+
+/** Samples for RemoteRenderingAccounts ListByResourceGroup. */
+public final class RemoteRenderingAccountsListByResourceGroupSamples {
+ /*
+ * x-ms-original-file: specification/mixedreality/resource-manager/Microsoft.MixedReality/preview/2021-03-01-preview/examples/remote-rendering/GetByResourceGroup.json
+ */
+ /**
+ * Sample code: List remote rendering accounts by resource group.
+ *
+ * @param manager Entry point to MixedRealityManager.
+ */
+ public static void listRemoteRenderingAccountsByResourceGroup(
+ com.azure.resourcemanager.mixedreality.MixedRealityManager manager) {
+ manager.remoteRenderingAccounts().listByResourceGroup("MyResourceGroup", Context.NONE);
+ }
+}
diff --git a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/samples/java/com/azure/resourcemanager/mixedreality/generated/RemoteRenderingAccountsListKeysSamples.java b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/samples/java/com/azure/resourcemanager/mixedreality/generated/RemoteRenderingAccountsListKeysSamples.java
new file mode 100644
index 0000000000000..7d64cdb40ae07
--- /dev/null
+++ b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/samples/java/com/azure/resourcemanager/mixedreality/generated/RemoteRenderingAccountsListKeysSamples.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.mixedreality.generated;
+
+import com.azure.core.util.Context;
+
+/** Samples for RemoteRenderingAccounts ListKeys. */
+public final class RemoteRenderingAccountsListKeysSamples {
+ /*
+ * x-ms-original-file: specification/mixedreality/resource-manager/Microsoft.MixedReality/preview/2021-03-01-preview/examples/remote-rendering/ListKeys.json
+ */
+ /**
+ * Sample code: List remote rendering account key.
+ *
+ * @param manager Entry point to MixedRealityManager.
+ */
+ public static void listRemoteRenderingAccountKey(
+ com.azure.resourcemanager.mixedreality.MixedRealityManager manager) {
+ manager.remoteRenderingAccounts().listKeysWithResponse("MyResourceGroup", "MyAccount", Context.NONE);
+ }
+}
diff --git a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/samples/java/com/azure/resourcemanager/mixedreality/generated/RemoteRenderingAccountsListSamples.java b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/samples/java/com/azure/resourcemanager/mixedreality/generated/RemoteRenderingAccountsListSamples.java
new file mode 100644
index 0000000000000..d861058f62c4c
--- /dev/null
+++ b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/samples/java/com/azure/resourcemanager/mixedreality/generated/RemoteRenderingAccountsListSamples.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.mixedreality.generated;
+
+import com.azure.core.util.Context;
+
+/** Samples for RemoteRenderingAccounts List. */
+public final class RemoteRenderingAccountsListSamples {
+ /*
+ * x-ms-original-file: specification/mixedreality/resource-manager/Microsoft.MixedReality/preview/2021-03-01-preview/examples/remote-rendering/GetBySubscription.json
+ */
+ /**
+ * Sample code: List remote rendering accounts by subscription.
+ *
+ * @param manager Entry point to MixedRealityManager.
+ */
+ public static void listRemoteRenderingAccountsBySubscription(
+ com.azure.resourcemanager.mixedreality.MixedRealityManager manager) {
+ manager.remoteRenderingAccounts().list(Context.NONE);
+ }
+}
diff --git a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/samples/java/com/azure/resourcemanager/mixedreality/generated/RemoteRenderingAccountsRegenerateKeysSamples.java b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/samples/java/com/azure/resourcemanager/mixedreality/generated/RemoteRenderingAccountsRegenerateKeysSamples.java
new file mode 100644
index 0000000000000..27da310ae7ea6
--- /dev/null
+++ b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/samples/java/com/azure/resourcemanager/mixedreality/generated/RemoteRenderingAccountsRegenerateKeysSamples.java
@@ -0,0 +1,28 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.mixedreality.generated;
+
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.mixedreality.models.AccountKeyRegenerateRequest;
+import com.azure.resourcemanager.mixedreality.models.Serial;
+
+/** Samples for RemoteRenderingAccounts RegenerateKeys. */
+public final class RemoteRenderingAccountsRegenerateKeysSamples {
+ /*
+ * x-ms-original-file: specification/mixedreality/resource-manager/Microsoft.MixedReality/preview/2021-03-01-preview/examples/remote-rendering/RegenerateKey.json
+ */
+ /**
+ * Sample code: Regenerate remote rendering account keys.
+ *
+ * @param manager Entry point to MixedRealityManager.
+ */
+ public static void regenerateRemoteRenderingAccountKeys(
+ com.azure.resourcemanager.mixedreality.MixedRealityManager manager) {
+ manager
+ .remoteRenderingAccounts()
+ .regenerateKeysWithResponse(
+ "MyResourceGroup", "MyAccount", new AccountKeyRegenerateRequest().withSerial(Serial.ONE), Context.NONE);
+ }
+}
diff --git a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/samples/java/com/azure/resourcemanager/mixedreality/generated/RemoteRenderingAccountsUpdateSamples.java b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/samples/java/com/azure/resourcemanager/mixedreality/generated/RemoteRenderingAccountsUpdateSamples.java
new file mode 100644
index 0000000000000..0580d0cfac00a
--- /dev/null
+++ b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/samples/java/com/azure/resourcemanager/mixedreality/generated/RemoteRenderingAccountsUpdateSamples.java
@@ -0,0 +1,48 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.mixedreality.generated;
+
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.mixedreality.models.Identity;
+import com.azure.resourcemanager.mixedreality.models.RemoteRenderingAccount;
+import com.azure.resourcemanager.mixedreality.models.ResourceIdentityType;
+import java.util.HashMap;
+import java.util.Map;
+
+/** Samples for RemoteRenderingAccounts Update. */
+public final class RemoteRenderingAccountsUpdateSamples {
+ /*
+ * x-ms-original-file: specification/mixedreality/resource-manager/Microsoft.MixedReality/preview/2021-03-01-preview/examples/remote-rendering/Patch.json
+ */
+ /**
+ * Sample code: Update remote rendering account.
+ *
+ * @param manager Entry point to MixedRealityManager.
+ */
+ public static void updateRemoteRenderingAccount(
+ com.azure.resourcemanager.mixedreality.MixedRealityManager manager) {
+ RemoteRenderingAccount resource =
+ manager
+ .remoteRenderingAccounts()
+ .getByResourceGroupWithResponse("MyResourceGroup", "MyAccount", Context.NONE)
+ .getValue();
+ resource
+ .update()
+ .withTags(mapOf("hero", "romeo", "heroine", "juliet"))
+ .withIdentity(new Identity().withType(ResourceIdentityType.SYSTEM_ASSIGNED))
+ .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/mixedreality/azure-resourcemanager-mixedreality/src/samples/java/com/azure/resourcemanager/mixedreality/generated/ResourceProviderCheckNameAvailabilityLocalSamples.java b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/samples/java/com/azure/resourcemanager/mixedreality/generated/ResourceProviderCheckNameAvailabilityLocalSamples.java
new file mode 100644
index 0000000000000..598856ab24b19
--- /dev/null
+++ b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/samples/java/com/azure/resourcemanager/mixedreality/generated/ResourceProviderCheckNameAvailabilityLocalSamples.java
@@ -0,0 +1,30 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.mixedreality.generated;
+
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.mixedreality.models.CheckNameAvailabilityRequest;
+
+/** Samples for ResourceProvider CheckNameAvailabilityLocal. */
+public final class ResourceProviderCheckNameAvailabilityLocalSamples {
+ /*
+ * x-ms-original-file: specification/mixedreality/resource-manager/Microsoft.MixedReality/preview/2021-03-01-preview/examples/proxy/CheckNameAvailabilityForLocalUniqueness.json
+ */
+ /**
+ * Sample code: CheckLocalNameAvailability.
+ *
+ * @param manager Entry point to MixedRealityManager.
+ */
+ public static void checkLocalNameAvailability(com.azure.resourcemanager.mixedreality.MixedRealityManager manager) {
+ manager
+ .resourceProviders()
+ .checkNameAvailabilityLocalWithResponse(
+ "eastus2euap",
+ new CheckNameAvailabilityRequest()
+ .withName("MyAccount")
+ .withType("Microsoft.MixedReality/spatialAnchorsAccounts"),
+ Context.NONE);
+ }
+}
diff --git a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/samples/java/com/azure/resourcemanager/mixedreality/generated/SpatialAnchorsAccountsCreateSamples.java b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/samples/java/com/azure/resourcemanager/mixedreality/generated/SpatialAnchorsAccountsCreateSamples.java
new file mode 100644
index 0000000000000..e3ac633983255
--- /dev/null
+++ b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/samples/java/com/azure/resourcemanager/mixedreality/generated/SpatialAnchorsAccountsCreateSamples.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.mixedreality.generated;
+
+/** Samples for SpatialAnchorsAccounts Create. */
+public final class SpatialAnchorsAccountsCreateSamples {
+ /*
+ * x-ms-original-file: specification/mixedreality/resource-manager/Microsoft.MixedReality/preview/2021-03-01-preview/examples/spatial-anchors/Put.json
+ */
+ /**
+ * Sample code: Create spatial anchor account.
+ *
+ * @param manager Entry point to MixedRealityManager.
+ */
+ public static void createSpatialAnchorAccount(com.azure.resourcemanager.mixedreality.MixedRealityManager manager) {
+ manager
+ .spatialAnchorsAccounts()
+ .define("MyAccount")
+ .withRegion("eastus2euap")
+ .withExistingResourceGroup("MyResourceGroup")
+ .create();
+ }
+}
diff --git a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/samples/java/com/azure/resourcemanager/mixedreality/generated/SpatialAnchorsAccountsDeleteSamples.java b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/samples/java/com/azure/resourcemanager/mixedreality/generated/SpatialAnchorsAccountsDeleteSamples.java
new file mode 100644
index 0000000000000..0abbdeba0d933
--- /dev/null
+++ b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/samples/java/com/azure/resourcemanager/mixedreality/generated/SpatialAnchorsAccountsDeleteSamples.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.mixedreality.generated;
+
+import com.azure.core.util.Context;
+
+/** Samples for SpatialAnchorsAccounts Delete. */
+public final class SpatialAnchorsAccountsDeleteSamples {
+ /*
+ * x-ms-original-file: specification/mixedreality/resource-manager/Microsoft.MixedReality/preview/2021-03-01-preview/examples/spatial-anchors/Delete.json
+ */
+ /**
+ * Sample code: Delete spatial anchors account.
+ *
+ * @param manager Entry point to MixedRealityManager.
+ */
+ public static void deleteSpatialAnchorsAccount(com.azure.resourcemanager.mixedreality.MixedRealityManager manager) {
+ manager.spatialAnchorsAccounts().deleteWithResponse("MyResourceGroup", "MyAccount", Context.NONE);
+ }
+}
diff --git a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/samples/java/com/azure/resourcemanager/mixedreality/generated/SpatialAnchorsAccountsGetByResourceGroupSamples.java b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/samples/java/com/azure/resourcemanager/mixedreality/generated/SpatialAnchorsAccountsGetByResourceGroupSamples.java
new file mode 100644
index 0000000000000..05466121b746f
--- /dev/null
+++ b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/samples/java/com/azure/resourcemanager/mixedreality/generated/SpatialAnchorsAccountsGetByResourceGroupSamples.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.mixedreality.generated;
+
+import com.azure.core.util.Context;
+
+/** Samples for SpatialAnchorsAccounts GetByResourceGroup. */
+public final class SpatialAnchorsAccountsGetByResourceGroupSamples {
+ /*
+ * x-ms-original-file: specification/mixedreality/resource-manager/Microsoft.MixedReality/preview/2021-03-01-preview/examples/spatial-anchors/Get.json
+ */
+ /**
+ * Sample code: Get spatial anchors account.
+ *
+ * @param manager Entry point to MixedRealityManager.
+ */
+ public static void getSpatialAnchorsAccount(com.azure.resourcemanager.mixedreality.MixedRealityManager manager) {
+ manager.spatialAnchorsAccounts().getByResourceGroupWithResponse("MyResourceGroup", "MyAccount", Context.NONE);
+ }
+}
diff --git a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/samples/java/com/azure/resourcemanager/mixedreality/generated/SpatialAnchorsAccountsListByResourceGroupSamples.java b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/samples/java/com/azure/resourcemanager/mixedreality/generated/SpatialAnchorsAccountsListByResourceGroupSamples.java
new file mode 100644
index 0000000000000..29d81ed4466e0
--- /dev/null
+++ b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/samples/java/com/azure/resourcemanager/mixedreality/generated/SpatialAnchorsAccountsListByResourceGroupSamples.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.mixedreality.generated;
+
+import com.azure.core.util.Context;
+
+/** Samples for SpatialAnchorsAccounts ListByResourceGroup. */
+public final class SpatialAnchorsAccountsListByResourceGroupSamples {
+ /*
+ * x-ms-original-file: specification/mixedreality/resource-manager/Microsoft.MixedReality/preview/2021-03-01-preview/examples/spatial-anchors/GetByResourceGroup.json
+ */
+ /**
+ * Sample code: List spatial anchor accounts by resource group.
+ *
+ * @param manager Entry point to MixedRealityManager.
+ */
+ public static void listSpatialAnchorAccountsByResourceGroup(
+ com.azure.resourcemanager.mixedreality.MixedRealityManager manager) {
+ manager.spatialAnchorsAccounts().listByResourceGroup("MyResourceGroup", Context.NONE);
+ }
+}
diff --git a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/samples/java/com/azure/resourcemanager/mixedreality/generated/SpatialAnchorsAccountsListKeysSamples.java b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/samples/java/com/azure/resourcemanager/mixedreality/generated/SpatialAnchorsAccountsListKeysSamples.java
new file mode 100644
index 0000000000000..cde196ac312ca
--- /dev/null
+++ b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/samples/java/com/azure/resourcemanager/mixedreality/generated/SpatialAnchorsAccountsListKeysSamples.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.mixedreality.generated;
+
+import com.azure.core.util.Context;
+
+/** Samples for SpatialAnchorsAccounts ListKeys. */
+public final class SpatialAnchorsAccountsListKeysSamples {
+ /*
+ * x-ms-original-file: specification/mixedreality/resource-manager/Microsoft.MixedReality/preview/2021-03-01-preview/examples/spatial-anchors/ListKeys.json
+ */
+ /**
+ * Sample code: List spatial anchor account key.
+ *
+ * @param manager Entry point to MixedRealityManager.
+ */
+ public static void listSpatialAnchorAccountKey(com.azure.resourcemanager.mixedreality.MixedRealityManager manager) {
+ manager.spatialAnchorsAccounts().listKeysWithResponse("MyResourceGroup", "MyAccount", Context.NONE);
+ }
+}
diff --git a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/samples/java/com/azure/resourcemanager/mixedreality/generated/SpatialAnchorsAccountsListSamples.java b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/samples/java/com/azure/resourcemanager/mixedreality/generated/SpatialAnchorsAccountsListSamples.java
new file mode 100644
index 0000000000000..5f6df44056e9e
--- /dev/null
+++ b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/samples/java/com/azure/resourcemanager/mixedreality/generated/SpatialAnchorsAccountsListSamples.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.mixedreality.generated;
+
+import com.azure.core.util.Context;
+
+/** Samples for SpatialAnchorsAccounts List. */
+public final class SpatialAnchorsAccountsListSamples {
+ /*
+ * x-ms-original-file: specification/mixedreality/resource-manager/Microsoft.MixedReality/preview/2021-03-01-preview/examples/spatial-anchors/GetBySubscription.json
+ */
+ /**
+ * Sample code: List spatial anchors accounts by subscription.
+ *
+ * @param manager Entry point to MixedRealityManager.
+ */
+ public static void listSpatialAnchorsAccountsBySubscription(
+ com.azure.resourcemanager.mixedreality.MixedRealityManager manager) {
+ manager.spatialAnchorsAccounts().list(Context.NONE);
+ }
+}
diff --git a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/samples/java/com/azure/resourcemanager/mixedreality/generated/SpatialAnchorsAccountsRegenerateKeysSamples.java b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/samples/java/com/azure/resourcemanager/mixedreality/generated/SpatialAnchorsAccountsRegenerateKeysSamples.java
new file mode 100644
index 0000000000000..f2d66f5d60659
--- /dev/null
+++ b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/samples/java/com/azure/resourcemanager/mixedreality/generated/SpatialAnchorsAccountsRegenerateKeysSamples.java
@@ -0,0 +1,28 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.mixedreality.generated;
+
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.mixedreality.models.AccountKeyRegenerateRequest;
+import com.azure.resourcemanager.mixedreality.models.Serial;
+
+/** Samples for SpatialAnchorsAccounts RegenerateKeys. */
+public final class SpatialAnchorsAccountsRegenerateKeysSamples {
+ /*
+ * x-ms-original-file: specification/mixedreality/resource-manager/Microsoft.MixedReality/preview/2021-03-01-preview/examples/spatial-anchors/RegenerateKey.json
+ */
+ /**
+ * Sample code: Regenerate spatial anchors account keys.
+ *
+ * @param manager Entry point to MixedRealityManager.
+ */
+ public static void regenerateSpatialAnchorsAccountKeys(
+ com.azure.resourcemanager.mixedreality.MixedRealityManager manager) {
+ manager
+ .spatialAnchorsAccounts()
+ .regenerateKeysWithResponse(
+ "MyResourceGroup", "MyAccount", new AccountKeyRegenerateRequest().withSerial(Serial.ONE), Context.NONE);
+ }
+}
diff --git a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/samples/java/com/azure/resourcemanager/mixedreality/generated/SpatialAnchorsAccountsUpdateSamples.java b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/samples/java/com/azure/resourcemanager/mixedreality/generated/SpatialAnchorsAccountsUpdateSamples.java
new file mode 100644
index 0000000000000..05150457f8b18
--- /dev/null
+++ b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/samples/java/com/azure/resourcemanager/mixedreality/generated/SpatialAnchorsAccountsUpdateSamples.java
@@ -0,0 +1,41 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.mixedreality.generated;
+
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.mixedreality.models.SpatialAnchorsAccount;
+import java.util.HashMap;
+import java.util.Map;
+
+/** Samples for SpatialAnchorsAccounts Update. */
+public final class SpatialAnchorsAccountsUpdateSamples {
+ /*
+ * x-ms-original-file: specification/mixedreality/resource-manager/Microsoft.MixedReality/preview/2021-03-01-preview/examples/spatial-anchors/Patch.json
+ */
+ /**
+ * Sample code: Update spatial anchors account.
+ *
+ * @param manager Entry point to MixedRealityManager.
+ */
+ public static void updateSpatialAnchorsAccount(com.azure.resourcemanager.mixedreality.MixedRealityManager manager) {
+ SpatialAnchorsAccount resource =
+ manager
+ .spatialAnchorsAccounts()
+ .getByResourceGroupWithResponse("MyResourceGroup", "MyAccount", Context.NONE)
+ .getValue();
+ resource.update().withTags(mapOf("hero", "romeo", "heroine", "juliet")).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;
+ }
+}