diff --git a/sdk/mixedreality/azure-resourcemanager-mixedreality/CHANGELOG.md b/sdk/mixedreality/azure-resourcemanager-mixedreality/CHANGELOG.md index 8a503bdd0702..3c66e2778e97 100644 --- a/sdk/mixedreality/azure-resourcemanager-mixedreality/CHANGELOG.md +++ b/sdk/mixedreality/azure-resourcemanager-mixedreality/CHANGELOG.md @@ -1,14 +1,30 @@ # Release History -## 1.1.0-beta.1 (Unreleased) +## 1.0.0-beta.1 (2025-04-30) + +- 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). ### Features Added -### Breaking Changes +* `models.ObjectAnchorsAccounts` was added -### Bugs Fixed +* `models.ObjectAnchorsAccountIdentity` was added -### Other Changes +* `models.ObjectAnchorsAccountPage` was added + +* `models.ObjectAnchorsAccount$DefinitionStages` was added + +* `models.ObjectAnchorsAccount$Update` was added + +* `models.ObjectAnchorsAccount$Definition` was added + +* `models.ObjectAnchorsAccount` was added + +* `models.ObjectAnchorsAccount$UpdateStages` was added + +#### `MixedRealityManager` was modified + +* `objectAnchorsAccounts()` was added ## 1.0.0 (2024-12-23) diff --git a/sdk/mixedreality/azure-resourcemanager-mixedreality/README.md b/sdk/mixedreality/azure-resourcemanager-mixedreality/README.md index 8d00a8ae23bb..69a75ef62e26 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 @@ -52,7 +52,7 @@ Azure subscription ID can be configured via `AZURE_SUBSCRIPTION_ID` environment Assuming the use of the `DefaultAzureCredential` credential class, the client can be authenticated using the following code: ```java -AzureProfile profile = new AzureProfile(AzureEnvironment.AZURE); +AzureProfile profile = new AzureProfile(AzureCloud.AZURE_PUBLIC_CLOUD); TokenCredential credential = new DefaultAzureCredentialBuilder() .authorityHost(profile.getEnvironment().getActiveDirectoryEndpoint()) .build(); @@ -60,7 +60,7 @@ MixedRealityManager manager = MixedRealityManager .authenticate(credential, profile); ``` -The sample code assumes global Azure. Please change `AzureEnvironment.AZURE` variable if otherwise. +The sample code assumes global Azure. Please change the `AzureCloud.AZURE_PUBLIC_CLOUD` variable if otherwise. See [Authentication][authenticate] for more options. @@ -100,5 +100,3 @@ This project has adopted the [Microsoft Open Source Code of Conduct][coc]. For m [cg]: https://github.com/Azure/azure-sdk-for-java/blob/main/CONTRIBUTING.md [coc]: https://opensource.microsoft.com/codeofconduct/ [coc_faq]: https://opensource.microsoft.com/codeofconduct/faq/ - - diff --git a/sdk/mixedreality/azure-resourcemanager-mixedreality/SAMPLE.md b/sdk/mixedreality/azure-resourcemanager-mixedreality/SAMPLE.md index e74deb58cea9..0ec333ddf236 100644 --- a/sdk/mixedreality/azure-resourcemanager-mixedreality/SAMPLE.md +++ b/sdk/mixedreality/azure-resourcemanager-mixedreality/SAMPLE.md @@ -1,6 +1,17 @@ # 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) @@ -30,7 +41,168 @@ - [ListKeys](#spatialanchorsaccounts_listkeys) - [RegenerateKeys](#spatialanchorsaccounts_regeneratekeys) - [Update](#spatialanchorsaccounts_update) -### Operations_List +### ObjectAnchorsAccounts_Create + +```java +/** + * 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", com.azure.core.util.Context.NONE); + } +} +``` + +### ObjectAnchorsAccounts_Delete + +```java +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", com.azure.core.util.Context.NONE) + .getValue(); + resource.update() + .withTags(mapOf("hero", "romeo", "heroine", "juliet")) + .withIdentity(new ObjectAnchorsAccountIdentity().withType(ResourceIdentityType.SYSTEM_ASSIGNED)) + .apply(); + } + + // Use "Map.of" if available + @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; + } +} +``` + +### ObjectAnchorsAccounts_GetByResourceGroup + +```java +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", com.azure.core.util.Context.NONE) + .getValue(); + resource.update().withTags(mapOf("hero", "romeo", "heroine", "juliet")).apply(); + } + + // Use "Map.of" if available + @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; + } +} +``` + +### ObjectAnchorsAccounts_List + +```java +/** + * 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(com.azure.core.util.Context.NONE); + } +} +``` + +### ObjectAnchorsAccounts_ListByResourceGroup + +```java +/** + * 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", com.azure.core.util.Context.NONE); + } +} +``` + +### ObjectAnchorsAccounts_ListKeys ```java /** @@ -39,7 +211,7 @@ public final class OperationsListSamples { /* * x-ms-original-file: - * specification/mixedreality/resource-manager/Microsoft.MixedReality/stable/2021-01-01/examples/proxy/ + * specification/mixedreality/resource-manager/Microsoft.MixedReality/preview/2021-03-01-preview/examples/proxy/ * ExposingAvailableOperations.json */ /** @@ -53,7 +225,7 @@ public final class OperationsListSamples { } ``` -### RemoteRenderingAccounts_Create +### ObjectAnchorsAccounts_RegenerateKeys ```java import com.azure.resourcemanager.mixedreality.models.Identity; @@ -65,8 +237,8 @@ import com.azure.resourcemanager.mixedreality.models.ResourceIdentityType; public final class RemoteRenderingAccountsCreateSamples { /* * x-ms-original-file: - * specification/mixedreality/resource-manager/Microsoft.MixedReality/stable/2021-01-01/examples/remote-rendering/ - * Put.json + * specification/mixedreality/resource-manager/Microsoft.MixedReality/preview/2021-03-01-preview/examples/remote- + * rendering/Put.json */ /** * Sample code: Create remote rendering account. @@ -85,27 +257,104 @@ public final class RemoteRenderingAccountsCreateSamples { } ``` -### RemoteRenderingAccounts_Delete +### ObjectAnchorsAccounts_Update ```java /** - * Samples for RemoteRenderingAccounts Delete. + * Samples for RemoteRenderingAccounts List. */ -public final class RemoteRenderingAccountsDeleteSamples { +public final class RemoteRenderingAccountsListSamples { /* * x-ms-original-file: - * specification/mixedreality/resource-manager/Microsoft.MixedReality/stable/2021-01-01/examples/remote-rendering/ - * Delete.json + * specification/mixedreality/resource-manager/Microsoft.MixedReality/preview/2021-03-01-preview/examples/remote- + * rendering/GetBySubscription.json */ /** - * Sample code: Delete remote rendering account. + * Sample code: List remote rendering accounts by subscription. * * @param manager Entry point to MixedRealityManager. */ public static void - deleteRemoteRenderingAccount(com.azure.resourcemanager.mixedreality.MixedRealityManager manager) { + listRemoteRenderingAccountsBySubscription(com.azure.resourcemanager.mixedreality.MixedRealityManager manager) { + manager.remoteRenderingAccounts().list(com.azure.core.util.Context.NONE); + } +} +``` + +### Operations_List + +```java +/** + * 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() - .deleteByResourceGroupWithResponse("MyResourceGroup", "MyAccount", com.azure.core.util.Context.NONE); + .listKeysWithResponse("MyResourceGroup", "MyAccount", com.azure.core.util.Context.NONE); + } +} +``` + +### RemoteRenderingAccounts_Create + +```java +/** + * 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", com.azure.core.util.Context.NONE); + } +} +``` + +### RemoteRenderingAccounts_Delete + +```java +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"), + com.azure.core.util.Context.NONE); } } ``` @@ -114,21 +363,21 @@ public final class RemoteRenderingAccountsDeleteSamples { ```java /** - * Samples for RemoteRenderingAccounts GetByResourceGroup. + * Samples for SpatialAnchorsAccounts GetByResourceGroup. */ -public final class RemoteRenderingAccountsGetByResourceGroupSamples { +public final class SpatialAnchorsAccountsGetByResourceGroupSamples { /* * x-ms-original-file: - * specification/mixedreality/resource-manager/Microsoft.MixedReality/stable/2021-01-01/examples/remote-rendering/ - * Get.json + * specification/mixedreality/resource-manager/Microsoft.MixedReality/preview/2021-03-01-preview/examples/spatial- + * anchors/Get.json */ /** - * Sample code: Get remote rendering account. + * Sample code: Get spatial anchors account. * * @param manager Entry point to MixedRealityManager. */ - public static void getRemoteRenderingAccount(com.azure.resourcemanager.mixedreality.MixedRealityManager manager) { - manager.remoteRenderingAccounts() + public static void getSpatialAnchorsAccount(com.azure.resourcemanager.mixedreality.MixedRealityManager manager) { + manager.spatialAnchorsAccounts() .getByResourceGroupWithResponse("MyResourceGroup", "MyAccount", com.azure.core.util.Context.NONE); } } @@ -137,23 +386,28 @@ public final class RemoteRenderingAccountsGetByResourceGroupSamples { ### RemoteRenderingAccounts_List ```java +import com.azure.resourcemanager.mixedreality.models.AccountKeyRegenerateRequest; +import com.azure.resourcemanager.mixedreality.models.Serial; + /** - * Samples for RemoteRenderingAccounts List. + * Samples for SpatialAnchorsAccounts RegenerateKeys. */ -public final class RemoteRenderingAccountsListSamples { +public final class SpatialAnchorsAccountsRegenerateKeysSamples { /* * x-ms-original-file: - * specification/mixedreality/resource-manager/Microsoft.MixedReality/stable/2021-01-01/examples/remote-rendering/ - * GetBySubscription.json + * specification/mixedreality/resource-manager/Microsoft.MixedReality/preview/2021-03-01-preview/examples/spatial- + * anchors/RegenerateKey.json */ /** - * Sample code: List remote rendering accounts by subscription. + * Sample code: Regenerate spatial anchors account keys. * * @param manager Entry point to MixedRealityManager. */ public static void - listRemoteRenderingAccountsBySubscription(com.azure.resourcemanager.mixedreality.MixedRealityManager manager) { - manager.remoteRenderingAccounts().list(com.azure.core.util.Context.NONE); + regenerateSpatialAnchorsAccountKeys(com.azure.resourcemanager.mixedreality.MixedRealityManager manager) { + manager.spatialAnchorsAccounts() + .regenerateKeysWithResponse("MyResourceGroup", "MyAccount", + new AccountKeyRegenerateRequest().withSerial(Serial.ONE), com.azure.core.util.Context.NONE); } } ``` @@ -162,22 +416,22 @@ public final class RemoteRenderingAccountsListSamples { ```java /** - * Samples for RemoteRenderingAccounts ListByResourceGroup. + * Samples for ObjectAnchorsAccounts ListKeys. */ -public final class RemoteRenderingAccountsListByResourceGroupSamples { +public final class ObjectAnchorsAccountsListKeysSamples { /* * x-ms-original-file: - * specification/mixedreality/resource-manager/Microsoft.MixedReality/stable/2021-01-01/examples/remote-rendering/ - * GetByResourceGroup.json + * specification/mixedreality/resource-manager/Microsoft.MixedReality/preview/2021-03-01-preview/examples/object- + * anchors/ListKeys.json */ /** - * Sample code: List remote rendering accounts by resource group. + * Sample code: List object anchors account key. * * @param manager Entry point to MixedRealityManager. */ - public static void - listRemoteRenderingAccountsByResourceGroup(com.azure.resourcemanager.mixedreality.MixedRealityManager manager) { - manager.remoteRenderingAccounts().listByResourceGroup("MyResourceGroup", com.azure.core.util.Context.NONE); + public static void listObjectAnchorsAccountKey(com.azure.resourcemanager.mixedreality.MixedRealityManager manager) { + manager.objectAnchorsAccounts() + .listKeysWithResponse("MyResourceGroup", "MyAccount", com.azure.core.util.Context.NONE); } } ``` @@ -186,23 +440,23 @@ public final class RemoteRenderingAccountsListByResourceGroupSamples { ```java /** - * Samples for RemoteRenderingAccounts ListKeys. + * Samples for RemoteRenderingAccounts Delete. */ -public final class RemoteRenderingAccountsListKeysSamples { +public final class RemoteRenderingAccountsDeleteSamples { /* * x-ms-original-file: - * specification/mixedreality/resource-manager/Microsoft.MixedReality/stable/2021-01-01/examples/remote-rendering/ - * ListKeys.json + * specification/mixedreality/resource-manager/Microsoft.MixedReality/preview/2021-03-01-preview/examples/remote- + * rendering/Delete.json */ /** - * Sample code: List remote rendering account key. + * Sample code: Delete remote rendering account. * * @param manager Entry point to MixedRealityManager. */ public static void - listRemoteRenderingAccountKey(com.azure.resourcemanager.mixedreality.MixedRealityManager manager) { + deleteRemoteRenderingAccount(com.azure.resourcemanager.mixedreality.MixedRealityManager manager) { manager.remoteRenderingAccounts() - .listKeysWithResponse("MyResourceGroup", "MyAccount", com.azure.core.util.Context.NONE); + .deleteByResourceGroupWithResponse("MyResourceGroup", "MyAccount", com.azure.core.util.Context.NONE); } } ``` @@ -210,28 +464,23 @@ public final class RemoteRenderingAccountsListKeysSamples { ### RemoteRenderingAccounts_RegenerateKeys ```java -import com.azure.resourcemanager.mixedreality.models.AccountKeyRegenerateRequest; -import com.azure.resourcemanager.mixedreality.models.Serial; - /** - * Samples for RemoteRenderingAccounts RegenerateKeys. + * Samples for SpatialAnchorsAccounts List. */ -public final class RemoteRenderingAccountsRegenerateKeysSamples { +public final class SpatialAnchorsAccountsListSamples { /* * x-ms-original-file: - * specification/mixedreality/resource-manager/Microsoft.MixedReality/stable/2021-01-01/examples/remote-rendering/ - * RegenerateKey.json + * specification/mixedreality/resource-manager/Microsoft.MixedReality/preview/2021-03-01-preview/examples/spatial- + * anchors/GetBySubscription.json */ /** - * Sample code: Regenerate remote rendering account keys. + * Sample code: List spatial anchors accounts by subscription. * * @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), com.azure.core.util.Context.NONE); + listSpatialAnchorsAccountsBySubscription(com.azure.resourcemanager.mixedreality.MixedRealityManager manager) { + manager.spatialAnchorsAccounts().list(com.azure.core.util.Context.NONE); } } ``` @@ -239,47 +488,23 @@ public final class RemoteRenderingAccountsRegenerateKeysSamples { ### RemoteRenderingAccounts_Update ```java -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. + * Samples for SpatialAnchorsAccounts ListByResourceGroup. */ -public final class RemoteRenderingAccountsUpdateSamples { +public final class SpatialAnchorsAccountsListByResourceGroupSamples { /* * x-ms-original-file: - * specification/mixedreality/resource-manager/Microsoft.MixedReality/stable/2021-01-01/examples/remote-rendering/ - * Patch.json + * specification/mixedreality/resource-manager/Microsoft.MixedReality/preview/2021-03-01-preview/examples/spatial- + * anchors/GetByResourceGroup.json */ /** - * Sample code: Update remote rendering account. + * Sample code: List spatial anchor accounts by resource group. * * @param manager Entry point to MixedRealityManager. */ public static void - updateRemoteRenderingAccount(com.azure.resourcemanager.mixedreality.MixedRealityManager manager) { - RemoteRenderingAccount resource = manager.remoteRenderingAccounts() - .getByResourceGroupWithResponse("MyResourceGroup", "MyAccount", com.azure.core.util.Context.NONE) - .getValue(); - resource.update() - .withTags(mapOf("hero", "romeo", "heroine", "juliet")) - .withIdentity(new Identity().withType(ResourceIdentityType.SYSTEM_ASSIGNED)) - .apply(); - } - - // Use "Map.of" if available - @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; + listSpatialAnchorAccountsByResourceGroup(com.azure.resourcemanager.mixedreality.MixedRealityManager manager) { + manager.spatialAnchorsAccounts().listByResourceGroup("MyResourceGroup", com.azure.core.util.Context.NONE); } } ``` @@ -287,28 +512,23 @@ public final class RemoteRenderingAccountsUpdateSamples { ### ResourceProvider_CheckNameAvailabilityLocal ```java -import com.azure.resourcemanager.mixedreality.models.CheckNameAvailabilityRequest; - /** - * Samples for ResourceProvider CheckNameAvailabilityLocal. + * Samples for SpatialAnchorsAccounts Delete. */ -public final class ResourceProviderCheckNameAvailabilityLocalSamples { +public final class SpatialAnchorsAccountsDeleteSamples { /* * x-ms-original-file: - * specification/mixedreality/resource-manager/Microsoft.MixedReality/stable/2021-01-01/examples/proxy/ - * CheckNameAvailabilityForLocalUniqueness.json + * specification/mixedreality/resource-manager/Microsoft.MixedReality/preview/2021-03-01-preview/examples/spatial- + * anchors/Delete.json */ /** - * Sample code: CheckLocalNameAvailability. + * Sample code: Delete spatial anchors account. * * @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"), - com.azure.core.util.Context.NONE); + public static void deleteSpatialAnchorsAccount(com.azure.resourcemanager.mixedreality.MixedRealityManager manager) { + manager.spatialAnchorsAccounts() + .deleteByResourceGroupWithResponse("MyResourceGroup", "MyAccount", com.azure.core.util.Context.NONE); } } ``` @@ -317,25 +537,22 @@ public final class ResourceProviderCheckNameAvailabilityLocalSamples { ```java /** - * Samples for SpatialAnchorsAccounts Create. + * Samples for ObjectAnchorsAccounts Delete. */ -public final class SpatialAnchorsAccountsCreateSamples { +public final class ObjectAnchorsAccountsDeleteSamples { /* * x-ms-original-file: - * specification/mixedreality/resource-manager/Microsoft.MixedReality/stable/2021-01-01/examples/spatial-anchors/Put - * .json + * specification/mixedreality/resource-manager/Microsoft.MixedReality/preview/2021-03-01-preview/examples/object- + * anchors/Delete.json */ /** - * Sample code: Create spatial anchor account. + * Sample code: Delete object anchors 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(); + public static void deleteObjectAnchorsAccount(com.azure.resourcemanager.mixedreality.MixedRealityManager manager) { + manager.objectAnchorsAccounts() + .deleteByResourceGroupWithResponse("MyResourceGroup", "MyAccount", com.azure.core.util.Context.NONE); } } ``` @@ -343,23 +560,28 @@ public final class SpatialAnchorsAccountsCreateSamples { ### SpatialAnchorsAccounts_Delete ```java +import com.azure.resourcemanager.mixedreality.models.AccountKeyRegenerateRequest; +import com.azure.resourcemanager.mixedreality.models.Serial; + /** - * Samples for SpatialAnchorsAccounts Delete. + * Samples for RemoteRenderingAccounts RegenerateKeys. */ -public final class SpatialAnchorsAccountsDeleteSamples { +public final class RemoteRenderingAccountsRegenerateKeysSamples { /* * x-ms-original-file: - * specification/mixedreality/resource-manager/Microsoft.MixedReality/stable/2021-01-01/examples/spatial-anchors/ - * Delete.json + * specification/mixedreality/resource-manager/Microsoft.MixedReality/preview/2021-03-01-preview/examples/remote- + * rendering/RegenerateKey.json */ /** - * Sample code: Delete spatial anchors account. + * Sample code: Regenerate remote rendering account keys. * * @param manager Entry point to MixedRealityManager. */ - public static void deleteSpatialAnchorsAccount(com.azure.resourcemanager.mixedreality.MixedRealityManager manager) { - manager.spatialAnchorsAccounts() - .deleteByResourceGroupWithResponse("MyResourceGroup", "MyAccount", com.azure.core.util.Context.NONE); + public static void + regenerateRemoteRenderingAccountKeys(com.azure.resourcemanager.mixedreality.MixedRealityManager manager) { + manager.remoteRenderingAccounts() + .regenerateKeysWithResponse("MyResourceGroup", "MyAccount", + new AccountKeyRegenerateRequest().withSerial(Serial.ONE), com.azure.core.util.Context.NONE); } } ``` @@ -368,22 +590,22 @@ public final class SpatialAnchorsAccountsDeleteSamples { ```java /** - * Samples for SpatialAnchorsAccounts GetByResourceGroup. + * Samples for SpatialAnchorsAccounts ListKeys. */ -public final class SpatialAnchorsAccountsGetByResourceGroupSamples { +public final class SpatialAnchorsAccountsListKeysSamples { /* * x-ms-original-file: - * specification/mixedreality/resource-manager/Microsoft.MixedReality/stable/2021-01-01/examples/spatial-anchors/Get - * .json + * specification/mixedreality/resource-manager/Microsoft.MixedReality/preview/2021-03-01-preview/examples/spatial- + * anchors/ListKeys.json */ /** - * Sample code: Get spatial anchors account. + * Sample code: List spatial anchor account key. * * @param manager Entry point to MixedRealityManager. */ - public static void getSpatialAnchorsAccount(com.azure.resourcemanager.mixedreality.MixedRealityManager manager) { + public static void listSpatialAnchorAccountKey(com.azure.resourcemanager.mixedreality.MixedRealityManager manager) { manager.spatialAnchorsAccounts() - .getByResourceGroupWithResponse("MyResourceGroup", "MyAccount", com.azure.core.util.Context.NONE); + .listKeysWithResponse("MyResourceGroup", "MyAccount", com.azure.core.util.Context.NONE); } } ``` @@ -392,22 +614,25 @@ public final class SpatialAnchorsAccountsGetByResourceGroupSamples { ```java /** - * Samples for SpatialAnchorsAccounts List. + * Samples for SpatialAnchorsAccounts Create. */ -public final class SpatialAnchorsAccountsListSamples { +public final class SpatialAnchorsAccountsCreateSamples { /* * x-ms-original-file: - * specification/mixedreality/resource-manager/Microsoft.MixedReality/stable/2021-01-01/examples/spatial-anchors/ - * GetBySubscription.json + * specification/mixedreality/resource-manager/Microsoft.MixedReality/preview/2021-03-01-preview/examples/spatial- + * anchors/Put.json */ /** - * Sample code: List spatial anchors accounts by subscription. + * Sample code: Create spatial anchor account. * * @param manager Entry point to MixedRealityManager. */ - public static void - listSpatialAnchorsAccountsBySubscription(com.azure.resourcemanager.mixedreality.MixedRealityManager manager) { - manager.spatialAnchorsAccounts().list(com.azure.core.util.Context.NONE); + public static void createSpatialAnchorAccount(com.azure.resourcemanager.mixedreality.MixedRealityManager manager) { + manager.spatialAnchorsAccounts() + .define("MyAccount") + .withRegion("eastus2euap") + .withExistingResourceGroup("MyResourceGroup") + .create(); } } ``` @@ -416,22 +641,22 @@ public final class SpatialAnchorsAccountsListSamples { ```java /** - * Samples for SpatialAnchorsAccounts ListByResourceGroup. + * Samples for ObjectAnchorsAccounts ListByResourceGroup. */ -public final class SpatialAnchorsAccountsListByResourceGroupSamples { +public final class ObjectAnchorsAccountsListByResourceGroupSamples { /* * x-ms-original-file: - * specification/mixedreality/resource-manager/Microsoft.MixedReality/stable/2021-01-01/examples/spatial-anchors/ - * GetByResourceGroup.json + * specification/mixedreality/resource-manager/Microsoft.MixedReality/preview/2021-03-01-preview/examples/object- + * anchors/GetByResourceGroup.json */ /** - * Sample code: List spatial anchor accounts by resource group. + * Sample code: List object anchors accounts by resource group. * * @param manager Entry point to MixedRealityManager. */ public static void - listSpatialAnchorAccountsByResourceGroup(com.azure.resourcemanager.mixedreality.MixedRealityManager manager) { - manager.spatialAnchorsAccounts().listByResourceGroup("MyResourceGroup", com.azure.core.util.Context.NONE); + listObjectAnchorsAccountsByResourceGroup(com.azure.resourcemanager.mixedreality.MixedRealityManager manager) { + manager.objectAnchorsAccounts().listByResourceGroup("MyResourceGroup", com.azure.core.util.Context.NONE); } } ``` @@ -439,23 +664,30 @@ public final class SpatialAnchorsAccountsListByResourceGroupSamples { ### SpatialAnchorsAccounts_ListKeys ```java +import com.azure.resourcemanager.mixedreality.models.ObjectAnchorsAccountIdentity; +import com.azure.resourcemanager.mixedreality.models.ResourceIdentityType; + /** - * Samples for SpatialAnchorsAccounts ListKeys. + * Samples for ObjectAnchorsAccounts Create. */ -public final class SpatialAnchorsAccountsListKeysSamples { +public final class ObjectAnchorsAccountsCreateSamples { /* * x-ms-original-file: - * specification/mixedreality/resource-manager/Microsoft.MixedReality/stable/2021-01-01/examples/spatial-anchors/ - * ListKeys.json + * specification/mixedreality/resource-manager/Microsoft.MixedReality/preview/2021-03-01-preview/examples/object- + * anchors/Put.json */ /** - * Sample code: List spatial anchor account key. + * Sample code: Create object anchors account. * * @param manager Entry point to MixedRealityManager. */ - public static void listSpatialAnchorAccountKey(com.azure.resourcemanager.mixedreality.MixedRealityManager manager) { - manager.spatialAnchorsAccounts() - .listKeysWithResponse("MyResourceGroup", "MyAccount", com.azure.core.util.Context.NONE); + 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(); } } ``` @@ -467,22 +699,22 @@ import com.azure.resourcemanager.mixedreality.models.AccountKeyRegenerateRequest import com.azure.resourcemanager.mixedreality.models.Serial; /** - * Samples for SpatialAnchorsAccounts RegenerateKeys. + * Samples for ObjectAnchorsAccounts RegenerateKeys. */ -public final class SpatialAnchorsAccountsRegenerateKeysSamples { +public final class ObjectAnchorsAccountsRegenerateKeysSamples { /* * x-ms-original-file: - * specification/mixedreality/resource-manager/Microsoft.MixedReality/stable/2021-01-01/examples/spatial-anchors/ - * RegenerateKey.json + * specification/mixedreality/resource-manager/Microsoft.MixedReality/preview/2021-03-01-preview/examples/object- + * anchors/RegenerateKey.json */ /** - * Sample code: Regenerate spatial anchors account keys. + * Sample code: Regenerate object anchors account keys. * * @param manager Entry point to MixedRealityManager. */ public static void - regenerateSpatialAnchorsAccountKeys(com.azure.resourcemanager.mixedreality.MixedRealityManager manager) { - manager.spatialAnchorsAccounts() + regenerateObjectAnchorsAccountKeys(com.azure.resourcemanager.mixedreality.MixedRealityManager manager) { + manager.objectAnchorsAccounts() .regenerateKeysWithResponse("MyResourceGroup", "MyAccount", new AccountKeyRegenerateRequest().withSerial(Serial.ONE), com.azure.core.util.Context.NONE); } @@ -492,29 +724,35 @@ public final class SpatialAnchorsAccountsRegenerateKeysSamples { ### SpatialAnchorsAccounts_Update ```java -import com.azure.resourcemanager.mixedreality.models.SpatialAnchorsAccount; +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 SpatialAnchorsAccounts Update. + * Samples for RemoteRenderingAccounts Update. */ -public final class SpatialAnchorsAccountsUpdateSamples { +public final class RemoteRenderingAccountsUpdateSamples { /* * x-ms-original-file: - * specification/mixedreality/resource-manager/Microsoft.MixedReality/stable/2021-01-01/examples/spatial-anchors/ - * Patch.json + * specification/mixedreality/resource-manager/Microsoft.MixedReality/preview/2021-03-01-preview/examples/remote- + * rendering/Patch.json */ /** - * Sample code: Update spatial anchors account. + * Sample code: Update remote rendering account. * * @param manager Entry point to MixedRealityManager. */ - public static void updateSpatialAnchorsAccount(com.azure.resourcemanager.mixedreality.MixedRealityManager manager) { - SpatialAnchorsAccount resource = manager.spatialAnchorsAccounts() + public static void + updateRemoteRenderingAccount(com.azure.resourcemanager.mixedreality.MixedRealityManager manager) { + RemoteRenderingAccount resource = manager.remoteRenderingAccounts() .getByResourceGroupWithResponse("MyResourceGroup", "MyAccount", com.azure.core.util.Context.NONE) .getValue(); - resource.update().withTags(mapOf("hero", "romeo", "heroine", "juliet")).apply(); + resource.update() + .withTags(mapOf("hero", "romeo", "heroine", "juliet")) + .withIdentity(new Identity().withType(ResourceIdentityType.SYSTEM_ASSIGNED)) + .apply(); } // Use "Map.of" if available diff --git a/sdk/mixedreality/azure-resourcemanager-mixedreality/pom.xml b/sdk/mixedreality/azure-resourcemanager-mixedreality/pom.xml index 3d1353559061..6e94cbdd0ee7 100644 --- a/sdk/mixedreality/azure-resourcemanager-mixedreality/pom.xml +++ b/sdk/mixedreality/azure-resourcemanager-mixedreality/pom.xml @@ -18,7 +18,7 @@ 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. + 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 @@ -45,7 +45,7 @@ UTF-8 0 0 - false + true 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 c98dfda9d20c..f72d9d13ebf2 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 @@ -22,13 +22,16 @@ import com.azure.core.http.policy.UserAgentPolicy; import com.azure.core.management.profile.AzureProfile; import com.azure.core.util.Configuration; +import com.azure.core.util.CoreUtils; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.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; @@ -37,6 +40,7 @@ import java.time.temporal.ChronoUnit; import java.util.ArrayList; import java.util.List; +import java.util.Map; import java.util.Objects; import java.util.stream.Collectors; @@ -53,6 +57,8 @@ public final class MixedRealityManager { private RemoteRenderingAccounts remoteRenderingAccounts; + private ObjectAnchorsAccounts objectAnchorsAccounts; + private final MixedRealityClient clientObject; private MixedRealityManager(HttpPipeline httpPipeline, AzureProfile profile, Duration defaultPollInterval) { @@ -105,6 +111,9 @@ public static Configurable configure() { */ public static final class Configurable { private static final ClientLogger LOGGER = new ClientLogger(Configurable.class); + private static final String SDK_VERSION = "version"; + private static final Map PROPERTIES + = CoreUtils.getProperties("azure-resourcemanager-mixedreality.properties"); private HttpClient httpClient; private HttpLogOptions httpLogOptions; @@ -212,12 +221,14 @@ public MixedRealityManager authenticate(TokenCredential credential, AzureProfile Objects.requireNonNull(credential, "'credential' cannot be null."); Objects.requireNonNull(profile, "'profile' cannot be null."); + String clientVersion = PROPERTIES.getOrDefault(SDK_VERSION, "UnknownVersion"); + StringBuilder userAgentBuilder = new StringBuilder(); userAgentBuilder.append("azsdk-java") .append("-") .append("com.azure.resourcemanager.mixedreality") .append("/") - .append("1.0.0"); + .append(clientVersion); if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) { userAgentBuilder.append(" (") .append(Configuration.getGlobalConfiguration().get("java.version")) @@ -313,6 +324,18 @@ public RemoteRenderingAccounts remoteRenderingAccounts() { return remoteRenderingAccounts; } + /** + * Gets the resource collection API of ObjectAnchorsAccounts. It manages ObjectAnchorsAccount. + * + * @return Resource collection API of ObjectAnchorsAccounts. + */ + public ObjectAnchorsAccounts objectAnchorsAccounts() { + if (this.objectAnchorsAccounts == null) { + this.objectAnchorsAccounts = new ObjectAnchorsAccountsImpl(clientObject.getObjectAnchorsAccounts(), this); + } + return objectAnchorsAccounts; + } + /** * Gets 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 b16d3ae45b2d..a9473ed794fd 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 @@ -73,4 +73,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 000000000000..0ca7a0f524b1 --- /dev/null +++ b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/fluent/ObjectAnchorsAccountsClient.java @@ -0,0 +1,336 @@ +// 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 { + /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * + * 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 as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(); + + /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * + * 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 as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(Context context); + + /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * + * 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 as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName); + + /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * + * 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 as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName, Context context); + + /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * + * 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 {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response deleteWithResponse(String resourceGroupName, String accountName, Context context); + + /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * + * 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); + + /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * + * 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 along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getByResourceGroupWithResponse(String resourceGroupName, String accountName, + Context context); + + /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * + * 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); + + /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * + * 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 along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response updateWithResponse(String resourceGroupName, String accountName, + ObjectAnchorsAccountInner objectAnchorsAccount, Context context); + + /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * + * 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); + + /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * + * 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 along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response createWithResponse(String resourceGroupName, String accountName, + ObjectAnchorsAccountInner objectAnchorsAccount, Context context); + + /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * + * 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); + + /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * + * 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 along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response listKeysWithResponse(String resourceGroupName, String accountName, Context context); + + /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * + * 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); + + /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * + * 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 along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response regenerateKeysWithResponse(String resourceGroupName, String accountName, + AccountKeyRegenerateRequest regenerate, Context context); + + /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * + * 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); +} diff --git a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/fluent/RemoteRenderingAccountsClient.java b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/fluent/RemoteRenderingAccountsClient.java index 56cc4e551d50..a0a9ae8b2ca9 100644 --- a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/fluent/RemoteRenderingAccountsClient.java +++ b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/fluent/RemoteRenderingAccountsClient.java @@ -18,6 +18,12 @@ */ public interface RemoteRenderingAccountsClient { /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * * List Remote Rendering Accounts by Subscription. * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -28,6 +34,12 @@ public interface RemoteRenderingAccountsClient { PagedIterable list(); /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * * List Remote Rendering Accounts by Subscription. * * @param context The context to associate with this operation. @@ -40,6 +52,12 @@ public interface RemoteRenderingAccountsClient { PagedIterable list(Context context); /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * * List Resources by Resource Group. * * @param resourceGroupName Name of an Azure resource group. @@ -52,6 +70,12 @@ public interface RemoteRenderingAccountsClient { PagedIterable listByResourceGroup(String resourceGroupName); /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * * List Resources by Resource Group. * * @param resourceGroupName Name of an Azure resource group. @@ -65,6 +89,12 @@ public interface RemoteRenderingAccountsClient { PagedIterable listByResourceGroup(String resourceGroupName, Context context); /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * * Delete a Remote Rendering Account. * * @param resourceGroupName Name of an Azure resource group. @@ -79,6 +109,12 @@ public interface RemoteRenderingAccountsClient { Response deleteWithResponse(String resourceGroupName, String accountName, Context context); /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * * Delete a Remote Rendering Account. * * @param resourceGroupName Name of an Azure resource group. @@ -91,6 +127,12 @@ public interface RemoteRenderingAccountsClient { void delete(String resourceGroupName, String accountName); /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * * Retrieve a Remote Rendering Account. * * @param resourceGroupName Name of an Azure resource group. @@ -106,6 +148,12 @@ Response getByResourceGroupWithResponse(String reso Context context); /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * * Retrieve a Remote Rendering Account. * * @param resourceGroupName Name of an Azure resource group. @@ -119,6 +167,12 @@ Response getByResourceGroupWithResponse(String reso RemoteRenderingAccountInner getByResourceGroup(String resourceGroupName, String accountName); /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * * Updating a Remote Rendering Account. * * @param resourceGroupName Name of an Azure resource group. @@ -135,6 +189,12 @@ Response updateWithResponse(String resourceGroupNam RemoteRenderingAccountInner remoteRenderingAccount, Context context); /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * * Updating a Remote Rendering Account. * * @param resourceGroupName Name of an Azure resource group. @@ -150,6 +210,12 @@ RemoteRenderingAccountInner update(String resourceGroupName, String accountName, RemoteRenderingAccountInner remoteRenderingAccount); /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * * Creating or Updating a Remote Rendering Account. * * @param resourceGroupName Name of an Azure resource group. @@ -166,6 +232,12 @@ Response createWithResponse(String resourceGroupNam RemoteRenderingAccountInner remoteRenderingAccount, Context context); /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * * Creating or Updating a Remote Rendering Account. * * @param resourceGroupName Name of an Azure resource group. @@ -181,6 +253,12 @@ RemoteRenderingAccountInner create(String resourceGroupName, String accountName, RemoteRenderingAccountInner remoteRenderingAccount); /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * * List Both of the 2 Keys of a Remote Rendering Account. * * @param resourceGroupName Name of an Azure resource group. @@ -195,6 +273,12 @@ RemoteRenderingAccountInner create(String resourceGroupName, String accountName, Response listKeysWithResponse(String resourceGroupName, String accountName, Context context); /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * * List Both of the 2 Keys of a Remote Rendering Account. * * @param resourceGroupName Name of an Azure resource group. @@ -208,6 +292,12 @@ RemoteRenderingAccountInner create(String resourceGroupName, String accountName, AccountKeysInner listKeys(String resourceGroupName, String accountName); /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * * Regenerate specified Key of a Remote Rendering Account. * * @param resourceGroupName Name of an Azure resource group. @@ -224,6 +314,12 @@ Response regenerateKeysWithResponse(String resourceGroupName, AccountKeyRegenerateRequest regenerate, Context context); /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * * Regenerate specified Key of a Remote Rendering Account. * * @param resourceGroupName Name of an Azure resource group. diff --git a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/fluent/SpatialAnchorsAccountsClient.java b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/fluent/SpatialAnchorsAccountsClient.java index 72c24ede38ae..51385f614ec9 100644 --- a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/fluent/SpatialAnchorsAccountsClient.java +++ b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/fluent/SpatialAnchorsAccountsClient.java @@ -18,6 +18,12 @@ */ public interface SpatialAnchorsAccountsClient { /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * * List Spatial Anchors Accounts by Subscription. * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -28,6 +34,12 @@ public interface SpatialAnchorsAccountsClient { PagedIterable list(); /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * * List Spatial Anchors Accounts by Subscription. * * @param context The context to associate with this operation. @@ -40,6 +52,12 @@ public interface SpatialAnchorsAccountsClient { PagedIterable list(Context context); /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * * List Resources by Resource Group. * * @param resourceGroupName Name of an Azure resource group. @@ -52,6 +70,12 @@ public interface SpatialAnchorsAccountsClient { PagedIterable listByResourceGroup(String resourceGroupName); /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * * List Resources by Resource Group. * * @param resourceGroupName Name of an Azure resource group. @@ -65,6 +89,12 @@ public interface SpatialAnchorsAccountsClient { PagedIterable listByResourceGroup(String resourceGroupName, Context context); /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * * Delete a Spatial Anchors Account. * * @param resourceGroupName Name of an Azure resource group. @@ -79,6 +109,12 @@ public interface SpatialAnchorsAccountsClient { Response deleteWithResponse(String resourceGroupName, String accountName, Context context); /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * * Delete a Spatial Anchors Account. * * @param resourceGroupName Name of an Azure resource group. @@ -91,6 +127,12 @@ public interface SpatialAnchorsAccountsClient { void delete(String resourceGroupName, String accountName); /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * * Retrieve a Spatial Anchors Account. * * @param resourceGroupName Name of an Azure resource group. @@ -106,6 +148,12 @@ Response getByResourceGroupWithResponse(String resou Context context); /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * * Retrieve a Spatial Anchors Account. * * @param resourceGroupName Name of an Azure resource group. @@ -119,6 +167,12 @@ Response getByResourceGroupWithResponse(String resou SpatialAnchorsAccountInner getByResourceGroup(String resourceGroupName, String accountName); /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * * Updating a Spatial Anchors Account. * * @param resourceGroupName Name of an Azure resource group. @@ -135,6 +189,12 @@ Response updateWithResponse(String resourceGroupName SpatialAnchorsAccountInner spatialAnchorsAccount, Context context); /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * * Updating a Spatial Anchors Account. * * @param resourceGroupName Name of an Azure resource group. @@ -150,6 +210,12 @@ SpatialAnchorsAccountInner update(String resourceGroupName, String accountName, SpatialAnchorsAccountInner spatialAnchorsAccount); /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * * Creating or Updating a Spatial Anchors Account. * * @param resourceGroupName Name of an Azure resource group. @@ -166,6 +232,12 @@ Response createWithResponse(String resourceGroupName SpatialAnchorsAccountInner spatialAnchorsAccount, Context context); /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * * Creating or Updating a Spatial Anchors Account. * * @param resourceGroupName Name of an Azure resource group. @@ -181,6 +253,12 @@ SpatialAnchorsAccountInner create(String resourceGroupName, String accountName, SpatialAnchorsAccountInner spatialAnchorsAccount); /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * * List Both of the 2 Keys of a Spatial Anchors Account. * * @param resourceGroupName Name of an Azure resource group. @@ -195,6 +273,12 @@ SpatialAnchorsAccountInner create(String resourceGroupName, String accountName, Response listKeysWithResponse(String resourceGroupName, String accountName, Context context); /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * * List Both of the 2 Keys of a Spatial Anchors Account. * * @param resourceGroupName Name of an Azure resource group. @@ -208,6 +292,12 @@ SpatialAnchorsAccountInner create(String resourceGroupName, String accountName, AccountKeysInner listKeys(String resourceGroupName, String accountName); /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * * Regenerate specified Key of a Spatial Anchors Account. * * @param resourceGroupName Name of an Azure resource group. @@ -224,6 +314,12 @@ Response regenerateKeysWithResponse(String resourceGroupName, AccountKeyRegenerateRequest regenerate, Context context); /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * * Regenerate specified Key of a Spatial Anchors Account. * * @param resourceGroupName Name of an Azure resource group. 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 000000000000..9d862d196a15 --- /dev/null +++ b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/fluent/models/ObjectAnchorsAccountInner.java @@ -0,0 +1,349 @@ +// 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.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.mixedreality.models.Identity; +import com.azure.resourcemanager.mixedreality.models.ObjectAnchorsAccountIdentity; +import com.azure.resourcemanager.mixedreality.models.Sku; +import java.io.IOException; +import java.util.Map; + +/** + * ObjectAnchorsAccount Response. + */ +@Fluent +public final class ObjectAnchorsAccountInner extends Resource { + /* + * The identity property. + */ + private ObjectAnchorsAccountIdentity identity; + + /* + * Property bag. + */ + private MixedRealityAccountProperties innerProperties; + + /* + * The plan associated with this account + */ + private Identity plan; + + /* + * The sku associated with this account + */ + private Sku sku; + + /* + * The kind of account, if supported + */ + private Sku kind; + + /* + * The system metadata related to an object anchors account. + */ + private SystemData systemData; + + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of ObjectAnchorsAccountInner class. + */ + public ObjectAnchorsAccountInner() { + } + + /** + * 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; + } + + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * {@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(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("location", location()); + jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("identity", this.identity); + jsonWriter.writeJsonField("properties", this.innerProperties); + jsonWriter.writeJsonField("plan", this.plan); + jsonWriter.writeJsonField("sku", this.sku); + jsonWriter.writeJsonField("kind", this.kind); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ObjectAnchorsAccountInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ObjectAnchorsAccountInner if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ObjectAnchorsAccountInner. + */ + public static ObjectAnchorsAccountInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ObjectAnchorsAccountInner deserializedObjectAnchorsAccountInner = new ObjectAnchorsAccountInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedObjectAnchorsAccountInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedObjectAnchorsAccountInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedObjectAnchorsAccountInner.type = reader.getString(); + } else if ("location".equals(fieldName)) { + deserializedObjectAnchorsAccountInner.withLocation(reader.getString()); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedObjectAnchorsAccountInner.withTags(tags); + } else if ("identity".equals(fieldName)) { + deserializedObjectAnchorsAccountInner.identity = ObjectAnchorsAccountIdentity.fromJson(reader); + } else if ("properties".equals(fieldName)) { + deserializedObjectAnchorsAccountInner.innerProperties + = MixedRealityAccountProperties.fromJson(reader); + } else if ("plan".equals(fieldName)) { + deserializedObjectAnchorsAccountInner.plan = Identity.fromJson(reader); + } else if ("sku".equals(fieldName)) { + deserializedObjectAnchorsAccountInner.sku = Sku.fromJson(reader); + } else if ("kind".equals(fieldName)) { + deserializedObjectAnchorsAccountInner.kind = Sku.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedObjectAnchorsAccountInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedObjectAnchorsAccountInner; + }); + } +} 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 e67fc823cf29..e955a405bd61 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 @@ -24,6 +24,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; @@ -182,6 +183,20 @@ 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. * @@ -200,11 +215,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 000000000000..47164c1292a2 --- /dev/null +++ b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/implementation/ObjectAnchorsAccountImpl.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.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 String resourceGroupName() { + return resourceGroupName; + } + + 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 = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.accountName = ResourceManagerUtils.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 Response listKeysWithResponse(Context context) { + return serviceManager.objectAnchorsAccounts().listKeysWithResponse(resourceGroupName, accountName, context); + } + + public AccountKeys listKeys() { + return serviceManager.objectAnchorsAccounts().listKeys(resourceGroupName, accountName); + } + + public Response regenerateKeysWithResponse(AccountKeyRegenerateRequest regenerate, Context context) { + return serviceManager.objectAnchorsAccounts() + .regenerateKeysWithResponse(resourceGroupName, accountName, regenerate, context); + } + + public AccountKeys regenerateKeys(AccountKeyRegenerateRequest regenerate) { + return serviceManager.objectAnchorsAccounts().regenerateKeys(resourceGroupName, accountName, regenerate); + } + + 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 000000000000..3099993fc532 --- /dev/null +++ b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/implementation/ObjectAnchorsAccountsClientImpl.java @@ -0,0 +1,1527 @@ +// 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.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 { + /** + * 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") + public 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); + } + + /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * + * 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 along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @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())); + } + + /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * + * 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 along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @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)); + } + + /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * + * 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 as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync() { + return new PagedFlux<>(() -> listSinglePageAsync(), + nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); + } + + /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * + * 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 as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(Context context) { + return new PagedFlux<>(() -> listSinglePageAsync(context), + nextLink -> listBySubscriptionNextSinglePageAsync(nextLink, context)); + } + + /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * + * 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 as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list() { + return new PagedIterable<>(listAsync()); + } + + /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * + * 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 as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(Context context) { + return new PagedIterable<>(listAsync(context)); + } + + /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * + * 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 along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @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())); + } + + /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * + * 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 along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @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)); + } + + /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * + * 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 as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName) { + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); + } + + /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * + * 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 as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) { + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, context), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context)); + } + + /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * + * 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 as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName) { + return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName)); + } + + /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * + * 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 as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { + return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, context)); + } + + /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * + * 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 {@link Response} on successful completion of {@link Mono}. + */ + @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())); + } + + /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * + * 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 {@link Response} on successful completion of {@link Mono}. + */ + @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); + } + + /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * + * 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 A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String accountName) { + return deleteWithResponseAsync(resourceGroupName, accountName).flatMap(ignored -> Mono.empty()); + } + + /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * + * 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 {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response deleteWithResponse(String resourceGroupName, String accountName, Context context) { + return deleteWithResponseAsync(resourceGroupName, accountName, context).block(); + } + + /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * + * 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) { + deleteWithResponse(resourceGroupName, accountName, Context.NONE); + } + + /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * + * 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 along with {@link Response} on successful completion of {@link Mono}. + */ + @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())); + } + + /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * + * 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 along with {@link Response} on successful completion of {@link Mono}. + */ + @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); + } + + /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * + * 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 on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getByResourceGroupAsync(String resourceGroupName, String accountName) { + return getByResourceGroupWithResponseAsync(resourceGroupName, accountName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * + * 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 along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getByResourceGroupWithResponse(String resourceGroupName, + String accountName, Context context) { + return getByResourceGroupWithResponseAsync(resourceGroupName, accountName, context).block(); + } + + /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * + * 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 getByResourceGroupWithResponse(resourceGroupName, accountName, Context.NONE).getValue(); + } + + /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * + * 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 along with {@link Response} on successful completion of {@link Mono}. + */ + @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())); + } + + /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * + * 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 along with {@link Response} on successful completion of {@link Mono}. + */ + @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); + } + + /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * + * 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 on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAsync(String resourceGroupName, String accountName, + ObjectAnchorsAccountInner objectAnchorsAccount) { + return updateWithResponseAsync(resourceGroupName, accountName, objectAnchorsAccount) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * + * 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 along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response updateWithResponse(String resourceGroupName, String accountName, + ObjectAnchorsAccountInner objectAnchorsAccount, Context context) { + return updateWithResponseAsync(resourceGroupName, accountName, objectAnchorsAccount, context).block(); + } + + /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * + * 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 updateWithResponse(resourceGroupName, accountName, objectAnchorsAccount, Context.NONE).getValue(); + } + + /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * + * 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 along with {@link Response} on successful completion of {@link Mono}. + */ + @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())); + } + + /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * + * 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 along with {@link Response} on successful completion of {@link Mono}. + */ + @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); + } + + /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * + * 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 on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createAsync(String resourceGroupName, String accountName, + ObjectAnchorsAccountInner objectAnchorsAccount) { + return createWithResponseAsync(resourceGroupName, accountName, objectAnchorsAccount) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * + * 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 along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response createWithResponse(String resourceGroupName, String accountName, + ObjectAnchorsAccountInner objectAnchorsAccount, Context context) { + return createWithResponseAsync(resourceGroupName, accountName, objectAnchorsAccount, context).block(); + } + + /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * + * 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 createWithResponse(resourceGroupName, accountName, objectAnchorsAccount, Context.NONE).getValue(); + } + + /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * + * 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 along with {@link Response} on successful completion of {@link Mono}. + */ + @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())); + } + + /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * + * 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 along with {@link Response} on successful completion of {@link Mono}. + */ + @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); + } + + /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * + * 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 on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono listKeysAsync(String resourceGroupName, String accountName) { + return listKeysWithResponseAsync(resourceGroupName, accountName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * + * 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 along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response listKeysWithResponse(String resourceGroupName, String accountName, + Context context) { + return listKeysWithResponseAsync(resourceGroupName, accountName, context).block(); + } + + /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * + * 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 listKeysWithResponse(resourceGroupName, accountName, Context.NONE).getValue(); + } + + /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * + * 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 along with {@link Response} on successful completion of {@link Mono}. + */ + @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())); + } + + /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * + * 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 along with {@link Response} on successful completion of {@link Mono}. + */ + @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); + } + + /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * + * 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 on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono regenerateKeysAsync(String resourceGroupName, String accountName, + AccountKeyRegenerateRequest regenerate) { + return regenerateKeysWithResponseAsync(resourceGroupName, accountName, regenerate) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * + * 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 along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response regenerateKeysWithResponse(String resourceGroupName, String accountName, + AccountKeyRegenerateRequest regenerate, Context context) { + return regenerateKeysWithResponseAsync(resourceGroupName, accountName, regenerate, context).block(); + } + + /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * + * 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 regenerateKeysWithResponse(resourceGroupName, accountName, regenerate, Context.NONE).getValue(); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return result of the request to get resource collection along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @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 URL to get the next list of items. + * @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 along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @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 URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return result of the request to get resource collection along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @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 URL to get the next list of items. + * @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 along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @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 000000000000..c3eefa62cc71 --- /dev/null +++ b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/implementation/ObjectAnchorsAccountsImpl.java @@ -0,0 +1,193 @@ +// 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; + +public final class ObjectAnchorsAccountsImpl implements ObjectAnchorsAccounts { + private static 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 ResourceManagerUtils.mapPage(inner, inner1 -> new ObjectAnchorsAccountImpl(inner1, this.manager())); + } + + public PagedIterable list(Context context) { + PagedIterable inner = this.serviceClient().list(context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ObjectAnchorsAccountImpl(inner1, this.manager())); + } + + public PagedIterable listByResourceGroup(String resourceGroupName) { + PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ObjectAnchorsAccountImpl(inner1, this.manager())); + } + + public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { + PagedIterable inner + = this.serviceClient().listByResourceGroup(resourceGroupName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ObjectAnchorsAccountImpl(inner1, this.manager())); + } + + public Response deleteByResourceGroupWithResponse(String resourceGroupName, String accountName, + Context context) { + return this.serviceClient().deleteWithResponse(resourceGroupName, accountName, context); + } + + public void deleteByResourceGroup(String resourceGroupName, String accountName) { + this.serviceClient().delete(resourceGroupName, accountName); + } + + 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 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 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 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 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 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 ObjectAnchorsAccount getById(String id) { + String resourceGroupName = ResourceManagerUtils.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 = ResourceManagerUtils.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 = ResourceManagerUtils.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 = ResourceManagerUtils.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 = ResourceManagerUtils.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 = ResourceManagerUtils.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.deleteByResourceGroupWithResponse(resourceGroupName, accountName, Context.NONE); + } + + public Response deleteByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.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 = ResourceManagerUtils.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.deleteByResourceGroupWithResponse(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/RemoteRenderingAccountsClientImpl.java b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/implementation/RemoteRenderingAccountsClientImpl.java index 8bcf591be6f7..8172b9a40e77 100644 --- a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/implementation/RemoteRenderingAccountsClientImpl.java +++ b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/implementation/RemoteRenderingAccountsClientImpl.java @@ -164,6 +164,12 @@ Mono> listByResourceGroupNext( } /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * * List Remote Rendering Accounts by Subscription. * * @throws ManagementException thrown if the request is rejected by server. @@ -191,6 +197,12 @@ private Mono> listSinglePageAsync() { } /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * * List Remote Rendering Accounts by Subscription. * * @param context The context to associate with this operation. @@ -220,6 +232,12 @@ private Mono> listSinglePageAsync(Con } /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * * List Remote Rendering Accounts by Subscription. * * @throws ManagementException thrown if the request is rejected by server. @@ -233,6 +251,12 @@ private PagedFlux listAsync() { } /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * * List Remote Rendering Accounts by Subscription. * * @param context The context to associate with this operation. @@ -248,6 +272,12 @@ private PagedFlux listAsync(Context context) { } /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * * List Remote Rendering Accounts by Subscription. * * @throws ManagementException thrown if the request is rejected by server. @@ -260,6 +290,12 @@ public PagedIterable list() { } /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * * List Remote Rendering Accounts by Subscription. * * @param context The context to associate with this operation. @@ -274,6 +310,12 @@ public PagedIterable list(Context context) { } /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * * List Resources by Resource Group. * * @param resourceGroupName Name of an Azure resource group. @@ -308,6 +350,12 @@ public PagedIterable list(Context context) { } /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * * List Resources by Resource Group. * * @param resourceGroupName Name of an Azure resource group. @@ -343,6 +391,12 @@ public PagedIterable list(Context context) { } /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * * List Resources by Resource Group. * * @param resourceGroupName Name of an Azure resource group. @@ -358,6 +412,12 @@ private PagedFlux listByResourceGroupAsync(String r } /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * * List Resources by Resource Group. * * @param resourceGroupName Name of an Azure resource group. @@ -374,6 +434,12 @@ private PagedFlux listByResourceGroupAsync(String r } /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * * List Resources by Resource Group. * * @param resourceGroupName Name of an Azure resource group. @@ -388,6 +454,12 @@ public PagedIterable listByResourceGroup(String res } /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * * List Resources by Resource Group. * * @param resourceGroupName Name of an Azure resource group. @@ -403,6 +475,12 @@ public PagedIterable listByResourceGroup(String res } /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * * Delete a Remote Rendering Account. * * @param resourceGroupName Name of an Azure resource group. @@ -437,6 +515,12 @@ private Mono> deleteWithResponseAsync(String resourceGroupName, S } /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * * Delete a Remote Rendering Account. * * @param resourceGroupName Name of an Azure resource group. @@ -472,6 +556,12 @@ private Mono> deleteWithResponseAsync(String resourceGroupName, S } /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * * Delete a Remote Rendering Account. * * @param resourceGroupName Name of an Azure resource group. @@ -487,6 +577,12 @@ private Mono deleteAsync(String resourceGroupName, String accountName) { } /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * * Delete a Remote Rendering Account. * * @param resourceGroupName Name of an Azure resource group. @@ -503,6 +599,12 @@ public Response deleteWithResponse(String resourceGroupName, String accoun } /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * * Delete a Remote Rendering Account. * * @param resourceGroupName Name of an Azure resource group. @@ -517,6 +619,12 @@ public void delete(String resourceGroupName, String accountName) { } /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * * Retrieve a Remote Rendering Account. * * @param resourceGroupName Name of an Azure resource group. @@ -553,6 +661,12 @@ private Mono> getByResourceGroupWithRespon } /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * * Retrieve a Remote Rendering Account. * * @param resourceGroupName Name of an Azure resource group. @@ -588,6 +702,12 @@ private Mono> getByResourceGroupWithRespon } /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * * Retrieve a Remote Rendering Account. * * @param resourceGroupName Name of an Azure resource group. @@ -604,6 +724,12 @@ private Mono getByResourceGroupAsync(String resourc } /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * * Retrieve a Remote Rendering Account. * * @param resourceGroupName Name of an Azure resource group. @@ -621,6 +747,12 @@ public Response getByResourceGroupWithResponse(Stri } /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * * Retrieve a Remote Rendering Account. * * @param resourceGroupName Name of an Azure resource group. @@ -636,6 +768,12 @@ public RemoteRenderingAccountInner getByResourceGroup(String resourceGroupName, } /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * * Updating a Remote Rendering Account. * * @param resourceGroupName Name of an Azure resource group. @@ -678,6 +816,12 @@ private Mono> updateWithResponseAsync(Stri } /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * * Updating a Remote Rendering Account. * * @param resourceGroupName Name of an Azure resource group. @@ -720,6 +864,12 @@ private Mono> updateWithResponseAsync(Stri } /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * * Updating a Remote Rendering Account. * * @param resourceGroupName Name of an Azure resource group. @@ -738,6 +888,12 @@ private Mono updateAsync(String resourceGroupName, } /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * * Updating a Remote Rendering Account. * * @param resourceGroupName Name of an Azure resource group. @@ -756,6 +912,12 @@ public Response updateWithResponse(String resourceG } /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * * Updating a Remote Rendering Account. * * @param resourceGroupName Name of an Azure resource group. @@ -773,6 +935,12 @@ public RemoteRenderingAccountInner update(String resourceGroupName, String accou } /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * * Creating or Updating a Remote Rendering Account. * * @param resourceGroupName Name of an Azure resource group. @@ -815,6 +983,12 @@ private Mono> createWithResponseAsync(Stri } /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * * Creating or Updating a Remote Rendering Account. * * @param resourceGroupName Name of an Azure resource group. @@ -857,6 +1031,12 @@ private Mono> createWithResponseAsync(Stri } /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * * Creating or Updating a Remote Rendering Account. * * @param resourceGroupName Name of an Azure resource group. @@ -875,6 +1055,12 @@ private Mono createAsync(String resourceGroupName, } /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * * Creating or Updating a Remote Rendering Account. * * @param resourceGroupName Name of an Azure resource group. @@ -893,6 +1079,12 @@ public Response createWithResponse(String resourceG } /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * * Creating or Updating a Remote Rendering Account. * * @param resourceGroupName Name of an Azure resource group. @@ -910,6 +1102,12 @@ public RemoteRenderingAccountInner create(String resourceGroupName, String accou } /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * * List Both of the 2 Keys of a Remote Rendering Account. * * @param resourceGroupName Name of an Azure resource group. @@ -944,6 +1142,12 @@ private Mono> listKeysWithResponseAsync(String resour } /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * * List Both of the 2 Keys of a Remote Rendering Account. * * @param resourceGroupName Name of an Azure resource group. @@ -979,6 +1183,12 @@ private Mono> listKeysWithResponseAsync(String resour } /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * * List Both of the 2 Keys of a Remote Rendering Account. * * @param resourceGroupName Name of an Azure resource group. @@ -995,6 +1205,12 @@ private Mono listKeysAsync(String resourceGroupName, String ac } /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * * List Both of the 2 Keys of a Remote Rendering Account. * * @param resourceGroupName Name of an Azure resource group. @@ -1012,6 +1228,12 @@ public Response listKeysWithResponse(String resourceGroupName, } /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * * List Both of the 2 Keys of a Remote Rendering Account. * * @param resourceGroupName Name of an Azure resource group. @@ -1027,6 +1249,12 @@ public AccountKeysInner listKeys(String resourceGroupName, String accountName) { } /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * * Regenerate specified Key of a Remote Rendering Account. * * @param resourceGroupName Name of an Azure resource group. @@ -1068,6 +1296,12 @@ private Mono> regenerateKeysWithResponseAsync(String } /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * * Regenerate specified Key of a Remote Rendering Account. * * @param resourceGroupName Name of an Azure resource group. @@ -1109,6 +1343,12 @@ private Mono> regenerateKeysWithResponseAsync(String } /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * * Regenerate specified Key of a Remote Rendering Account. * * @param resourceGroupName Name of an Azure resource group. @@ -1127,6 +1367,12 @@ private Mono regenerateKeysAsync(String resourceGroupName, Str } /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * * Regenerate specified Key of a Remote Rendering Account. * * @param resourceGroupName Name of an Azure resource group. @@ -1145,6 +1391,12 @@ public Response regenerateKeysWithResponse(String resourceGrou } /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * * Regenerate specified Key of a Remote Rendering Account. * * @param resourceGroupName Name of an Azure resource group. diff --git a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/implementation/SpatialAnchorsAccountsClientImpl.java b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/implementation/SpatialAnchorsAccountsClientImpl.java index ead1188d2081..cf940f414253 100644 --- a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/implementation/SpatialAnchorsAccountsClientImpl.java +++ b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/implementation/SpatialAnchorsAccountsClientImpl.java @@ -164,6 +164,12 @@ Mono> listByResourceGroupNext( } /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * * List Spatial Anchors Accounts by Subscription. * * @throws ManagementException thrown if the request is rejected by server. @@ -191,6 +197,12 @@ private Mono> listSinglePageAsync() { } /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * * List Spatial Anchors Accounts by Subscription. * * @param context The context to associate with this operation. @@ -220,6 +232,12 @@ private Mono> listSinglePageAsync(Cont } /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * * List Spatial Anchors Accounts by Subscription. * * @throws ManagementException thrown if the request is rejected by server. @@ -233,6 +251,12 @@ private PagedFlux listAsync() { } /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * * List Spatial Anchors Accounts by Subscription. * * @param context The context to associate with this operation. @@ -248,6 +272,12 @@ private PagedFlux listAsync(Context context) { } /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * * List Spatial Anchors Accounts by Subscription. * * @throws ManagementException thrown if the request is rejected by server. @@ -260,6 +290,12 @@ public PagedIterable list() { } /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * * List Spatial Anchors Accounts by Subscription. * * @param context The context to associate with this operation. @@ -274,6 +310,12 @@ public PagedIterable list(Context context) { } /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * * List Resources by Resource Group. * * @param resourceGroupName Name of an Azure resource group. @@ -308,6 +350,12 @@ public PagedIterable list(Context context) { } /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * * List Resources by Resource Group. * * @param resourceGroupName Name of an Azure resource group. @@ -343,6 +391,12 @@ private Mono> listByResourceGroupSingl } /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * * List Resources by Resource Group. * * @param resourceGroupName Name of an Azure resource group. @@ -358,6 +412,12 @@ private PagedFlux listByResourceGroupAsync(String re } /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * * List Resources by Resource Group. * * @param resourceGroupName Name of an Azure resource group. @@ -374,6 +434,12 @@ private PagedFlux listByResourceGroupAsync(String re } /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * * List Resources by Resource Group. * * @param resourceGroupName Name of an Azure resource group. @@ -388,6 +454,12 @@ public PagedIterable listByResourceGroup(String reso } /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * * List Resources by Resource Group. * * @param resourceGroupName Name of an Azure resource group. @@ -403,6 +475,12 @@ public PagedIterable listByResourceGroup(String reso } /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * * Delete a Spatial Anchors Account. * * @param resourceGroupName Name of an Azure resource group. @@ -437,6 +515,12 @@ private Mono> deleteWithResponseAsync(String resourceGroupName, S } /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * * Delete a Spatial Anchors Account. * * @param resourceGroupName Name of an Azure resource group. @@ -472,6 +556,12 @@ private Mono> deleteWithResponseAsync(String resourceGroupName, S } /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * * Delete a Spatial Anchors Account. * * @param resourceGroupName Name of an Azure resource group. @@ -487,6 +577,12 @@ private Mono deleteAsync(String resourceGroupName, String accountName) { } /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * * Delete a Spatial Anchors Account. * * @param resourceGroupName Name of an Azure resource group. @@ -503,6 +599,12 @@ public Response deleteWithResponse(String resourceGroupName, String accoun } /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * * Delete a Spatial Anchors Account. * * @param resourceGroupName Name of an Azure resource group. @@ -517,6 +619,12 @@ public void delete(String resourceGroupName, String accountName) { } /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * * Retrieve a Spatial Anchors Account. * * @param resourceGroupName Name of an Azure resource group. @@ -553,6 +661,12 @@ private Mono> getByResourceGroupWithRespons } /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * * Retrieve a Spatial Anchors Account. * * @param resourceGroupName Name of an Azure resource group. @@ -588,6 +702,12 @@ private Mono> getByResourceGroupWithRespons } /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * * Retrieve a Spatial Anchors Account. * * @param resourceGroupName Name of an Azure resource group. @@ -604,6 +724,12 @@ private Mono getByResourceGroupAsync(String resource } /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * * Retrieve a Spatial Anchors Account. * * @param resourceGroupName Name of an Azure resource group. @@ -621,6 +747,12 @@ public Response getByResourceGroupWithResponse(Strin } /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * * Retrieve a Spatial Anchors Account. * * @param resourceGroupName Name of an Azure resource group. @@ -636,6 +768,12 @@ public SpatialAnchorsAccountInner getByResourceGroup(String resourceGroupName, S } /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * * Updating a Spatial Anchors Account. * * @param resourceGroupName Name of an Azure resource group. @@ -678,6 +816,12 @@ private Mono> updateWithResponseAsync(Strin } /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * * Updating a Spatial Anchors Account. * * @param resourceGroupName Name of an Azure resource group. @@ -720,6 +864,12 @@ private Mono> updateWithResponseAsync(Strin } /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * * Updating a Spatial Anchors Account. * * @param resourceGroupName Name of an Azure resource group. @@ -738,6 +888,12 @@ private Mono updateAsync(String resourceGroupName, S } /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * * Updating a Spatial Anchors Account. * * @param resourceGroupName Name of an Azure resource group. @@ -756,6 +912,12 @@ public Response updateWithResponse(String resourceGr } /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * * Updating a Spatial Anchors Account. * * @param resourceGroupName Name of an Azure resource group. @@ -773,6 +935,12 @@ public SpatialAnchorsAccountInner update(String resourceGroupName, String accoun } /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * * Creating or Updating a Spatial Anchors Account. * * @param resourceGroupName Name of an Azure resource group. @@ -815,6 +983,12 @@ private Mono> createWithResponseAsync(Strin } /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * * Creating or Updating a Spatial Anchors Account. * * @param resourceGroupName Name of an Azure resource group. @@ -857,6 +1031,12 @@ private Mono> createWithResponseAsync(Strin } /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * * Creating or Updating a Spatial Anchors Account. * * @param resourceGroupName Name of an Azure resource group. @@ -875,6 +1055,12 @@ private Mono createAsync(String resourceGroupName, S } /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * * Creating or Updating a Spatial Anchors Account. * * @param resourceGroupName Name of an Azure resource group. @@ -893,6 +1079,12 @@ public Response createWithResponse(String resourceGr } /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * * Creating or Updating a Spatial Anchors Account. * * @param resourceGroupName Name of an Azure resource group. @@ -910,6 +1102,12 @@ public SpatialAnchorsAccountInner create(String resourceGroupName, String accoun } /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * * List Both of the 2 Keys of a Spatial Anchors Account. * * @param resourceGroupName Name of an Azure resource group. @@ -944,6 +1142,12 @@ private Mono> listKeysWithResponseAsync(String resour } /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * * List Both of the 2 Keys of a Spatial Anchors Account. * * @param resourceGroupName Name of an Azure resource group. @@ -979,6 +1183,12 @@ private Mono> listKeysWithResponseAsync(String resour } /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * * List Both of the 2 Keys of a Spatial Anchors Account. * * @param resourceGroupName Name of an Azure resource group. @@ -995,6 +1205,12 @@ private Mono listKeysAsync(String resourceGroupName, String ac } /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * * List Both of the 2 Keys of a Spatial Anchors Account. * * @param resourceGroupName Name of an Azure resource group. @@ -1012,6 +1228,12 @@ public Response listKeysWithResponse(String resourceGroupName, } /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * * List Both of the 2 Keys of a Spatial Anchors Account. * * @param resourceGroupName Name of an Azure resource group. @@ -1027,6 +1249,12 @@ public AccountKeysInner listKeys(String resourceGroupName, String accountName) { } /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * * Regenerate specified Key of a Spatial Anchors Account. * * @param resourceGroupName Name of an Azure resource group. @@ -1068,6 +1296,12 @@ private Mono> regenerateKeysWithResponseAsync(String } /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * * Regenerate specified Key of a Spatial Anchors Account. * * @param resourceGroupName Name of an Azure resource group. @@ -1109,6 +1343,12 @@ private Mono> regenerateKeysWithResponseAsync(String } /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * * Regenerate specified Key of a Spatial Anchors Account. * * @param resourceGroupName Name of an Azure resource group. @@ -1127,6 +1367,12 @@ private Mono regenerateKeysAsync(String resourceGroupName, Str } /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * * Regenerate specified Key of a Spatial Anchors Account. * * @param resourceGroupName Name of an Azure resource group. @@ -1145,6 +1391,12 @@ public Response regenerateKeysWithResponse(String resourceGrou } /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * * Regenerate specified Key of a Spatial Anchors Account. * * @param resourceGroupName Name of an Azure resource group. 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 074a128ca424..ead01a4d8589 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 @@ -17,7 +17,7 @@ @Fluent public final class AccountKeyRegenerateRequest implements JsonSerializable { /* - * serial of key to be regenerated + * Serial of key to be regenerated */ private Serial serial; @@ -28,7 +28,7 @@ public AccountKeyRegenerateRequest() { } /** - * Get the serial property: serial of key to be regenerated. + * Get the serial property: Serial of key to be regenerated. * * @return the serial value. */ @@ -37,7 +37,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/Identity.java b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/models/Identity.java index 109c9086e36b..0c26a3484f03 100644 --- a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/models/Identity.java +++ b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/models/Identity.java @@ -15,7 +15,7 @@ * Identity for the resource. */ @Fluent -public final class Identity implements JsonSerializable { +public class Identity implements JsonSerializable { /* * The principal ID of resource identity. */ @@ -46,6 +46,17 @@ public String principalId() { return this.principalId; } + /** + * Set the principalId property: The principal ID of resource identity. + * + * @param principalId the principalId value to set. + * @return the Identity object itself. + */ + Identity withPrincipalId(String principalId) { + this.principalId = principalId; + return this; + } + /** * Get the tenantId property: The tenant ID of resource. * @@ -55,6 +66,17 @@ public String tenantId() { return this.tenantId; } + /** + * Set the tenantId property: The tenant ID of resource. + * + * @param tenantId the tenantId value to set. + * @return the Identity object itself. + */ + Identity withTenantId(String tenantId) { + this.tenantId = tenantId; + return this; + } + /** * Get the type property: The identity type. * 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 587b44bcc989..08d956ba2b7d 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,7 +32,7 @@ public final class MetricDimension implements JsonSerializable private String internalName; /* - * Whether the dimension should be included for the shoebox export scenario. + * Flag to indicate export for Shoebox */ private Boolean toBeExportedForShoebox; @@ -103,8 +103,7 @@ public MetricDimension withInternalName(String internalName) { } /** - * Get the toBeExportedForShoebox property: Whether the dimension should be included for the shoebox export - * scenario. + * Get the toBeExportedForShoebox property: Flag to indicate export for Shoebox. * * @return the toBeExportedForShoebox value. */ @@ -113,8 +112,7 @@ public Boolean toBeExportedForShoebox() { } /** - * Set the toBeExportedForShoebox property: Whether the dimension should be included for the shoebox export - * scenario. + * Set the toBeExportedForShoebox property: Flag to indicate export for Shoebox. * * @param toBeExportedForShoebox the toBeExportedForShoebox value to set. * @return the MetricDimension object itself. 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 000000000000..e8e6465e6f20 --- /dev/null +++ b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/models/ObjectAnchorsAccount.java @@ -0,0 +1,484 @@ +// 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 name of the resource group. + * + * @return the name of the resource group. + */ + String resourceGroupName(); + + /** + * 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); + + /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * + * 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 along with {@link Response}. + */ + Response listKeysWithResponse(Context context); + + /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * + * 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(); + + /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * + * 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 along with {@link Response}. + */ + Response regenerateKeysWithResponse(AccountKeyRegenerateRequest regenerate, Context context); + + /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * + * 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); +} 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 000000000000..8c7b4a5ab33a --- /dev/null +++ b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/models/ObjectAnchorsAccountIdentity.java @@ -0,0 +1,112 @@ +// 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.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The ObjectAnchorsAccountIdentity model. + */ +@Fluent +public final class ObjectAnchorsAccountIdentity extends Identity { + /* + * The tenant ID of resource. + */ + private String tenantId; + + /* + * The principal ID of resource identity. + */ + private String principalId; + + /** + * Creates an instance of ObjectAnchorsAccountIdentity class. + */ + public ObjectAnchorsAccountIdentity() { + } + + /** + * Get the tenantId property: The tenant ID of resource. + * + * @return the tenantId value. + */ + @Override + public String tenantId() { + return this.tenantId; + } + + /** + * Get the principalId property: The principal ID of resource identity. + * + * @return the principalId value. + */ + @Override + public String principalId() { + return this.principalId; + } + + /** + * {@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() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("type", type() == null ? null : type().toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ObjectAnchorsAccountIdentity from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ObjectAnchorsAccountIdentity if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ObjectAnchorsAccountIdentity. + */ + public static ObjectAnchorsAccountIdentity fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ObjectAnchorsAccountIdentity deserializedObjectAnchorsAccountIdentity = new ObjectAnchorsAccountIdentity(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("principalId".equals(fieldName)) { + deserializedObjectAnchorsAccountIdentity.principalId = reader.getString(); + } else if ("tenantId".equals(fieldName)) { + deserializedObjectAnchorsAccountIdentity.tenantId = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedObjectAnchorsAccountIdentity + .withType(ResourceIdentityType.fromString(reader.getString())); + } else { + reader.skipChildren(); + } + } + + return deserializedObjectAnchorsAccountIdentity; + }); + } +} 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 000000000000..88bfa45f3896 --- /dev/null +++ b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/models/ObjectAnchorsAccountPage.java @@ -0,0 +1,129 @@ +// 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.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.mixedreality.fluent.models.ObjectAnchorsAccountInner; +import java.io.IOException; +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 implements JsonSerializable { + /* + * List of resources supported by the Resource Provider. + */ + private List value; + + /* + * URL to get the next set of resource list results if there are any. + */ + private String nextLink; + + /** + * Creates an instance of ObjectAnchorsAccountPage class. + */ + public ObjectAnchorsAccountPage() { + } + + /** + * 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()); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ObjectAnchorsAccountPage from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ObjectAnchorsAccountPage if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ObjectAnchorsAccountPage. + */ + public static ObjectAnchorsAccountPage fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ObjectAnchorsAccountPage deserializedObjectAnchorsAccountPage = new ObjectAnchorsAccountPage(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> ObjectAnchorsAccountInner.fromJson(reader1)); + deserializedObjectAnchorsAccountPage.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedObjectAnchorsAccountPage.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedObjectAnchorsAccountPage; + }); + } +} 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 000000000000..93093cc350bf --- /dev/null +++ b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/models/ObjectAnchorsAccounts.java @@ -0,0 +1,309 @@ +// 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 { + /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * + * 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 as paginated response with {@link PagedIterable}. + */ + PagedIterable list(); + + /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * + * 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 as paginated response with {@link PagedIterable}. + */ + PagedIterable list(Context context); + + /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * + * 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 as paginated response with {@link PagedIterable}. + */ + PagedIterable listByResourceGroup(String resourceGroupName); + + /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * + * 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 as paginated response with {@link PagedIterable}. + */ + PagedIterable listByResourceGroup(String resourceGroupName, Context context); + + /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * + * 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 {@link Response}. + */ + Response deleteByResourceGroupWithResponse(String resourceGroupName, String accountName, Context context); + + /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * + * 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); + + /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * + * 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 along with {@link Response}. + */ + Response getByResourceGroupWithResponse(String resourceGroupName, String accountName, + Context context); + + /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * + * 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); + + /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * + * 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 along with {@link Response}. + */ + Response listKeysWithResponse(String resourceGroupName, String accountName, Context context); + + /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * + * 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); + + /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * + * 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 along with {@link Response}. + */ + Response regenerateKeysWithResponse(String resourceGroupName, String accountName, + AccountKeyRegenerateRequest regenerate, Context context); + + /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * + * 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); + + /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * + * 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 along with {@link Response}. + */ + ObjectAnchorsAccount getById(String id); + + /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * + * 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 along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * + * 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); + + /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * + * 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 {@link 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/main/java/com/azure/resourcemanager/mixedreality/models/RemoteRenderingAccount.java b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/models/RemoteRenderingAccount.java index 04bbb0bb3efa..1b8fa49a426c 100644 --- a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/models/RemoteRenderingAccount.java +++ b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/models/RemoteRenderingAccount.java @@ -416,6 +416,12 @@ interface WithStorageAccountName { RemoteRenderingAccount refresh(Context context); /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * * List Both of the 2 Keys of a Remote Rendering Account. * * @param context The context to associate with this operation. @@ -427,6 +433,12 @@ interface WithStorageAccountName { Response listKeysWithResponse(Context context); /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * * List Both of the 2 Keys of a Remote Rendering Account. * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -436,6 +448,12 @@ interface WithStorageAccountName { AccountKeys listKeys(); /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * * Regenerate specified Key of a Remote Rendering Account. * * @param regenerate Required information for key regeneration. @@ -448,6 +466,12 @@ interface WithStorageAccountName { Response regenerateKeysWithResponse(AccountKeyRegenerateRequest regenerate, Context context); /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * * Regenerate specified Key of a Remote Rendering Account. * * @param regenerate Required information for key regeneration. diff --git a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/models/RemoteRenderingAccounts.java b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/models/RemoteRenderingAccounts.java index 1b356436c58b..4eb9efecfaeb 100644 --- a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/models/RemoteRenderingAccounts.java +++ b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/models/RemoteRenderingAccounts.java @@ -13,6 +13,12 @@ */ public interface RemoteRenderingAccounts { /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * * List Remote Rendering Accounts by Subscription. * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -22,6 +28,12 @@ public interface RemoteRenderingAccounts { PagedIterable list(); /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * * List Remote Rendering Accounts by Subscription. * * @param context The context to associate with this operation. @@ -33,6 +45,12 @@ public interface RemoteRenderingAccounts { PagedIterable list(Context context); /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * * List Resources by Resource Group. * * @param resourceGroupName Name of an Azure resource group. @@ -44,6 +62,12 @@ public interface RemoteRenderingAccounts { PagedIterable listByResourceGroup(String resourceGroupName); /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * * List Resources by Resource Group. * * @param resourceGroupName Name of an Azure resource group. @@ -56,6 +80,12 @@ public interface RemoteRenderingAccounts { PagedIterable listByResourceGroup(String resourceGroupName, Context context); /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * * Delete a Remote Rendering Account. * * @param resourceGroupName Name of an Azure resource group. @@ -69,6 +99,12 @@ public interface RemoteRenderingAccounts { Response deleteByResourceGroupWithResponse(String resourceGroupName, String accountName, Context context); /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * * Delete a Remote Rendering Account. * * @param resourceGroupName Name of an Azure resource group. @@ -80,6 +116,12 @@ public interface RemoteRenderingAccounts { void deleteByResourceGroup(String resourceGroupName, String accountName); /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * * Retrieve a Remote Rendering Account. * * @param resourceGroupName Name of an Azure resource group. @@ -94,6 +136,12 @@ Response getByResourceGroupWithResponse(String resourceG Context context); /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * * Retrieve a Remote Rendering Account. * * @param resourceGroupName Name of an Azure resource group. @@ -106,6 +154,12 @@ Response getByResourceGroupWithResponse(String resourceG RemoteRenderingAccount getByResourceGroup(String resourceGroupName, String accountName); /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * * List Both of the 2 Keys of a Remote Rendering Account. * * @param resourceGroupName Name of an Azure resource group. @@ -119,6 +173,12 @@ Response getByResourceGroupWithResponse(String resourceG Response listKeysWithResponse(String resourceGroupName, String accountName, Context context); /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * * List Both of the 2 Keys of a Remote Rendering Account. * * @param resourceGroupName Name of an Azure resource group. @@ -131,6 +191,12 @@ Response getByResourceGroupWithResponse(String resourceG AccountKeys listKeys(String resourceGroupName, String accountName); /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * * Regenerate specified Key of a Remote Rendering Account. * * @param resourceGroupName Name of an Azure resource group. @@ -146,6 +212,12 @@ Response regenerateKeysWithResponse(String resourceGroupName, Strin AccountKeyRegenerateRequest regenerate, Context context); /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * * Regenerate specified Key of a Remote Rendering Account. * * @param resourceGroupName Name of an Azure resource group. @@ -159,6 +231,12 @@ Response regenerateKeysWithResponse(String resourceGroupName, Strin AccountKeys regenerateKeys(String resourceGroupName, String accountName, AccountKeyRegenerateRequest regenerate); /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * * Retrieve a Remote Rendering Account. * * @param id the resource ID. @@ -170,6 +248,12 @@ Response regenerateKeysWithResponse(String resourceGroupName, Strin RemoteRenderingAccount getById(String id); /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * * Retrieve a Remote Rendering Account. * * @param id the resource ID. @@ -182,6 +266,12 @@ Response regenerateKeysWithResponse(String resourceGroupName, Strin Response getByIdWithResponse(String id, Context context); /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * * Delete a Remote Rendering Account. * * @param id the resource ID. @@ -192,6 +282,12 @@ Response regenerateKeysWithResponse(String resourceGroupName, Strin void deleteById(String id); /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * * Delete a Remote Rendering Account. * * @param id the resource ID. diff --git a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/models/Serial.java b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/models/Serial.java index dc4dd14f4c9b..06cb6bc05e86 100644 --- a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/models/Serial.java +++ b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/models/Serial.java @@ -5,7 +5,7 @@ package com.azure.resourcemanager.mixedreality.models; /** - * serial of key to be regenerated. + * Serial of key to be regenerated. */ public enum Serial { /** diff --git a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/models/SpatialAnchorsAccount.java b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/models/SpatialAnchorsAccount.java index 1b57d3a0b121..471aa4d13a04 100644 --- a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/models/SpatialAnchorsAccount.java +++ b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/models/SpatialAnchorsAccount.java @@ -416,6 +416,12 @@ interface WithStorageAccountName { SpatialAnchorsAccount refresh(Context context); /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * * List Both of the 2 Keys of a Spatial Anchors Account. * * @param context The context to associate with this operation. @@ -427,6 +433,12 @@ interface WithStorageAccountName { Response listKeysWithResponse(Context context); /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * * List Both of the 2 Keys of a Spatial Anchors Account. * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -436,6 +448,12 @@ interface WithStorageAccountName { AccountKeys listKeys(); /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * * Regenerate specified Key of a Spatial Anchors Account. * * @param regenerate Required information for key regeneration. @@ -448,6 +466,12 @@ interface WithStorageAccountName { Response regenerateKeysWithResponse(AccountKeyRegenerateRequest regenerate, Context context); /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * * Regenerate specified Key of a Spatial Anchors Account. * * @param regenerate Required information for key regeneration. diff --git a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/models/SpatialAnchorsAccounts.java b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/models/SpatialAnchorsAccounts.java index 32d63fd34b47..11f080f7a361 100644 --- a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/models/SpatialAnchorsAccounts.java +++ b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/models/SpatialAnchorsAccounts.java @@ -13,6 +13,12 @@ */ public interface SpatialAnchorsAccounts { /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * * List Spatial Anchors Accounts by Subscription. * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -22,6 +28,12 @@ public interface SpatialAnchorsAccounts { PagedIterable list(); /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * * List Spatial Anchors Accounts by Subscription. * * @param context The context to associate with this operation. @@ -33,6 +45,12 @@ public interface SpatialAnchorsAccounts { PagedIterable list(Context context); /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * * List Resources by Resource Group. * * @param resourceGroupName Name of an Azure resource group. @@ -44,6 +62,12 @@ public interface SpatialAnchorsAccounts { PagedIterable listByResourceGroup(String resourceGroupName); /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * * List Resources by Resource Group. * * @param resourceGroupName Name of an Azure resource group. @@ -56,6 +80,12 @@ public interface SpatialAnchorsAccounts { PagedIterable listByResourceGroup(String resourceGroupName, Context context); /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * * Delete a Spatial Anchors Account. * * @param resourceGroupName Name of an Azure resource group. @@ -69,6 +99,12 @@ public interface SpatialAnchorsAccounts { Response deleteByResourceGroupWithResponse(String resourceGroupName, String accountName, Context context); /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * * Delete a Spatial Anchors Account. * * @param resourceGroupName Name of an Azure resource group. @@ -80,6 +116,12 @@ public interface SpatialAnchorsAccounts { void deleteByResourceGroup(String resourceGroupName, String accountName); /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * * Retrieve a Spatial Anchors Account. * * @param resourceGroupName Name of an Azure resource group. @@ -94,6 +136,12 @@ Response getByResourceGroupWithResponse(String resourceGr Context context); /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * * Retrieve a Spatial Anchors Account. * * @param resourceGroupName Name of an Azure resource group. @@ -106,6 +154,12 @@ Response getByResourceGroupWithResponse(String resourceGr SpatialAnchorsAccount getByResourceGroup(String resourceGroupName, String accountName); /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * * List Both of the 2 Keys of a Spatial Anchors Account. * * @param resourceGroupName Name of an Azure resource group. @@ -119,6 +173,12 @@ Response getByResourceGroupWithResponse(String resourceGr Response listKeysWithResponse(String resourceGroupName, String accountName, Context context); /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * * List Both of the 2 Keys of a Spatial Anchors Account. * * @param resourceGroupName Name of an Azure resource group. @@ -131,6 +191,12 @@ Response getByResourceGroupWithResponse(String resourceGr AccountKeys listKeys(String resourceGroupName, String accountName); /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * * Regenerate specified Key of a Spatial Anchors Account. * * @param resourceGroupName Name of an Azure resource group. @@ -146,6 +212,12 @@ Response regenerateKeysWithResponse(String resourceGroupName, Strin AccountKeyRegenerateRequest regenerate, Context context); /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * * Regenerate specified Key of a Spatial Anchors Account. * * @param resourceGroupName Name of an Azure resource group. @@ -159,6 +231,12 @@ Response regenerateKeysWithResponse(String resourceGroupName, Strin AccountKeys regenerateKeys(String resourceGroupName, String accountName, AccountKeyRegenerateRequest regenerate); /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * * Retrieve a Spatial Anchors Account. * * @param id the resource ID. @@ -170,6 +248,12 @@ Response regenerateKeysWithResponse(String resourceGroupName, Strin SpatialAnchorsAccount getById(String id); /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * * Retrieve a Spatial Anchors Account. * * @param id the resource ID. @@ -182,6 +266,12 @@ Response regenerateKeysWithResponse(String resourceGroupName, Strin Response getByIdWithResponse(String id, Context context); /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * * Delete a Spatial Anchors Account. * * @param id the resource ID. @@ -192,6 +282,12 @@ Response regenerateKeysWithResponse(String resourceGroupName, Strin void deleteById(String id); /** + * > [!NOTE] + * > + * > **Mixed Reality retirement** + * > + * > The Mixed Reality service is now deprecated and will be retired. + * * Delete a Spatial Anchors Account. * * @param id the resource ID. diff --git a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-mixedreality/proxy-config.json b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-mixedreality/proxy-config.json index a0abd14869af..2935d592f6e6 100644 --- a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-mixedreality/proxy-config.json +++ b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-mixedreality/proxy-config.json @@ -1 +1 @@ -[["com.azure.resourcemanager.mixedreality.implementation.OperationsClientImpl$OperationsService"],["com.azure.resourcemanager.mixedreality.implementation.RemoteRenderingAccountsClientImpl$RemoteRenderingAccountsService"],["com.azure.resourcemanager.mixedreality.implementation.ResourceProvidersClientImpl$ResourceProvidersService"],["com.azure.resourcemanager.mixedreality.implementation.SpatialAnchorsAccountsClientImpl$SpatialAnchorsAccountsService"]] \ No newline at end of file +[["com.azure.resourcemanager.mixedreality.implementation.ObjectAnchorsAccountsClientImpl$ObjectAnchorsAccountsService"],["com.azure.resourcemanager.mixedreality.implementation.OperationsClientImpl$OperationsService"],["com.azure.resourcemanager.mixedreality.implementation.RemoteRenderingAccountsClientImpl$RemoteRenderingAccountsService"],["com.azure.resourcemanager.mixedreality.implementation.ResourceProvidersClientImpl$ResourceProvidersService"],["com.azure.resourcemanager.mixedreality.implementation.SpatialAnchorsAccountsClientImpl$SpatialAnchorsAccountsService"]] \ No newline at end of file diff --git a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/resources/azure-resourcemanager-mixedreality.properties b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/resources/azure-resourcemanager-mixedreality.properties new file mode 100644 index 000000000000..defbd48204e4 --- /dev/null +++ b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/resources/azure-resourcemanager-mixedreality.properties @@ -0,0 +1 @@ +version=${project.version} 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 000000000000..fccc05657890 --- /dev/null +++ b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/samples/java/com/azure/resourcemanager/mixedreality/generated/ObjectAnchorsAccountsCreateSamples.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.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 000000000000..0a9d4ffbc2f7 --- /dev/null +++ b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/samples/java/com/azure/resourcemanager/mixedreality/generated/ObjectAnchorsAccountsDeleteSamples.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 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() + .deleteByResourceGroupWithResponse("MyResourceGroup", "MyAccount", com.azure.core.util.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 000000000000..fbbf72fb950a --- /dev/null +++ b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/samples/java/com/azure/resourcemanager/mixedreality/generated/ObjectAnchorsAccountsGetByResourceGroupSamples.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 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", com.azure.core.util.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 000000000000..efdc7b89714b --- /dev/null +++ b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/samples/java/com/azure/resourcemanager/mixedreality/generated/ObjectAnchorsAccountsListByResourceGroupSamples.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 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", com.azure.core.util.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 000000000000..1c6c2aab9fb5 --- /dev/null +++ b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/samples/java/com/azure/resourcemanager/mixedreality/generated/ObjectAnchorsAccountsListKeysSamples.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 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", com.azure.core.util.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 000000000000..21f4b34c5113 --- /dev/null +++ b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/samples/java/com/azure/resourcemanager/mixedreality/generated/ObjectAnchorsAccountsListSamples.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 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(com.azure.core.util.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 000000000000..9e8496162825 --- /dev/null +++ b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/samples/java/com/azure/resourcemanager/mixedreality/generated/ObjectAnchorsAccountsRegenerateKeysSamples.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.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), com.azure.core.util.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 000000000000..fbd4d5e8ac8f --- /dev/null +++ b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/samples/java/com/azure/resourcemanager/mixedreality/generated/ObjectAnchorsAccountsUpdateSamples.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.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", com.azure.core.util.Context.NONE) + .getValue(); + resource.update() + .withTags(mapOf("hero", "romeo", "heroine", "juliet")) + .withIdentity(new ObjectAnchorsAccountIdentity().withType(ResourceIdentityType.SYSTEM_ASSIGNED)) + .apply(); + } + + // Use "Map.of" if available + @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 index e54f0909eaaf..97e4810560e6 100644 --- 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 @@ -10,7 +10,7 @@ public final class OperationsListSamples { /* * x-ms-original-file: - * specification/mixedreality/resource-manager/Microsoft.MixedReality/stable/2021-01-01/examples/proxy/ + * specification/mixedreality/resource-manager/Microsoft.MixedReality/preview/2021-03-01-preview/examples/proxy/ * ExposingAvailableOperations.json */ /** 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 index a453f791e57b..53618df29583 100644 --- 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 @@ -13,8 +13,8 @@ public final class RemoteRenderingAccountsCreateSamples { /* * x-ms-original-file: - * specification/mixedreality/resource-manager/Microsoft.MixedReality/stable/2021-01-01/examples/remote-rendering/ - * Put.json + * specification/mixedreality/resource-manager/Microsoft.MixedReality/preview/2021-03-01-preview/examples/remote- + * rendering/Put.json */ /** * Sample code: Create remote rendering account. 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 index 7914ea74f634..927f6fda0311 100644 --- 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 @@ -10,8 +10,8 @@ public final class RemoteRenderingAccountsDeleteSamples { /* * x-ms-original-file: - * specification/mixedreality/resource-manager/Microsoft.MixedReality/stable/2021-01-01/examples/remote-rendering/ - * Delete.json + * specification/mixedreality/resource-manager/Microsoft.MixedReality/preview/2021-03-01-preview/examples/remote- + * rendering/Delete.json */ /** * Sample code: Delete remote rendering account. 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 index 4bba52271e4f..175a78901ab8 100644 --- 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 @@ -10,8 +10,8 @@ public final class RemoteRenderingAccountsGetByResourceGroupSamples { /* * x-ms-original-file: - * specification/mixedreality/resource-manager/Microsoft.MixedReality/stable/2021-01-01/examples/remote-rendering/ - * Get.json + * specification/mixedreality/resource-manager/Microsoft.MixedReality/preview/2021-03-01-preview/examples/remote- + * rendering/Get.json */ /** * Sample code: Get remote rendering account. 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 index 0d819b5922c5..736c3e7e2cd6 100644 --- 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 @@ -10,8 +10,8 @@ public final class RemoteRenderingAccountsListByResourceGroupSamples { /* * x-ms-original-file: - * specification/mixedreality/resource-manager/Microsoft.MixedReality/stable/2021-01-01/examples/remote-rendering/ - * GetByResourceGroup.json + * 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. 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 index 3c5f8082b5f1..4e59c5ac8da6 100644 --- 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 @@ -10,8 +10,8 @@ public final class RemoteRenderingAccountsListKeysSamples { /* * x-ms-original-file: - * specification/mixedreality/resource-manager/Microsoft.MixedReality/stable/2021-01-01/examples/remote-rendering/ - * ListKeys.json + * specification/mixedreality/resource-manager/Microsoft.MixedReality/preview/2021-03-01-preview/examples/remote- + * rendering/ListKeys.json */ /** * Sample code: List remote rendering account key. 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 index 4ce5fb1dc232..87b1a4b6f1a4 100644 --- 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 @@ -10,8 +10,8 @@ public final class RemoteRenderingAccountsListSamples { /* * x-ms-original-file: - * specification/mixedreality/resource-manager/Microsoft.MixedReality/stable/2021-01-01/examples/remote-rendering/ - * GetBySubscription.json + * specification/mixedreality/resource-manager/Microsoft.MixedReality/preview/2021-03-01-preview/examples/remote- + * rendering/GetBySubscription.json */ /** * Sample code: List remote rendering accounts by subscription. 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 index 4b2d542f07e1..f5362af2f874 100644 --- 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 @@ -13,8 +13,8 @@ public final class RemoteRenderingAccountsRegenerateKeysSamples { /* * x-ms-original-file: - * specification/mixedreality/resource-manager/Microsoft.MixedReality/stable/2021-01-01/examples/remote-rendering/ - * RegenerateKey.json + * specification/mixedreality/resource-manager/Microsoft.MixedReality/preview/2021-03-01-preview/examples/remote- + * rendering/RegenerateKey.json */ /** * Sample code: Regenerate remote rendering account keys. 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 index 939639182efd..6bb57664bd65 100644 --- 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 @@ -16,8 +16,8 @@ public final class RemoteRenderingAccountsUpdateSamples { /* * x-ms-original-file: - * specification/mixedreality/resource-manager/Microsoft.MixedReality/stable/2021-01-01/examples/remote-rendering/ - * Patch.json + * specification/mixedreality/resource-manager/Microsoft.MixedReality/preview/2021-03-01-preview/examples/remote- + * rendering/Patch.json */ /** * Sample code: Update remote rendering account. 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 index a7173e115f6f..01ef5ffdca68 100644 --- 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 @@ -12,7 +12,7 @@ public final class ResourceProviderCheckNameAvailabilityLocalSamples { /* * x-ms-original-file: - * specification/mixedreality/resource-manager/Microsoft.MixedReality/stable/2021-01-01/examples/proxy/ + * specification/mixedreality/resource-manager/Microsoft.MixedReality/preview/2021-03-01-preview/examples/proxy/ * CheckNameAvailabilityForLocalUniqueness.json */ /** 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 index cb3fa010d267..ada26eac7282 100644 --- 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 @@ -10,8 +10,8 @@ public final class SpatialAnchorsAccountsCreateSamples { /* * x-ms-original-file: - * specification/mixedreality/resource-manager/Microsoft.MixedReality/stable/2021-01-01/examples/spatial-anchors/Put - * .json + * specification/mixedreality/resource-manager/Microsoft.MixedReality/preview/2021-03-01-preview/examples/spatial- + * anchors/Put.json */ /** * Sample code: Create spatial anchor account. 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 index e85d9dfed957..6aabc5c656fc 100644 --- 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 @@ -10,8 +10,8 @@ public final class SpatialAnchorsAccountsDeleteSamples { /* * x-ms-original-file: - * specification/mixedreality/resource-manager/Microsoft.MixedReality/stable/2021-01-01/examples/spatial-anchors/ - * Delete.json + * specification/mixedreality/resource-manager/Microsoft.MixedReality/preview/2021-03-01-preview/examples/spatial- + * anchors/Delete.json */ /** * Sample code: Delete spatial anchors account. 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 index 14b203a96c91..c0c848d3ed21 100644 --- 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 @@ -10,8 +10,8 @@ public final class SpatialAnchorsAccountsGetByResourceGroupSamples { /* * x-ms-original-file: - * specification/mixedreality/resource-manager/Microsoft.MixedReality/stable/2021-01-01/examples/spatial-anchors/Get - * .json + * specification/mixedreality/resource-manager/Microsoft.MixedReality/preview/2021-03-01-preview/examples/spatial- + * anchors/Get.json */ /** * Sample code: Get spatial anchors account. 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 index f78a7fe93fe9..750897d9f69c 100644 --- 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 @@ -10,8 +10,8 @@ public final class SpatialAnchorsAccountsListByResourceGroupSamples { /* * x-ms-original-file: - * specification/mixedreality/resource-manager/Microsoft.MixedReality/stable/2021-01-01/examples/spatial-anchors/ - * GetByResourceGroup.json + * 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. 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 index 469def12f57a..966e16f88675 100644 --- 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 @@ -10,8 +10,8 @@ public final class SpatialAnchorsAccountsListKeysSamples { /* * x-ms-original-file: - * specification/mixedreality/resource-manager/Microsoft.MixedReality/stable/2021-01-01/examples/spatial-anchors/ - * ListKeys.json + * specification/mixedreality/resource-manager/Microsoft.MixedReality/preview/2021-03-01-preview/examples/spatial- + * anchors/ListKeys.json */ /** * Sample code: List spatial anchor account key. 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 index 3e827bd6c111..ee92ac17fd69 100644 --- 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 @@ -10,8 +10,8 @@ public final class SpatialAnchorsAccountsListSamples { /* * x-ms-original-file: - * specification/mixedreality/resource-manager/Microsoft.MixedReality/stable/2021-01-01/examples/spatial-anchors/ - * GetBySubscription.json + * specification/mixedreality/resource-manager/Microsoft.MixedReality/preview/2021-03-01-preview/examples/spatial- + * anchors/GetBySubscription.json */ /** * Sample code: List spatial anchors accounts by subscription. 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 index 81200fcfce8a..33e7a226f26d 100644 --- 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 @@ -13,8 +13,8 @@ public final class SpatialAnchorsAccountsRegenerateKeysSamples { /* * x-ms-original-file: - * specification/mixedreality/resource-manager/Microsoft.MixedReality/stable/2021-01-01/examples/spatial-anchors/ - * RegenerateKey.json + * specification/mixedreality/resource-manager/Microsoft.MixedReality/preview/2021-03-01-preview/examples/spatial- + * anchors/RegenerateKey.json */ /** * Sample code: Regenerate spatial anchors account keys. 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 index 757e083228c9..5506929879bb 100644 --- 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 @@ -14,8 +14,8 @@ public final class SpatialAnchorsAccountsUpdateSamples { /* * x-ms-original-file: - * specification/mixedreality/resource-manager/Microsoft.MixedReality/stable/2021-01-01/examples/spatial-anchors/ - * Patch.json + * specification/mixedreality/resource-manager/Microsoft.MixedReality/preview/2021-03-01-preview/examples/spatial- + * anchors/Patch.json */ /** * Sample code: Update spatial anchors account. diff --git a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/test/java/com/azure/resourcemanager/mixedreality/generated/AccountKeyRegenerateRequestTests.java b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/test/java/com/azure/resourcemanager/mixedreality/generated/AccountKeyRegenerateRequestTests.java deleted file mode 100644 index 49c4e56f5c01..000000000000 --- a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/test/java/com/azure/resourcemanager/mixedreality/generated/AccountKeyRegenerateRequestTests.java +++ /dev/null @@ -1,26 +0,0 @@ -// 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.BinaryData; -import com.azure.resourcemanager.mixedreality.models.AccountKeyRegenerateRequest; -import com.azure.resourcemanager.mixedreality.models.Serial; -import org.junit.jupiter.api.Assertions; - -public final class AccountKeyRegenerateRequestTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AccountKeyRegenerateRequest model - = BinaryData.fromString("{\"serial\":2}").toObject(AccountKeyRegenerateRequest.class); - Assertions.assertEquals(Serial.TWO, model.serial()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AccountKeyRegenerateRequest model = new AccountKeyRegenerateRequest().withSerial(Serial.TWO); - model = BinaryData.fromObject(model).toObject(AccountKeyRegenerateRequest.class); - Assertions.assertEquals(Serial.TWO, model.serial()); - } -} diff --git a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/test/java/com/azure/resourcemanager/mixedreality/generated/CheckNameAvailabilityRequestTests.java b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/test/java/com/azure/resourcemanager/mixedreality/generated/CheckNameAvailabilityRequestTests.java deleted file mode 100644 index b070f177d49d..000000000000 --- a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/test/java/com/azure/resourcemanager/mixedreality/generated/CheckNameAvailabilityRequestTests.java +++ /dev/null @@ -1,28 +0,0 @@ -// 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.BinaryData; -import com.azure.resourcemanager.mixedreality.models.CheckNameAvailabilityRequest; -import org.junit.jupiter.api.Assertions; - -public final class CheckNameAvailabilityRequestTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - CheckNameAvailabilityRequest model = BinaryData.fromString("{\"name\":\"eic\",\"type\":\"twnpzaoqvuhrhcf\"}") - .toObject(CheckNameAvailabilityRequest.class); - Assertions.assertEquals("eic", model.name()); - Assertions.assertEquals("twnpzaoqvuhrhcf", model.type()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CheckNameAvailabilityRequest model - = new CheckNameAvailabilityRequest().withName("eic").withType("twnpzaoqvuhrhcf"); - model = BinaryData.fromObject(model).toObject(CheckNameAvailabilityRequest.class); - Assertions.assertEquals("eic", model.name()); - Assertions.assertEquals("twnpzaoqvuhrhcf", model.type()); - } -} diff --git a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/test/java/com/azure/resourcemanager/mixedreality/generated/CheckNameAvailabilityResponseInnerTests.java b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/test/java/com/azure/resourcemanager/mixedreality/generated/CheckNameAvailabilityResponseInnerTests.java deleted file mode 100644 index a12e55d9050d..000000000000 --- a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/test/java/com/azure/resourcemanager/mixedreality/generated/CheckNameAvailabilityResponseInnerTests.java +++ /dev/null @@ -1,33 +0,0 @@ -// 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.BinaryData; -import com.azure.resourcemanager.mixedreality.fluent.models.CheckNameAvailabilityResponseInner; -import com.azure.resourcemanager.mixedreality.models.NameUnavailableReason; -import org.junit.jupiter.api.Assertions; - -public final class CheckNameAvailabilityResponseInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - CheckNameAvailabilityResponseInner model - = BinaryData.fromString("{\"nameAvailable\":true,\"reason\":\"Invalid\",\"message\":\"glmjth\"}") - .toObject(CheckNameAvailabilityResponseInner.class); - Assertions.assertEquals(true, model.nameAvailable()); - Assertions.assertEquals(NameUnavailableReason.INVALID, model.reason()); - Assertions.assertEquals("glmjth", model.message()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CheckNameAvailabilityResponseInner model = new CheckNameAvailabilityResponseInner().withNameAvailable(true) - .withReason(NameUnavailableReason.INVALID) - .withMessage("glmjth"); - model = BinaryData.fromObject(model).toObject(CheckNameAvailabilityResponseInner.class); - Assertions.assertEquals(true, model.nameAvailable()); - Assertions.assertEquals(NameUnavailableReason.INVALID, model.reason()); - Assertions.assertEquals("glmjth", model.message()); - } -} diff --git a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/test/java/com/azure/resourcemanager/mixedreality/generated/IdentityTests.java b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/test/java/com/azure/resourcemanager/mixedreality/generated/IdentityTests.java deleted file mode 100644 index f8aea8e64ee2..000000000000 --- a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/test/java/com/azure/resourcemanager/mixedreality/generated/IdentityTests.java +++ /dev/null @@ -1,27 +0,0 @@ -// 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.BinaryData; -import com.azure.resourcemanager.mixedreality.models.Identity; -import com.azure.resourcemanager.mixedreality.models.ResourceIdentityType; -import org.junit.jupiter.api.Assertions; - -public final class IdentityTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - Identity model = BinaryData - .fromString("{\"principalId\":\"jpkcattpng\",\"tenantId\":\"rcczsqpjhvmd\",\"type\":\"SystemAssigned\"}") - .toObject(Identity.class); - Assertions.assertEquals(ResourceIdentityType.SYSTEM_ASSIGNED, model.type()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - Identity model = new Identity().withType(ResourceIdentityType.SYSTEM_ASSIGNED); - model = BinaryData.fromObject(model).toObject(Identity.class); - Assertions.assertEquals(ResourceIdentityType.SYSTEM_ASSIGNED, model.type()); - } -} diff --git a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/test/java/com/azure/resourcemanager/mixedreality/generated/LogSpecificationTests.java b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/test/java/com/azure/resourcemanager/mixedreality/generated/LogSpecificationTests.java deleted file mode 100644 index 5f255b8e898e..000000000000 --- a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/test/java/com/azure/resourcemanager/mixedreality/generated/LogSpecificationTests.java +++ /dev/null @@ -1,31 +0,0 @@ -// 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.BinaryData; -import com.azure.resourcemanager.mixedreality.models.LogSpecification; -import org.junit.jupiter.api.Assertions; - -public final class LogSpecificationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - LogSpecification model = BinaryData - .fromString("{\"name\":\"iachbo\",\"displayName\":\"flnrosfqpteehzz\",\"blobDuration\":\"pyqr\"}") - .toObject(LogSpecification.class); - Assertions.assertEquals("iachbo", model.name()); - Assertions.assertEquals("flnrosfqpteehzz", model.displayName()); - Assertions.assertEquals("pyqr", model.blobDuration()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - LogSpecification model - = new LogSpecification().withName("iachbo").withDisplayName("flnrosfqpteehzz").withBlobDuration("pyqr"); - model = BinaryData.fromObject(model).toObject(LogSpecification.class); - Assertions.assertEquals("iachbo", model.name()); - Assertions.assertEquals("flnrosfqpteehzz", model.displayName()); - Assertions.assertEquals("pyqr", model.blobDuration()); - } -} diff --git a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/test/java/com/azure/resourcemanager/mixedreality/generated/MetricDimensionTests.java b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/test/java/com/azure/resourcemanager/mixedreality/generated/MetricDimensionTests.java deleted file mode 100644 index 8fbb8fdc0275..000000000000 --- a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/test/java/com/azure/resourcemanager/mixedreality/generated/MetricDimensionTests.java +++ /dev/null @@ -1,35 +0,0 @@ -// 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.BinaryData; -import com.azure.resourcemanager.mixedreality.models.MetricDimension; -import org.junit.jupiter.api.Assertions; - -public final class MetricDimensionTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - MetricDimension model = BinaryData.fromString( - "{\"name\":\"hvpmoue\",\"displayName\":\"dzxibqeojnxqbzvd\",\"internalName\":\"t\",\"toBeExportedForShoebox\":true}") - .toObject(MetricDimension.class); - Assertions.assertEquals("hvpmoue", model.name()); - Assertions.assertEquals("dzxibqeojnxqbzvd", model.displayName()); - Assertions.assertEquals("t", model.internalName()); - Assertions.assertEquals(true, model.toBeExportedForShoebox()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - MetricDimension model = new MetricDimension().withName("hvpmoue") - .withDisplayName("dzxibqeojnxqbzvd") - .withInternalName("t") - .withToBeExportedForShoebox(true); - model = BinaryData.fromObject(model).toObject(MetricDimension.class); - Assertions.assertEquals("hvpmoue", model.name()); - Assertions.assertEquals("dzxibqeojnxqbzvd", model.displayName()); - Assertions.assertEquals("t", model.internalName()); - Assertions.assertEquals(true, model.toBeExportedForShoebox()); - } -} diff --git a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/test/java/com/azure/resourcemanager/mixedreality/generated/MetricSpecificationTests.java b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/test/java/com/azure/resourcemanager/mixedreality/generated/MetricSpecificationTests.java deleted file mode 100644 index d9483b43f4d3..000000000000 --- a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/test/java/com/azure/resourcemanager/mixedreality/generated/MetricSpecificationTests.java +++ /dev/null @@ -1,95 +0,0 @@ -// 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.BinaryData; -import com.azure.resourcemanager.mixedreality.models.MetricDimension; -import com.azure.resourcemanager.mixedreality.models.MetricSpecification; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class MetricSpecificationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - MetricSpecification model = BinaryData.fromString( - "{\"name\":\"z\",\"displayName\":\"pvswjdkirso\",\"displayDescription\":\"qxhcrmn\",\"unit\":\"jtckwhdso\",\"aggregationType\":\"iy\",\"supportedAggregationTypes\":[\"xsqwpgrjbznorc\",\"xv\",\"nb\"],\"supportedTimeGrainTypes\":[\"abnmocpcyshu\",\"zafb\"],\"enableRegionalMdmAccount\":false,\"sourceMdmAccount\":\"pbtoqcjmkl\",\"sourceMdmNamespace\":\"vbqid\",\"metricFilterPattern\":\"ajzyul\",\"fillGapWithZero\":false,\"category\":\"jkrlkhbzhfepg\",\"internalMetricName\":\"qex\",\"dimensions\":[{\"name\":\"xscpaierhhbc\",\"displayName\":\"l\",\"internalName\":\"majtjaod\",\"toBeExportedForShoebox\":true},{\"name\":\"bdxkqpxokaj\",\"displayName\":\"npime\",\"internalName\":\"stxgc\",\"toBeExportedForShoebox\":false},{\"name\":\"maajrmvdjwzrlo\",\"displayName\":\"clwhijcoejctbz\",\"internalName\":\"s\",\"toBeExportedForShoebox\":false},{\"name\":\"bkbfkgukdkex\",\"displayName\":\"pofm\",\"internalName\":\"x\",\"toBeExportedForShoebox\":false}],\"lockedAggregationType\":\"gddtocj\"}") - .toObject(MetricSpecification.class); - Assertions.assertEquals("z", model.name()); - Assertions.assertEquals("pvswjdkirso", model.displayName()); - Assertions.assertEquals("qxhcrmn", model.displayDescription()); - Assertions.assertEquals("jtckwhdso", model.unit()); - Assertions.assertEquals("iy", model.aggregationType()); - Assertions.assertEquals("xsqwpgrjbznorc", model.supportedAggregationTypes().get(0)); - Assertions.assertEquals("abnmocpcyshu", model.supportedTimeGrainTypes().get(0)); - Assertions.assertEquals(false, model.enableRegionalMdmAccount()); - Assertions.assertEquals("pbtoqcjmkl", model.sourceMdmAccount()); - Assertions.assertEquals("vbqid", model.sourceMdmNamespace()); - Assertions.assertEquals("ajzyul", model.metricFilterPattern()); - Assertions.assertEquals(false, model.fillGapWithZero()); - Assertions.assertEquals("jkrlkhbzhfepg", model.category()); - Assertions.assertEquals("qex", model.internalMetricName()); - Assertions.assertEquals("xscpaierhhbc", model.dimensions().get(0).name()); - Assertions.assertEquals("l", model.dimensions().get(0).displayName()); - Assertions.assertEquals("majtjaod", model.dimensions().get(0).internalName()); - Assertions.assertEquals(true, model.dimensions().get(0).toBeExportedForShoebox()); - Assertions.assertEquals("gddtocj", model.lockedAggregationType()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - MetricSpecification model = new MetricSpecification().withName("z") - .withDisplayName("pvswjdkirso") - .withDisplayDescription("qxhcrmn") - .withUnit("jtckwhdso") - .withAggregationType("iy") - .withSupportedAggregationTypes(Arrays.asList("xsqwpgrjbznorc", "xv", "nb")) - .withSupportedTimeGrainTypes(Arrays.asList("abnmocpcyshu", "zafb")) - .withEnableRegionalMdmAccount(false) - .withSourceMdmAccount("pbtoqcjmkl") - .withSourceMdmNamespace("vbqid") - .withMetricFilterPattern("ajzyul") - .withFillGapWithZero(false) - .withCategory("jkrlkhbzhfepg") - .withInternalMetricName("qex") - .withDimensions(Arrays.asList( - new MetricDimension().withName("xscpaierhhbc") - .withDisplayName("l") - .withInternalName("majtjaod") - .withToBeExportedForShoebox(true), - new MetricDimension().withName("bdxkqpxokaj") - .withDisplayName("npime") - .withInternalName("stxgc") - .withToBeExportedForShoebox(false), - new MetricDimension().withName("maajrmvdjwzrlo") - .withDisplayName("clwhijcoejctbz") - .withInternalName("s") - .withToBeExportedForShoebox(false), - new MetricDimension().withName("bkbfkgukdkex") - .withDisplayName("pofm") - .withInternalName("x") - .withToBeExportedForShoebox(false))) - .withLockedAggregationType("gddtocj"); - model = BinaryData.fromObject(model).toObject(MetricSpecification.class); - Assertions.assertEquals("z", model.name()); - Assertions.assertEquals("pvswjdkirso", model.displayName()); - Assertions.assertEquals("qxhcrmn", model.displayDescription()); - Assertions.assertEquals("jtckwhdso", model.unit()); - Assertions.assertEquals("iy", model.aggregationType()); - Assertions.assertEquals("xsqwpgrjbznorc", model.supportedAggregationTypes().get(0)); - Assertions.assertEquals("abnmocpcyshu", model.supportedTimeGrainTypes().get(0)); - Assertions.assertEquals(false, model.enableRegionalMdmAccount()); - Assertions.assertEquals("pbtoqcjmkl", model.sourceMdmAccount()); - Assertions.assertEquals("vbqid", model.sourceMdmNamespace()); - Assertions.assertEquals("ajzyul", model.metricFilterPattern()); - Assertions.assertEquals(false, model.fillGapWithZero()); - Assertions.assertEquals("jkrlkhbzhfepg", model.category()); - Assertions.assertEquals("qex", model.internalMetricName()); - Assertions.assertEquals("xscpaierhhbc", model.dimensions().get(0).name()); - Assertions.assertEquals("l", model.dimensions().get(0).displayName()); - Assertions.assertEquals("majtjaod", model.dimensions().get(0).internalName()); - Assertions.assertEquals(true, model.dimensions().get(0).toBeExportedForShoebox()); - Assertions.assertEquals("gddtocj", model.lockedAggregationType()); - } -} diff --git a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/test/java/com/azure/resourcemanager/mixedreality/generated/MixedRealityAccountPropertiesTests.java b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/test/java/com/azure/resourcemanager/mixedreality/generated/MixedRealityAccountPropertiesTests.java deleted file mode 100644 index f9a6e8539494..000000000000 --- a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/test/java/com/azure/resourcemanager/mixedreality/generated/MixedRealityAccountPropertiesTests.java +++ /dev/null @@ -1,26 +0,0 @@ -// 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.BinaryData; -import com.azure.resourcemanager.mixedreality.fluent.models.MixedRealityAccountProperties; -import org.junit.jupiter.api.Assertions; - -public final class MixedRealityAccountPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - MixedRealityAccountProperties model = BinaryData - .fromString("{\"storageAccountName\":\"c\",\"accountId\":\"efovgmk\",\"accountDomain\":\"leyyvx\"}") - .toObject(MixedRealityAccountProperties.class); - Assertions.assertEquals("c", model.storageAccountName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - MixedRealityAccountProperties model = new MixedRealityAccountProperties().withStorageAccountName("c"); - model = BinaryData.fromObject(model).toObject(MixedRealityAccountProperties.class); - Assertions.assertEquals("c", model.storageAccountName()); - } -} diff --git a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/test/java/com/azure/resourcemanager/mixedreality/generated/OperationDisplayTests.java b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/test/java/com/azure/resourcemanager/mixedreality/generated/OperationDisplayTests.java deleted file mode 100644 index ab2303a447ef..000000000000 --- a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/test/java/com/azure/resourcemanager/mixedreality/generated/OperationDisplayTests.java +++ /dev/null @@ -1,35 +0,0 @@ -// 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.BinaryData; -import com.azure.resourcemanager.mixedreality.models.OperationDisplay; -import org.junit.jupiter.api.Assertions; - -public final class OperationDisplayTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - OperationDisplay model = BinaryData.fromString( - "{\"provider\":\"npmqnjaqwixjspro\",\"resource\":\"vcputegj\",\"operation\":\"wmfdatscmdvpjhul\",\"description\":\"uuvmkjozkrwfnd\"}") - .toObject(OperationDisplay.class); - Assertions.assertEquals("npmqnjaqwixjspro", model.provider()); - Assertions.assertEquals("vcputegj", model.resource()); - Assertions.assertEquals("wmfdatscmdvpjhul", model.operation()); - Assertions.assertEquals("uuvmkjozkrwfnd", model.description()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OperationDisplay model = new OperationDisplay().withProvider("npmqnjaqwixjspro") - .withResource("vcputegj") - .withOperation("wmfdatscmdvpjhul") - .withDescription("uuvmkjozkrwfnd"); - model = BinaryData.fromObject(model).toObject(OperationDisplay.class); - Assertions.assertEquals("npmqnjaqwixjspro", model.provider()); - Assertions.assertEquals("vcputegj", model.resource()); - Assertions.assertEquals("wmfdatscmdvpjhul", model.operation()); - Assertions.assertEquals("uuvmkjozkrwfnd", model.description()); - } -} diff --git a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/test/java/com/azure/resourcemanager/mixedreality/generated/OperationInnerTests.java b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/test/java/com/azure/resourcemanager/mixedreality/generated/OperationInnerTests.java deleted file mode 100644 index edd736d3c1ae..000000000000 --- a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/test/java/com/azure/resourcemanager/mixedreality/generated/OperationInnerTests.java +++ /dev/null @@ -1,140 +0,0 @@ -// 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.BinaryData; -import com.azure.resourcemanager.mixedreality.fluent.models.OperationInner; -import com.azure.resourcemanager.mixedreality.models.LogSpecification; -import com.azure.resourcemanager.mixedreality.models.MetricDimension; -import com.azure.resourcemanager.mixedreality.models.MetricSpecification; -import com.azure.resourcemanager.mixedreality.models.OperationDisplay; -import com.azure.resourcemanager.mixedreality.models.OperationProperties; -import com.azure.resourcemanager.mixedreality.models.ServiceSpecification; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class OperationInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - OperationInner model = BinaryData.fromString( - "{\"name\":\"flusarhmof\",\"display\":{\"provider\":\"hs\",\"resource\":\"yurkdtmlxhekuksj\",\"operation\":\"xukcdmpar\",\"description\":\"ryuanzwuxzdxtay\"},\"isDataAction\":true,\"origin\":\"whfpmrqobmtu\",\"properties\":{\"serviceSpecification\":{\"logSpecifications\":[{\"name\":\"tihfx\",\"displayName\":\"jbpzvgnwzsymg\",\"blobDuration\":\"uf\"},{\"name\":\"zk\",\"displayName\":\"dbihanufhfcbj\",\"blobDuration\":\"a\"}],\"metricSpecifications\":[{\"name\":\"xqhabi\",\"displayName\":\"ikxwc\",\"displayDescription\":\"yscnpqxu\",\"unit\":\"vyq\",\"aggregationType\":\"wby\",\"supportedAggregationTypes\":[\"xvd\"],\"supportedTimeGrainTypes\":[\"grtfwvu\",\"xgaudccs\",\"h\"],\"enableRegionalMdmAccount\":true,\"sourceMdmAccount\":\"yejhk\",\"sourceMdmNamespace\":\"htnapczwlokjyem\",\"metricFilterPattern\":\"vnipjox\",\"fillGapWithZero\":false,\"category\":\"hgejspodma\",\"internalMetricName\":\"zyde\",\"dimensions\":[{},{},{},{}],\"lockedAggregationType\":\"yahux\"}]}}}") - .toObject(OperationInner.class); - Assertions.assertEquals("flusarhmof", model.name()); - Assertions.assertEquals("hs", model.display().provider()); - Assertions.assertEquals("yurkdtmlxhekuksj", model.display().resource()); - Assertions.assertEquals("xukcdmpar", model.display().operation()); - Assertions.assertEquals("ryuanzwuxzdxtay", model.display().description()); - Assertions.assertEquals(true, model.isDataAction()); - Assertions.assertEquals("whfpmrqobmtu", model.origin()); - Assertions.assertEquals("tihfx", model.properties().serviceSpecification().logSpecifications().get(0).name()); - Assertions.assertEquals("jbpzvgnwzsymg", - model.properties().serviceSpecification().logSpecifications().get(0).displayName()); - Assertions.assertEquals("uf", - model.properties().serviceSpecification().logSpecifications().get(0).blobDuration()); - Assertions.assertEquals("xqhabi", - model.properties().serviceSpecification().metricSpecifications().get(0).name()); - Assertions.assertEquals("ikxwc", - model.properties().serviceSpecification().metricSpecifications().get(0).displayName()); - Assertions.assertEquals("yscnpqxu", - model.properties().serviceSpecification().metricSpecifications().get(0).displayDescription()); - Assertions.assertEquals("vyq", model.properties().serviceSpecification().metricSpecifications().get(0).unit()); - Assertions.assertEquals("wby", - model.properties().serviceSpecification().metricSpecifications().get(0).aggregationType()); - Assertions.assertEquals("xvd", - model.properties().serviceSpecification().metricSpecifications().get(0).supportedAggregationTypes().get(0)); - Assertions.assertEquals("grtfwvu", - model.properties().serviceSpecification().metricSpecifications().get(0).supportedTimeGrainTypes().get(0)); - Assertions.assertEquals(true, - model.properties().serviceSpecification().metricSpecifications().get(0).enableRegionalMdmAccount()); - Assertions.assertEquals("yejhk", - model.properties().serviceSpecification().metricSpecifications().get(0).sourceMdmAccount()); - Assertions.assertEquals("htnapczwlokjyem", - model.properties().serviceSpecification().metricSpecifications().get(0).sourceMdmNamespace()); - Assertions.assertEquals("vnipjox", - model.properties().serviceSpecification().metricSpecifications().get(0).metricFilterPattern()); - Assertions.assertEquals(false, - model.properties().serviceSpecification().metricSpecifications().get(0).fillGapWithZero()); - Assertions.assertEquals("hgejspodma", - model.properties().serviceSpecification().metricSpecifications().get(0).category()); - Assertions.assertEquals("zyde", - model.properties().serviceSpecification().metricSpecifications().get(0).internalMetricName()); - Assertions.assertEquals("yahux", - model.properties().serviceSpecification().metricSpecifications().get(0).lockedAggregationType()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OperationInner model = new OperationInner().withName("flusarhmof") - .withDisplay(new OperationDisplay().withProvider("hs") - .withResource("yurkdtmlxhekuksj") - .withOperation("xukcdmpar") - .withDescription("ryuanzwuxzdxtay")) - .withIsDataAction(true) - .withOrigin("whfpmrqobmtu") - .withProperties(new OperationProperties().withServiceSpecification(new ServiceSpecification() - .withLogSpecifications(Arrays.asList( - new LogSpecification().withName("tihfx").withDisplayName("jbpzvgnwzsymg").withBlobDuration("uf"), - new LogSpecification().withName("zk").withDisplayName("dbihanufhfcbj").withBlobDuration("a"))) - .withMetricSpecifications(Arrays.asList(new MetricSpecification().withName("xqhabi") - .withDisplayName("ikxwc") - .withDisplayDescription("yscnpqxu") - .withUnit("vyq") - .withAggregationType("wby") - .withSupportedAggregationTypes(Arrays.asList("xvd")) - .withSupportedTimeGrainTypes(Arrays.asList("grtfwvu", "xgaudccs", "h")) - .withEnableRegionalMdmAccount(true) - .withSourceMdmAccount("yejhk") - .withSourceMdmNamespace("htnapczwlokjyem") - .withMetricFilterPattern("vnipjox") - .withFillGapWithZero(false) - .withCategory("hgejspodma") - .withInternalMetricName("zyde") - .withDimensions(Arrays.asList(new MetricDimension(), new MetricDimension(), new MetricDimension(), - new MetricDimension())) - .withLockedAggregationType("yahux"))))); - model = BinaryData.fromObject(model).toObject(OperationInner.class); - Assertions.assertEquals("flusarhmof", model.name()); - Assertions.assertEquals("hs", model.display().provider()); - Assertions.assertEquals("yurkdtmlxhekuksj", model.display().resource()); - Assertions.assertEquals("xukcdmpar", model.display().operation()); - Assertions.assertEquals("ryuanzwuxzdxtay", model.display().description()); - Assertions.assertEquals(true, model.isDataAction()); - Assertions.assertEquals("whfpmrqobmtu", model.origin()); - Assertions.assertEquals("tihfx", model.properties().serviceSpecification().logSpecifications().get(0).name()); - Assertions.assertEquals("jbpzvgnwzsymg", - model.properties().serviceSpecification().logSpecifications().get(0).displayName()); - Assertions.assertEquals("uf", - model.properties().serviceSpecification().logSpecifications().get(0).blobDuration()); - Assertions.assertEquals("xqhabi", - model.properties().serviceSpecification().metricSpecifications().get(0).name()); - Assertions.assertEquals("ikxwc", - model.properties().serviceSpecification().metricSpecifications().get(0).displayName()); - Assertions.assertEquals("yscnpqxu", - model.properties().serviceSpecification().metricSpecifications().get(0).displayDescription()); - Assertions.assertEquals("vyq", model.properties().serviceSpecification().metricSpecifications().get(0).unit()); - Assertions.assertEquals("wby", - model.properties().serviceSpecification().metricSpecifications().get(0).aggregationType()); - Assertions.assertEquals("xvd", - model.properties().serviceSpecification().metricSpecifications().get(0).supportedAggregationTypes().get(0)); - Assertions.assertEquals("grtfwvu", - model.properties().serviceSpecification().metricSpecifications().get(0).supportedTimeGrainTypes().get(0)); - Assertions.assertEquals(true, - model.properties().serviceSpecification().metricSpecifications().get(0).enableRegionalMdmAccount()); - Assertions.assertEquals("yejhk", - model.properties().serviceSpecification().metricSpecifications().get(0).sourceMdmAccount()); - Assertions.assertEquals("htnapczwlokjyem", - model.properties().serviceSpecification().metricSpecifications().get(0).sourceMdmNamespace()); - Assertions.assertEquals("vnipjox", - model.properties().serviceSpecification().metricSpecifications().get(0).metricFilterPattern()); - Assertions.assertEquals(false, - model.properties().serviceSpecification().metricSpecifications().get(0).fillGapWithZero()); - Assertions.assertEquals("hgejspodma", - model.properties().serviceSpecification().metricSpecifications().get(0).category()); - Assertions.assertEquals("zyde", - model.properties().serviceSpecification().metricSpecifications().get(0).internalMetricName()); - Assertions.assertEquals("yahux", - model.properties().serviceSpecification().metricSpecifications().get(0).lockedAggregationType()); - } -} diff --git a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/test/java/com/azure/resourcemanager/mixedreality/generated/OperationPageTests.java b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/test/java/com/azure/resourcemanager/mixedreality/generated/OperationPageTests.java deleted file mode 100644 index de29624caf76..000000000000 --- a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/test/java/com/azure/resourcemanager/mixedreality/generated/OperationPageTests.java +++ /dev/null @@ -1,79 +0,0 @@ -// 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.BinaryData; -import com.azure.resourcemanager.mixedreality.fluent.models.OperationInner; -import com.azure.resourcemanager.mixedreality.models.LogSpecification; -import com.azure.resourcemanager.mixedreality.models.MetricSpecification; -import com.azure.resourcemanager.mixedreality.models.OperationDisplay; -import com.azure.resourcemanager.mixedreality.models.OperationPage; -import com.azure.resourcemanager.mixedreality.models.OperationProperties; -import com.azure.resourcemanager.mixedreality.models.ServiceSpecification; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class OperationPageTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - OperationPage model = BinaryData.fromString( - "{\"value\":[{\"name\":\"quvgjxpybczme\",\"display\":{\"provider\":\"tzopbsphrupidgsy\",\"resource\":\"bejhphoycmsxa\",\"operation\":\"bhdxbm\",\"description\":\"qioqjzehtbmu\"},\"isDataAction\":false,\"origin\":\"noi\",\"properties\":{\"serviceSpecification\":{\"logSpecifications\":[{},{}],\"metricSpecifications\":[{},{},{}]}}},{\"name\":\"qsoqijgkd\",\"display\":{\"provider\":\"pazlobcufpdz\",\"resource\":\"rbt\",\"operation\":\"qqjnqgl\",\"description\":\"qgn\"},\"isDataAction\":true,\"origin\":\"ojywifsqesa\",\"properties\":{\"serviceSpecification\":{\"logSpecifications\":[{},{}],\"metricSpecifications\":[{}]}}},{\"name\":\"lhjxr\",\"display\":{\"provider\":\"kwm\",\"resource\":\"vktsizntocipao\",\"operation\":\"ajpsquc\",\"description\":\"poyfdkfogkn\"},\"isDataAction\":false,\"origin\":\"fjddeqs\",\"properties\":{\"serviceSpecification\":{\"logSpecifications\":[{},{}],\"metricSpecifications\":[{}]}}}],\"nextLink\":\"wreitj\"}") - .toObject(OperationPage.class); - Assertions.assertEquals("quvgjxpybczme", model.value().get(0).name()); - Assertions.assertEquals("tzopbsphrupidgsy", model.value().get(0).display().provider()); - Assertions.assertEquals("bejhphoycmsxa", model.value().get(0).display().resource()); - Assertions.assertEquals("bhdxbm", model.value().get(0).display().operation()); - Assertions.assertEquals("qioqjzehtbmu", model.value().get(0).display().description()); - Assertions.assertEquals(false, model.value().get(0).isDataAction()); - Assertions.assertEquals("noi", model.value().get(0).origin()); - Assertions.assertEquals("wreitj", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OperationPage model = new OperationPage().withValue(Arrays.asList( - new OperationInner().withName("quvgjxpybczme") - .withDisplay(new OperationDisplay().withProvider("tzopbsphrupidgsy") - .withResource("bejhphoycmsxa") - .withOperation("bhdxbm") - .withDescription("qioqjzehtbmu")) - .withIsDataAction(false) - .withOrigin("noi") - .withProperties(new OperationProperties().withServiceSpecification(new ServiceSpecification() - .withLogSpecifications(Arrays.asList(new LogSpecification(), new LogSpecification())) - .withMetricSpecifications(Arrays.asList(new MetricSpecification(), new MetricSpecification(), - new MetricSpecification())))), - new OperationInner().withName("qsoqijgkd") - .withDisplay(new OperationDisplay().withProvider("pazlobcufpdz") - .withResource("rbt") - .withOperation("qqjnqgl") - .withDescription("qgn")) - .withIsDataAction(true) - .withOrigin("ojywifsqesa") - .withProperties(new OperationProperties().withServiceSpecification(new ServiceSpecification() - .withLogSpecifications(Arrays.asList(new LogSpecification(), new LogSpecification())) - .withMetricSpecifications(Arrays.asList(new MetricSpecification())))), - new OperationInner().withName("lhjxr") - .withDisplay(new OperationDisplay().withProvider("kwm") - .withResource("vktsizntocipao") - .withOperation("ajpsquc") - .withDescription("poyfdkfogkn")) - .withIsDataAction(false) - .withOrigin("fjddeqs") - .withProperties(new OperationProperties().withServiceSpecification(new ServiceSpecification() - .withLogSpecifications(Arrays.asList(new LogSpecification(), new LogSpecification())) - .withMetricSpecifications(Arrays.asList(new MetricSpecification())))))) - .withNextLink("wreitj"); - model = BinaryData.fromObject(model).toObject(OperationPage.class); - Assertions.assertEquals("quvgjxpybczme", model.value().get(0).name()); - Assertions.assertEquals("tzopbsphrupidgsy", model.value().get(0).display().provider()); - Assertions.assertEquals("bejhphoycmsxa", model.value().get(0).display().resource()); - Assertions.assertEquals("bhdxbm", model.value().get(0).display().operation()); - Assertions.assertEquals("qioqjzehtbmu", model.value().get(0).display().description()); - Assertions.assertEquals(false, model.value().get(0).isDataAction()); - Assertions.assertEquals("noi", model.value().get(0).origin()); - Assertions.assertEquals("wreitj", model.nextLink()); - } -} diff --git a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/test/java/com/azure/resourcemanager/mixedreality/generated/OperationPropertiesTests.java b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/test/java/com/azure/resourcemanager/mixedreality/generated/OperationPropertiesTests.java deleted file mode 100644 index 2bde668a0235..000000000000 --- a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/test/java/com/azure/resourcemanager/mixedreality/generated/OperationPropertiesTests.java +++ /dev/null @@ -1,159 +0,0 @@ -// 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.BinaryData; -import com.azure.resourcemanager.mixedreality.models.LogSpecification; -import com.azure.resourcemanager.mixedreality.models.MetricDimension; -import com.azure.resourcemanager.mixedreality.models.MetricSpecification; -import com.azure.resourcemanager.mixedreality.models.OperationProperties; -import com.azure.resourcemanager.mixedreality.models.ServiceSpecification; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class OperationPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - OperationProperties model = BinaryData.fromString( - "{\"serviceSpecification\":{\"logSpecifications\":[{\"name\":\"slwejdpvw\",\"displayName\":\"oqpsoa\",\"blobDuration\":\"tazak\"},{\"name\":\"lahbcryff\",\"displayName\":\"dosyg\",\"blobDuration\":\"paojakhmsbzjh\"}],\"metricSpecifications\":[{\"name\":\"vdphlxaolthqtr\",\"displayName\":\"jbp\",\"displayDescription\":\"fsinzgvfcjrwzoxx\",\"unit\":\"felluwfzitonpe\",\"aggregationType\":\"pjkjlxofpdv\",\"supportedAggregationTypes\":[\"xxypininmay\",\"uybbkpodep\",\"oginuvamiheognar\",\"zxtheotusivyevcc\"],\"supportedTimeGrainTypes\":[\"hn\",\"un\"],\"enableRegionalMdmAccount\":true,\"sourceMdmAccount\":\"zrnf\",\"sourceMdmNamespace\":\"xgispemvtzfkufu\",\"metricFilterPattern\":\"jofxqe\",\"fillGapWithZero\":false,\"category\":\"e\",\"internalMetricName\":\"hqjbasvmsmj\",\"dimensions\":[{\"name\":\"gsntnbybkzgcwr\",\"displayName\":\"lxxwrljdouskc\",\"internalName\":\"kocrcjdkwtnhx\",\"toBeExportedForShoebox\":true},{\"name\":\"iksqr\",\"displayName\":\"ssainqpjwnzll\",\"internalName\":\"mppeebvmgxs\",\"toBeExportedForShoebox\":true},{\"name\":\"qduujitcjczdz\",\"displayName\":\"ndhkrw\",\"internalName\":\"appd\",\"toBeExportedForShoebox\":true},{\"name\":\"vwrwj\",\"displayName\":\"usnhutje\",\"internalName\":\"mrldhu\",\"toBeExportedForShoebox\":false}],\"lockedAggregationType\":\"datqxhocdgeabl\"},{\"name\":\"huticndvkao\",\"displayName\":\"yiftyhxhuro\",\"displayDescription\":\"tyxolniwpwc\",\"unit\":\"jfkgiawxk\",\"aggregationType\":\"ypl\",\"supportedAggregationTypes\":[\"basyy\",\"nddhsgcbacph\"],\"supportedTimeGrainTypes\":[\"ot\"],\"enableRegionalMdmAccount\":false,\"sourceMdmAccount\":\"oulzndlikwyq\",\"sourceMdmNamespace\":\"fgibmadgakeq\",\"metricFilterPattern\":\"xybz\",\"fillGapWithZero\":false,\"category\":\"qytbciq\",\"internalMetricName\":\"uflmm\",\"dimensions\":[{\"name\":\"modmglougpb\",\"displayName\":\"tmut\",\"internalName\":\"qktapspwgcuert\",\"toBeExportedForShoebox\":false}],\"lockedAggregationType\":\"o\"}]}}") - .toObject(OperationProperties.class); - Assertions.assertEquals("slwejdpvw", model.serviceSpecification().logSpecifications().get(0).name()); - Assertions.assertEquals("oqpsoa", model.serviceSpecification().logSpecifications().get(0).displayName()); - Assertions.assertEquals("tazak", model.serviceSpecification().logSpecifications().get(0).blobDuration()); - Assertions.assertEquals("vdphlxaolthqtr", model.serviceSpecification().metricSpecifications().get(0).name()); - Assertions.assertEquals("jbp", model.serviceSpecification().metricSpecifications().get(0).displayName()); - Assertions.assertEquals("fsinzgvfcjrwzoxx", - model.serviceSpecification().metricSpecifications().get(0).displayDescription()); - Assertions.assertEquals("felluwfzitonpe", model.serviceSpecification().metricSpecifications().get(0).unit()); - Assertions.assertEquals("pjkjlxofpdv", - model.serviceSpecification().metricSpecifications().get(0).aggregationType()); - Assertions.assertEquals("xxypininmay", - model.serviceSpecification().metricSpecifications().get(0).supportedAggregationTypes().get(0)); - Assertions.assertEquals("hn", - model.serviceSpecification().metricSpecifications().get(0).supportedTimeGrainTypes().get(0)); - Assertions.assertEquals(true, - model.serviceSpecification().metricSpecifications().get(0).enableRegionalMdmAccount()); - Assertions.assertEquals("zrnf", model.serviceSpecification().metricSpecifications().get(0).sourceMdmAccount()); - Assertions.assertEquals("xgispemvtzfkufu", - model.serviceSpecification().metricSpecifications().get(0).sourceMdmNamespace()); - Assertions.assertEquals("jofxqe", - model.serviceSpecification().metricSpecifications().get(0).metricFilterPattern()); - Assertions.assertEquals(false, model.serviceSpecification().metricSpecifications().get(0).fillGapWithZero()); - Assertions.assertEquals("e", model.serviceSpecification().metricSpecifications().get(0).category()); - Assertions.assertEquals("hqjbasvmsmj", - model.serviceSpecification().metricSpecifications().get(0).internalMetricName()); - Assertions.assertEquals("gsntnbybkzgcwr", - model.serviceSpecification().metricSpecifications().get(0).dimensions().get(0).name()); - Assertions.assertEquals("lxxwrljdouskc", - model.serviceSpecification().metricSpecifications().get(0).dimensions().get(0).displayName()); - Assertions.assertEquals("kocrcjdkwtnhx", - model.serviceSpecification().metricSpecifications().get(0).dimensions().get(0).internalName()); - Assertions.assertEquals(true, - model.serviceSpecification().metricSpecifications().get(0).dimensions().get(0).toBeExportedForShoebox()); - Assertions.assertEquals("datqxhocdgeabl", - model.serviceSpecification().metricSpecifications().get(0).lockedAggregationType()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OperationProperties model = new OperationProperties().withServiceSpecification(new ServiceSpecification() - .withLogSpecifications(Arrays - .asList( - new LogSpecification().withName("slwejdpvw").withDisplayName("oqpsoa").withBlobDuration("tazak"), - new LogSpecification() - .withName("lahbcryff") - .withDisplayName("dosyg") - .withBlobDuration("paojakhmsbzjh"))) - .withMetricSpecifications(Arrays.asList( - new MetricSpecification().withName("vdphlxaolthqtr") - .withDisplayName("jbp") - .withDisplayDescription("fsinzgvfcjrwzoxx") - .withUnit("felluwfzitonpe") - .withAggregationType("pjkjlxofpdv") - .withSupportedAggregationTypes( - Arrays.asList("xxypininmay", "uybbkpodep", "oginuvamiheognar", "zxtheotusivyevcc")) - .withSupportedTimeGrainTypes(Arrays.asList("hn", "un")) - .withEnableRegionalMdmAccount(true) - .withSourceMdmAccount("zrnf") - .withSourceMdmNamespace("xgispemvtzfkufu") - .withMetricFilterPattern("jofxqe") - .withFillGapWithZero(false) - .withCategory("e") - .withInternalMetricName("hqjbasvmsmj") - .withDimensions(Arrays.asList( - new MetricDimension().withName("gsntnbybkzgcwr") - .withDisplayName("lxxwrljdouskc") - .withInternalName("kocrcjdkwtnhx") - .withToBeExportedForShoebox(true), - new MetricDimension().withName("iksqr") - .withDisplayName("ssainqpjwnzll") - .withInternalName("mppeebvmgxs") - .withToBeExportedForShoebox(true), - new MetricDimension().withName("qduujitcjczdz") - .withDisplayName("ndhkrw") - .withInternalName("appd") - .withToBeExportedForShoebox(true), - new MetricDimension().withName("vwrwj") - .withDisplayName("usnhutje") - .withInternalName("mrldhu") - .withToBeExportedForShoebox(false))) - .withLockedAggregationType("datqxhocdgeabl"), - new MetricSpecification().withName("huticndvkao") - .withDisplayName("yiftyhxhuro") - .withDisplayDescription("tyxolniwpwc") - .withUnit("jfkgiawxk") - .withAggregationType("ypl") - .withSupportedAggregationTypes(Arrays.asList("basyy", "nddhsgcbacph")) - .withSupportedTimeGrainTypes(Arrays.asList("ot")) - .withEnableRegionalMdmAccount(false) - .withSourceMdmAccount("oulzndlikwyq") - .withSourceMdmNamespace("fgibmadgakeq") - .withMetricFilterPattern("xybz") - .withFillGapWithZero(false) - .withCategory("qytbciq") - .withInternalMetricName("uflmm") - .withDimensions(Arrays.asList(new MetricDimension().withName("modmglougpb") - .withDisplayName("tmut") - .withInternalName("qktapspwgcuert") - .withToBeExportedForShoebox(false))) - .withLockedAggregationType("o")))); - model = BinaryData.fromObject(model).toObject(OperationProperties.class); - Assertions.assertEquals("slwejdpvw", model.serviceSpecification().logSpecifications().get(0).name()); - Assertions.assertEquals("oqpsoa", model.serviceSpecification().logSpecifications().get(0).displayName()); - Assertions.assertEquals("tazak", model.serviceSpecification().logSpecifications().get(0).blobDuration()); - Assertions.assertEquals("vdphlxaolthqtr", model.serviceSpecification().metricSpecifications().get(0).name()); - Assertions.assertEquals("jbp", model.serviceSpecification().metricSpecifications().get(0).displayName()); - Assertions.assertEquals("fsinzgvfcjrwzoxx", - model.serviceSpecification().metricSpecifications().get(0).displayDescription()); - Assertions.assertEquals("felluwfzitonpe", model.serviceSpecification().metricSpecifications().get(0).unit()); - Assertions.assertEquals("pjkjlxofpdv", - model.serviceSpecification().metricSpecifications().get(0).aggregationType()); - Assertions.assertEquals("xxypininmay", - model.serviceSpecification().metricSpecifications().get(0).supportedAggregationTypes().get(0)); - Assertions.assertEquals("hn", - model.serviceSpecification().metricSpecifications().get(0).supportedTimeGrainTypes().get(0)); - Assertions.assertEquals(true, - model.serviceSpecification().metricSpecifications().get(0).enableRegionalMdmAccount()); - Assertions.assertEquals("zrnf", model.serviceSpecification().metricSpecifications().get(0).sourceMdmAccount()); - Assertions.assertEquals("xgispemvtzfkufu", - model.serviceSpecification().metricSpecifications().get(0).sourceMdmNamespace()); - Assertions.assertEquals("jofxqe", - model.serviceSpecification().metricSpecifications().get(0).metricFilterPattern()); - Assertions.assertEquals(false, model.serviceSpecification().metricSpecifications().get(0).fillGapWithZero()); - Assertions.assertEquals("e", model.serviceSpecification().metricSpecifications().get(0).category()); - Assertions.assertEquals("hqjbasvmsmj", - model.serviceSpecification().metricSpecifications().get(0).internalMetricName()); - Assertions.assertEquals("gsntnbybkzgcwr", - model.serviceSpecification().metricSpecifications().get(0).dimensions().get(0).name()); - Assertions.assertEquals("lxxwrljdouskc", - model.serviceSpecification().metricSpecifications().get(0).dimensions().get(0).displayName()); - Assertions.assertEquals("kocrcjdkwtnhx", - model.serviceSpecification().metricSpecifications().get(0).dimensions().get(0).internalName()); - Assertions.assertEquals(true, - model.serviceSpecification().metricSpecifications().get(0).dimensions().get(0).toBeExportedForShoebox()); - Assertions.assertEquals("datqxhocdgeabl", - model.serviceSpecification().metricSpecifications().get(0).lockedAggregationType()); - } -} diff --git a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/test/java/com/azure/resourcemanager/mixedreality/generated/OperationsListMockTests.java b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/test/java/com/azure/resourcemanager/mixedreality/generated/OperationsListMockTests.java deleted file mode 100644 index 0a40ba76fe3c..000000000000 --- a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/test/java/com/azure/resourcemanager/mixedreality/generated/OperationsListMockTests.java +++ /dev/null @@ -1,148 +0,0 @@ -// 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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.mixedreality.MixedRealityManager; -import com.azure.resourcemanager.mixedreality.models.Operation; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class OperationsListMockTests { - @Test - public void testList() throws Exception { - String responseStr - = "{\"value\":[{\"name\":\"d\",\"display\":{\"provider\":\"avxbniwdjswztsdb\",\"resource\":\"gnxytxhpzxbz\",\"operation\":\"fzab\",\"description\":\"lcuhxwtctyqiklb\"},\"isDataAction\":false,\"origin\":\"lwzbhvgyugu\",\"properties\":{\"serviceSpecification\":{\"logSpecifications\":[{\"name\":\"ss\",\"displayName\":\"ukkfplgmgs\",\"blobDuration\":\"kjz\"},{\"name\":\"es\",\"displayName\":\"vlopwiyighx\",\"blobDuration\":\"dwzbaiue\"},{\"name\":\"a\",\"displayName\":\"nyqupedeojnabck\",\"blobDuration\":\"mtxpsiebtfh\"}],\"metricSpecifications\":[{\"name\":\"apskrdqm\",\"displayName\":\"jdhtldwkyzxu\",\"displayDescription\":\"kn\",\"unit\":\"scwsv\",\"aggregationType\":\"otogtwrupqs\",\"supportedAggregationTypes\":[\"micykvceoveilo\"],\"supportedTimeGrainTypes\":[\"tyfjfcnjbkcnxdhb\"],\"enableRegionalMdmAccount\":true,\"sourceMdmAccount\":\"h\",\"sourceMdmNamespace\":\"pnvjtoqnermclf\",\"metricFilterPattern\":\"phoxus\",\"fillGapWithZero\":false,\"category\":\"bgyepsbj\",\"internalMetricName\":\"zq\",\"dimensions\":[{},{},{},{}],\"lockedAggregationType\":\"wpmueefj\"}]}}}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MixedRealityManager manager = MixedRealityManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = manager.operations().list(com.azure.core.util.Context.NONE); - - Assertions.assertEquals("d", response.iterator().next().name()); - Assertions.assertEquals("avxbniwdjswztsdb", response.iterator().next().display().provider()); - Assertions.assertEquals("gnxytxhpzxbz", response.iterator().next().display().resource()); - Assertions.assertEquals("fzab", response.iterator().next().display().operation()); - Assertions.assertEquals("lcuhxwtctyqiklb", response.iterator().next().display().description()); - Assertions.assertEquals(false, response.iterator().next().isDataAction()); - Assertions.assertEquals("lwzbhvgyugu", response.iterator().next().origin()); - Assertions.assertEquals("ss", - response.iterator().next().properties().serviceSpecification().logSpecifications().get(0).name()); - Assertions.assertEquals("ukkfplgmgs", - response.iterator().next().properties().serviceSpecification().logSpecifications().get(0).displayName()); - Assertions.assertEquals("kjz", - response.iterator().next().properties().serviceSpecification().logSpecifications().get(0).blobDuration()); - Assertions.assertEquals("apskrdqm", - response.iterator().next().properties().serviceSpecification().metricSpecifications().get(0).name()); - Assertions.assertEquals("jdhtldwkyzxu", - response.iterator().next().properties().serviceSpecification().metricSpecifications().get(0).displayName()); - Assertions.assertEquals("kn", - response.iterator() - .next() - .properties() - .serviceSpecification() - .metricSpecifications() - .get(0) - .displayDescription()); - Assertions.assertEquals("scwsv", - response.iterator().next().properties().serviceSpecification().metricSpecifications().get(0).unit()); - Assertions.assertEquals("otogtwrupqs", - response.iterator() - .next() - .properties() - .serviceSpecification() - .metricSpecifications() - .get(0) - .aggregationType()); - Assertions.assertEquals("micykvceoveilo", - response.iterator() - .next() - .properties() - .serviceSpecification() - .metricSpecifications() - .get(0) - .supportedAggregationTypes() - .get(0)); - Assertions.assertEquals("tyfjfcnjbkcnxdhb", - response.iterator() - .next() - .properties() - .serviceSpecification() - .metricSpecifications() - .get(0) - .supportedTimeGrainTypes() - .get(0)); - Assertions.assertEquals(true, - response.iterator() - .next() - .properties() - .serviceSpecification() - .metricSpecifications() - .get(0) - .enableRegionalMdmAccount()); - Assertions.assertEquals("h", - response.iterator() - .next() - .properties() - .serviceSpecification() - .metricSpecifications() - .get(0) - .sourceMdmAccount()); - Assertions.assertEquals("pnvjtoqnermclf", - response.iterator() - .next() - .properties() - .serviceSpecification() - .metricSpecifications() - .get(0) - .sourceMdmNamespace()); - Assertions.assertEquals("phoxus", - response.iterator() - .next() - .properties() - .serviceSpecification() - .metricSpecifications() - .get(0) - .metricFilterPattern()); - Assertions.assertEquals(false, - response.iterator() - .next() - .properties() - .serviceSpecification() - .metricSpecifications() - .get(0) - .fillGapWithZero()); - Assertions.assertEquals("bgyepsbj", - response.iterator().next().properties().serviceSpecification().metricSpecifications().get(0).category()); - Assertions.assertEquals("zq", - response.iterator() - .next() - .properties() - .serviceSpecification() - .metricSpecifications() - .get(0) - .internalMetricName()); - Assertions.assertEquals("wpmueefj", - response.iterator() - .next() - .properties() - .serviceSpecification() - .metricSpecifications() - .get(0) - .lockedAggregationType()); - } -} diff --git a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/test/java/com/azure/resourcemanager/mixedreality/generated/RemoteRenderingAccountInnerTests.java b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/test/java/com/azure/resourcemanager/mixedreality/generated/RemoteRenderingAccountInnerTests.java deleted file mode 100644 index 46518c38f974..000000000000 --- a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/test/java/com/azure/resourcemanager/mixedreality/generated/RemoteRenderingAccountInnerTests.java +++ /dev/null @@ -1,87 +0,0 @@ -// 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.BinaryData; -import com.azure.resourcemanager.mixedreality.fluent.models.RemoteRenderingAccountInner; -import com.azure.resourcemanager.mixedreality.models.Identity; -import com.azure.resourcemanager.mixedreality.models.ResourceIdentityType; -import com.azure.resourcemanager.mixedreality.models.Sku; -import com.azure.resourcemanager.mixedreality.models.SkuTier; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class RemoteRenderingAccountInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - RemoteRenderingAccountInner model = BinaryData.fromString( - "{\"properties\":{\"storageAccountName\":\"jyoxgvclt\",\"accountId\":\"sncghkjeszz\",\"accountDomain\":\"ijhtxf\"},\"identity\":{\"principalId\":\"bfs\",\"tenantId\":\"nehmpvecx\",\"type\":\"SystemAssigned\"},\"plan\":{\"principalId\":\"fqkkr\",\"tenantId\":\"pukgriwflzlfb\",\"type\":\"SystemAssigned\"},\"sku\":{\"name\":\"zycispn\",\"tier\":\"Basic\",\"size\":\"mgkbrpyydhibn\",\"family\":\"qkpikadrgvtqagnb\",\"capacity\":855671205},\"kind\":{\"name\":\"ijggmebfsiar\",\"tier\":\"Standard\",\"size\":\"cvpnazzmhjrunmpx\",\"family\":\"dbhrbnlankxm\",\"capacity\":266718281},\"location\":\"bhenbtkcxywnyt\",\"tags\":{\"qidybyx\":\"yn\",\"aaxdbabphlwrq\":\"zfcl\",\"hsucoc\":\"fkts\",\"ckzywbiexzfeyue\":\"nyyazttbtwwrqpue\"},\"id\":\"xibxujwbhqwalm\",\"name\":\"zyoxaepdkzjan\",\"type\":\"ux\"}") - .toObject(RemoteRenderingAccountInner.class); - Assertions.assertEquals("bhenbtkcxywnyt", model.location()); - Assertions.assertEquals("yn", model.tags().get("qidybyx")); - Assertions.assertEquals(ResourceIdentityType.SYSTEM_ASSIGNED, model.identity().type()); - Assertions.assertEquals(ResourceIdentityType.SYSTEM_ASSIGNED, model.plan().type()); - Assertions.assertEquals("zycispn", model.sku().name()); - Assertions.assertEquals(SkuTier.BASIC, model.sku().tier()); - Assertions.assertEquals("mgkbrpyydhibn", model.sku().size()); - Assertions.assertEquals("qkpikadrgvtqagnb", model.sku().family()); - Assertions.assertEquals(855671205, model.sku().capacity()); - Assertions.assertEquals("ijggmebfsiar", model.kind().name()); - Assertions.assertEquals(SkuTier.STANDARD, model.kind().tier()); - Assertions.assertEquals("cvpnazzmhjrunmpx", model.kind().size()); - Assertions.assertEquals("dbhrbnlankxm", model.kind().family()); - Assertions.assertEquals(266718281, model.kind().capacity()); - Assertions.assertEquals("jyoxgvclt", model.storageAccountName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - RemoteRenderingAccountInner model = new RemoteRenderingAccountInner().withLocation("bhenbtkcxywnyt") - .withTags(mapOf("qidybyx", "yn", "aaxdbabphlwrq", "zfcl", "hsucoc", "fkts", "ckzywbiexzfeyue", - "nyyazttbtwwrqpue")) - .withIdentity(new Identity().withType(ResourceIdentityType.SYSTEM_ASSIGNED)) - .withPlan(new Identity().withType(ResourceIdentityType.SYSTEM_ASSIGNED)) - .withSku(new Sku().withName("zycispn") - .withTier(SkuTier.BASIC) - .withSize("mgkbrpyydhibn") - .withFamily("qkpikadrgvtqagnb") - .withCapacity(855671205)) - .withKind(new Sku().withName("ijggmebfsiar") - .withTier(SkuTier.STANDARD) - .withSize("cvpnazzmhjrunmpx") - .withFamily("dbhrbnlankxm") - .withCapacity(266718281)) - .withStorageAccountName("jyoxgvclt"); - model = BinaryData.fromObject(model).toObject(RemoteRenderingAccountInner.class); - Assertions.assertEquals("bhenbtkcxywnyt", model.location()); - Assertions.assertEquals("yn", model.tags().get("qidybyx")); - Assertions.assertEquals(ResourceIdentityType.SYSTEM_ASSIGNED, model.identity().type()); - Assertions.assertEquals(ResourceIdentityType.SYSTEM_ASSIGNED, model.plan().type()); - Assertions.assertEquals("zycispn", model.sku().name()); - Assertions.assertEquals(SkuTier.BASIC, model.sku().tier()); - Assertions.assertEquals("mgkbrpyydhibn", model.sku().size()); - Assertions.assertEquals("qkpikadrgvtqagnb", model.sku().family()); - Assertions.assertEquals(855671205, model.sku().capacity()); - Assertions.assertEquals("ijggmebfsiar", model.kind().name()); - Assertions.assertEquals(SkuTier.STANDARD, model.kind().tier()); - Assertions.assertEquals("cvpnazzmhjrunmpx", model.kind().size()); - Assertions.assertEquals("dbhrbnlankxm", model.kind().family()); - Assertions.assertEquals(266718281, model.kind().capacity()); - Assertions.assertEquals("jyoxgvclt", model.storageAccountName()); - } - - // Use "Map.of" if available - @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/test/java/com/azure/resourcemanager/mixedreality/generated/RemoteRenderingAccountPageTests.java b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/test/java/com/azure/resourcemanager/mixedreality/generated/RemoteRenderingAccountPageTests.java deleted file mode 100644 index 9b559186f586..000000000000 --- a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/test/java/com/azure/resourcemanager/mixedreality/generated/RemoteRenderingAccountPageTests.java +++ /dev/null @@ -1,122 +0,0 @@ -// 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.BinaryData; -import com.azure.resourcemanager.mixedreality.fluent.models.RemoteRenderingAccountInner; -import com.azure.resourcemanager.mixedreality.models.Identity; -import com.azure.resourcemanager.mixedreality.models.RemoteRenderingAccountPage; -import com.azure.resourcemanager.mixedreality.models.ResourceIdentityType; -import com.azure.resourcemanager.mixedreality.models.Sku; -import com.azure.resourcemanager.mixedreality.models.SkuTier; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class RemoteRenderingAccountPageTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - RemoteRenderingAccountPage model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"storageAccountName\":\"yzydagfuaxbezyi\",\"accountId\":\"kktwhrdxw\",\"accountDomain\":\"wqsmbsur\"},\"identity\":{\"principalId\":\"moryocfsfksym\",\"tenantId\":\"ys\",\"type\":\"SystemAssigned\"},\"plan\":{\"principalId\":\"xhqyudxorrqnb\",\"tenantId\":\"czvyifq\",\"type\":\"SystemAssigned\"},\"sku\":{\"name\":\"vjsllrmvvdfw\",\"tier\":\"Premium\",\"size\":\"n\",\"family\":\"lexxbczwtru\",\"capacity\":223654021},\"kind\":{\"name\":\"bq\",\"tier\":\"Premium\",\"size\":\"vmyokacspkwl\",\"family\":\"dobpxjmflbvvn\",\"capacity\":1044580515},\"location\":\"cciw\",\"tags\":{\"foskghsauuimj\":\"uqkhrsajiwku\"},\"id\":\"vxieduugidyj\",\"name\":\"rfbyaosvexcso\",\"type\":\"pclhocohslk\"},{\"properties\":{\"storageAccountName\":\"eggzfb\",\"accountId\":\"fmvfaxkffeiit\",\"accountDomain\":\"vmezy\"},\"identity\":{\"principalId\":\"xmzsbbzogg\",\"tenantId\":\"rxwburv\",\"type\":\"SystemAssigned\"},\"plan\":{\"principalId\":\"spyd\",\"tenantId\":\"koen\",\"type\":\"SystemAssigned\"},\"sku\":{\"name\":\"nvudwtiukb\",\"tier\":\"Standard\",\"size\":\"kpoc\",\"family\":\"azyxoegukg\",\"capacity\":642461794},\"kind\":{\"name\":\"ucgygevqz\",\"tier\":\"Free\",\"size\":\"mrbpizcdrqj\",\"family\":\"pyd\",\"capacity\":1305817330},\"location\":\"xdeoejzic\",\"tags\":{\"bkh\":\"sjttgzfbish\"},\"id\":\"jdeyeamdpha\",\"name\":\"alpbuxwgipwhon\",\"type\":\"wkgshwa\"},{\"properties\":{\"storageAccountName\":\"xzbinjeputt\",\"accountId\":\"ywnuzoq\",\"accountDomain\":\"iyqzrnk\"},\"identity\":{\"principalId\":\"yx\",\"tenantId\":\"hzls\",\"type\":\"SystemAssigned\"},\"plan\":{\"principalId\":\"qqn\",\"tenantId\":\"lryav\",\"type\":\"SystemAssigned\"},\"sku\":{\"name\":\"unmmq\",\"tier\":\"Free\",\"size\":\"zko\",\"family\":\"cukoklyaxuconu\",\"capacity\":447504444},\"kind\":{\"name\":\"kbeype\",\"tier\":\"Standard\",\"size\":\"mwvvjektcxsenhw\",\"family\":\"s\",\"capacity\":1160903159},\"location\":\"pwvlqdq\",\"tags\":{\"fcivfsnkym\":\"qylihkaetckt\",\"jf\":\"ctq\",\"fuwutttxf\":\"ebrjcxe\"},\"id\":\"jrbirphxepcyv\",\"name\":\"hfnljkyq\",\"type\":\"j\"}],\"nextLink\":\"ujqgidok\"}") - .toObject(RemoteRenderingAccountPage.class); - Assertions.assertEquals("cciw", model.value().get(0).location()); - Assertions.assertEquals("uqkhrsajiwku", model.value().get(0).tags().get("foskghsauuimj")); - Assertions.assertEquals(ResourceIdentityType.SYSTEM_ASSIGNED, model.value().get(0).identity().type()); - Assertions.assertEquals(ResourceIdentityType.SYSTEM_ASSIGNED, model.value().get(0).plan().type()); - Assertions.assertEquals("vjsllrmvvdfw", model.value().get(0).sku().name()); - Assertions.assertEquals(SkuTier.PREMIUM, model.value().get(0).sku().tier()); - Assertions.assertEquals("n", model.value().get(0).sku().size()); - Assertions.assertEquals("lexxbczwtru", model.value().get(0).sku().family()); - Assertions.assertEquals(223654021, model.value().get(0).sku().capacity()); - Assertions.assertEquals("bq", model.value().get(0).kind().name()); - Assertions.assertEquals(SkuTier.PREMIUM, model.value().get(0).kind().tier()); - Assertions.assertEquals("vmyokacspkwl", model.value().get(0).kind().size()); - Assertions.assertEquals("dobpxjmflbvvn", model.value().get(0).kind().family()); - Assertions.assertEquals(1044580515, model.value().get(0).kind().capacity()); - Assertions.assertEquals("yzydagfuaxbezyi", model.value().get(0).storageAccountName()); - Assertions.assertEquals("ujqgidok", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - RemoteRenderingAccountPage model = new RemoteRenderingAccountPage().withValue(Arrays.asList( - new RemoteRenderingAccountInner().withLocation("cciw") - .withTags(mapOf("foskghsauuimj", "uqkhrsajiwku")) - .withIdentity(new Identity().withType(ResourceIdentityType.SYSTEM_ASSIGNED)) - .withPlan(new Identity().withType(ResourceIdentityType.SYSTEM_ASSIGNED)) - .withSku(new Sku().withName("vjsllrmvvdfw") - .withTier(SkuTier.PREMIUM) - .withSize("n") - .withFamily("lexxbczwtru") - .withCapacity(223654021)) - .withKind(new Sku().withName("bq") - .withTier(SkuTier.PREMIUM) - .withSize("vmyokacspkwl") - .withFamily("dobpxjmflbvvn") - .withCapacity(1044580515)) - .withStorageAccountName("yzydagfuaxbezyi"), - new RemoteRenderingAccountInner().withLocation("xdeoejzic") - .withTags(mapOf("bkh", "sjttgzfbish")) - .withIdentity(new Identity().withType(ResourceIdentityType.SYSTEM_ASSIGNED)) - .withPlan(new Identity().withType(ResourceIdentityType.SYSTEM_ASSIGNED)) - .withSku(new Sku().withName("nvudwtiukb") - .withTier(SkuTier.STANDARD) - .withSize("kpoc") - .withFamily("azyxoegukg") - .withCapacity(642461794)) - .withKind(new Sku().withName("ucgygevqz") - .withTier(SkuTier.FREE) - .withSize("mrbpizcdrqj") - .withFamily("pyd") - .withCapacity(1305817330)) - .withStorageAccountName("eggzfb"), - new RemoteRenderingAccountInner().withLocation("pwvlqdq") - .withTags(mapOf("fcivfsnkym", "qylihkaetckt", "jf", "ctq", "fuwutttxf", "ebrjcxe")) - .withIdentity(new Identity().withType(ResourceIdentityType.SYSTEM_ASSIGNED)) - .withPlan(new Identity().withType(ResourceIdentityType.SYSTEM_ASSIGNED)) - .withSku(new Sku().withName("unmmq") - .withTier(SkuTier.FREE) - .withSize("zko") - .withFamily("cukoklyaxuconu") - .withCapacity(447504444)) - .withKind(new Sku().withName("kbeype") - .withTier(SkuTier.STANDARD) - .withSize("mwvvjektcxsenhw") - .withFamily("s") - .withCapacity(1160903159)) - .withStorageAccountName("xzbinjeputt"))) - .withNextLink("ujqgidok"); - model = BinaryData.fromObject(model).toObject(RemoteRenderingAccountPage.class); - Assertions.assertEquals("cciw", model.value().get(0).location()); - Assertions.assertEquals("uqkhrsajiwku", model.value().get(0).tags().get("foskghsauuimj")); - Assertions.assertEquals(ResourceIdentityType.SYSTEM_ASSIGNED, model.value().get(0).identity().type()); - Assertions.assertEquals(ResourceIdentityType.SYSTEM_ASSIGNED, model.value().get(0).plan().type()); - Assertions.assertEquals("vjsllrmvvdfw", model.value().get(0).sku().name()); - Assertions.assertEquals(SkuTier.PREMIUM, model.value().get(0).sku().tier()); - Assertions.assertEquals("n", model.value().get(0).sku().size()); - Assertions.assertEquals("lexxbczwtru", model.value().get(0).sku().family()); - Assertions.assertEquals(223654021, model.value().get(0).sku().capacity()); - Assertions.assertEquals("bq", model.value().get(0).kind().name()); - Assertions.assertEquals(SkuTier.PREMIUM, model.value().get(0).kind().tier()); - Assertions.assertEquals("vmyokacspkwl", model.value().get(0).kind().size()); - Assertions.assertEquals("dobpxjmflbvvn", model.value().get(0).kind().family()); - Assertions.assertEquals(1044580515, model.value().get(0).kind().capacity()); - Assertions.assertEquals("yzydagfuaxbezyi", model.value().get(0).storageAccountName()); - Assertions.assertEquals("ujqgidok", model.nextLink()); - } - - // Use "Map.of" if available - @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/test/java/com/azure/resourcemanager/mixedreality/generated/RemoteRenderingAccountsCreateWithResponseMockTests.java b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/test/java/com/azure/resourcemanager/mixedreality/generated/RemoteRenderingAccountsCreateWithResponseMockTests.java deleted file mode 100644 index fbe3b8a07809..000000000000 --- a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/test/java/com/azure/resourcemanager/mixedreality/generated/RemoteRenderingAccountsCreateWithResponseMockTests.java +++ /dev/null @@ -1,88 +0,0 @@ -// 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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.mixedreality.MixedRealityManager; -import com.azure.resourcemanager.mixedreality.models.Identity; -import com.azure.resourcemanager.mixedreality.models.RemoteRenderingAccount; -import com.azure.resourcemanager.mixedreality.models.ResourceIdentityType; -import com.azure.resourcemanager.mixedreality.models.Sku; -import com.azure.resourcemanager.mixedreality.models.SkuTier; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class RemoteRenderingAccountsCreateWithResponseMockTests { - @Test - public void testCreateWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"storageAccountName\":\"lyc\",\"accountId\":\"uhpkxkgymar\",\"accountDomain\":\"n\"},\"identity\":{\"principalId\":\"qugjhkycube\",\"tenantId\":\"gssofwq\",\"type\":\"SystemAssigned\"},\"plan\":{\"principalId\":\"krmnjijpxacqqud\",\"tenantId\":\"byxbaaabjy\",\"type\":\"SystemAssigned\"},\"sku\":{\"name\":\"fimrzrtuzqogse\",\"tier\":\"Standard\",\"size\":\"fdnw\",\"family\":\"mewzsyyc\",\"capacity\":1576556557},\"kind\":{\"name\":\"oibjudpfrxtrthz\",\"tier\":\"Free\",\"size\":\"dwkqbrq\",\"family\":\"paxh\",\"capacity\":1580176854},\"location\":\"livpdt\",\"tags\":{\"d\":\"q\"},\"id\":\"oaxoruzfgsqu\",\"name\":\"fxrxxle\",\"type\":\"tramxjez\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MixedRealityManager manager = MixedRealityManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - RemoteRenderingAccount response = manager.remoteRenderingAccounts() - .define("edndr") - .withRegion("l") - .withExistingResourceGroup("hyrnxxmu") - .withTags(mapOf("ag", "v", "cktqumiekkezzi", "rvimjwosytxitcsk", "bdunygaeqid", "hlyfjhdgqgg", "a", - "qfatpxllrxcyjm")) - .withIdentity(new Identity().withType(ResourceIdentityType.SYSTEM_ASSIGNED)) - .withPlan(new Identity().withType(ResourceIdentityType.SYSTEM_ASSIGNED)) - .withSku(new Sku().withName("eyfkzikfja") - .withTier(SkuTier.STANDARD) - .withSize("ivx") - .withFamily("zel") - .withCapacity(1240770029)) - .withKind(new Sku().withName("elsfeaen") - .withTier(SkuTier.PREMIUM) - .withSize("atklddxbjhwuaa") - .withFamily("zjosp") - .withCapacity(1616817744)) - .withStorageAccountName("tkwqqtchealm") - .create(); - - Assertions.assertEquals("livpdt", response.location()); - Assertions.assertEquals("q", response.tags().get("d")); - Assertions.assertEquals(ResourceIdentityType.SYSTEM_ASSIGNED, response.identity().type()); - Assertions.assertEquals(ResourceIdentityType.SYSTEM_ASSIGNED, response.plan().type()); - Assertions.assertEquals("fimrzrtuzqogse", response.sku().name()); - Assertions.assertEquals(SkuTier.STANDARD, response.sku().tier()); - Assertions.assertEquals("fdnw", response.sku().size()); - Assertions.assertEquals("mewzsyyc", response.sku().family()); - Assertions.assertEquals(1576556557, response.sku().capacity()); - Assertions.assertEquals("oibjudpfrxtrthz", response.kind().name()); - Assertions.assertEquals(SkuTier.FREE, response.kind().tier()); - Assertions.assertEquals("dwkqbrq", response.kind().size()); - Assertions.assertEquals("paxh", response.kind().family()); - Assertions.assertEquals(1580176854, response.kind().capacity()); - Assertions.assertEquals("lyc", response.storageAccountName()); - } - - // Use "Map.of" if available - @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/test/java/com/azure/resourcemanager/mixedreality/generated/RemoteRenderingAccountsDeleteByResourceGroupWithResponseMockTests.java b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/test/java/com/azure/resourcemanager/mixedreality/generated/RemoteRenderingAccountsDeleteByResourceGroupWithResponseMockTests.java deleted file mode 100644 index a01326542477..000000000000 --- a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/test/java/com/azure/resourcemanager/mixedreality/generated/RemoteRenderingAccountsDeleteByResourceGroupWithResponseMockTests.java +++ /dev/null @@ -1,34 +0,0 @@ -// 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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.mixedreality.MixedRealityManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class RemoteRenderingAccountsDeleteByResourceGroupWithResponseMockTests { - @Test - public void testDeleteWithResponse() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MixedRealityManager manager = MixedRealityManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.remoteRenderingAccounts() - .deleteByResourceGroupWithResponse("koymkcd", "h", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/test/java/com/azure/resourcemanager/mixedreality/generated/RemoteRenderingAccountsGetByResourceGroupWithResponseMockTests.java b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/test/java/com/azure/resourcemanager/mixedreality/generated/RemoteRenderingAccountsGetByResourceGroupWithResponseMockTests.java deleted file mode 100644 index 6f06b83b1145..000000000000 --- a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/test/java/com/azure/resourcemanager/mixedreality/generated/RemoteRenderingAccountsGetByResourceGroupWithResponseMockTests.java +++ /dev/null @@ -1,55 +0,0 @@ -// 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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.mixedreality.MixedRealityManager; -import com.azure.resourcemanager.mixedreality.models.RemoteRenderingAccount; -import com.azure.resourcemanager.mixedreality.models.ResourceIdentityType; -import com.azure.resourcemanager.mixedreality.models.SkuTier; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class RemoteRenderingAccountsGetByResourceGroupWithResponseMockTests { - @Test - public void testGetByResourceGroupWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"storageAccountName\":\"ywsuwsy\",\"accountId\":\"ndsytgadg\",\"accountDomain\":\"aeaeneqnzarrw\"},\"identity\":{\"principalId\":\"uijfqk\",\"tenantId\":\"e\",\"type\":\"SystemAssigned\"},\"plan\":{\"principalId\":\"pubjibw\",\"tenantId\":\"f\",\"type\":\"SystemAssigned\"},\"sku\":{\"name\":\"kvpuvksgplsaknyn\",\"tier\":\"Free\",\"size\":\"ljphuopxodl\",\"family\":\"ynt\",\"capacity\":863114887},\"kind\":{\"name\":\"hleosjsw\",\"tier\":\"Premium\",\"size\":\"lyzrpzbchckqqzqi\",\"family\":\"iysui\",\"capacity\":2121235922},\"location\":\"ked\",\"tags\":{\"pyy\":\"rwyhqmibzyhwitsm\",\"mwzn\":\"pcdpumnz\",\"rgjhxb\":\"abikns\"},\"id\":\"dtlwwrlkd\",\"name\":\"tncvokot\",\"type\":\"lxdy\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MixedRealityManager manager = MixedRealityManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - RemoteRenderingAccount response = manager.remoteRenderingAccounts() - .getByResourceGroupWithResponse("pkkpw", "reqnovvqfov", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("ked", response.location()); - Assertions.assertEquals("rwyhqmibzyhwitsm", response.tags().get("pyy")); - Assertions.assertEquals(ResourceIdentityType.SYSTEM_ASSIGNED, response.identity().type()); - Assertions.assertEquals(ResourceIdentityType.SYSTEM_ASSIGNED, response.plan().type()); - Assertions.assertEquals("kvpuvksgplsaknyn", response.sku().name()); - Assertions.assertEquals(SkuTier.FREE, response.sku().tier()); - Assertions.assertEquals("ljphuopxodl", response.sku().size()); - Assertions.assertEquals("ynt", response.sku().family()); - Assertions.assertEquals(863114887, response.sku().capacity()); - Assertions.assertEquals("hleosjsw", response.kind().name()); - Assertions.assertEquals(SkuTier.PREMIUM, response.kind().tier()); - Assertions.assertEquals("lyzrpzbchckqqzqi", response.kind().size()); - Assertions.assertEquals("iysui", response.kind().family()); - Assertions.assertEquals(2121235922, response.kind().capacity()); - Assertions.assertEquals("ywsuwsy", response.storageAccountName()); - } -} diff --git a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/test/java/com/azure/resourcemanager/mixedreality/generated/RemoteRenderingAccountsListByResourceGroupMockTests.java b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/test/java/com/azure/resourcemanager/mixedreality/generated/RemoteRenderingAccountsListByResourceGroupMockTests.java deleted file mode 100644 index 860ea4336c97..000000000000 --- a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/test/java/com/azure/resourcemanager/mixedreality/generated/RemoteRenderingAccountsListByResourceGroupMockTests.java +++ /dev/null @@ -1,55 +0,0 @@ -// 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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.mixedreality.MixedRealityManager; -import com.azure.resourcemanager.mixedreality.models.RemoteRenderingAccount; -import com.azure.resourcemanager.mixedreality.models.ResourceIdentityType; -import com.azure.resourcemanager.mixedreality.models.SkuTier; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class RemoteRenderingAccountsListByResourceGroupMockTests { - @Test - public void testListByResourceGroup() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"storageAccountName\":\"sluicpdggkzz\",\"accountId\":\"mbmpaxmodfvuefy\",\"accountDomain\":\"bpfvm\"},\"identity\":{\"principalId\":\"rfouyftaakcpw\",\"tenantId\":\"zvqtmnubexkp\",\"type\":\"SystemAssigned\"},\"plan\":{\"principalId\":\"ndjmquxvyp\",\"tenantId\":\"gkopkwhojvpajqgx\",\"type\":\"SystemAssigned\"},\"sku\":{\"name\":\"cmbqfqvmk\",\"tier\":\"Free\",\"size\":\"apvhelxprgly\",\"family\":\"dd\",\"capacity\":1454263457},\"kind\":{\"name\":\"cuejrjxgci\",\"tier\":\"Free\",\"size\":\"hos\",\"family\":\"dqrhzoymib\",\"capacity\":1056733583},\"location\":\"ibahwflus\",\"tags\":{\"expbtg\":\"mhrkwofyyvoqacp\",\"nwashrtd\":\"wbwo\",\"ulpiuj\":\"kcnqxwbpo\",\"obyu\":\"aasipqi\"},\"id\":\"erpqlpqwcciuqg\",\"name\":\"dbutauvfbtkuwhh\",\"type\":\"hykojoxafnndlpic\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MixedRealityManager manager = MixedRealityManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response - = manager.remoteRenderingAccounts().listByResourceGroup("rpkhjwn", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("ibahwflus", response.iterator().next().location()); - Assertions.assertEquals("mhrkwofyyvoqacp", response.iterator().next().tags().get("expbtg")); - Assertions.assertEquals(ResourceIdentityType.SYSTEM_ASSIGNED, response.iterator().next().identity().type()); - Assertions.assertEquals(ResourceIdentityType.SYSTEM_ASSIGNED, response.iterator().next().plan().type()); - Assertions.assertEquals("cmbqfqvmk", response.iterator().next().sku().name()); - Assertions.assertEquals(SkuTier.FREE, response.iterator().next().sku().tier()); - Assertions.assertEquals("apvhelxprgly", response.iterator().next().sku().size()); - Assertions.assertEquals("dd", response.iterator().next().sku().family()); - Assertions.assertEquals(1454263457, response.iterator().next().sku().capacity()); - Assertions.assertEquals("cuejrjxgci", response.iterator().next().kind().name()); - Assertions.assertEquals(SkuTier.FREE, response.iterator().next().kind().tier()); - Assertions.assertEquals("hos", response.iterator().next().kind().size()); - Assertions.assertEquals("dqrhzoymib", response.iterator().next().kind().family()); - Assertions.assertEquals(1056733583, response.iterator().next().kind().capacity()); - Assertions.assertEquals("sluicpdggkzz", response.iterator().next().storageAccountName()); - } -} diff --git a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/test/java/com/azure/resourcemanager/mixedreality/generated/RemoteRenderingAccountsListMockTests.java b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/test/java/com/azure/resourcemanager/mixedreality/generated/RemoteRenderingAccountsListMockTests.java deleted file mode 100644 index 5320bda9894e..000000000000 --- a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/test/java/com/azure/resourcemanager/mixedreality/generated/RemoteRenderingAccountsListMockTests.java +++ /dev/null @@ -1,55 +0,0 @@ -// 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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.mixedreality.MixedRealityManager; -import com.azure.resourcemanager.mixedreality.models.RemoteRenderingAccount; -import com.azure.resourcemanager.mixedreality.models.ResourceIdentityType; -import com.azure.resourcemanager.mixedreality.models.SkuTier; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class RemoteRenderingAccountsListMockTests { - @Test - public void testList() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"storageAccountName\":\"mubyynt\",\"accountId\":\"rbqtkoie\",\"accountDomain\":\"eotg\"},\"identity\":{\"principalId\":\"ltmuwlauwzizx\",\"tenantId\":\"pgcjefuzmuvp\",\"type\":\"SystemAssigned\"},\"plan\":{\"principalId\":\"morppxebmnzbtbh\",\"tenantId\":\"glkfg\",\"type\":\"SystemAssigned\"},\"sku\":{\"name\":\"euel\",\"tier\":\"Free\",\"size\":\"dyhtozfikdowwquu\",\"family\":\"zx\",\"capacity\":1297043875},\"kind\":{\"name\":\"thhqzonosggbh\",\"tier\":\"Premium\",\"size\":\"wdsjnkalju\",\"family\":\"iswac\",\"capacity\":916120827},\"location\":\"k\",\"tags\":{\"ppfufl\":\"wkfvhqcrailvp\",\"gafcnihgwqapnedg\":\"wdmhdlxyjrxs\",\"cvdrhvoodsot\":\"bcvkcvqvpkeq\"},\"id\":\"obzdopcjwvnhdl\",\"name\":\"wmgxcxrsl\",\"type\":\"mutwuoe\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MixedRealityManager manager = MixedRealityManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response - = manager.remoteRenderingAccounts().list(com.azure.core.util.Context.NONE); - - Assertions.assertEquals("k", response.iterator().next().location()); - Assertions.assertEquals("wkfvhqcrailvp", response.iterator().next().tags().get("ppfufl")); - Assertions.assertEquals(ResourceIdentityType.SYSTEM_ASSIGNED, response.iterator().next().identity().type()); - Assertions.assertEquals(ResourceIdentityType.SYSTEM_ASSIGNED, response.iterator().next().plan().type()); - Assertions.assertEquals("euel", response.iterator().next().sku().name()); - Assertions.assertEquals(SkuTier.FREE, response.iterator().next().sku().tier()); - Assertions.assertEquals("dyhtozfikdowwquu", response.iterator().next().sku().size()); - Assertions.assertEquals("zx", response.iterator().next().sku().family()); - Assertions.assertEquals(1297043875, response.iterator().next().sku().capacity()); - Assertions.assertEquals("thhqzonosggbh", response.iterator().next().kind().name()); - Assertions.assertEquals(SkuTier.PREMIUM, response.iterator().next().kind().tier()); - Assertions.assertEquals("wdsjnkalju", response.iterator().next().kind().size()); - Assertions.assertEquals("iswac", response.iterator().next().kind().family()); - Assertions.assertEquals(916120827, response.iterator().next().kind().capacity()); - Assertions.assertEquals("mubyynt", response.iterator().next().storageAccountName()); - } -} diff --git a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/test/java/com/azure/resourcemanager/mixedreality/generated/ResourceProvidersCheckNameAvailabilityLocalWithResponseMockTests.java b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/test/java/com/azure/resourcemanager/mixedreality/generated/ResourceProvidersCheckNameAvailabilityLocalWithResponseMockTests.java deleted file mode 100644 index 919216aa4fdf..000000000000 --- a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/test/java/com/azure/resourcemanager/mixedreality/generated/ResourceProvidersCheckNameAvailabilityLocalWithResponseMockTests.java +++ /dev/null @@ -1,44 +0,0 @@ -// 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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.mixedreality.MixedRealityManager; -import com.azure.resourcemanager.mixedreality.models.CheckNameAvailabilityRequest; -import com.azure.resourcemanager.mixedreality.models.CheckNameAvailabilityResponse; -import com.azure.resourcemanager.mixedreality.models.NameUnavailableReason; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ResourceProvidersCheckNameAvailabilityLocalWithResponseMockTests { - @Test - public void testCheckNameAvailabilityLocalWithResponse() throws Exception { - String responseStr = "{\"nameAvailable\":false,\"reason\":\"Invalid\",\"message\":\"g\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MixedRealityManager manager = MixedRealityManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - CheckNameAvailabilityResponse response = manager.resourceProviders() - .checkNameAvailabilityLocalWithResponse("wfqkquj", - new CheckNameAvailabilityRequest().withName("dsuyonobgla").withType("cq"), - com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals(false, response.nameAvailable()); - Assertions.assertEquals(NameUnavailableReason.INVALID, response.reason()); - Assertions.assertEquals("g", response.message()); - } -} diff --git a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/test/java/com/azure/resourcemanager/mixedreality/generated/ServiceSpecificationTests.java b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/test/java/com/azure/resourcemanager/mixedreality/generated/ServiceSpecificationTests.java deleted file mode 100644 index 49ced9616e91..000000000000 --- a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/test/java/com/azure/resourcemanager/mixedreality/generated/ServiceSpecificationTests.java +++ /dev/null @@ -1,95 +0,0 @@ -// 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.BinaryData; -import com.azure.resourcemanager.mixedreality.models.LogSpecification; -import com.azure.resourcemanager.mixedreality.models.MetricDimension; -import com.azure.resourcemanager.mixedreality.models.MetricSpecification; -import com.azure.resourcemanager.mixedreality.models.ServiceSpecification; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ServiceSpecificationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ServiceSpecification model = BinaryData.fromString( - "{\"logSpecifications\":[{\"name\":\"hbmdgbbjfdd\",\"displayName\":\"bmbexppbhtqqro\",\"blobDuration\":\"p\"}],\"metricSpecifications\":[{\"name\":\"lgbquxig\",\"displayName\":\"jgzjaoyfhrtx\",\"displayDescription\":\"n\",\"unit\":\"kujysvlejuvfq\",\"aggregationType\":\"rlyxwjkcprbnw\",\"supportedAggregationTypes\":[\"jvtbvpyss\",\"dnrujqguhmuouqfp\"],\"supportedTimeGrainTypes\":[\"wbnguitnwui\"],\"enableRegionalMdmAccount\":false,\"sourceMdmAccount\":\"x\",\"sourceMdmNamespace\":\"izuckyfihrfidfvz\",\"metricFilterPattern\":\"zuhtymwisdkfthwx\",\"fillGapWithZero\":false,\"category\":\"i\",\"internalMetricName\":\"opvkmijcm\",\"dimensions\":[{\"name\":\"ufufsrp\",\"displayName\":\"zidnsezcxtbzsgfy\",\"internalName\":\"sne\",\"toBeExportedForShoebox\":true}],\"lockedAggregationType\":\"z\"}]}") - .toObject(ServiceSpecification.class); - Assertions.assertEquals("hbmdgbbjfdd", model.logSpecifications().get(0).name()); - Assertions.assertEquals("bmbexppbhtqqro", model.logSpecifications().get(0).displayName()); - Assertions.assertEquals("p", model.logSpecifications().get(0).blobDuration()); - Assertions.assertEquals("lgbquxig", model.metricSpecifications().get(0).name()); - Assertions.assertEquals("jgzjaoyfhrtx", model.metricSpecifications().get(0).displayName()); - Assertions.assertEquals("n", model.metricSpecifications().get(0).displayDescription()); - Assertions.assertEquals("kujysvlejuvfq", model.metricSpecifications().get(0).unit()); - Assertions.assertEquals("rlyxwjkcprbnw", model.metricSpecifications().get(0).aggregationType()); - Assertions.assertEquals("jvtbvpyss", model.metricSpecifications().get(0).supportedAggregationTypes().get(0)); - Assertions.assertEquals("wbnguitnwui", model.metricSpecifications().get(0).supportedTimeGrainTypes().get(0)); - Assertions.assertEquals(false, model.metricSpecifications().get(0).enableRegionalMdmAccount()); - Assertions.assertEquals("x", model.metricSpecifications().get(0).sourceMdmAccount()); - Assertions.assertEquals("izuckyfihrfidfvz", model.metricSpecifications().get(0).sourceMdmNamespace()); - Assertions.assertEquals("zuhtymwisdkfthwx", model.metricSpecifications().get(0).metricFilterPattern()); - Assertions.assertEquals(false, model.metricSpecifications().get(0).fillGapWithZero()); - Assertions.assertEquals("i", model.metricSpecifications().get(0).category()); - Assertions.assertEquals("opvkmijcm", model.metricSpecifications().get(0).internalMetricName()); - Assertions.assertEquals("ufufsrp", model.metricSpecifications().get(0).dimensions().get(0).name()); - Assertions.assertEquals("zidnsezcxtbzsgfy", - model.metricSpecifications().get(0).dimensions().get(0).displayName()); - Assertions.assertEquals("sne", model.metricSpecifications().get(0).dimensions().get(0).internalName()); - Assertions.assertEquals(true, model.metricSpecifications().get(0).dimensions().get(0).toBeExportedForShoebox()); - Assertions.assertEquals("z", model.metricSpecifications().get(0).lockedAggregationType()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ServiceSpecification model = new ServiceSpecification() - .withLogSpecifications(Arrays.asList( - new LogSpecification().withName("hbmdgbbjfdd").withDisplayName("bmbexppbhtqqro").withBlobDuration("p"))) - .withMetricSpecifications(Arrays.asList(new MetricSpecification().withName("lgbquxig") - .withDisplayName("jgzjaoyfhrtx") - .withDisplayDescription("n") - .withUnit("kujysvlejuvfq") - .withAggregationType("rlyxwjkcprbnw") - .withSupportedAggregationTypes(Arrays.asList("jvtbvpyss", "dnrujqguhmuouqfp")) - .withSupportedTimeGrainTypes(Arrays.asList("wbnguitnwui")) - .withEnableRegionalMdmAccount(false) - .withSourceMdmAccount("x") - .withSourceMdmNamespace("izuckyfihrfidfvz") - .withMetricFilterPattern("zuhtymwisdkfthwx") - .withFillGapWithZero(false) - .withCategory("i") - .withInternalMetricName("opvkmijcm") - .withDimensions(Arrays.asList(new MetricDimension().withName("ufufsrp") - .withDisplayName("zidnsezcxtbzsgfy") - .withInternalName("sne") - .withToBeExportedForShoebox(true))) - .withLockedAggregationType("z"))); - model = BinaryData.fromObject(model).toObject(ServiceSpecification.class); - Assertions.assertEquals("hbmdgbbjfdd", model.logSpecifications().get(0).name()); - Assertions.assertEquals("bmbexppbhtqqro", model.logSpecifications().get(0).displayName()); - Assertions.assertEquals("p", model.logSpecifications().get(0).blobDuration()); - Assertions.assertEquals("lgbquxig", model.metricSpecifications().get(0).name()); - Assertions.assertEquals("jgzjaoyfhrtx", model.metricSpecifications().get(0).displayName()); - Assertions.assertEquals("n", model.metricSpecifications().get(0).displayDescription()); - Assertions.assertEquals("kujysvlejuvfq", model.metricSpecifications().get(0).unit()); - Assertions.assertEquals("rlyxwjkcprbnw", model.metricSpecifications().get(0).aggregationType()); - Assertions.assertEquals("jvtbvpyss", model.metricSpecifications().get(0).supportedAggregationTypes().get(0)); - Assertions.assertEquals("wbnguitnwui", model.metricSpecifications().get(0).supportedTimeGrainTypes().get(0)); - Assertions.assertEquals(false, model.metricSpecifications().get(0).enableRegionalMdmAccount()); - Assertions.assertEquals("x", model.metricSpecifications().get(0).sourceMdmAccount()); - Assertions.assertEquals("izuckyfihrfidfvz", model.metricSpecifications().get(0).sourceMdmNamespace()); - Assertions.assertEquals("zuhtymwisdkfthwx", model.metricSpecifications().get(0).metricFilterPattern()); - Assertions.assertEquals(false, model.metricSpecifications().get(0).fillGapWithZero()); - Assertions.assertEquals("i", model.metricSpecifications().get(0).category()); - Assertions.assertEquals("opvkmijcm", model.metricSpecifications().get(0).internalMetricName()); - Assertions.assertEquals("ufufsrp", model.metricSpecifications().get(0).dimensions().get(0).name()); - Assertions.assertEquals("zidnsezcxtbzsgfy", - model.metricSpecifications().get(0).dimensions().get(0).displayName()); - Assertions.assertEquals("sne", model.metricSpecifications().get(0).dimensions().get(0).internalName()); - Assertions.assertEquals(true, model.metricSpecifications().get(0).dimensions().get(0).toBeExportedForShoebox()); - Assertions.assertEquals("z", model.metricSpecifications().get(0).lockedAggregationType()); - } -} diff --git a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/test/java/com/azure/resourcemanager/mixedreality/generated/SkuTests.java b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/test/java/com/azure/resourcemanager/mixedreality/generated/SkuTests.java deleted file mode 100644 index c34fc5b44fb4..000000000000 --- a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/test/java/com/azure/resourcemanager/mixedreality/generated/SkuTests.java +++ /dev/null @@ -1,39 +0,0 @@ -// 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.BinaryData; -import com.azure.resourcemanager.mixedreality.models.Sku; -import com.azure.resourcemanager.mixedreality.models.SkuTier; -import org.junit.jupiter.api.Assertions; - -public final class SkuTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - Sku model = BinaryData.fromString( - "{\"name\":\"nysounqe\",\"tier\":\"Free\",\"size\":\"ae\",\"family\":\"fhyhltrpmopjmcma\",\"capacity\":860799201}") - .toObject(Sku.class); - Assertions.assertEquals("nysounqe", model.name()); - Assertions.assertEquals(SkuTier.FREE, model.tier()); - Assertions.assertEquals("ae", model.size()); - Assertions.assertEquals("fhyhltrpmopjmcma", model.family()); - Assertions.assertEquals(860799201, model.capacity()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - Sku model = new Sku().withName("nysounqe") - .withTier(SkuTier.FREE) - .withSize("ae") - .withFamily("fhyhltrpmopjmcma") - .withCapacity(860799201); - model = BinaryData.fromObject(model).toObject(Sku.class); - Assertions.assertEquals("nysounqe", model.name()); - Assertions.assertEquals(SkuTier.FREE, model.tier()); - Assertions.assertEquals("ae", model.size()); - Assertions.assertEquals("fhyhltrpmopjmcma", model.family()); - Assertions.assertEquals(860799201, model.capacity()); - } -} diff --git a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/test/java/com/azure/resourcemanager/mixedreality/generated/SpatialAnchorsAccountInnerTests.java b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/test/java/com/azure/resourcemanager/mixedreality/generated/SpatialAnchorsAccountInnerTests.java deleted file mode 100644 index 4c5c5613e13b..000000000000 --- a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/test/java/com/azure/resourcemanager/mixedreality/generated/SpatialAnchorsAccountInnerTests.java +++ /dev/null @@ -1,87 +0,0 @@ -// 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.BinaryData; -import com.azure.resourcemanager.mixedreality.fluent.models.SpatialAnchorsAccountInner; -import com.azure.resourcemanager.mixedreality.models.Identity; -import com.azure.resourcemanager.mixedreality.models.ResourceIdentityType; -import com.azure.resourcemanager.mixedreality.models.Sku; -import com.azure.resourcemanager.mixedreality.models.SkuTier; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class SpatialAnchorsAccountInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SpatialAnchorsAccountInner model = BinaryData.fromString( - "{\"properties\":{\"storageAccountName\":\"llnwsubi\",\"accountId\":\"jampmngnzscxaqw\",\"accountDomain\":\"chcbonqvpkvlrxnj\"},\"identity\":{\"principalId\":\"eipheoflokeyy\",\"tenantId\":\"nj\",\"type\":\"SystemAssigned\"},\"plan\":{\"principalId\":\"grhpdjpju\",\"tenantId\":\"sxazjpq\",\"type\":\"SystemAssigned\"},\"sku\":{\"name\":\"alhbx\",\"tier\":\"Free\",\"size\":\"jzzvdud\",\"family\":\"dslfhotwmcy\",\"capacity\":1581858778},\"kind\":{\"name\":\"bjnpg\",\"tier\":\"Premium\",\"size\":\"adehxnltyfsopp\",\"family\":\"uesnzwdejbavo\",\"capacity\":669466066},\"location\":\"mohctb\",\"tags\":{\"w\":\"dwxdndnv\",\"lazjdyggdtjixhbk\":\"ujjugwdkcglh\",\"fwhybcibvy\":\"ofqweykhmenevfye\",\"ynnaam\":\"dcsi\"},\"id\":\"ectehf\",\"name\":\"qsc\",\"type\":\"eypvhezrkg\"}") - .toObject(SpatialAnchorsAccountInner.class); - Assertions.assertEquals("mohctb", model.location()); - Assertions.assertEquals("dwxdndnv", model.tags().get("w")); - Assertions.assertEquals(ResourceIdentityType.SYSTEM_ASSIGNED, model.identity().type()); - Assertions.assertEquals(ResourceIdentityType.SYSTEM_ASSIGNED, model.plan().type()); - Assertions.assertEquals("alhbx", model.sku().name()); - Assertions.assertEquals(SkuTier.FREE, model.sku().tier()); - Assertions.assertEquals("jzzvdud", model.sku().size()); - Assertions.assertEquals("dslfhotwmcy", model.sku().family()); - Assertions.assertEquals(1581858778, model.sku().capacity()); - Assertions.assertEquals("bjnpg", model.kind().name()); - Assertions.assertEquals(SkuTier.PREMIUM, model.kind().tier()); - Assertions.assertEquals("adehxnltyfsopp", model.kind().size()); - Assertions.assertEquals("uesnzwdejbavo", model.kind().family()); - Assertions.assertEquals(669466066, model.kind().capacity()); - Assertions.assertEquals("llnwsubi", model.storageAccountName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SpatialAnchorsAccountInner model = new SpatialAnchorsAccountInner().withLocation("mohctb") - .withTags(mapOf("w", "dwxdndnv", "lazjdyggdtjixhbk", "ujjugwdkcglh", "fwhybcibvy", "ofqweykhmenevfye", - "ynnaam", "dcsi")) - .withIdentity(new Identity().withType(ResourceIdentityType.SYSTEM_ASSIGNED)) - .withPlan(new Identity().withType(ResourceIdentityType.SYSTEM_ASSIGNED)) - .withSku(new Sku().withName("alhbx") - .withTier(SkuTier.FREE) - .withSize("jzzvdud") - .withFamily("dslfhotwmcy") - .withCapacity(1581858778)) - .withKind(new Sku().withName("bjnpg") - .withTier(SkuTier.PREMIUM) - .withSize("adehxnltyfsopp") - .withFamily("uesnzwdejbavo") - .withCapacity(669466066)) - .withStorageAccountName("llnwsubi"); - model = BinaryData.fromObject(model).toObject(SpatialAnchorsAccountInner.class); - Assertions.assertEquals("mohctb", model.location()); - Assertions.assertEquals("dwxdndnv", model.tags().get("w")); - Assertions.assertEquals(ResourceIdentityType.SYSTEM_ASSIGNED, model.identity().type()); - Assertions.assertEquals(ResourceIdentityType.SYSTEM_ASSIGNED, model.plan().type()); - Assertions.assertEquals("alhbx", model.sku().name()); - Assertions.assertEquals(SkuTier.FREE, model.sku().tier()); - Assertions.assertEquals("jzzvdud", model.sku().size()); - Assertions.assertEquals("dslfhotwmcy", model.sku().family()); - Assertions.assertEquals(1581858778, model.sku().capacity()); - Assertions.assertEquals("bjnpg", model.kind().name()); - Assertions.assertEquals(SkuTier.PREMIUM, model.kind().tier()); - Assertions.assertEquals("adehxnltyfsopp", model.kind().size()); - Assertions.assertEquals("uesnzwdejbavo", model.kind().family()); - Assertions.assertEquals(669466066, model.kind().capacity()); - Assertions.assertEquals("llnwsubi", model.storageAccountName()); - } - - // Use "Map.of" if available - @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/test/java/com/azure/resourcemanager/mixedreality/generated/SpatialAnchorsAccountPageTests.java b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/test/java/com/azure/resourcemanager/mixedreality/generated/SpatialAnchorsAccountPageTests.java deleted file mode 100644 index c90501361cb3..000000000000 --- a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/test/java/com/azure/resourcemanager/mixedreality/generated/SpatialAnchorsAccountPageTests.java +++ /dev/null @@ -1,92 +0,0 @@ -// 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.BinaryData; -import com.azure.resourcemanager.mixedreality.fluent.models.SpatialAnchorsAccountInner; -import com.azure.resourcemanager.mixedreality.models.Identity; -import com.azure.resourcemanager.mixedreality.models.ResourceIdentityType; -import com.azure.resourcemanager.mixedreality.models.Sku; -import com.azure.resourcemanager.mixedreality.models.SkuTier; -import com.azure.resourcemanager.mixedreality.models.SpatialAnchorsAccountPage; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class SpatialAnchorsAccountPageTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SpatialAnchorsAccountPage model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"storageAccountName\":\"yeicxmqciwqvhk\",\"accountId\":\"xuigdtopbobj\",\"accountDomain\":\"hm\"},\"identity\":{\"principalId\":\"a\",\"tenantId\":\"uhrzayvvt\",\"type\":\"SystemAssigned\"},\"plan\":{\"principalId\":\"giotkftutqxlngx\",\"tenantId\":\"fgugnxkrxdqmid\",\"type\":\"SystemAssigned\"},\"sku\":{\"name\":\"rvqdra\",\"tier\":\"Basic\",\"size\":\"big\",\"family\":\"oqfbowskanyk\",\"capacity\":1440760803},\"kind\":{\"name\":\"u\",\"tier\":\"Basic\",\"size\":\"qyw\",\"family\":\"drvyn\",\"capacity\":19075135},\"location\":\"phrcgyncoc\",\"tags\":{\"coofsxlzev\":\"fvm\",\"abcypmivk\":\"bmqj\"},\"id\":\"lzu\",\"name\":\"ccfwnfnbacfion\",\"type\":\"ebxetqgtzxdp\"}],\"nextLink\":\"bqqwxrj\"}") - .toObject(SpatialAnchorsAccountPage.class); - Assertions.assertEquals("phrcgyncoc", model.value().get(0).location()); - Assertions.assertEquals("fvm", model.value().get(0).tags().get("coofsxlzev")); - Assertions.assertEquals(ResourceIdentityType.SYSTEM_ASSIGNED, model.value().get(0).identity().type()); - Assertions.assertEquals(ResourceIdentityType.SYSTEM_ASSIGNED, model.value().get(0).plan().type()); - Assertions.assertEquals("rvqdra", model.value().get(0).sku().name()); - Assertions.assertEquals(SkuTier.BASIC, model.value().get(0).sku().tier()); - Assertions.assertEquals("big", model.value().get(0).sku().size()); - Assertions.assertEquals("oqfbowskanyk", model.value().get(0).sku().family()); - Assertions.assertEquals(1440760803, model.value().get(0).sku().capacity()); - Assertions.assertEquals("u", model.value().get(0).kind().name()); - Assertions.assertEquals(SkuTier.BASIC, model.value().get(0).kind().tier()); - Assertions.assertEquals("qyw", model.value().get(0).kind().size()); - Assertions.assertEquals("drvyn", model.value().get(0).kind().family()); - Assertions.assertEquals(19075135, model.value().get(0).kind().capacity()); - Assertions.assertEquals("yeicxmqciwqvhk", model.value().get(0).storageAccountName()); - Assertions.assertEquals("bqqwxrj", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SpatialAnchorsAccountPage model = new SpatialAnchorsAccountPage() - .withValue(Arrays.asList(new SpatialAnchorsAccountInner().withLocation("phrcgyncoc") - .withTags(mapOf("coofsxlzev", "fvm", "abcypmivk", "bmqj")) - .withIdentity(new Identity().withType(ResourceIdentityType.SYSTEM_ASSIGNED)) - .withPlan(new Identity().withType(ResourceIdentityType.SYSTEM_ASSIGNED)) - .withSku(new Sku().withName("rvqdra") - .withTier(SkuTier.BASIC) - .withSize("big") - .withFamily("oqfbowskanyk") - .withCapacity(1440760803)) - .withKind(new Sku().withName("u") - .withTier(SkuTier.BASIC) - .withSize("qyw") - .withFamily("drvyn") - .withCapacity(19075135)) - .withStorageAccountName("yeicxmqciwqvhk"))) - .withNextLink("bqqwxrj"); - model = BinaryData.fromObject(model).toObject(SpatialAnchorsAccountPage.class); - Assertions.assertEquals("phrcgyncoc", model.value().get(0).location()); - Assertions.assertEquals("fvm", model.value().get(0).tags().get("coofsxlzev")); - Assertions.assertEquals(ResourceIdentityType.SYSTEM_ASSIGNED, model.value().get(0).identity().type()); - Assertions.assertEquals(ResourceIdentityType.SYSTEM_ASSIGNED, model.value().get(0).plan().type()); - Assertions.assertEquals("rvqdra", model.value().get(0).sku().name()); - Assertions.assertEquals(SkuTier.BASIC, model.value().get(0).sku().tier()); - Assertions.assertEquals("big", model.value().get(0).sku().size()); - Assertions.assertEquals("oqfbowskanyk", model.value().get(0).sku().family()); - Assertions.assertEquals(1440760803, model.value().get(0).sku().capacity()); - Assertions.assertEquals("u", model.value().get(0).kind().name()); - Assertions.assertEquals(SkuTier.BASIC, model.value().get(0).kind().tier()); - Assertions.assertEquals("qyw", model.value().get(0).kind().size()); - Assertions.assertEquals("drvyn", model.value().get(0).kind().family()); - Assertions.assertEquals(19075135, model.value().get(0).kind().capacity()); - Assertions.assertEquals("yeicxmqciwqvhk", model.value().get(0).storageAccountName()); - Assertions.assertEquals("bqqwxrj", model.nextLink()); - } - - // Use "Map.of" if available - @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/test/java/com/azure/resourcemanager/mixedreality/generated/SpatialAnchorsAccountsCreateWithResponseMockTests.java b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/test/java/com/azure/resourcemanager/mixedreality/generated/SpatialAnchorsAccountsCreateWithResponseMockTests.java deleted file mode 100644 index 67b5e5a0d7d7..000000000000 --- a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/test/java/com/azure/resourcemanager/mixedreality/generated/SpatialAnchorsAccountsCreateWithResponseMockTests.java +++ /dev/null @@ -1,88 +0,0 @@ -// 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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.mixedreality.MixedRealityManager; -import com.azure.resourcemanager.mixedreality.models.Identity; -import com.azure.resourcemanager.mixedreality.models.ResourceIdentityType; -import com.azure.resourcemanager.mixedreality.models.Sku; -import com.azure.resourcemanager.mixedreality.models.SkuTier; -import com.azure.resourcemanager.mixedreality.models.SpatialAnchorsAccount; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class SpatialAnchorsAccountsCreateWithResponseMockTests { - @Test - public void testCreateWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"storageAccountName\":\"lkthu\",\"accountId\":\"qolbgyc\",\"accountDomain\":\"iertgccymvaolp\"},\"identity\":{\"principalId\":\"qlfmmdnbb\",\"tenantId\":\"zpswiydmc\",\"type\":\"SystemAssigned\"},\"plan\":{\"principalId\":\"xssadbzmnvdf\",\"tenantId\":\"ud\",\"type\":\"SystemAssigned\"},\"sku\":{\"name\":\"xzb\",\"tier\":\"Standard\",\"size\":\"ylpstdbhhxsrzdz\",\"family\":\"erscdntne\",\"capacity\":1072156994},\"kind\":{\"name\":\"jmygtdsslswtmwer\",\"tier\":\"Free\",\"size\":\"pyqs\",\"family\":\"wab\",\"capacity\":334511461},\"location\":\"hhszh\",\"tags\":{\"nkww\":\"lvwiwubmwmbesl\",\"flcxoga\":\"pp\",\"mkqzeqqkdltfzxmh\":\"konzmnsik\",\"gureodkwobdag\":\"v\"},\"id\":\"tibqdxbxwakb\",\"name\":\"gqxndlkzgxhuripl\",\"type\":\"podxunkb\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MixedRealityManager manager = MixedRealityManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - SpatialAnchorsAccount response = manager.spatialAnchorsAccounts() - .define("mjh") - .withRegion("ssotftpv") - .withExistingResourceGroup("rmfqjhhkxbpvj") - .withTags( - mapOf("aruoujmkcjhwqyt", "exilzznfqqnvwpmq", "bnw", "r", "enq", "ewgdrjervn", "ndoygmifthnzdnd", "eh")) - .withIdentity(new Identity().withType(ResourceIdentityType.SYSTEM_ASSIGNED)) - .withPlan(new Identity().withType(ResourceIdentityType.SYSTEM_ASSIGNED)) - .withSku(new Sku().withName("blytk") - .withTier(SkuTier.FREE) - .withSize("ewwwfbkrvrnsv") - .withFamily("q") - .withCapacity(925506689)) - .withKind(new Sku().withName("crsbfovasr") - .withTier(SkuTier.FREE) - .withSize("bhsqfsubcgjbirxb") - .withFamily("bsrfbj") - .withCapacity(837542479)) - .withStorageAccountName("yngudivk") - .create(); - - Assertions.assertEquals("hhszh", response.location()); - Assertions.assertEquals("lvwiwubmwmbesl", response.tags().get("nkww")); - Assertions.assertEquals(ResourceIdentityType.SYSTEM_ASSIGNED, response.identity().type()); - Assertions.assertEquals(ResourceIdentityType.SYSTEM_ASSIGNED, response.plan().type()); - Assertions.assertEquals("xzb", response.sku().name()); - Assertions.assertEquals(SkuTier.STANDARD, response.sku().tier()); - Assertions.assertEquals("ylpstdbhhxsrzdz", response.sku().size()); - Assertions.assertEquals("erscdntne", response.sku().family()); - Assertions.assertEquals(1072156994, response.sku().capacity()); - Assertions.assertEquals("jmygtdsslswtmwer", response.kind().name()); - Assertions.assertEquals(SkuTier.FREE, response.kind().tier()); - Assertions.assertEquals("pyqs", response.kind().size()); - Assertions.assertEquals("wab", response.kind().family()); - Assertions.assertEquals(334511461, response.kind().capacity()); - Assertions.assertEquals("lkthu", response.storageAccountName()); - } - - // Use "Map.of" if available - @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/test/java/com/azure/resourcemanager/mixedreality/generated/SpatialAnchorsAccountsDeleteByResourceGroupWithResponseMockTests.java b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/test/java/com/azure/resourcemanager/mixedreality/generated/SpatialAnchorsAccountsDeleteByResourceGroupWithResponseMockTests.java deleted file mode 100644 index fe857410b40f..000000000000 --- a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/test/java/com/azure/resourcemanager/mixedreality/generated/SpatialAnchorsAccountsDeleteByResourceGroupWithResponseMockTests.java +++ /dev/null @@ -1,34 +0,0 @@ -// 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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.mixedreality.MixedRealityManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class SpatialAnchorsAccountsDeleteByResourceGroupWithResponseMockTests { - @Test - public void testDeleteWithResponse() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MixedRealityManager manager = MixedRealityManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.spatialAnchorsAccounts() - .deleteByResourceGroupWithResponse("bexrmcq", "bycnojvkn", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/test/java/com/azure/resourcemanager/mixedreality/generated/SpatialAnchorsAccountsGetByResourceGroupWithResponseMockTests.java b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/test/java/com/azure/resourcemanager/mixedreality/generated/SpatialAnchorsAccountsGetByResourceGroupWithResponseMockTests.java deleted file mode 100644 index 29263b4653ab..000000000000 --- a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/test/java/com/azure/resourcemanager/mixedreality/generated/SpatialAnchorsAccountsGetByResourceGroupWithResponseMockTests.java +++ /dev/null @@ -1,55 +0,0 @@ -// 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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.mixedreality.MixedRealityManager; -import com.azure.resourcemanager.mixedreality.models.ResourceIdentityType; -import com.azure.resourcemanager.mixedreality.models.SkuTier; -import com.azure.resourcemanager.mixedreality.models.SpatialAnchorsAccount; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class SpatialAnchorsAccountsGetByResourceGroupWithResponseMockTests { - @Test - public void testGetByResourceGroupWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"storageAccountName\":\"pvgqzcjrvxdjzlm\",\"accountId\":\"xkvugfhzov\",\"accountDomain\":\"jvzunluthnnp\"},\"identity\":{\"principalId\":\"i\",\"tenantId\":\"ilpjzuaejxdult\",\"type\":\"SystemAssigned\"},\"plan\":{\"principalId\":\"tdzumveekgpw\",\"tenantId\":\"uh\",\"type\":\"SystemAssigned\"},\"sku\":{\"name\":\"sjyofdx\",\"tier\":\"Free\",\"size\":\"dttouwaboekqvkel\",\"family\":\"mvb\",\"capacity\":1393240700},\"kind\":{\"name\":\"sflhhca\",\"tier\":\"Free\",\"size\":\"ixisxyawjoy\",\"family\":\"cslyjpk\",\"capacity\":888543440},\"location\":\"yexz\",\"tags\":{\"lhbnxkna\":\"ixhnrztf\",\"pnapnyiropuh\":\"aulppggd\",\"git\":\"igvpgylg\"},\"id\":\"medjvcslynqwwncw\",\"name\":\"zhxgktrmgucn\",\"type\":\"pkteo\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MixedRealityManager manager = MixedRealityManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - SpatialAnchorsAccount response = manager.spatialAnchorsAccounts() - .getByResourceGroupWithResponse("e", "qsgzvahapj", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("yexz", response.location()); - Assertions.assertEquals("ixhnrztf", response.tags().get("lhbnxkna")); - Assertions.assertEquals(ResourceIdentityType.SYSTEM_ASSIGNED, response.identity().type()); - Assertions.assertEquals(ResourceIdentityType.SYSTEM_ASSIGNED, response.plan().type()); - Assertions.assertEquals("sjyofdx", response.sku().name()); - Assertions.assertEquals(SkuTier.FREE, response.sku().tier()); - Assertions.assertEquals("dttouwaboekqvkel", response.sku().size()); - Assertions.assertEquals("mvb", response.sku().family()); - Assertions.assertEquals(1393240700, response.sku().capacity()); - Assertions.assertEquals("sflhhca", response.kind().name()); - Assertions.assertEquals(SkuTier.FREE, response.kind().tier()); - Assertions.assertEquals("ixisxyawjoy", response.kind().size()); - Assertions.assertEquals("cslyjpk", response.kind().family()); - Assertions.assertEquals(888543440, response.kind().capacity()); - Assertions.assertEquals("pvgqzcjrvxdjzlm", response.storageAccountName()); - } -} diff --git a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/test/java/com/azure/resourcemanager/mixedreality/generated/SpatialAnchorsAccountsListByResourceGroupMockTests.java b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/test/java/com/azure/resourcemanager/mixedreality/generated/SpatialAnchorsAccountsListByResourceGroupMockTests.java deleted file mode 100644 index cb12f49dcd62..000000000000 --- a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/test/java/com/azure/resourcemanager/mixedreality/generated/SpatialAnchorsAccountsListByResourceGroupMockTests.java +++ /dev/null @@ -1,55 +0,0 @@ -// 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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.mixedreality.MixedRealityManager; -import com.azure.resourcemanager.mixedreality.models.ResourceIdentityType; -import com.azure.resourcemanager.mixedreality.models.SkuTier; -import com.azure.resourcemanager.mixedreality.models.SpatialAnchorsAccount; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class SpatialAnchorsAccountsListByResourceGroupMockTests { - @Test - public void testListByResourceGroup() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"storageAccountName\":\"wmcdytdxwi\",\"accountId\":\"nrjawgqwg\",\"accountDomain\":\"ni\"},\"identity\":{\"principalId\":\"fbkp\",\"tenantId\":\"gklwn\",\"type\":\"SystemAssigned\"},\"plan\":{\"principalId\":\"auwhvylwzbtdhx\",\"tenantId\":\"znbmpowuwprzq\",\"type\":\"SystemAssigned\"},\"sku\":{\"name\":\"alupjm\",\"tier\":\"Standard\",\"size\":\"obbc\",\"family\":\"s\",\"capacity\":1626950587},\"kind\":{\"name\":\"iplrbpbewtghfgb\",\"tier\":\"Free\",\"size\":\"xzvlvqhjkbegib\",\"family\":\"mxiebw\",\"capacity\":2134442960},\"location\":\"ayqcgw\",\"tags\":{\"zg\":\"j\",\"txon\":\"yzm\"},\"id\":\"mtsavjcbpwxqp\",\"name\":\"rknftguvriuhprwm\",\"type\":\"yvxqtayriwwroy\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MixedRealityManager manager = MixedRealityManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response - = manager.spatialAnchorsAccounts().listByResourceGroup("hzceuojgjrwjue", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("ayqcgw", response.iterator().next().location()); - Assertions.assertEquals("j", response.iterator().next().tags().get("zg")); - Assertions.assertEquals(ResourceIdentityType.SYSTEM_ASSIGNED, response.iterator().next().identity().type()); - Assertions.assertEquals(ResourceIdentityType.SYSTEM_ASSIGNED, response.iterator().next().plan().type()); - Assertions.assertEquals("alupjm", response.iterator().next().sku().name()); - Assertions.assertEquals(SkuTier.STANDARD, response.iterator().next().sku().tier()); - Assertions.assertEquals("obbc", response.iterator().next().sku().size()); - Assertions.assertEquals("s", response.iterator().next().sku().family()); - Assertions.assertEquals(1626950587, response.iterator().next().sku().capacity()); - Assertions.assertEquals("iplrbpbewtghfgb", response.iterator().next().kind().name()); - Assertions.assertEquals(SkuTier.FREE, response.iterator().next().kind().tier()); - Assertions.assertEquals("xzvlvqhjkbegib", response.iterator().next().kind().size()); - Assertions.assertEquals("mxiebw", response.iterator().next().kind().family()); - Assertions.assertEquals(2134442960, response.iterator().next().kind().capacity()); - Assertions.assertEquals("wmcdytdxwi", response.iterator().next().storageAccountName()); - } -} diff --git a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/test/java/com/azure/resourcemanager/mixedreality/generated/SpatialAnchorsAccountsListMockTests.java b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/test/java/com/azure/resourcemanager/mixedreality/generated/SpatialAnchorsAccountsListMockTests.java deleted file mode 100644 index 05be26e86d40..000000000000 --- a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/test/java/com/azure/resourcemanager/mixedreality/generated/SpatialAnchorsAccountsListMockTests.java +++ /dev/null @@ -1,55 +0,0 @@ -// 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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.mixedreality.MixedRealityManager; -import com.azure.resourcemanager.mixedreality.models.ResourceIdentityType; -import com.azure.resourcemanager.mixedreality.models.SkuTier; -import com.azure.resourcemanager.mixedreality.models.SpatialAnchorsAccount; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class SpatialAnchorsAccountsListMockTests { - @Test - public void testList() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"storageAccountName\":\"xy\",\"accountId\":\"moyrxvwfudwpz\",\"accountDomain\":\"xhdzhlrqjbhckf\"},\"identity\":{\"principalId\":\"rxsbkyvp\",\"tenantId\":\"anuzbpzkafkuw\",\"type\":\"SystemAssigned\"},\"plan\":{\"principalId\":\"bmehh\",\"tenantId\":\"yvjusrtslhsp\",\"type\":\"SystemAssigned\"},\"sku\":{\"name\":\"maofmxagkv\",\"tier\":\"Basic\",\"size\":\"mqkrhahvljuahaqu\",\"family\":\"dhmdua\",\"capacity\":595850477},\"kind\":{\"name\":\"qpv\",\"tier\":\"Premium\",\"size\":\"ws\",\"family\":\"r\",\"capacity\":1259983494},\"location\":\"vgomz\",\"tags\":{\"ali\":\"isgwbnbbeldawkz\",\"hashsfwxosow\":\"urqhaka\"},\"id\":\"xcug\",\"name\":\"cjooxdjebwpucwwf\",\"type\":\"ovbvmeueciv\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MixedRealityManager manager = MixedRealityManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response - = manager.spatialAnchorsAccounts().list(com.azure.core.util.Context.NONE); - - Assertions.assertEquals("vgomz", response.iterator().next().location()); - Assertions.assertEquals("isgwbnbbeldawkz", response.iterator().next().tags().get("ali")); - Assertions.assertEquals(ResourceIdentityType.SYSTEM_ASSIGNED, response.iterator().next().identity().type()); - Assertions.assertEquals(ResourceIdentityType.SYSTEM_ASSIGNED, response.iterator().next().plan().type()); - Assertions.assertEquals("maofmxagkv", response.iterator().next().sku().name()); - Assertions.assertEquals(SkuTier.BASIC, response.iterator().next().sku().tier()); - Assertions.assertEquals("mqkrhahvljuahaqu", response.iterator().next().sku().size()); - Assertions.assertEquals("dhmdua", response.iterator().next().sku().family()); - Assertions.assertEquals(595850477, response.iterator().next().sku().capacity()); - Assertions.assertEquals("qpv", response.iterator().next().kind().name()); - Assertions.assertEquals(SkuTier.PREMIUM, response.iterator().next().kind().tier()); - Assertions.assertEquals("ws", response.iterator().next().kind().size()); - Assertions.assertEquals("r", response.iterator().next().kind().family()); - Assertions.assertEquals(1259983494, response.iterator().next().kind().capacity()); - Assertions.assertEquals("xy", response.iterator().next().storageAccountName()); - } -}