From 704af0e96748b2163d46558a19b388ffc646e00f Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Thu, 21 Apr 2022 19:26:09 +0000 Subject: [PATCH] CodeGen from PR 18603 in Azure/azure-rest-api-specs Merge 591dfb6d4e3b34195990b5854d3170d38d2c3eac into 3439439b760e84e5dcc3e68edde7251c602da5f0 --- .../CHANGELOG.md | 3 +- .../README.md | 7 +- .../SAMPLE.md | 711 ++++++++ .../pom.xml | 98 +- .../mixedreality/MixedRealityManager.java | 93 +- .../fluent/MixedRealityClient.java | 7 + .../fluent/ObjectAnchorsAccountsClient.java | 238 +++ .../mixedreality/fluent/OperationsClient.java | 6 +- .../fluent/RemoteRenderingAccountsClient.java | 20 +- .../fluent/ResourceProvidersClient.java | 2 +- .../fluent/SpatialAnchorsAccountsClient.java | 20 +- .../fluent/models/AccountKeysInner.java | 4 - .../CheckNameAvailabilityResponseInner.java | 4 - .../models/MixedRealityAccountProperties.java | 76 + .../models/ObjectAnchorsAccountInner.java | 230 +++ .../fluent/models/OperationInner.java | 4 - .../models/RemoteRenderingAccountInner.java | 77 +- .../models/SpatialAnchorsAccountInner.java | 77 +- .../MixedRealityClientBuilder.java | 34 +- .../MixedRealityClientImpl.java | 22 +- .../ObjectAnchorsAccountImpl.java | 245 +++ .../ObjectAnchorsAccountsClientImpl.java | 1607 +++++++++++++++++ .../ObjectAnchorsAccountsImpl.java | 234 +++ .../implementation/OperationsClientImpl.java | 25 +- .../implementation/OperationsImpl.java | 3 +- .../RemoteRenderingAccountsClientImpl.java | 91 +- .../RemoteRenderingAccountsImpl.java | 21 +- .../ResourceProvidersClientImpl.java | 11 +- .../implementation/ResourceProvidersImpl.java | 3 +- .../SpatialAnchorsAccountsClientImpl.java | 91 +- .../SpatialAnchorsAccountsImpl.java | 21 +- .../models/AccountKeyRegenerateRequest.java | 10 +- .../models/CheckNameAvailabilityRequest.java | 9 +- .../mixedreality/models/Identity.java | 4 - .../mixedreality/models/LogSpecification.java | 4 - .../mixedreality/models/MetricDimension.java | 30 +- .../models/MetricSpecification.java | 247 ++- .../models/ObjectAnchorsAccount.java | 407 +++++ .../models/ObjectAnchorsAccountIdentity.java | 28 + .../models/ObjectAnchorsAccountPage.java | 80 + .../models/ObjectAnchorsAccounts.java | 211 +++ .../mixedreality/models/OperationDisplay.java | 13 +- .../mixedreality/models/OperationPage.java | 4 - .../models/OperationProperties.java | 4 - .../mixedreality/models/Operations.java | 6 +- .../models/RemoteRenderingAccount.java | 4 +- .../models/RemoteRenderingAccountPage.java | 4 - .../models/RemoteRenderingAccounts.java | 22 +- .../models/ResourceProviders.java | 2 +- .../models/ServiceSpecification.java | 4 - .../mixedreality/models/Sku.java | 7 +- .../models/SpatialAnchorsAccount.java | 4 +- .../models/SpatialAnchorsAccountPage.java | 4 - .../models/SpatialAnchorsAccounts.java | 22 +- .../ObjectAnchorsAccountsCreateSamples.java | 29 + .../ObjectAnchorsAccountsDeleteSamples.java | 22 + ...horsAccountsGetByResourceGroupSamples.java | 22 + ...orsAccountsListByResourceGroupSamples.java | 23 + .../ObjectAnchorsAccountsListKeysSamples.java | 22 + .../ObjectAnchorsAccountsListSamples.java | 23 + ...tAnchorsAccountsRegenerateKeysSamples.java | 28 + .../ObjectAnchorsAccountsUpdateSamples.java | 47 + .../generated/OperationsListSamples.java | 22 + .../RemoteRenderingAccountsCreateSamples.java | 30 + .../RemoteRenderingAccountsDeleteSamples.java | 23 + ...ringAccountsGetByResourceGroupSamples.java | 22 + ...ingAccountsListByResourceGroupSamples.java | 23 + ...emoteRenderingAccountsListKeysSamples.java | 23 + .../RemoteRenderingAccountsListSamples.java | 23 + ...enderingAccountsRegenerateKeysSamples.java | 28 + .../RemoteRenderingAccountsUpdateSamples.java | 48 + ...iderCheckNameAvailabilityLocalSamples.java | 30 + .../SpatialAnchorsAccountsCreateSamples.java | 25 + .../SpatialAnchorsAccountsDeleteSamples.java | 22 + ...horsAccountsGetByResourceGroupSamples.java | 22 + ...orsAccountsListByResourceGroupSamples.java | 23 + ...SpatialAnchorsAccountsListKeysSamples.java | 22 + .../SpatialAnchorsAccountsListSamples.java | 23 + ...lAnchorsAccountsRegenerateKeysSamples.java | 28 + .../SpatialAnchorsAccountsUpdateSamples.java | 41 + 80 files changed, 5492 insertions(+), 417 deletions(-) create mode 100644 sdk/mixedreality/azure-resourcemanager-mixedreality/SAMPLE.md create mode 100644 sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/fluent/ObjectAnchorsAccountsClient.java create mode 100644 sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/fluent/models/MixedRealityAccountProperties.java create mode 100644 sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/fluent/models/ObjectAnchorsAccountInner.java create mode 100644 sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/implementation/ObjectAnchorsAccountImpl.java create mode 100644 sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/implementation/ObjectAnchorsAccountsClientImpl.java create mode 100644 sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/implementation/ObjectAnchorsAccountsImpl.java create mode 100644 sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/models/ObjectAnchorsAccount.java create mode 100644 sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/models/ObjectAnchorsAccountIdentity.java create mode 100644 sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/models/ObjectAnchorsAccountPage.java create mode 100644 sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/models/ObjectAnchorsAccounts.java create mode 100644 sdk/mixedreality/azure-resourcemanager-mixedreality/src/samples/java/com/azure/resourcemanager/mixedreality/generated/ObjectAnchorsAccountsCreateSamples.java create mode 100644 sdk/mixedreality/azure-resourcemanager-mixedreality/src/samples/java/com/azure/resourcemanager/mixedreality/generated/ObjectAnchorsAccountsDeleteSamples.java create mode 100644 sdk/mixedreality/azure-resourcemanager-mixedreality/src/samples/java/com/azure/resourcemanager/mixedreality/generated/ObjectAnchorsAccountsGetByResourceGroupSamples.java create mode 100644 sdk/mixedreality/azure-resourcemanager-mixedreality/src/samples/java/com/azure/resourcemanager/mixedreality/generated/ObjectAnchorsAccountsListByResourceGroupSamples.java create mode 100644 sdk/mixedreality/azure-resourcemanager-mixedreality/src/samples/java/com/azure/resourcemanager/mixedreality/generated/ObjectAnchorsAccountsListKeysSamples.java create mode 100644 sdk/mixedreality/azure-resourcemanager-mixedreality/src/samples/java/com/azure/resourcemanager/mixedreality/generated/ObjectAnchorsAccountsListSamples.java create mode 100644 sdk/mixedreality/azure-resourcemanager-mixedreality/src/samples/java/com/azure/resourcemanager/mixedreality/generated/ObjectAnchorsAccountsRegenerateKeysSamples.java create mode 100644 sdk/mixedreality/azure-resourcemanager-mixedreality/src/samples/java/com/azure/resourcemanager/mixedreality/generated/ObjectAnchorsAccountsUpdateSamples.java create mode 100644 sdk/mixedreality/azure-resourcemanager-mixedreality/src/samples/java/com/azure/resourcemanager/mixedreality/generated/OperationsListSamples.java create mode 100644 sdk/mixedreality/azure-resourcemanager-mixedreality/src/samples/java/com/azure/resourcemanager/mixedreality/generated/RemoteRenderingAccountsCreateSamples.java create mode 100644 sdk/mixedreality/azure-resourcemanager-mixedreality/src/samples/java/com/azure/resourcemanager/mixedreality/generated/RemoteRenderingAccountsDeleteSamples.java create mode 100644 sdk/mixedreality/azure-resourcemanager-mixedreality/src/samples/java/com/azure/resourcemanager/mixedreality/generated/RemoteRenderingAccountsGetByResourceGroupSamples.java create mode 100644 sdk/mixedreality/azure-resourcemanager-mixedreality/src/samples/java/com/azure/resourcemanager/mixedreality/generated/RemoteRenderingAccountsListByResourceGroupSamples.java create mode 100644 sdk/mixedreality/azure-resourcemanager-mixedreality/src/samples/java/com/azure/resourcemanager/mixedreality/generated/RemoteRenderingAccountsListKeysSamples.java create mode 100644 sdk/mixedreality/azure-resourcemanager-mixedreality/src/samples/java/com/azure/resourcemanager/mixedreality/generated/RemoteRenderingAccountsListSamples.java create mode 100644 sdk/mixedreality/azure-resourcemanager-mixedreality/src/samples/java/com/azure/resourcemanager/mixedreality/generated/RemoteRenderingAccountsRegenerateKeysSamples.java create mode 100644 sdk/mixedreality/azure-resourcemanager-mixedreality/src/samples/java/com/azure/resourcemanager/mixedreality/generated/RemoteRenderingAccountsUpdateSamples.java create mode 100644 sdk/mixedreality/azure-resourcemanager-mixedreality/src/samples/java/com/azure/resourcemanager/mixedreality/generated/ResourceProviderCheckNameAvailabilityLocalSamples.java create mode 100644 sdk/mixedreality/azure-resourcemanager-mixedreality/src/samples/java/com/azure/resourcemanager/mixedreality/generated/SpatialAnchorsAccountsCreateSamples.java create mode 100644 sdk/mixedreality/azure-resourcemanager-mixedreality/src/samples/java/com/azure/resourcemanager/mixedreality/generated/SpatialAnchorsAccountsDeleteSamples.java create mode 100644 sdk/mixedreality/azure-resourcemanager-mixedreality/src/samples/java/com/azure/resourcemanager/mixedreality/generated/SpatialAnchorsAccountsGetByResourceGroupSamples.java create mode 100644 sdk/mixedreality/azure-resourcemanager-mixedreality/src/samples/java/com/azure/resourcemanager/mixedreality/generated/SpatialAnchorsAccountsListByResourceGroupSamples.java create mode 100644 sdk/mixedreality/azure-resourcemanager-mixedreality/src/samples/java/com/azure/resourcemanager/mixedreality/generated/SpatialAnchorsAccountsListKeysSamples.java create mode 100644 sdk/mixedreality/azure-resourcemanager-mixedreality/src/samples/java/com/azure/resourcemanager/mixedreality/generated/SpatialAnchorsAccountsListSamples.java create mode 100644 sdk/mixedreality/azure-resourcemanager-mixedreality/src/samples/java/com/azure/resourcemanager/mixedreality/generated/SpatialAnchorsAccountsRegenerateKeysSamples.java create mode 100644 sdk/mixedreality/azure-resourcemanager-mixedreality/src/samples/java/com/azure/resourcemanager/mixedreality/generated/SpatialAnchorsAccountsUpdateSamples.java diff --git a/sdk/mixedreality/azure-resourcemanager-mixedreality/CHANGELOG.md b/sdk/mixedreality/azure-resourcemanager-mixedreality/CHANGELOG.md index 9e27e57f9a809..8f9a1f070099a 100644 --- a/sdk/mixedreality/azure-resourcemanager-mixedreality/CHANGELOG.md +++ b/sdk/mixedreality/azure-resourcemanager-mixedreality/CHANGELOG.md @@ -1,7 +1,8 @@ # Release History -## 1.0.0-beta.2 (Unreleased) +## 1.0.0-beta.1 (2022-04-21) +- Azure Resource Manager MixedReality client library for Java. This package contains Microsoft Azure SDK for MixedReality Management SDK. Mixed Reality Client. Package tag package-2021-03-01-preview. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ## 1.0.0-beta.1 (2021-04-27) diff --git a/sdk/mixedreality/azure-resourcemanager-mixedreality/README.md b/sdk/mixedreality/azure-resourcemanager-mixedreality/README.md index d632500de9eb2..e509cf8ac391e 100644 --- a/sdk/mixedreality/azure-resourcemanager-mixedreality/README.md +++ b/sdk/mixedreality/azure-resourcemanager-mixedreality/README.md @@ -2,7 +2,7 @@ Azure Resource Manager MixedReality client library for Java. -This package contains Microsoft Azure SDK for MixedReality Management SDK. Mixed Reality Client. Package tag package-2021-01. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). +This package contains Microsoft Azure SDK for MixedReality Management SDK. Mixed Reality Client. Package tag package-2021-03-01-preview. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ## We'd love to hear your feedback @@ -32,7 +32,7 @@ Various documentation is available to help you get started com.azure.resourcemanager azure-resourcemanager-mixedreality - 1.0.0-beta.1 + 1.0.0-beta.2 ``` [//]: # ({x-version-update-end}) @@ -74,6 +74,9 @@ See [API design][design] for general introduction on design and key concepts on ## Examples +[Code snippets and samples](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/mixedreality/azure-resourcemanager-mixedreality/SAMPLE.md) + + ## Troubleshooting ## Next steps diff --git a/sdk/mixedreality/azure-resourcemanager-mixedreality/SAMPLE.md b/sdk/mixedreality/azure-resourcemanager-mixedreality/SAMPLE.md new file mode 100644 index 0000000000000..cede21d2011e5 --- /dev/null +++ b/sdk/mixedreality/azure-resourcemanager-mixedreality/SAMPLE.md @@ -0,0 +1,711 @@ +# Code snippets and samples + + +## ObjectAnchorsAccounts + +- [Create](#objectanchorsaccounts_create) +- [Delete](#objectanchorsaccounts_delete) +- [GetByResourceGroup](#objectanchorsaccounts_getbyresourcegroup) +- [List](#objectanchorsaccounts_list) +- [ListByResourceGroup](#objectanchorsaccounts_listbyresourcegroup) +- [ListKeys](#objectanchorsaccounts_listkeys) +- [RegenerateKeys](#objectanchorsaccounts_regeneratekeys) +- [Update](#objectanchorsaccounts_update) + +## Operations + +- [List](#operations_list) + +## RemoteRenderingAccounts + +- [Create](#remoterenderingaccounts_create) +- [Delete](#remoterenderingaccounts_delete) +- [GetByResourceGroup](#remoterenderingaccounts_getbyresourcegroup) +- [List](#remoterenderingaccounts_list) +- [ListByResourceGroup](#remoterenderingaccounts_listbyresourcegroup) +- [ListKeys](#remoterenderingaccounts_listkeys) +- [RegenerateKeys](#remoterenderingaccounts_regeneratekeys) +- [Update](#remoterenderingaccounts_update) + +## ResourceProvider + +- [CheckNameAvailabilityLocal](#resourceprovider_checknameavailabilitylocal) + +## SpatialAnchorsAccounts + +- [Create](#spatialanchorsaccounts_create) +- [Delete](#spatialanchorsaccounts_delete) +- [GetByResourceGroup](#spatialanchorsaccounts_getbyresourcegroup) +- [List](#spatialanchorsaccounts_list) +- [ListByResourceGroup](#spatialanchorsaccounts_listbyresourcegroup) +- [ListKeys](#spatialanchorsaccounts_listkeys) +- [RegenerateKeys](#spatialanchorsaccounts_regeneratekeys) +- [Update](#spatialanchorsaccounts_update) +### ObjectAnchorsAccounts_Create + +```java +import com.azure.resourcemanager.mixedreality.models.ObjectAnchorsAccountIdentity; +import com.azure.resourcemanager.mixedreality.models.ResourceIdentityType; + +/** Samples for ObjectAnchorsAccounts Create. */ +public final class ObjectAnchorsAccountsCreateSamples { + /* + * x-ms-original-file: specification/mixedreality/resource-manager/Microsoft.MixedReality/preview/2021-03-01-preview/examples/object-anchors/Put.json + */ + /** + * Sample code: Create object anchors account. + * + * @param manager Entry point to MixedRealityManager. + */ + public static void createObjectAnchorsAccount(com.azure.resourcemanager.mixedreality.MixedRealityManager manager) { + manager + .objectAnchorsAccounts() + .define("MyAccount") + .withRegion("eastus2euap") + .withExistingResourceGroup("MyResourceGroup") + .withIdentity(new ObjectAnchorsAccountIdentity().withType(ResourceIdentityType.SYSTEM_ASSIGNED)) + .create(); + } +} +``` + +### ObjectAnchorsAccounts_Delete + +```java +import com.azure.core.util.Context; + +/** Samples for ObjectAnchorsAccounts Delete. */ +public final class ObjectAnchorsAccountsDeleteSamples { + /* + * x-ms-original-file: specification/mixedreality/resource-manager/Microsoft.MixedReality/preview/2021-03-01-preview/examples/object-anchors/Delete.json + */ + /** + * Sample code: Delete object anchors account. + * + * @param manager Entry point to MixedRealityManager. + */ + public static void deleteObjectAnchorsAccount(com.azure.resourcemanager.mixedreality.MixedRealityManager manager) { + manager.objectAnchorsAccounts().deleteWithResponse("MyResourceGroup", "MyAccount", Context.NONE); + } +} +``` + +### ObjectAnchorsAccounts_GetByResourceGroup + +```java +import com.azure.core.util.Context; + +/** Samples for ObjectAnchorsAccounts GetByResourceGroup. */ +public final class ObjectAnchorsAccountsGetByResourceGroupSamples { + /* + * x-ms-original-file: specification/mixedreality/resource-manager/Microsoft.MixedReality/preview/2021-03-01-preview/examples/object-anchors/Get.json + */ + /** + * Sample code: Get object anchors account. + * + * @param manager Entry point to MixedRealityManager. + */ + public static void getObjectAnchorsAccount(com.azure.resourcemanager.mixedreality.MixedRealityManager manager) { + manager.objectAnchorsAccounts().getByResourceGroupWithResponse("MyResourceGroup", "MyAccount", Context.NONE); + } +} +``` + +### ObjectAnchorsAccounts_List + +```java +import com.azure.core.util.Context; + +/** Samples for ObjectAnchorsAccounts List. */ +public final class ObjectAnchorsAccountsListSamples { + /* + * x-ms-original-file: specification/mixedreality/resource-manager/Microsoft.MixedReality/preview/2021-03-01-preview/examples/object-anchors/GetBySubscription.json + */ + /** + * Sample code: List object anchors accounts by subscription. + * + * @param manager Entry point to MixedRealityManager. + */ + public static void listObjectAnchorsAccountsBySubscription( + com.azure.resourcemanager.mixedreality.MixedRealityManager manager) { + manager.objectAnchorsAccounts().list(Context.NONE); + } +} +``` + +### ObjectAnchorsAccounts_ListByResourceGroup + +```java +import com.azure.core.util.Context; + +/** Samples for ObjectAnchorsAccounts ListByResourceGroup. */ +public final class ObjectAnchorsAccountsListByResourceGroupSamples { + /* + * x-ms-original-file: specification/mixedreality/resource-manager/Microsoft.MixedReality/preview/2021-03-01-preview/examples/object-anchors/GetByResourceGroup.json + */ + /** + * Sample code: List object anchors accounts by resource group. + * + * @param manager Entry point to MixedRealityManager. + */ + public static void listObjectAnchorsAccountsByResourceGroup( + com.azure.resourcemanager.mixedreality.MixedRealityManager manager) { + manager.objectAnchorsAccounts().listByResourceGroup("MyResourceGroup", Context.NONE); + } +} +``` + +### ObjectAnchorsAccounts_ListKeys + +```java +import com.azure.core.util.Context; + +/** Samples for ObjectAnchorsAccounts ListKeys. */ +public final class ObjectAnchorsAccountsListKeysSamples { + /* + * x-ms-original-file: specification/mixedreality/resource-manager/Microsoft.MixedReality/preview/2021-03-01-preview/examples/object-anchors/ListKeys.json + */ + /** + * Sample code: List object anchors account key. + * + * @param manager Entry point to MixedRealityManager. + */ + public static void listObjectAnchorsAccountKey(com.azure.resourcemanager.mixedreality.MixedRealityManager manager) { + manager.objectAnchorsAccounts().listKeysWithResponse("MyResourceGroup", "MyAccount", Context.NONE); + } +} +``` + +### ObjectAnchorsAccounts_RegenerateKeys + +```java +import com.azure.core.util.Context; +import com.azure.resourcemanager.mixedreality.models.AccountKeyRegenerateRequest; +import com.azure.resourcemanager.mixedreality.models.Serial; + +/** Samples for ObjectAnchorsAccounts RegenerateKeys. */ +public final class ObjectAnchorsAccountsRegenerateKeysSamples { + /* + * x-ms-original-file: specification/mixedreality/resource-manager/Microsoft.MixedReality/preview/2021-03-01-preview/examples/object-anchors/RegenerateKey.json + */ + /** + * Sample code: Regenerate object anchors account keys. + * + * @param manager Entry point to MixedRealityManager. + */ + public static void regenerateObjectAnchorsAccountKeys( + com.azure.resourcemanager.mixedreality.MixedRealityManager manager) { + manager + .objectAnchorsAccounts() + .regenerateKeysWithResponse( + "MyResourceGroup", "MyAccount", new AccountKeyRegenerateRequest().withSerial(Serial.ONE), Context.NONE); + } +} +``` + +### ObjectAnchorsAccounts_Update + +```java +import com.azure.core.util.Context; +import com.azure.resourcemanager.mixedreality.models.ObjectAnchorsAccount; +import com.azure.resourcemanager.mixedreality.models.ObjectAnchorsAccountIdentity; +import com.azure.resourcemanager.mixedreality.models.ResourceIdentityType; +import java.util.HashMap; +import java.util.Map; + +/** Samples for ObjectAnchorsAccounts Update. */ +public final class ObjectAnchorsAccountsUpdateSamples { + /* + * x-ms-original-file: specification/mixedreality/resource-manager/Microsoft.MixedReality/preview/2021-03-01-preview/examples/object-anchors/Patch.json + */ + /** + * Sample code: Update object anchors account. + * + * @param manager Entry point to MixedRealityManager. + */ + public static void updateObjectAnchorsAccount(com.azure.resourcemanager.mixedreality.MixedRealityManager manager) { + ObjectAnchorsAccount resource = + manager + .objectAnchorsAccounts() + .getByResourceGroupWithResponse("MyResourceGroup", "MyAccount", Context.NONE) + .getValue(); + resource + .update() + .withTags(mapOf("hero", "romeo", "heroine", "juliet")) + .withIdentity(new ObjectAnchorsAccountIdentity().withType(ResourceIdentityType.SYSTEM_ASSIGNED)) + .apply(); + } + + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} +``` + +### Operations_List + +```java +import com.azure.core.util.Context; + +/** Samples for Operations List. */ +public final class OperationsListSamples { + /* + * x-ms-original-file: specification/mixedreality/resource-manager/Microsoft.MixedReality/preview/2021-03-01-preview/examples/proxy/ExposingAvailableOperations.json + */ + /** + * Sample code: List available operations. + * + * @param manager Entry point to MixedRealityManager. + */ + public static void listAvailableOperations(com.azure.resourcemanager.mixedreality.MixedRealityManager manager) { + manager.operations().list(Context.NONE); + } +} +``` + +### RemoteRenderingAccounts_Create + +```java +import com.azure.resourcemanager.mixedreality.models.Identity; +import com.azure.resourcemanager.mixedreality.models.ResourceIdentityType; + +/** Samples for RemoteRenderingAccounts Create. */ +public final class RemoteRenderingAccountsCreateSamples { + /* + * x-ms-original-file: specification/mixedreality/resource-manager/Microsoft.MixedReality/preview/2021-03-01-preview/examples/remote-rendering/Put.json + */ + /** + * Sample code: Create remote rendering account. + * + * @param manager Entry point to MixedRealityManager. + */ + public static void createRemoteRenderingAccount( + com.azure.resourcemanager.mixedreality.MixedRealityManager manager) { + manager + .remoteRenderingAccounts() + .define("MyAccount") + .withRegion("eastus2euap") + .withExistingResourceGroup("MyResourceGroup") + .withIdentity(new Identity().withType(ResourceIdentityType.SYSTEM_ASSIGNED)) + .create(); + } +} +``` + +### RemoteRenderingAccounts_Delete + +```java +import com.azure.core.util.Context; + +/** Samples for RemoteRenderingAccounts Delete. */ +public final class RemoteRenderingAccountsDeleteSamples { + /* + * x-ms-original-file: specification/mixedreality/resource-manager/Microsoft.MixedReality/preview/2021-03-01-preview/examples/remote-rendering/Delete.json + */ + /** + * Sample code: Delete remote rendering account. + * + * @param manager Entry point to MixedRealityManager. + */ + public static void deleteRemoteRenderingAccount( + com.azure.resourcemanager.mixedreality.MixedRealityManager manager) { + manager.remoteRenderingAccounts().deleteWithResponse("MyResourceGroup", "MyAccount", Context.NONE); + } +} +``` + +### RemoteRenderingAccounts_GetByResourceGroup + +```java +import com.azure.core.util.Context; + +/** Samples for RemoteRenderingAccounts GetByResourceGroup. */ +public final class RemoteRenderingAccountsGetByResourceGroupSamples { + /* + * x-ms-original-file: specification/mixedreality/resource-manager/Microsoft.MixedReality/preview/2021-03-01-preview/examples/remote-rendering/Get.json + */ + /** + * Sample code: Get remote rendering account. + * + * @param manager Entry point to MixedRealityManager. + */ + public static void getRemoteRenderingAccount(com.azure.resourcemanager.mixedreality.MixedRealityManager manager) { + manager.remoteRenderingAccounts().getByResourceGroupWithResponse("MyResourceGroup", "MyAccount", Context.NONE); + } +} +``` + +### RemoteRenderingAccounts_List + +```java +import com.azure.core.util.Context; + +/** Samples for RemoteRenderingAccounts List. */ +public final class RemoteRenderingAccountsListSamples { + /* + * x-ms-original-file: specification/mixedreality/resource-manager/Microsoft.MixedReality/preview/2021-03-01-preview/examples/remote-rendering/GetBySubscription.json + */ + /** + * Sample code: List remote rendering accounts by subscription. + * + * @param manager Entry point to MixedRealityManager. + */ + public static void listRemoteRenderingAccountsBySubscription( + com.azure.resourcemanager.mixedreality.MixedRealityManager manager) { + manager.remoteRenderingAccounts().list(Context.NONE); + } +} +``` + +### RemoteRenderingAccounts_ListByResourceGroup + +```java +import com.azure.core.util.Context; + +/** Samples for RemoteRenderingAccounts ListByResourceGroup. */ +public final class RemoteRenderingAccountsListByResourceGroupSamples { + /* + * x-ms-original-file: specification/mixedreality/resource-manager/Microsoft.MixedReality/preview/2021-03-01-preview/examples/remote-rendering/GetByResourceGroup.json + */ + /** + * Sample code: List remote rendering accounts by resource group. + * + * @param manager Entry point to MixedRealityManager. + */ + public static void listRemoteRenderingAccountsByResourceGroup( + com.azure.resourcemanager.mixedreality.MixedRealityManager manager) { + manager.remoteRenderingAccounts().listByResourceGroup("MyResourceGroup", Context.NONE); + } +} +``` + +### RemoteRenderingAccounts_ListKeys + +```java +import com.azure.core.util.Context; + +/** Samples for RemoteRenderingAccounts ListKeys. */ +public final class RemoteRenderingAccountsListKeysSamples { + /* + * x-ms-original-file: specification/mixedreality/resource-manager/Microsoft.MixedReality/preview/2021-03-01-preview/examples/remote-rendering/ListKeys.json + */ + /** + * Sample code: List remote rendering account key. + * + * @param manager Entry point to MixedRealityManager. + */ + public static void listRemoteRenderingAccountKey( + com.azure.resourcemanager.mixedreality.MixedRealityManager manager) { + manager.remoteRenderingAccounts().listKeysWithResponse("MyResourceGroup", "MyAccount", Context.NONE); + } +} +``` + +### RemoteRenderingAccounts_RegenerateKeys + +```java +import com.azure.core.util.Context; +import com.azure.resourcemanager.mixedreality.models.AccountKeyRegenerateRequest; +import com.azure.resourcemanager.mixedreality.models.Serial; + +/** Samples for RemoteRenderingAccounts RegenerateKeys. */ +public final class RemoteRenderingAccountsRegenerateKeysSamples { + /* + * x-ms-original-file: specification/mixedreality/resource-manager/Microsoft.MixedReality/preview/2021-03-01-preview/examples/remote-rendering/RegenerateKey.json + */ + /** + * Sample code: Regenerate remote rendering account keys. + * + * @param manager Entry point to MixedRealityManager. + */ + public static void regenerateRemoteRenderingAccountKeys( + com.azure.resourcemanager.mixedreality.MixedRealityManager manager) { + manager + .remoteRenderingAccounts() + .regenerateKeysWithResponse( + "MyResourceGroup", "MyAccount", new AccountKeyRegenerateRequest().withSerial(Serial.ONE), Context.NONE); + } +} +``` + +### RemoteRenderingAccounts_Update + +```java +import com.azure.core.util.Context; +import com.azure.resourcemanager.mixedreality.models.Identity; +import com.azure.resourcemanager.mixedreality.models.RemoteRenderingAccount; +import com.azure.resourcemanager.mixedreality.models.ResourceIdentityType; +import java.util.HashMap; +import java.util.Map; + +/** Samples for RemoteRenderingAccounts Update. */ +public final class RemoteRenderingAccountsUpdateSamples { + /* + * x-ms-original-file: specification/mixedreality/resource-manager/Microsoft.MixedReality/preview/2021-03-01-preview/examples/remote-rendering/Patch.json + */ + /** + * Sample code: Update remote rendering account. + * + * @param manager Entry point to MixedRealityManager. + */ + public static void updateRemoteRenderingAccount( + com.azure.resourcemanager.mixedreality.MixedRealityManager manager) { + RemoteRenderingAccount resource = + manager + .remoteRenderingAccounts() + .getByResourceGroupWithResponse("MyResourceGroup", "MyAccount", Context.NONE) + .getValue(); + resource + .update() + .withTags(mapOf("hero", "romeo", "heroine", "juliet")) + .withIdentity(new Identity().withType(ResourceIdentityType.SYSTEM_ASSIGNED)) + .apply(); + } + + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} +``` + +### ResourceProvider_CheckNameAvailabilityLocal + +```java +import com.azure.core.util.Context; +import com.azure.resourcemanager.mixedreality.models.CheckNameAvailabilityRequest; + +/** Samples for ResourceProvider CheckNameAvailabilityLocal. */ +public final class ResourceProviderCheckNameAvailabilityLocalSamples { + /* + * x-ms-original-file: specification/mixedreality/resource-manager/Microsoft.MixedReality/preview/2021-03-01-preview/examples/proxy/CheckNameAvailabilityForLocalUniqueness.json + */ + /** + * Sample code: CheckLocalNameAvailability. + * + * @param manager Entry point to MixedRealityManager. + */ + public static void checkLocalNameAvailability(com.azure.resourcemanager.mixedreality.MixedRealityManager manager) { + manager + .resourceProviders() + .checkNameAvailabilityLocalWithResponse( + "eastus2euap", + new CheckNameAvailabilityRequest() + .withName("MyAccount") + .withType("Microsoft.MixedReality/spatialAnchorsAccounts"), + Context.NONE); + } +} +``` + +### SpatialAnchorsAccounts_Create + +```java +/** Samples for SpatialAnchorsAccounts Create. */ +public final class SpatialAnchorsAccountsCreateSamples { + /* + * x-ms-original-file: specification/mixedreality/resource-manager/Microsoft.MixedReality/preview/2021-03-01-preview/examples/spatial-anchors/Put.json + */ + /** + * Sample code: Create spatial anchor account. + * + * @param manager Entry point to MixedRealityManager. + */ + public static void createSpatialAnchorAccount(com.azure.resourcemanager.mixedreality.MixedRealityManager manager) { + manager + .spatialAnchorsAccounts() + .define("MyAccount") + .withRegion("eastus2euap") + .withExistingResourceGroup("MyResourceGroup") + .create(); + } +} +``` + +### SpatialAnchorsAccounts_Delete + +```java +import com.azure.core.util.Context; + +/** Samples for SpatialAnchorsAccounts Delete. */ +public final class SpatialAnchorsAccountsDeleteSamples { + /* + * x-ms-original-file: specification/mixedreality/resource-manager/Microsoft.MixedReality/preview/2021-03-01-preview/examples/spatial-anchors/Delete.json + */ + /** + * Sample code: Delete spatial anchors account. + * + * @param manager Entry point to MixedRealityManager. + */ + public static void deleteSpatialAnchorsAccount(com.azure.resourcemanager.mixedreality.MixedRealityManager manager) { + manager.spatialAnchorsAccounts().deleteWithResponse("MyResourceGroup", "MyAccount", Context.NONE); + } +} +``` + +### SpatialAnchorsAccounts_GetByResourceGroup + +```java +import com.azure.core.util.Context; + +/** Samples for SpatialAnchorsAccounts GetByResourceGroup. */ +public final class SpatialAnchorsAccountsGetByResourceGroupSamples { + /* + * x-ms-original-file: specification/mixedreality/resource-manager/Microsoft.MixedReality/preview/2021-03-01-preview/examples/spatial-anchors/Get.json + */ + /** + * Sample code: Get spatial anchors account. + * + * @param manager Entry point to MixedRealityManager. + */ + public static void getSpatialAnchorsAccount(com.azure.resourcemanager.mixedreality.MixedRealityManager manager) { + manager.spatialAnchorsAccounts().getByResourceGroupWithResponse("MyResourceGroup", "MyAccount", Context.NONE); + } +} +``` + +### SpatialAnchorsAccounts_List + +```java +import com.azure.core.util.Context; + +/** Samples for SpatialAnchorsAccounts List. */ +public final class SpatialAnchorsAccountsListSamples { + /* + * x-ms-original-file: specification/mixedreality/resource-manager/Microsoft.MixedReality/preview/2021-03-01-preview/examples/spatial-anchors/GetBySubscription.json + */ + /** + * Sample code: List spatial anchors accounts by subscription. + * + * @param manager Entry point to MixedRealityManager. + */ + public static void listSpatialAnchorsAccountsBySubscription( + com.azure.resourcemanager.mixedreality.MixedRealityManager manager) { + manager.spatialAnchorsAccounts().list(Context.NONE); + } +} +``` + +### SpatialAnchorsAccounts_ListByResourceGroup + +```java +import com.azure.core.util.Context; + +/** Samples for SpatialAnchorsAccounts ListByResourceGroup. */ +public final class SpatialAnchorsAccountsListByResourceGroupSamples { + /* + * x-ms-original-file: specification/mixedreality/resource-manager/Microsoft.MixedReality/preview/2021-03-01-preview/examples/spatial-anchors/GetByResourceGroup.json + */ + /** + * Sample code: List spatial anchor accounts by resource group. + * + * @param manager Entry point to MixedRealityManager. + */ + public static void listSpatialAnchorAccountsByResourceGroup( + com.azure.resourcemanager.mixedreality.MixedRealityManager manager) { + manager.spatialAnchorsAccounts().listByResourceGroup("MyResourceGroup", Context.NONE); + } +} +``` + +### SpatialAnchorsAccounts_ListKeys + +```java +import com.azure.core.util.Context; + +/** Samples for SpatialAnchorsAccounts ListKeys. */ +public final class SpatialAnchorsAccountsListKeysSamples { + /* + * x-ms-original-file: specification/mixedreality/resource-manager/Microsoft.MixedReality/preview/2021-03-01-preview/examples/spatial-anchors/ListKeys.json + */ + /** + * Sample code: List spatial anchor account key. + * + * @param manager Entry point to MixedRealityManager. + */ + public static void listSpatialAnchorAccountKey(com.azure.resourcemanager.mixedreality.MixedRealityManager manager) { + manager.spatialAnchorsAccounts().listKeysWithResponse("MyResourceGroup", "MyAccount", Context.NONE); + } +} +``` + +### SpatialAnchorsAccounts_RegenerateKeys + +```java +import com.azure.core.util.Context; +import com.azure.resourcemanager.mixedreality.models.AccountKeyRegenerateRequest; +import com.azure.resourcemanager.mixedreality.models.Serial; + +/** Samples for SpatialAnchorsAccounts RegenerateKeys. */ +public final class SpatialAnchorsAccountsRegenerateKeysSamples { + /* + * x-ms-original-file: specification/mixedreality/resource-manager/Microsoft.MixedReality/preview/2021-03-01-preview/examples/spatial-anchors/RegenerateKey.json + */ + /** + * Sample code: Regenerate spatial anchors account keys. + * + * @param manager Entry point to MixedRealityManager. + */ + public static void regenerateSpatialAnchorsAccountKeys( + com.azure.resourcemanager.mixedreality.MixedRealityManager manager) { + manager + .spatialAnchorsAccounts() + .regenerateKeysWithResponse( + "MyResourceGroup", "MyAccount", new AccountKeyRegenerateRequest().withSerial(Serial.ONE), Context.NONE); + } +} +``` + +### SpatialAnchorsAccounts_Update + +```java +import com.azure.core.util.Context; +import com.azure.resourcemanager.mixedreality.models.SpatialAnchorsAccount; +import java.util.HashMap; +import java.util.Map; + +/** Samples for SpatialAnchorsAccounts Update. */ +public final class SpatialAnchorsAccountsUpdateSamples { + /* + * x-ms-original-file: specification/mixedreality/resource-manager/Microsoft.MixedReality/preview/2021-03-01-preview/examples/spatial-anchors/Patch.json + */ + /** + * Sample code: Update spatial anchors account. + * + * @param manager Entry point to MixedRealityManager. + */ + public static void updateSpatialAnchorsAccount(com.azure.resourcemanager.mixedreality.MixedRealityManager manager) { + SpatialAnchorsAccount resource = + manager + .spatialAnchorsAccounts() + .getByResourceGroupWithResponse("MyResourceGroup", "MyAccount", Context.NONE) + .getValue(); + resource.update().withTags(mapOf("hero", "romeo", "heroine", "juliet")).apply(); + } + + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} +``` + diff --git a/sdk/mixedreality/azure-resourcemanager-mixedreality/pom.xml b/sdk/mixedreality/azure-resourcemanager-mixedreality/pom.xml index f90c02e1ac784..246dcc072eaac 100644 --- a/sdk/mixedreality/azure-resourcemanager-mixedreality/pom.xml +++ b/sdk/mixedreality/azure-resourcemanager-mixedreality/pom.xml @@ -1,55 +1,55 @@ - 4.0.0 - - com.azure - azure-client-sdk-parent - 1.7.0 - ../../parents/azure-client-sdk-parent - + 4.0.0 + + com.azure + azure-client-sdk-parent + 1.7.0 + ../../parents/azure-client-sdk-parent + - com.azure.resourcemanager - azure-resourcemanager-mixedreality - 1.0.0-beta.2 - jar + com.azure.resourcemanager + azure-resourcemanager-mixedreality + 1.0.0-beta.2 + jar - Microsoft Azure SDK for MixedReality Management - This package contains Microsoft Azure SDK for MixedReality Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Mixed Reality Client. Package tag package-2021-01. - https://github.com/Azure/azure-sdk-for-java + Microsoft Azure SDK for MixedReality Management + This package contains Microsoft Azure SDK for MixedReality Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Mixed Reality Client. Package tag package-2021-03-01-preview. + https://github.com/Azure/azure-sdk-for-java - - - The MIT License (MIT) - http://opensource.org/licenses/MIT - repo - - + + + The MIT License (MIT) + http://opensource.org/licenses/MIT + repo + + - - https://github.com/Azure/azure-sdk-for-java - scm:git:git@github.com:Azure/azure-sdk-for-java.git - scm:git:git@github.com:Azure/azure-sdk-for-java.git - HEAD - - - - microsoft - Microsoft - - - - UTF-8 - true - - - - com.azure - azure-core - 1.27.0 - - - com.azure - azure-core-management - 1.5.4 - - + + https://github.com/Azure/azure-sdk-for-java + scm:git:git@github.com:Azure/azure-sdk-for-java.git + scm:git:git@github.com:Azure/azure-sdk-for-java.git + HEAD + + + + microsoft + Microsoft + + + + UTF-8 + true + + + + com.azure + azure-core + 1.27.0 + + + com.azure + azure-core-management + 1.5.4 + + diff --git a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/MixedRealityManager.java b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/MixedRealityManager.java index 030f4b2c59116..196104665bb9e 100644 --- a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/MixedRealityManager.java +++ b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/MixedRealityManager.java @@ -8,24 +8,29 @@ import com.azure.core.http.HttpClient; import com.azure.core.http.HttpPipeline; import com.azure.core.http.HttpPipelineBuilder; +import com.azure.core.http.HttpPipelinePosition; import com.azure.core.http.policy.AddDatePolicy; -import com.azure.core.http.policy.BearerTokenAuthenticationPolicy; +import com.azure.core.http.policy.AddHeadersFromContextPolicy; import com.azure.core.http.policy.HttpLogOptions; import com.azure.core.http.policy.HttpLoggingPolicy; import com.azure.core.http.policy.HttpPipelinePolicy; import com.azure.core.http.policy.HttpPolicyProviders; import com.azure.core.http.policy.RequestIdPolicy; +import com.azure.core.http.policy.RetryOptions; import com.azure.core.http.policy.RetryPolicy; import com.azure.core.http.policy.UserAgentPolicy; +import com.azure.core.management.http.policy.ArmChallengeAuthenticationPolicy; import com.azure.core.management.profile.AzureProfile; import com.azure.core.util.Configuration; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.mixedreality.fluent.MixedRealityClient; import com.azure.resourcemanager.mixedreality.implementation.MixedRealityClientBuilder; +import com.azure.resourcemanager.mixedreality.implementation.ObjectAnchorsAccountsImpl; import com.azure.resourcemanager.mixedreality.implementation.OperationsImpl; import com.azure.resourcemanager.mixedreality.implementation.RemoteRenderingAccountsImpl; import com.azure.resourcemanager.mixedreality.implementation.ResourceProvidersImpl; import com.azure.resourcemanager.mixedreality.implementation.SpatialAnchorsAccountsImpl; +import com.azure.resourcemanager.mixedreality.models.ObjectAnchorsAccounts; import com.azure.resourcemanager.mixedreality.models.Operations; import com.azure.resourcemanager.mixedreality.models.RemoteRenderingAccounts; import com.azure.resourcemanager.mixedreality.models.ResourceProviders; @@ -35,6 +40,7 @@ import java.util.ArrayList; import java.util.List; import java.util.Objects; +import java.util.stream.Collectors; /** Entry point to MixedRealityManager. Mixed Reality Client. */ public final class MixedRealityManager { @@ -46,6 +52,8 @@ public final class MixedRealityManager { private RemoteRenderingAccounts remoteRenderingAccounts; + private ObjectAnchorsAccounts objectAnchorsAccounts; + private final MixedRealityClient clientObject; private MixedRealityManager(HttpPipeline httpPipeline, AzureProfile profile, Duration defaultPollInterval) { @@ -73,6 +81,19 @@ public static MixedRealityManager authenticate(TokenCredential credential, Azure return configure().authenticate(credential, profile); } + /** + * Creates an instance of MixedReality service API entry point. + * + * @param httpPipeline the {@link HttpPipeline} configured with Azure authentication credential. + * @param profile the Azure profile for client. + * @return the MixedReality service API instance. + */ + public static MixedRealityManager authenticate(HttpPipeline httpPipeline, AzureProfile profile) { + Objects.requireNonNull(httpPipeline, "'httpPipeline' cannot be null."); + Objects.requireNonNull(profile, "'profile' cannot be null."); + return new MixedRealityManager(httpPipeline, profile, null); + } + /** * Gets a Configurable instance that can be used to create MixedRealityManager with optional configuration. * @@ -84,12 +105,14 @@ public static Configurable configure() { /** The Configurable allowing configurations to be set. */ public static final class Configurable { - private final ClientLogger logger = new ClientLogger(Configurable.class); + private static final ClientLogger LOGGER = new ClientLogger(Configurable.class); private HttpClient httpClient; private HttpLogOptions httpLogOptions; private final List policies = new ArrayList<>(); + private final List scopes = new ArrayList<>(); private RetryPolicy retryPolicy; + private RetryOptions retryOptions; private Duration defaultPollInterval; private Configurable() { @@ -128,6 +151,17 @@ public Configurable withPolicy(HttpPipelinePolicy policy) { return this; } + /** + * Adds the scope to permission sets. + * + * @param scope the scope. + * @return the configurable object itself. + */ + public Configurable withScope(String scope) { + this.scopes.add(Objects.requireNonNull(scope, "'scope' cannot be null.")); + return this; + } + /** * Sets the retry policy to the HTTP pipeline. * @@ -139,6 +173,19 @@ public Configurable withRetryPolicy(RetryPolicy retryPolicy) { return this; } + /** + * Sets the retry options for the HTTP pipeline retry policy. + * + *

This setting has no effect, if retry policy is set via {@link #withRetryPolicy(RetryPolicy)}. + * + * @param retryOptions the retry options for the HTTP pipeline retry policy. + * @return the configurable object itself. + */ + public Configurable withRetryOptions(RetryOptions retryOptions) { + this.retryOptions = Objects.requireNonNull(retryOptions, "'retryOptions' cannot be null."); + return this; + } + /** * Sets the default poll interval, used when service does not provide "Retry-After" header. * @@ -146,9 +193,11 @@ public Configurable withRetryPolicy(RetryPolicy retryPolicy) { * @return the configurable object itself. */ public Configurable withDefaultPollInterval(Duration defaultPollInterval) { - this.defaultPollInterval = Objects.requireNonNull(defaultPollInterval, "'retryPolicy' cannot be null."); + this.defaultPollInterval = + Objects.requireNonNull(defaultPollInterval, "'defaultPollInterval' cannot be null."); if (this.defaultPollInterval.isNegative()) { - throw logger.logExceptionAsError(new IllegalArgumentException("'httpPipeline' cannot be negative")); + throw LOGGER + .logExceptionAsError(new IllegalArgumentException("'defaultPollInterval' cannot be negative")); } return this; } @@ -184,20 +233,38 @@ public MixedRealityManager authenticate(TokenCredential credential, AzureProfile userAgentBuilder.append(" (auto-generated)"); } + if (scopes.isEmpty()) { + scopes.add(profile.getEnvironment().getManagementEndpoint() + "/.default"); + } if (retryPolicy == null) { - retryPolicy = new RetryPolicy("Retry-After", ChronoUnit.SECONDS); + if (retryOptions != null) { + retryPolicy = new RetryPolicy(retryOptions); + } else { + retryPolicy = new RetryPolicy("Retry-After", ChronoUnit.SECONDS); + } } List policies = new ArrayList<>(); policies.add(new UserAgentPolicy(userAgentBuilder.toString())); + policies.add(new AddHeadersFromContextPolicy()); policies.add(new RequestIdPolicy()); + policies + .addAll( + this + .policies + .stream() + .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_CALL) + .collect(Collectors.toList())); HttpPolicyProviders.addBeforeRetryPolicies(policies); policies.add(retryPolicy); policies.add(new AddDatePolicy()); + policies.add(new ArmChallengeAuthenticationPolicy(credential, scopes.toArray(new String[0]))); policies - .add( - new BearerTokenAuthenticationPolicy( - credential, profile.getEnvironment().getManagementEndpoint() + "/.default")); - policies.addAll(this.policies); + .addAll( + this + .policies + .stream() + .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY) + .collect(Collectors.toList())); HttpPolicyProviders.addAfterRetryPolicies(policies); policies.add(new HttpLoggingPolicy(httpLogOptions)); HttpPipeline httpPipeline = @@ -243,6 +310,14 @@ public RemoteRenderingAccounts remoteRenderingAccounts() { return remoteRenderingAccounts; } + /** @return Resource collection API of ObjectAnchorsAccounts. */ + public ObjectAnchorsAccounts objectAnchorsAccounts() { + if (this.objectAnchorsAccounts == null) { + this.objectAnchorsAccounts = new ObjectAnchorsAccountsImpl(clientObject.getObjectAnchorsAccounts(), this); + } + return objectAnchorsAccounts; + } + /** * @return Wrapped service client MixedRealityClient providing direct access to the underlying auto-generated API * implementation, based on Azure REST API. diff --git a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/fluent/MixedRealityClient.java b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/fluent/MixedRealityClient.java index 83ac188059365..14ab8e52adcdd 100644 --- a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/fluent/MixedRealityClient.java +++ b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/fluent/MixedRealityClient.java @@ -71,4 +71,11 @@ public interface MixedRealityClient { * @return the RemoteRenderingAccountsClient object. */ RemoteRenderingAccountsClient getRemoteRenderingAccounts(); + + /** + * Gets the ObjectAnchorsAccountsClient object to access its operations. + * + * @return the ObjectAnchorsAccountsClient object. + */ + ObjectAnchorsAccountsClient getObjectAnchorsAccounts(); } diff --git a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/fluent/ObjectAnchorsAccountsClient.java b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/fluent/ObjectAnchorsAccountsClient.java new file mode 100644 index 0000000000000..2c3fb1b0aa998 --- /dev/null +++ b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/fluent/ObjectAnchorsAccountsClient.java @@ -0,0 +1,238 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mixedreality.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; +import com.azure.resourcemanager.mixedreality.fluent.models.AccountKeysInner; +import com.azure.resourcemanager.mixedreality.fluent.models.ObjectAnchorsAccountInner; +import com.azure.resourcemanager.mixedreality.models.AccountKeyRegenerateRequest; + +/** An instance of this class provides access to all the operations defined in ObjectAnchorsAccountsClient. */ +public interface ObjectAnchorsAccountsClient { + /** + * List Object Anchors Accounts by Subscription. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return result of the request to get resource collection as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(); + + /** + * List Object Anchors Accounts by Subscription. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return result of the request to get resource collection as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(Context context); + + /** + * List Resources by Resource Group. + * + * @param resourceGroupName Name of an Azure resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return result of the request to get resource collection as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName); + + /** + * List Resources by Resource Group. + * + * @param resourceGroupName Name of an Azure resource group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return result of the request to get resource collection as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName, Context context); + + /** + * Delete an Object Anchors Account. + * + * @param resourceGroupName Name of an Azure resource group. + * @param accountName Name of an Mixed Reality Account. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String accountName); + + /** + * Delete an Object Anchors Account. + * + * @param resourceGroupName Name of an Azure resource group. + * @param accountName Name of an Mixed Reality Account. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response deleteWithResponse(String resourceGroupName, String accountName, Context context); + + /** + * Retrieve an Object Anchors Account. + * + * @param resourceGroupName Name of an Azure resource group. + * @param accountName Name of an Mixed Reality Account. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return objectAnchorsAccount Response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ObjectAnchorsAccountInner getByResourceGroup(String resourceGroupName, String accountName); + + /** + * Retrieve an Object Anchors Account. + * + * @param resourceGroupName Name of an Azure resource group. + * @param accountName Name of an Mixed Reality Account. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return objectAnchorsAccount Response along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getByResourceGroupWithResponse( + String resourceGroupName, String accountName, Context context); + + /** + * Updating an Object Anchors Account. + * + * @param resourceGroupName Name of an Azure resource group. + * @param accountName Name of an Mixed Reality Account. + * @param objectAnchorsAccount Object Anchors Account parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return objectAnchorsAccount Response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ObjectAnchorsAccountInner update( + String resourceGroupName, String accountName, ObjectAnchorsAccountInner objectAnchorsAccount); + + /** + * Updating an Object Anchors Account. + * + * @param resourceGroupName Name of an Azure resource group. + * @param accountName Name of an Mixed Reality Account. + * @param objectAnchorsAccount Object Anchors Account parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return objectAnchorsAccount Response along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response updateWithResponse( + String resourceGroupName, String accountName, ObjectAnchorsAccountInner objectAnchorsAccount, Context context); + + /** + * Creating or Updating an object anchors Account. + * + * @param resourceGroupName Name of an Azure resource group. + * @param accountName Name of an Mixed Reality Account. + * @param objectAnchorsAccount Object Anchors Account parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return objectAnchorsAccount Response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ObjectAnchorsAccountInner create( + String resourceGroupName, String accountName, ObjectAnchorsAccountInner objectAnchorsAccount); + + /** + * Creating or Updating an object anchors Account. + * + * @param resourceGroupName Name of an Azure resource group. + * @param accountName Name of an Mixed Reality Account. + * @param objectAnchorsAccount Object Anchors Account parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return objectAnchorsAccount Response along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response createWithResponse( + String resourceGroupName, String accountName, ObjectAnchorsAccountInner objectAnchorsAccount, Context context); + + /** + * List Both of the 2 Keys of an object anchors Account. + * + * @param resourceGroupName Name of an Azure resource group. + * @param accountName Name of an Mixed Reality Account. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return developer Keys of account. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + AccountKeysInner listKeys(String resourceGroupName, String accountName); + + /** + * List Both of the 2 Keys of an object anchors Account. + * + * @param resourceGroupName Name of an Azure resource group. + * @param accountName Name of an Mixed Reality Account. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return developer Keys of account along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response listKeysWithResponse(String resourceGroupName, String accountName, Context context); + + /** + * Regenerate specified Key of an object anchors Account. + * + * @param resourceGroupName Name of an Azure resource group. + * @param accountName Name of an Mixed Reality Account. + * @param regenerate Required information for key regeneration. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return developer Keys of account. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + AccountKeysInner regenerateKeys( + String resourceGroupName, String accountName, AccountKeyRegenerateRequest regenerate); + + /** + * Regenerate specified Key of an object anchors Account. + * + * @param resourceGroupName Name of an Azure resource group. + * @param accountName Name of an Mixed Reality Account. + * @param regenerate Required information for key regeneration. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return developer Keys of account along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response regenerateKeysWithResponse( + String resourceGroupName, String accountName, AccountKeyRegenerateRequest regenerate, Context context); +} diff --git a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/fluent/OperationsClient.java b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/fluent/OperationsClient.java index 727bf29a6e7f3..0ee8283d77a05 100644 --- a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/fluent/OperationsClient.java +++ b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/fluent/OperationsClient.java @@ -17,7 +17,8 @@ public interface OperationsClient { * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the request to list Resource Provider operations. + * @return result of the request to list Resource Provider operations as paginated response with {@link + * PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(); @@ -29,7 +30,8 @@ public interface OperationsClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the request to list Resource Provider operations. + * @return result of the request to list Resource Provider operations as paginated response with {@link + * PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(Context context); 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 e1891b2ff5743..024350b5d5338 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 @@ -20,7 +20,7 @@ public interface RemoteRenderingAccountsClient { * * @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. + * @return result of the request to get resource collection as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(); @@ -32,7 +32,7 @@ public interface RemoteRenderingAccountsClient { * @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. + * @return result of the request to get resource collection as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(Context context); @@ -44,7 +44,7 @@ public interface RemoteRenderingAccountsClient { * @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. + * @return result of the request to get resource collection as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByResourceGroup(String resourceGroupName); @@ -57,7 +57,7 @@ public interface RemoteRenderingAccountsClient { * @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. + * @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); @@ -83,7 +83,7 @@ public interface RemoteRenderingAccountsClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response deleteWithResponse(String resourceGroupName, String accountName, Context context); @@ -110,7 +110,7 @@ public interface RemoteRenderingAccountsClient { * @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 remoteRenderingAccount Response. + * @return remoteRenderingAccount Response along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response getByResourceGroupWithResponse( @@ -141,7 +141,7 @@ RemoteRenderingAccountInner update( * @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 remoteRenderingAccount Response. + * @return remoteRenderingAccount Response along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response updateWithResponse( @@ -175,7 +175,7 @@ RemoteRenderingAccountInner create( * @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 remoteRenderingAccount Response. + * @return remoteRenderingAccount Response along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response createWithResponse( @@ -206,7 +206,7 @@ Response createWithResponse( * @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. + * @return developer Keys of account along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response listKeysWithResponse(String resourceGroupName, String accountName, Context context); @@ -236,7 +236,7 @@ AccountKeysInner regenerateKeys( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return developer Keys of account. + * @return developer Keys of account along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response regenerateKeysWithResponse( diff --git a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/fluent/ResourceProvidersClient.java b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/fluent/ResourceProvidersClient.java index 30f717be6fe44..2526b7d789a74 100644 --- a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/fluent/ResourceProvidersClient.java +++ b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/fluent/ResourceProvidersClient.java @@ -36,7 +36,7 @@ CheckNameAvailabilityResponseInner checkNameAvailabilityLocal( * @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 check Name Availability Response. + * @return check Name Availability Response along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response checkNameAvailabilityLocalWithResponse( 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 bd933fec73826..e7bd2a1b07bf3 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 @@ -20,7 +20,7 @@ public interface SpatialAnchorsAccountsClient { * * @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. + * @return result of the request to get resource collection as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(); @@ -32,7 +32,7 @@ public interface SpatialAnchorsAccountsClient { * @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. + * @return result of the request to get resource collection as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(Context context); @@ -44,7 +44,7 @@ public interface SpatialAnchorsAccountsClient { * @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. + * @return result of the request to get resource collection as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByResourceGroup(String resourceGroupName); @@ -57,7 +57,7 @@ public interface SpatialAnchorsAccountsClient { * @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. + * @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); @@ -83,7 +83,7 @@ public interface SpatialAnchorsAccountsClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response deleteWithResponse(String resourceGroupName, String accountName, Context context); @@ -110,7 +110,7 @@ public interface SpatialAnchorsAccountsClient { * @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 spatialAnchorsAccount Response. + * @return spatialAnchorsAccount Response along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response getByResourceGroupWithResponse( @@ -141,7 +141,7 @@ SpatialAnchorsAccountInner update( * @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 spatialAnchorsAccount Response. + * @return spatialAnchorsAccount Response along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response updateWithResponse( @@ -175,7 +175,7 @@ SpatialAnchorsAccountInner create( * @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 spatialAnchorsAccount Response. + * @return spatialAnchorsAccount Response along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response createWithResponse( @@ -206,7 +206,7 @@ Response createWithResponse( * @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. + * @return developer Keys of account along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response listKeysWithResponse(String resourceGroupName, String accountName, Context context); @@ -236,7 +236,7 @@ AccountKeysInner regenerateKeys( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return developer Keys of account. + * @return developer Keys of account along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response regenerateKeysWithResponse( diff --git a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/fluent/models/AccountKeysInner.java b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/fluent/models/AccountKeysInner.java index 2e41d0d0a1973..ed3c55b314ebb 100644 --- a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/fluent/models/AccountKeysInner.java +++ b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/fluent/models/AccountKeysInner.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.mixedreality.fluent.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Developer Keys of account. */ @Immutable public final class AccountKeysInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(AccountKeysInner.class); - /* * value of primary key. */ diff --git a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/fluent/models/CheckNameAvailabilityResponseInner.java b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/fluent/models/CheckNameAvailabilityResponseInner.java index 1695905c80985..f0b89e8610d07 100644 --- a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/fluent/models/CheckNameAvailabilityResponseInner.java +++ b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/fluent/models/CheckNameAvailabilityResponseInner.java @@ -5,16 +5,12 @@ package com.azure.resourcemanager.mixedreality.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.mixedreality.models.NameUnavailableReason; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Check Name Availability Response. */ @Fluent public final class CheckNameAvailabilityResponseInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(CheckNameAvailabilityResponseInner.class); - /* * if name Available */ diff --git a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/fluent/models/MixedRealityAccountProperties.java b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/fluent/models/MixedRealityAccountProperties.java new file mode 100644 index 0000000000000..79431281efc56 --- /dev/null +++ b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/fluent/models/MixedRealityAccountProperties.java @@ -0,0 +1,76 @@ +// 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.fasterxml.jackson.annotation.JsonProperty; + +/** Common Properties shared by Mixed Reality Accounts. */ +@Fluent +public final class MixedRealityAccountProperties { + /* + * The name of the storage account associated with this accountId + */ + @JsonProperty(value = "storageAccountName") + private String storageAccountName; + + /* + * unique id of certain account. + */ + @JsonProperty(value = "accountId", access = JsonProperty.Access.WRITE_ONLY) + private String accountId; + + /* + * Correspond domain name of certain Spatial Anchors Account + */ + @JsonProperty(value = "accountDomain", access = JsonProperty.Access.WRITE_ONLY) + private String accountDomain; + + /** + * Get the storageAccountName property: The name of the storage account associated with this accountId. + * + * @return the storageAccountName value. + */ + public String storageAccountName() { + return this.storageAccountName; + } + + /** + * Set the storageAccountName property: The name of the storage account associated with this accountId. + * + * @param storageAccountName the storageAccountName value to set. + * @return the MixedRealityAccountProperties object itself. + */ + public MixedRealityAccountProperties withStorageAccountName(String storageAccountName) { + this.storageAccountName = storageAccountName; + return this; + } + + /** + * Get the accountId property: unique id of certain account. + * + * @return the accountId value. + */ + public String accountId() { + return this.accountId; + } + + /** + * Get the accountDomain property: Correspond domain name of certain Spatial Anchors Account. + * + * @return the accountDomain value. + */ + public String accountDomain() { + return this.accountDomain; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/fluent/models/ObjectAnchorsAccountInner.java b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/fluent/models/ObjectAnchorsAccountInner.java new file mode 100644 index 0000000000000..71d4a72415d2d --- /dev/null +++ b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/fluent/models/ObjectAnchorsAccountInner.java @@ -0,0 +1,230 @@ +// 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.resourcemanager.mixedreality.models.Identity; +import com.azure.resourcemanager.mixedreality.models.ObjectAnchorsAccountIdentity; +import com.azure.resourcemanager.mixedreality.models.Sku; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Map; + +/** ObjectAnchorsAccount Response. */ +@Fluent +public final class ObjectAnchorsAccountInner extends Resource { + /* + * The identity property. + */ + @JsonProperty(value = "identity") + private ObjectAnchorsAccountIdentity identity; + + /* + * Property bag. + */ + @JsonProperty(value = "properties") + private MixedRealityAccountProperties innerProperties; + + /* + * The plan associated with this account + */ + @JsonProperty(value = "plan") + private Identity plan; + + /* + * The sku associated with this account + */ + @JsonProperty(value = "sku") + private Sku sku; + + /* + * The kind of account, if supported + */ + @JsonProperty(value = "kind") + private Sku kind; + + /* + * The system metadata related to an object anchors account. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** + * Get the identity property: The identity property. + * + * @return the identity value. + */ + public ObjectAnchorsAccountIdentity identity() { + return this.identity; + } + + /** + * Set the identity property: The identity property. + * + * @param identity the identity value to set. + * @return the ObjectAnchorsAccountInner object itself. + */ + public ObjectAnchorsAccountInner withIdentity(ObjectAnchorsAccountIdentity identity) { + this.identity = identity; + return this; + } + + /** + * Get the innerProperties property: Property bag. + * + * @return the innerProperties value. + */ + private MixedRealityAccountProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the plan property: The plan associated with this account. + * + * @return the plan value. + */ + public Identity plan() { + return this.plan; + } + + /** + * Set the plan property: The plan associated with this account. + * + * @param plan the plan value to set. + * @return the ObjectAnchorsAccountInner object itself. + */ + public ObjectAnchorsAccountInner withPlan(Identity plan) { + this.plan = plan; + return this; + } + + /** + * Get the sku property: The sku associated with this account. + * + * @return the sku value. + */ + public Sku sku() { + return this.sku; + } + + /** + * Set the sku property: The sku associated with this account. + * + * @param sku the sku value to set. + * @return the ObjectAnchorsAccountInner object itself. + */ + public ObjectAnchorsAccountInner withSku(Sku sku) { + this.sku = sku; + return this; + } + + /** + * Get the kind property: The kind of account, if supported. + * + * @return the kind value. + */ + public Sku kind() { + return this.kind; + } + + /** + * Set the kind property: The kind of account, if supported. + * + * @param kind the kind value to set. + * @return the ObjectAnchorsAccountInner object itself. + */ + public ObjectAnchorsAccountInner withKind(Sku kind) { + this.kind = kind; + return this; + } + + /** + * Get the systemData property: The system metadata related to an object anchors account. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** {@inheritDoc} */ + @Override + public ObjectAnchorsAccountInner withLocation(String location) { + super.withLocation(location); + return this; + } + + /** {@inheritDoc} */ + @Override + public ObjectAnchorsAccountInner withTags(Map tags) { + super.withTags(tags); + return this; + } + + /** + * Get the storageAccountName property: The name of the storage account associated with this accountId. + * + * @return the storageAccountName value. + */ + public String storageAccountName() { + return this.innerProperties() == null ? null : this.innerProperties().storageAccountName(); + } + + /** + * Set the storageAccountName property: The name of the storage account associated with this accountId. + * + * @param storageAccountName the storageAccountName value to set. + * @return the ObjectAnchorsAccountInner object itself. + */ + public ObjectAnchorsAccountInner withStorageAccountName(String storageAccountName) { + if (this.innerProperties() == null) { + this.innerProperties = new MixedRealityAccountProperties(); + } + this.innerProperties().withStorageAccountName(storageAccountName); + return this; + } + + /** + * Get the accountId property: unique id of certain account. + * + * @return the accountId value. + */ + public String accountId() { + return this.innerProperties() == null ? null : this.innerProperties().accountId(); + } + + /** + * Get the accountDomain property: Correspond domain name of certain Spatial Anchors Account. + * + * @return the accountDomain value. + */ + public String accountDomain() { + return this.innerProperties() == null ? null : this.innerProperties().accountDomain(); + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (identity() != null) { + identity().validate(); + } + if (innerProperties() != null) { + innerProperties().validate(); + } + if (plan() != null) { + plan().validate(); + } + if (sku() != null) { + sku().validate(); + } + if (kind() != null) { + kind().validate(); + } + } +} diff --git a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/fluent/models/OperationInner.java b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/fluent/models/OperationInner.java index 67cd162695a90..353ebfc018adc 100644 --- a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/fluent/models/OperationInner.java +++ b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/fluent/models/OperationInner.java @@ -5,17 +5,13 @@ package com.azure.resourcemanager.mixedreality.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.mixedreality.models.OperationDisplay; import com.azure.resourcemanager.mixedreality.models.OperationProperties; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** REST API operation. */ @Fluent public final class OperationInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(OperationInner.class); - /* * Operation name: {provider}/{resource}/{operation} */ diff --git a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/fluent/models/RemoteRenderingAccountInner.java b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/fluent/models/RemoteRenderingAccountInner.java index 7269022b859ea..546f709b99ad5 100644 --- a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/fluent/models/RemoteRenderingAccountInner.java +++ b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/fluent/models/RemoteRenderingAccountInner.java @@ -5,21 +5,21 @@ package com.azure.resourcemanager.mixedreality.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.annotation.JsonFlatten; import com.azure.core.management.Resource; import com.azure.core.management.SystemData; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.mixedreality.models.Identity; import com.azure.resourcemanager.mixedreality.models.Sku; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Map; /** RemoteRenderingAccount Response. */ -@JsonFlatten @Fluent -public class RemoteRenderingAccountInner extends Resource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(RemoteRenderingAccountInner.class); +public final class RemoteRenderingAccountInner extends Resource { + /* + * Property bag. + */ + @JsonProperty(value = "properties") + private MixedRealityAccountProperties innerProperties; /* * The identity associated with this account @@ -51,23 +51,14 @@ public class RemoteRenderingAccountInner extends Resource { @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) private SystemData systemData; - /* - * The name of the storage account associated with this accountId - */ - @JsonProperty(value = "properties.storageAccountName") - private String storageAccountName; - - /* - * unique id of certain account. - */ - @JsonProperty(value = "properties.accountId", access = JsonProperty.Access.WRITE_ONLY) - private String accountId; - - /* - * Correspond domain name of certain Spatial Anchors Account + /** + * Get the innerProperties property: Property bag. + * + * @return the innerProperties value. */ - @JsonProperty(value = "properties.accountDomain", access = JsonProperty.Access.WRITE_ONLY) - private String accountDomain; + private MixedRealityAccountProperties innerProperties() { + return this.innerProperties; + } /** * Get the identity property: The identity associated with this account. @@ -158,13 +149,27 @@ public SystemData systemData() { return this.systemData; } + /** {@inheritDoc} */ + @Override + public RemoteRenderingAccountInner withLocation(String location) { + super.withLocation(location); + return this; + } + + /** {@inheritDoc} */ + @Override + public RemoteRenderingAccountInner withTags(Map tags) { + super.withTags(tags); + return this; + } + /** * Get the storageAccountName property: The name of the storage account associated with this accountId. * * @return the storageAccountName value. */ public String storageAccountName() { - return this.storageAccountName; + return this.innerProperties() == null ? null : this.innerProperties().storageAccountName(); } /** @@ -174,7 +179,10 @@ public String storageAccountName() { * @return the RemoteRenderingAccountInner object itself. */ public RemoteRenderingAccountInner withStorageAccountName(String storageAccountName) { - this.storageAccountName = storageAccountName; + if (this.innerProperties() == null) { + this.innerProperties = new MixedRealityAccountProperties(); + } + this.innerProperties().withStorageAccountName(storageAccountName); return this; } @@ -184,7 +192,7 @@ public RemoteRenderingAccountInner withStorageAccountName(String storageAccountN * @return the accountId value. */ public String accountId() { - return this.accountId; + return this.innerProperties() == null ? null : this.innerProperties().accountId(); } /** @@ -193,21 +201,7 @@ public String accountId() { * @return the accountDomain value. */ public String accountDomain() { - return this.accountDomain; - } - - /** {@inheritDoc} */ - @Override - public RemoteRenderingAccountInner withLocation(String location) { - super.withLocation(location); - return this; - } - - /** {@inheritDoc} */ - @Override - public RemoteRenderingAccountInner withTags(Map tags) { - super.withTags(tags); - return this; + return this.innerProperties() == null ? null : this.innerProperties().accountDomain(); } /** @@ -216,6 +210,9 @@ public RemoteRenderingAccountInner withTags(Map tags) { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } if (identity() != null) { identity().validate(); } diff --git a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/fluent/models/SpatialAnchorsAccountInner.java b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/fluent/models/SpatialAnchorsAccountInner.java index 66e8b5e768f96..dd616beb038ef 100644 --- a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/fluent/models/SpatialAnchorsAccountInner.java +++ b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/fluent/models/SpatialAnchorsAccountInner.java @@ -5,21 +5,21 @@ package com.azure.resourcemanager.mixedreality.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.annotation.JsonFlatten; import com.azure.core.management.Resource; import com.azure.core.management.SystemData; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.mixedreality.models.Identity; import com.azure.resourcemanager.mixedreality.models.Sku; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Map; /** SpatialAnchorsAccount Response. */ -@JsonFlatten @Fluent -public class SpatialAnchorsAccountInner extends Resource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(SpatialAnchorsAccountInner.class); +public final class SpatialAnchorsAccountInner extends Resource { + /* + * Property bag. + */ + @JsonProperty(value = "properties") + private MixedRealityAccountProperties innerProperties; /* * The identity associated with this account @@ -51,23 +51,14 @@ public class SpatialAnchorsAccountInner extends Resource { @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) private SystemData systemData; - /* - * The name of the storage account associated with this accountId - */ - @JsonProperty(value = "properties.storageAccountName") - private String storageAccountName; - - /* - * unique id of certain account. - */ - @JsonProperty(value = "properties.accountId", access = JsonProperty.Access.WRITE_ONLY) - private String accountId; - - /* - * Correspond domain name of certain Spatial Anchors Account + /** + * Get the innerProperties property: Property bag. + * + * @return the innerProperties value. */ - @JsonProperty(value = "properties.accountDomain", access = JsonProperty.Access.WRITE_ONLY) - private String accountDomain; + private MixedRealityAccountProperties innerProperties() { + return this.innerProperties; + } /** * Get the identity property: The identity associated with this account. @@ -158,13 +149,27 @@ public SystemData systemData() { return this.systemData; } + /** {@inheritDoc} */ + @Override + public SpatialAnchorsAccountInner withLocation(String location) { + super.withLocation(location); + return this; + } + + /** {@inheritDoc} */ + @Override + public SpatialAnchorsAccountInner withTags(Map tags) { + super.withTags(tags); + return this; + } + /** * Get the storageAccountName property: The name of the storage account associated with this accountId. * * @return the storageAccountName value. */ public String storageAccountName() { - return this.storageAccountName; + return this.innerProperties() == null ? null : this.innerProperties().storageAccountName(); } /** @@ -174,7 +179,10 @@ public String storageAccountName() { * @return the SpatialAnchorsAccountInner object itself. */ public SpatialAnchorsAccountInner withStorageAccountName(String storageAccountName) { - this.storageAccountName = storageAccountName; + if (this.innerProperties() == null) { + this.innerProperties = new MixedRealityAccountProperties(); + } + this.innerProperties().withStorageAccountName(storageAccountName); return this; } @@ -184,7 +192,7 @@ public SpatialAnchorsAccountInner withStorageAccountName(String storageAccountNa * @return the accountId value. */ public String accountId() { - return this.accountId; + return this.innerProperties() == null ? null : this.innerProperties().accountId(); } /** @@ -193,21 +201,7 @@ public String accountId() { * @return the accountDomain value. */ public String accountDomain() { - return this.accountDomain; - } - - /** {@inheritDoc} */ - @Override - public SpatialAnchorsAccountInner withLocation(String location) { - super.withLocation(location); - return this; - } - - /** {@inheritDoc} */ - @Override - public SpatialAnchorsAccountInner withTags(Map tags) { - super.withTags(tags); - return this; + return this.innerProperties() == null ? null : this.innerProperties().accountDomain(); } /** @@ -216,6 +210,9 @@ public SpatialAnchorsAccountInner withTags(Map tags) { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } if (identity() != null) { identity().validate(); } diff --git a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/implementation/MixedRealityClientBuilder.java b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/implementation/MixedRealityClientBuilder.java index 13fe10f9973ed..f88b48b542187 100644 --- a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/implementation/MixedRealityClientBuilder.java +++ b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/implementation/MixedRealityClientBuilder.java @@ -7,7 +7,6 @@ import com.azure.core.annotation.ServiceClientBuilder; import com.azure.core.http.HttpPipeline; import com.azure.core.http.HttpPipelineBuilder; -import com.azure.core.http.policy.CookiePolicy; import com.azure.core.http.policy.RetryPolicy; import com.azure.core.http.policy.UserAgentPolicy; import com.azure.core.management.AzureEnvironment; @@ -68,34 +67,34 @@ public MixedRealityClientBuilder environment(AzureEnvironment environment) { } /* - * The default poll interval for long-running operation + * The HTTP pipeline to send requests through */ - private Duration defaultPollInterval; + private HttpPipeline pipeline; /** - * Sets The default poll interval for long-running operation. + * Sets The HTTP pipeline to send requests through. * - * @param defaultPollInterval the defaultPollInterval value. + * @param pipeline the pipeline value. * @return the MixedRealityClientBuilder. */ - public MixedRealityClientBuilder defaultPollInterval(Duration defaultPollInterval) { - this.defaultPollInterval = defaultPollInterval; + public MixedRealityClientBuilder pipeline(HttpPipeline pipeline) { + this.pipeline = pipeline; return this; } /* - * The HTTP pipeline to send requests through + * The default poll interval for long-running operation */ - private HttpPipeline pipeline; + private Duration defaultPollInterval; /** - * Sets The HTTP pipeline to send requests through. + * Sets The default poll interval for long-running operation. * - * @param pipeline the pipeline value. + * @param defaultPollInterval the defaultPollInterval value. * @return the MixedRealityClientBuilder. */ - public MixedRealityClientBuilder pipeline(HttpPipeline pipeline) { - this.pipeline = pipeline; + public MixedRealityClientBuilder defaultPollInterval(Duration defaultPollInterval) { + this.defaultPollInterval = defaultPollInterval; return this; } @@ -127,15 +126,12 @@ public MixedRealityClientImpl buildClient() { if (environment == null) { this.environment = AzureEnvironment.AZURE; } + if (pipeline == null) { + this.pipeline = new HttpPipelineBuilder().policies(new UserAgentPolicy(), new RetryPolicy()).build(); + } if (defaultPollInterval == null) { this.defaultPollInterval = Duration.ofSeconds(30); } - if (pipeline == null) { - this.pipeline = - new HttpPipelineBuilder() - .policies(new UserAgentPolicy(), new RetryPolicy(), new CookiePolicy()) - .build(); - } if (serializerAdapter == null) { this.serializerAdapter = SerializerFactory.createDefaultManagementSerializerAdapter(); } diff --git a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/implementation/MixedRealityClientImpl.java b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/implementation/MixedRealityClientImpl.java index 15870ed443522..124eeb4b5c4d5 100644 --- a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/implementation/MixedRealityClientImpl.java +++ b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/implementation/MixedRealityClientImpl.java @@ -22,6 +22,7 @@ import com.azure.core.util.serializer.SerializerAdapter; import com.azure.core.util.serializer.SerializerEncoding; import com.azure.resourcemanager.mixedreality.fluent.MixedRealityClient; +import com.azure.resourcemanager.mixedreality.fluent.ObjectAnchorsAccountsClient; import com.azure.resourcemanager.mixedreality.fluent.OperationsClient; import com.azure.resourcemanager.mixedreality.fluent.RemoteRenderingAccountsClient; import com.azure.resourcemanager.mixedreality.fluent.ResourceProvidersClient; @@ -39,8 +40,6 @@ /** Initializes a new instance of the MixedRealityClientImpl type. */ @ServiceClient(builder = MixedRealityClientBuilder.class) public final class MixedRealityClientImpl implements MixedRealityClient { - private final ClientLogger logger = new ClientLogger(MixedRealityClientImpl.class); - /** The Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). */ private final String subscriptionId; @@ -161,6 +160,18 @@ public RemoteRenderingAccountsClient getRemoteRenderingAccounts() { return this.remoteRenderingAccounts; } + /** The ObjectAnchorsAccountsClient object to access its operations. */ + private final ObjectAnchorsAccountsClient objectAnchorsAccounts; + + /** + * Gets the ObjectAnchorsAccountsClient object to access its operations. + * + * @return the ObjectAnchorsAccountsClient object. + */ + public ObjectAnchorsAccountsClient getObjectAnchorsAccounts() { + return this.objectAnchorsAccounts; + } + /** * Initializes an instance of MixedRealityClient client. * @@ -184,11 +195,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); } /** @@ -274,7 +286,7 @@ public Mono getLroFinalResultOrError(AsyncPollResponse, managementError = null; } } catch (IOException | RuntimeException ioe) { - logger.logThrowableAsWarning(ioe); + LOGGER.logThrowableAsWarning(ioe); } } } else { @@ -333,4 +345,6 @@ public Mono getBodyAsString(Charset charset) { return Mono.just(new String(responseBody, charset)); } } + + private static final ClientLogger LOGGER = new ClientLogger(MixedRealityClientImpl.class); } diff --git a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/implementation/ObjectAnchorsAccountImpl.java b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/implementation/ObjectAnchorsAccountImpl.java new file mode 100644 index 0000000000000..d4a454c951b10 --- /dev/null +++ b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/implementation/ObjectAnchorsAccountImpl.java @@ -0,0 +1,245 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mixedreality.implementation; + +import com.azure.core.http.rest.Response; +import com.azure.core.management.Region; +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.mixedreality.fluent.models.ObjectAnchorsAccountInner; +import com.azure.resourcemanager.mixedreality.models.AccountKeyRegenerateRequest; +import com.azure.resourcemanager.mixedreality.models.AccountKeys; +import com.azure.resourcemanager.mixedreality.models.Identity; +import com.azure.resourcemanager.mixedreality.models.ObjectAnchorsAccount; +import com.azure.resourcemanager.mixedreality.models.ObjectAnchorsAccountIdentity; +import com.azure.resourcemanager.mixedreality.models.Sku; +import java.util.Collections; +import java.util.Map; + +public final class ObjectAnchorsAccountImpl + implements ObjectAnchorsAccount, ObjectAnchorsAccount.Definition, ObjectAnchorsAccount.Update { + private ObjectAnchorsAccountInner innerObject; + + private final com.azure.resourcemanager.mixedreality.MixedRealityManager serviceManager; + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public String location() { + return this.innerModel().location(); + } + + public Map tags() { + Map inner = this.innerModel().tags(); + if (inner != null) { + return Collections.unmodifiableMap(inner); + } else { + return Collections.emptyMap(); + } + } + + public ObjectAnchorsAccountIdentity identity() { + return this.innerModel().identity(); + } + + public Identity plan() { + return this.innerModel().plan(); + } + + public Sku sku() { + return this.innerModel().sku(); + } + + public Sku kind() { + return this.innerModel().kind(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public String storageAccountName() { + return this.innerModel().storageAccountName(); + } + + public String accountId() { + return this.innerModel().accountId(); + } + + public String accountDomain() { + return this.innerModel().accountDomain(); + } + + public Region region() { + return Region.fromName(this.regionName()); + } + + public String regionName() { + return this.location(); + } + + public ObjectAnchorsAccountInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.mixedreality.MixedRealityManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String accountName; + + public ObjectAnchorsAccountImpl withExistingResourceGroup(String resourceGroupName) { + this.resourceGroupName = resourceGroupName; + return this; + } + + public ObjectAnchorsAccount create() { + this.innerObject = + serviceManager + .serviceClient() + .getObjectAnchorsAccounts() + .createWithResponse(resourceGroupName, accountName, this.innerModel(), Context.NONE) + .getValue(); + return this; + } + + public ObjectAnchorsAccount create(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getObjectAnchorsAccounts() + .createWithResponse(resourceGroupName, accountName, this.innerModel(), context) + .getValue(); + return this; + } + + ObjectAnchorsAccountImpl(String name, com.azure.resourcemanager.mixedreality.MixedRealityManager serviceManager) { + this.innerObject = new ObjectAnchorsAccountInner(); + this.serviceManager = serviceManager; + this.accountName = name; + } + + public ObjectAnchorsAccountImpl update() { + return this; + } + + public ObjectAnchorsAccount apply() { + this.innerObject = + serviceManager + .serviceClient() + .getObjectAnchorsAccounts() + .updateWithResponse(resourceGroupName, accountName, this.innerModel(), Context.NONE) + .getValue(); + return this; + } + + public ObjectAnchorsAccount apply(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getObjectAnchorsAccounts() + .updateWithResponse(resourceGroupName, accountName, this.innerModel(), context) + .getValue(); + return this; + } + + ObjectAnchorsAccountImpl( + ObjectAnchorsAccountInner innerObject, + com.azure.resourcemanager.mixedreality.MixedRealityManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.accountName = Utils.getValueFromIdByName(innerObject.id(), "objectAnchorsAccounts"); + } + + public ObjectAnchorsAccount refresh() { + this.innerObject = + serviceManager + .serviceClient() + .getObjectAnchorsAccounts() + .getByResourceGroupWithResponse(resourceGroupName, accountName, Context.NONE) + .getValue(); + return this; + } + + public ObjectAnchorsAccount refresh(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getObjectAnchorsAccounts() + .getByResourceGroupWithResponse(resourceGroupName, accountName, context) + .getValue(); + return this; + } + + public AccountKeys listKeys() { + return serviceManager.objectAnchorsAccounts().listKeys(resourceGroupName, accountName); + } + + public Response listKeysWithResponse(Context context) { + return serviceManager.objectAnchorsAccounts().listKeysWithResponse(resourceGroupName, accountName, context); + } + + public AccountKeys regenerateKeys(AccountKeyRegenerateRequest regenerate) { + return serviceManager.objectAnchorsAccounts().regenerateKeys(resourceGroupName, accountName, regenerate); + } + + public Response regenerateKeysWithResponse(AccountKeyRegenerateRequest regenerate, Context context) { + return serviceManager + .objectAnchorsAccounts() + .regenerateKeysWithResponse(resourceGroupName, accountName, regenerate, context); + } + + public ObjectAnchorsAccountImpl withRegion(Region location) { + this.innerModel().withLocation(location.toString()); + return this; + } + + public ObjectAnchorsAccountImpl withRegion(String location) { + this.innerModel().withLocation(location); + return this; + } + + public ObjectAnchorsAccountImpl withTags(Map tags) { + this.innerModel().withTags(tags); + return this; + } + + public ObjectAnchorsAccountImpl withIdentity(ObjectAnchorsAccountIdentity identity) { + this.innerModel().withIdentity(identity); + return this; + } + + public ObjectAnchorsAccountImpl withPlan(Identity plan) { + this.innerModel().withPlan(plan); + return this; + } + + public ObjectAnchorsAccountImpl withSku(Sku sku) { + this.innerModel().withSku(sku); + return this; + } + + public ObjectAnchorsAccountImpl withKind(Sku kind) { + this.innerModel().withKind(kind); + return this; + } + + public ObjectAnchorsAccountImpl withStorageAccountName(String storageAccountName) { + this.innerModel().withStorageAccountName(storageAccountName); + return this; + } +} diff --git a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/implementation/ObjectAnchorsAccountsClientImpl.java b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/implementation/ObjectAnchorsAccountsClientImpl.java new file mode 100644 index 0000000000000..3cb897496854e --- /dev/null +++ b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/implementation/ObjectAnchorsAccountsClientImpl.java @@ -0,0 +1,1607 @@ +// 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") + private interface ObjectAnchorsAccountsService { + @Headers({"Content-Type: application/json"}) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.MixedReality/objectAnchorsAccounts") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MixedReality" + + "/objectAnchorsAccounts") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByResourceGroup( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Delete( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MixedReality" + + "/objectAnchorsAccounts/{accountName}") + @ExpectedResponses({200, 204}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> delete( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("accountName") String accountName, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MixedReality" + + "/objectAnchorsAccounts/{accountName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> getByResourceGroup( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("accountName") String accountName, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Patch( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MixedReality" + + "/objectAnchorsAccounts/{accountName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> update( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("accountName") String accountName, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") ObjectAnchorsAccountInner objectAnchorsAccount, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Put( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MixedReality" + + "/objectAnchorsAccounts/{accountName}") + @ExpectedResponses({200, 201}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> create( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("accountName") String accountName, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") ObjectAnchorsAccountInner objectAnchorsAccount, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MixedReality" + + "/objectAnchorsAccounts/{accountName}/listKeys") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listKeys( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("accountName") String accountName, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MixedReality" + + "/objectAnchorsAccounts/{accountName}/regenerateKeys") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> regenerateKeys( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("accountName") String accountName, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") AccountKeyRegenerateRequest regenerate, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get("{nextLink}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listBySubscriptionNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get("{nextLink}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByResourceGroupNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, + Context context); + } + + /** + * List Object Anchors Accounts by Subscription. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return result of the request to get resource collection 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())); + } + + /** + * 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)); + } + + /** + * 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)); + } + + /** + * 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)); + } + + /** + * 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()); + } + + /** + * 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)); + } + + /** + * 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())); + } + + /** + * 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)); + } + + /** + * 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)); + } + + /** + * 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)); + } + + /** + * 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)); + } + + /** + * 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)); + } + + /** + * 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())); + } + + /** + * 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); + } + + /** + * 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((Response res) -> Mono.empty()); + } + + /** + * Delete an Object Anchors Account. + * + * @param resourceGroupName Name of an Azure resource group. + * @param accountName Name of an Mixed Reality Account. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String accountName) { + deleteAsync(resourceGroupName, accountName).block(); + } + + /** + * Delete an Object Anchors Account. + * + * @param resourceGroupName Name of an Azure resource group. + * @param accountName Name of an Mixed Reality Account. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response deleteWithResponse(String resourceGroupName, String accountName, Context context) { + return deleteWithResponseAsync(resourceGroupName, accountName, context).block(); + } + + /** + * Retrieve an Object Anchors Account. + * + * @param resourceGroupName Name of an Azure resource group. + * @param accountName Name of an Mixed Reality Account. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return objectAnchorsAccount Response 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())); + } + + /** + * 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); + } + + /** + * 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( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Retrieve an Object Anchors Account. + * + * @param resourceGroupName Name of an Azure resource group. + * @param accountName Name of an Mixed Reality Account. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return objectAnchorsAccount Response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ObjectAnchorsAccountInner getByResourceGroup(String resourceGroupName, String accountName) { + return getByResourceGroupAsync(resourceGroupName, accountName).block(); + } + + /** + * Retrieve an Object Anchors Account. + * + * @param resourceGroupName Name of an Azure resource group. + * @param accountName Name of an Mixed Reality Account. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return objectAnchorsAccount Response along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getByResourceGroupWithResponse( + String resourceGroupName, String accountName, Context context) { + return getByResourceGroupWithResponseAsync(resourceGroupName, accountName, context).block(); + } + + /** + * Updating an Object Anchors Account. + * + * @param resourceGroupName Name of an Azure resource group. + * @param accountName Name of an Mixed Reality Account. + * @param objectAnchorsAccount Object Anchors Account parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return objectAnchorsAccount Response 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())); + } + + /** + * 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); + } + + /** + * 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( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Updating an Object Anchors Account. + * + * @param resourceGroupName Name of an Azure resource group. + * @param accountName Name of an Mixed Reality Account. + * @param objectAnchorsAccount Object Anchors Account parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return objectAnchorsAccount Response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ObjectAnchorsAccountInner update( + String resourceGroupName, String accountName, ObjectAnchorsAccountInner objectAnchorsAccount) { + return updateAsync(resourceGroupName, accountName, objectAnchorsAccount).block(); + } + + /** + * Updating an Object Anchors Account. + * + * @param resourceGroupName Name of an Azure resource group. + * @param accountName Name of an Mixed Reality Account. + * @param objectAnchorsAccount Object Anchors Account parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return objectAnchorsAccount Response 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(); + } + + /** + * 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())); + } + + /** + * 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); + } + + /** + * 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( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Creating or Updating an object anchors Account. + * + * @param resourceGroupName Name of an Azure resource group. + * @param accountName Name of an Mixed Reality Account. + * @param objectAnchorsAccount Object Anchors Account parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return objectAnchorsAccount Response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ObjectAnchorsAccountInner create( + String resourceGroupName, String accountName, ObjectAnchorsAccountInner objectAnchorsAccount) { + return createAsync(resourceGroupName, accountName, objectAnchorsAccount).block(); + } + + /** + * Creating or Updating an object anchors Account. + * + * @param resourceGroupName Name of an Azure resource group. + * @param accountName Name of an Mixed Reality Account. + * @param objectAnchorsAccount Object Anchors Account parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return objectAnchorsAccount Response 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(); + } + + /** + * 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())); + } + + /** + * 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); + } + + /** + * 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( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * List Both of the 2 Keys of an object anchors Account. + * + * @param resourceGroupName Name of an Azure resource group. + * @param accountName Name of an Mixed Reality Account. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return developer Keys of account. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public AccountKeysInner listKeys(String resourceGroupName, String accountName) { + return listKeysAsync(resourceGroupName, accountName).block(); + } + + /** + * List Both of the 2 Keys of an object anchors Account. + * + * @param resourceGroupName Name of an Azure resource group. + * @param accountName Name of an Mixed Reality Account. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return developer Keys of account along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response listKeysWithResponse( + String resourceGroupName, String accountName, Context context) { + return listKeysWithResponseAsync(resourceGroupName, accountName, context).block(); + } + + /** + * Regenerate specified Key of an object anchors Account. + * + * @param resourceGroupName Name of an Azure resource group. + * @param accountName Name of an Mixed Reality Account. + * @param regenerate Required information for key regeneration. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return developer Keys of account 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())); + } + + /** + * 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); + } + + /** + * 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( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Regenerate specified Key of an object anchors Account. + * + * @param resourceGroupName Name of an Azure resource group. + * @param accountName Name of an Mixed Reality Account. + * @param regenerate Required information for key regeneration. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return developer Keys of account. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public AccountKeysInner regenerateKeys( + String resourceGroupName, String accountName, AccountKeyRegenerateRequest regenerate) { + return regenerateKeysAsync(resourceGroupName, accountName, regenerate).block(); + } + + /** + * Regenerate specified Key of an object anchors Account. + * + * @param resourceGroupName Name of an Azure resource group. + * @param accountName Name of an Mixed Reality Account. + * @param regenerate Required information for key regeneration. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return developer Keys of account 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(); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return result of the request to get resource collection 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 nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return result of the request to get resource collection 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 nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return result of the request to get resource collection 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 nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return result of the request to get resource collection 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 0000000000000..d907940881dc1 --- /dev/null +++ b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/implementation/ObjectAnchorsAccountsImpl.java @@ -0,0 +1,234 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mixedreality.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 Utils.mapPage(inner, inner1 -> new ObjectAnchorsAccountImpl(inner1, this.manager())); + } + + public PagedIterable list(Context context) { + PagedIterable inner = this.serviceClient().list(context); + return Utils.mapPage(inner, inner1 -> new ObjectAnchorsAccountImpl(inner1, this.manager())); + } + + public PagedIterable listByResourceGroup(String resourceGroupName) { + PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName); + return Utils.mapPage(inner, inner1 -> new ObjectAnchorsAccountImpl(inner1, this.manager())); + } + + public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { + PagedIterable inner = + this.serviceClient().listByResourceGroup(resourceGroupName, context); + return Utils.mapPage(inner, inner1 -> new ObjectAnchorsAccountImpl(inner1, this.manager())); + } + + public void deleteByResourceGroup(String resourceGroupName, String accountName) { + this.serviceClient().delete(resourceGroupName, accountName); + } + + public Response deleteWithResponse(String resourceGroupName, String accountName, Context context) { + return this.serviceClient().deleteWithResponse(resourceGroupName, accountName, context); + } + + public ObjectAnchorsAccount getByResourceGroup(String resourceGroupName, String accountName) { + ObjectAnchorsAccountInner inner = this.serviceClient().getByResourceGroup(resourceGroupName, accountName); + if (inner != null) { + return new ObjectAnchorsAccountImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getByResourceGroupWithResponse( + String resourceGroupName, String accountName, Context context) { + Response inner = + this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, accountName, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new ObjectAnchorsAccountImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public AccountKeys listKeys(String resourceGroupName, String accountName) { + AccountKeysInner inner = this.serviceClient().listKeys(resourceGroupName, accountName); + if (inner != null) { + return new AccountKeysImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response listKeysWithResponse(String resourceGroupName, String accountName, Context context) { + Response inner = + this.serviceClient().listKeysWithResponse(resourceGroupName, accountName, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new AccountKeysImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public AccountKeys regenerateKeys( + String resourceGroupName, String accountName, AccountKeyRegenerateRequest regenerate) { + AccountKeysInner inner = this.serviceClient().regenerateKeys(resourceGroupName, accountName, regenerate); + if (inner != null) { + return new AccountKeysImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response regenerateKeysWithResponse( + String resourceGroupName, String accountName, AccountKeyRegenerateRequest regenerate, Context context) { + Response inner = + this.serviceClient().regenerateKeysWithResponse(resourceGroupName, accountName, regenerate, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new AccountKeysImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public ObjectAnchorsAccount getById(String id) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String accountName = Utils.getValueFromIdByName(id, "objectAnchorsAccounts"); + if (accountName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format( + "The resource ID '%s' is not valid. Missing path segment 'objectAnchorsAccounts'.", + id))); + } + return this.getByResourceGroupWithResponse(resourceGroupName, accountName, Context.NONE).getValue(); + } + + public Response getByIdWithResponse(String id, Context context) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String accountName = Utils.getValueFromIdByName(id, "objectAnchorsAccounts"); + if (accountName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format( + "The resource ID '%s' is not valid. Missing path segment 'objectAnchorsAccounts'.", + id))); + } + return this.getByResourceGroupWithResponse(resourceGroupName, accountName, context); + } + + public void deleteById(String id) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String accountName = Utils.getValueFromIdByName(id, "objectAnchorsAccounts"); + if (accountName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format( + "The resource ID '%s' is not valid. Missing path segment 'objectAnchorsAccounts'.", + id))); + } + this.deleteWithResponse(resourceGroupName, accountName, Context.NONE); + } + + public Response deleteByIdWithResponse(String id, Context context) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String accountName = Utils.getValueFromIdByName(id, "objectAnchorsAccounts"); + if (accountName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format( + "The resource ID '%s' is not valid. Missing path segment 'objectAnchorsAccounts'.", + id))); + } + return this.deleteWithResponse(resourceGroupName, accountName, context); + } + + private ObjectAnchorsAccountsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.mixedreality.MixedRealityManager manager() { + return this.serviceManager; + } + + public ObjectAnchorsAccountImpl define(String name) { + return new ObjectAnchorsAccountImpl(name, this.manager()); + } +} diff --git a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/implementation/OperationsClientImpl.java b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/implementation/OperationsClientImpl.java index e7c346d7ae76a..5fca2b58bfc26 100644 --- a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/implementation/OperationsClientImpl.java +++ b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/implementation/OperationsClientImpl.java @@ -25,7 +25,6 @@ import com.azure.core.management.exception.ManagementException; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.mixedreality.fluent.OperationsClient; import com.azure.resourcemanager.mixedreality.fluent.models.OperationInner; import com.azure.resourcemanager.mixedreality.models.OperationPage; @@ -33,8 +32,6 @@ /** An instance of this class provides access to all the operations defined in OperationsClient. */ public final class OperationsClientImpl implements OperationsClient { - private final ClientLogger logger = new ClientLogger(OperationsClientImpl.class); - /** The proxy service used to perform REST calls. */ private final OperationsService service; @@ -85,7 +82,8 @@ Mono> listNext( * * @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 list Resource Provider operations. + * @return result of the request to list Resource Provider operations along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync() { @@ -118,7 +116,8 @@ private Mono> listSinglePageAsync() { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the request to list Resource Provider operations. + * @return result of the request to list Resource Provider operations along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(Context context) { @@ -148,7 +147,7 @@ private Mono> listSinglePageAsync(Context context) * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the request to list Resource Provider operations. + * @return result of the request to list Resource Provider operations as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync() { @@ -162,7 +161,7 @@ private PagedFlux listAsync() { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the request to list Resource Provider operations. + * @return result of the request to list Resource Provider operations as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(Context context) { @@ -175,7 +174,8 @@ private PagedFlux listAsync(Context context) { * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the request to list Resource Provider operations. + * @return result of the request to list Resource Provider operations as paginated response with {@link + * PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list() { @@ -189,7 +189,8 @@ public PagedIterable list() { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the request to list Resource Provider operations. + * @return result of the request to list Resource Provider operations as paginated response with {@link + * PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(Context context) { @@ -203,7 +204,8 @@ public PagedIterable list(Context context) { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the request to list Resource Provider operations. + * @return result of the request to list Resource Provider operations along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -239,7 +241,8 @@ private Mono> listNextSinglePageAsync(String nextL * @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 list Resource Provider operations. + * @return result of the request to list Resource Provider operations along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink, Context context) { diff --git a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/implementation/OperationsImpl.java b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/implementation/OperationsImpl.java index 545b849a7eb29..64d94f2d2f0fe 100644 --- a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/implementation/OperationsImpl.java +++ b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/implementation/OperationsImpl.java @@ -11,10 +11,9 @@ import com.azure.resourcemanager.mixedreality.fluent.models.OperationInner; import com.azure.resourcemanager.mixedreality.models.Operation; import com.azure.resourcemanager.mixedreality.models.Operations; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class OperationsImpl implements Operations { - @JsonIgnore private final ClientLogger logger = new ClientLogger(OperationsImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(OperationsImpl.class); private final OperationsClient innerClient; 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 40f60f9bfd012..9bd2b28a5c526 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 @@ -30,7 +30,6 @@ import com.azure.core.management.exception.ManagementException; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.mixedreality.fluent.RemoteRenderingAccountsClient; import com.azure.resourcemanager.mixedreality.fluent.models.AccountKeysInner; import com.azure.resourcemanager.mixedreality.fluent.models.RemoteRenderingAccountInner; @@ -40,8 +39,6 @@ /** An instance of this class provides access to all the operations defined in RemoteRenderingAccountsClient. */ public final class RemoteRenderingAccountsClientImpl implements RemoteRenderingAccountsClient { - private final ClientLogger logger = new ClientLogger(RemoteRenderingAccountsClientImpl.class); - /** The proxy service used to perform REST calls. */ private final RemoteRenderingAccountsService service; @@ -211,7 +208,8 @@ Mono> listByResourceGroupNext( * * @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. + * @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() { @@ -257,7 +255,8 @@ private Mono> listSinglePageAsync() { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the request to get resource collection. + * @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) { @@ -298,7 +297,7 @@ private Mono> listSinglePageAsync(Con * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the request to get resource collection. + * @return result of the request to get resource collection as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync() { @@ -313,7 +312,7 @@ private PagedFlux listAsync() { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the request to get resource collection. + * @return result of the request to get resource collection as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(Context context) { @@ -326,7 +325,7 @@ private PagedFlux listAsync(Context context) { * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the request to get resource collection. + * @return result of the request to get resource collection as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list() { @@ -340,7 +339,7 @@ public PagedIterable list() { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the request to get resource collection. + * @return result of the request to get resource collection as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(Context context) { @@ -354,7 +353,8 @@ public PagedIterable list(Context context) { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the request to get resource collection. + * @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( @@ -407,7 +407,8 @@ private Mono> listByResourceGroupSing * @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. + * @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( @@ -456,7 +457,7 @@ private Mono> listByResourceGroupSing * @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. + * @return result of the request to get resource collection as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByResourceGroupAsync(String resourceGroupName) { @@ -473,7 +474,7 @@ private PagedFlux listByResourceGroupAsync(String r * @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. + * @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) { @@ -489,7 +490,7 @@ private PagedFlux listByResourceGroupAsync(String r * @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. + * @return result of the request to get resource collection as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByResourceGroup(String resourceGroupName) { @@ -504,7 +505,7 @@ public PagedIterable listByResourceGroup(String res * @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. + * @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) { @@ -519,7 +520,7 @@ public PagedIterable listByResourceGroup(String res * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> deleteWithResponseAsync(String resourceGroupName, String accountName) { @@ -567,7 +568,7 @@ private Mono> deleteWithResponseAsync(String resourceGroupName, S * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> deleteWithResponseAsync( @@ -612,7 +613,7 @@ private Mono> deleteWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync(String resourceGroupName, String accountName) { @@ -642,7 +643,7 @@ public void delete(String resourceGroupName, String accountName) { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response deleteWithResponse(String resourceGroupName, String accountName, Context context) { @@ -657,7 +658,7 @@ public Response deleteWithResponse(String resourceGroupName, String accoun * @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 remoteRenderingAccount Response. + * @return remoteRenderingAccount Response along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getByResourceGroupWithResponseAsync( @@ -706,7 +707,7 @@ private Mono> getByResourceGroupWithRespon * @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 remoteRenderingAccount Response. + * @return remoteRenderingAccount Response along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getByResourceGroupWithResponseAsync( @@ -751,7 +752,7 @@ private Mono> getByResourceGroupWithRespon * @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 remoteRenderingAccount Response. + * @return remoteRenderingAccount Response on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getByResourceGroupAsync(String resourceGroupName, String accountName) { @@ -790,7 +791,7 @@ public RemoteRenderingAccountInner getByResourceGroup(String resourceGroupName, * @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 remoteRenderingAccount Response. + * @return remoteRenderingAccount Response along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getByResourceGroupWithResponse( @@ -807,7 +808,7 @@ public Response getByResourceGroupWithResponse( * @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 remoteRenderingAccount Response. + * @return remoteRenderingAccount Response along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> updateWithResponseAsync( @@ -865,7 +866,7 @@ private Mono> updateWithResponseAsync( * @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 remoteRenderingAccount Response. + * @return remoteRenderingAccount Response along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> updateWithResponseAsync( @@ -922,7 +923,7 @@ private Mono> updateWithResponseAsync( * @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 remoteRenderingAccount Response. + * @return remoteRenderingAccount Response on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateAsync( @@ -965,7 +966,7 @@ public RemoteRenderingAccountInner update( * @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 remoteRenderingAccount Response. + * @return remoteRenderingAccount Response along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response updateWithResponse( @@ -985,7 +986,7 @@ public Response updateWithResponse( * @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 remoteRenderingAccount Response. + * @return remoteRenderingAccount Response along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> createWithResponseAsync( @@ -1043,7 +1044,7 @@ private Mono> createWithResponseAsync( * @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 remoteRenderingAccount Response. + * @return remoteRenderingAccount Response along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> createWithResponseAsync( @@ -1100,7 +1101,7 @@ private Mono> createWithResponseAsync( * @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 remoteRenderingAccount Response. + * @return remoteRenderingAccount Response on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createAsync( @@ -1143,7 +1144,7 @@ public RemoteRenderingAccountInner create( * @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 remoteRenderingAccount Response. + * @return remoteRenderingAccount Response along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response createWithResponse( @@ -1162,7 +1163,7 @@ public Response createWithResponse( * @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. + * @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) { @@ -1210,7 +1211,7 @@ private Mono> listKeysWithResponseAsync(String resour * @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. + * @return developer Keys of account along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listKeysWithResponseAsync( @@ -1255,7 +1256,7 @@ private Mono> listKeysWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return developer Keys of account. + * @return developer Keys of account on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono listKeysAsync(String resourceGroupName, String accountName) { @@ -1294,7 +1295,7 @@ public AccountKeysInner listKeys(String resourceGroupName, String accountName) { * @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. + * @return developer Keys of account along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response listKeysWithResponse( @@ -1311,7 +1312,7 @@ public Response listKeysWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return developer Keys of account. + * @return developer Keys of account along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> regenerateKeysWithResponseAsync( @@ -1367,7 +1368,7 @@ private Mono> regenerateKeysWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return developer Keys of account. + * @return developer Keys of account along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> regenerateKeysWithResponseAsync( @@ -1419,7 +1420,7 @@ private Mono> regenerateKeysWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return developer Keys of account. + * @return developer Keys of account on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono regenerateKeysAsync( @@ -1462,7 +1463,7 @@ public AccountKeysInner regenerateKeys( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return developer Keys of account. + * @return developer Keys of account along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response regenerateKeysWithResponse( @@ -1477,7 +1478,8 @@ public Response regenerateKeysWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the request to get resource collection. + * @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) { @@ -1514,7 +1516,8 @@ private Mono> listBySubscriptionNextS * @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. + * @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( @@ -1550,7 +1553,8 @@ private Mono> listBySubscriptionNextS * @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. + * @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) { @@ -1587,7 +1591,8 @@ private Mono> listByResourceGroupNext * @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. + * @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( diff --git a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/implementation/RemoteRenderingAccountsImpl.java b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/implementation/RemoteRenderingAccountsImpl.java index 069e366d0673e..c22f9ffd28131 100644 --- a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/implementation/RemoteRenderingAccountsImpl.java +++ b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/implementation/RemoteRenderingAccountsImpl.java @@ -16,10 +16,9 @@ import com.azure.resourcemanager.mixedreality.models.AccountKeys; import com.azure.resourcemanager.mixedreality.models.RemoteRenderingAccount; import com.azure.resourcemanager.mixedreality.models.RemoteRenderingAccounts; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class RemoteRenderingAccountsImpl implements RemoteRenderingAccounts { - @JsonIgnore private final ClientLogger logger = new ClientLogger(RemoteRenderingAccountsImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(RemoteRenderingAccountsImpl.class); private final RemoteRenderingAccountsClient innerClient; @@ -136,7 +135,7 @@ public Response regenerateKeysWithResponse( public RemoteRenderingAccount getById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -144,7 +143,7 @@ public RemoteRenderingAccount getById(String id) { } String accountName = Utils.getValueFromIdByName(id, "remoteRenderingAccounts"); if (accountName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -158,7 +157,7 @@ public RemoteRenderingAccount getById(String id) { public Response getByIdWithResponse(String id, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -166,7 +165,7 @@ public Response getByIdWithResponse(String id, Context c } String accountName = Utils.getValueFromIdByName(id, "remoteRenderingAccounts"); if (accountName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -180,7 +179,7 @@ public Response getByIdWithResponse(String id, Context c public void deleteById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -188,7 +187,7 @@ public void deleteById(String id) { } String accountName = Utils.getValueFromIdByName(id, "remoteRenderingAccounts"); if (accountName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -196,13 +195,13 @@ public void deleteById(String id) { "The resource ID '%s' is not valid. Missing path segment 'remoteRenderingAccounts'.", id))); } - this.deleteWithResponse(resourceGroupName, accountName, Context.NONE).getValue(); + this.deleteWithResponse(resourceGroupName, accountName, Context.NONE); } public Response deleteByIdWithResponse(String id, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -210,7 +209,7 @@ public Response deleteByIdWithResponse(String id, Context context) { } String accountName = Utils.getValueFromIdByName(id, "remoteRenderingAccounts"); if (accountName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String diff --git a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/implementation/ResourceProvidersClientImpl.java b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/implementation/ResourceProvidersClientImpl.java index b2e2abb01ed35..2303845ab22f3 100644 --- a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/implementation/ResourceProvidersClientImpl.java +++ b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/implementation/ResourceProvidersClientImpl.java @@ -22,7 +22,6 @@ import com.azure.core.management.exception.ManagementException; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.mixedreality.fluent.ResourceProvidersClient; import com.azure.resourcemanager.mixedreality.fluent.models.CheckNameAvailabilityResponseInner; import com.azure.resourcemanager.mixedreality.models.CheckNameAvailabilityRequest; @@ -30,8 +29,6 @@ /** An instance of this class provides access to all the operations defined in ResourceProvidersClient. */ public final class ResourceProvidersClientImpl implements ResourceProvidersClient { - private final ClientLogger logger = new ClientLogger(ResourceProvidersClientImpl.class); - /** The proxy service used to perform REST calls. */ private final ResourceProvidersService service; @@ -80,7 +77,7 @@ Mono> checkNameAvailabilityLocal( * @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 check Name Availability Response. + * @return check Name Availability Response along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> checkNameAvailabilityLocalWithResponseAsync( @@ -131,7 +128,7 @@ private Mono> checkNameAvailability * @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 check Name Availability Response. + * @return check Name Availability Response along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> checkNameAvailabilityLocalWithResponseAsync( @@ -178,7 +175,7 @@ private Mono> checkNameAvailability * @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 check Name Availability Response. + * @return check Name Availability Response on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono checkNameAvailabilityLocalAsync( @@ -219,7 +216,7 @@ public CheckNameAvailabilityResponseInner checkNameAvailabilityLocal( * @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 check Name Availability Response. + * @return check Name Availability Response along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response checkNameAvailabilityLocalWithResponse( diff --git a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/implementation/ResourceProvidersImpl.java b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/implementation/ResourceProvidersImpl.java index 0ce057d6925d9..ed3eba993bf52 100644 --- a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/implementation/ResourceProvidersImpl.java +++ b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/implementation/ResourceProvidersImpl.java @@ -13,10 +13,9 @@ import com.azure.resourcemanager.mixedreality.models.CheckNameAvailabilityRequest; import com.azure.resourcemanager.mixedreality.models.CheckNameAvailabilityResponse; import com.azure.resourcemanager.mixedreality.models.ResourceProviders; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class ResourceProvidersImpl implements ResourceProviders { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ResourceProvidersImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(ResourceProvidersImpl.class); private final ResourceProvidersClient innerClient; 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 0d63b73137464..a4357e5678670 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 @@ -30,7 +30,6 @@ import com.azure.core.management.exception.ManagementException; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.mixedreality.fluent.SpatialAnchorsAccountsClient; import com.azure.resourcemanager.mixedreality.fluent.models.AccountKeysInner; import com.azure.resourcemanager.mixedreality.fluent.models.SpatialAnchorsAccountInner; @@ -40,8 +39,6 @@ /** An instance of this class provides access to all the operations defined in SpatialAnchorsAccountsClient. */ public final class SpatialAnchorsAccountsClientImpl implements SpatialAnchorsAccountsClient { - private final ClientLogger logger = new ClientLogger(SpatialAnchorsAccountsClientImpl.class); - /** The proxy service used to perform REST calls. */ private final SpatialAnchorsAccountsService service; @@ -211,7 +208,8 @@ Mono> listByResourceGroupNext( * * @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. + * @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() { @@ -257,7 +255,8 @@ private Mono> listSinglePageAsync() { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the request to get resource collection. + * @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) { @@ -298,7 +297,7 @@ private Mono> listSinglePageAsync(Cont * * @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. + * @return result of the request to get resource collection as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync() { @@ -313,7 +312,7 @@ private PagedFlux listAsync() { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the request to get resource collection. + * @return result of the request to get resource collection as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(Context context) { @@ -326,7 +325,7 @@ private PagedFlux listAsync(Context context) { * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the request to get resource collection. + * @return result of the request to get resource collection as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list() { @@ -340,7 +339,7 @@ public PagedIterable list() { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the request to get resource collection. + * @return result of the request to get resource collection as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(Context context) { @@ -354,7 +353,8 @@ public PagedIterable list(Context context) { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the request to get resource collection. + * @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( @@ -407,7 +407,8 @@ private Mono> listByResourceGroupSingl * @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. + * @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( @@ -456,7 +457,7 @@ private Mono> listByResourceGroupSingl * @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. + * @return result of the request to get resource collection as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByResourceGroupAsync(String resourceGroupName) { @@ -473,7 +474,7 @@ private PagedFlux listByResourceGroupAsync(String re * @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. + * @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) { @@ -489,7 +490,7 @@ private PagedFlux listByResourceGroupAsync(String re * @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. + * @return result of the request to get resource collection as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByResourceGroup(String resourceGroupName) { @@ -504,7 +505,7 @@ public PagedIterable listByResourceGroup(String reso * @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. + * @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) { @@ -519,7 +520,7 @@ public PagedIterable listByResourceGroup(String reso * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> deleteWithResponseAsync(String resourceGroupName, String accountName) { @@ -567,7 +568,7 @@ private Mono> deleteWithResponseAsync(String resourceGroupName, S * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> deleteWithResponseAsync( @@ -612,7 +613,7 @@ private Mono> deleteWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync(String resourceGroupName, String accountName) { @@ -642,7 +643,7 @@ public void delete(String resourceGroupName, String accountName) { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response deleteWithResponse(String resourceGroupName, String accountName, Context context) { @@ -657,7 +658,7 @@ public Response deleteWithResponse(String resourceGroupName, String accoun * @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 spatialAnchorsAccount Response. + * @return spatialAnchorsAccount Response along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getByResourceGroupWithResponseAsync( @@ -706,7 +707,7 @@ private Mono> getByResourceGroupWithRespons * @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 spatialAnchorsAccount Response. + * @return spatialAnchorsAccount Response along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getByResourceGroupWithResponseAsync( @@ -751,7 +752,7 @@ private Mono> getByResourceGroupWithRespons * @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 spatialAnchorsAccount Response. + * @return spatialAnchorsAccount Response on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getByResourceGroupAsync(String resourceGroupName, String accountName) { @@ -790,7 +791,7 @@ public SpatialAnchorsAccountInner getByResourceGroup(String resourceGroupName, S * @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 spatialAnchorsAccount Response. + * @return spatialAnchorsAccount Response along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getByResourceGroupWithResponse( @@ -807,7 +808,7 @@ public Response getByResourceGroupWithResponse( * @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 spatialAnchorsAccount Response. + * @return spatialAnchorsAccount Response along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> updateWithResponseAsync( @@ -864,7 +865,7 @@ private Mono> updateWithResponseAsync( * @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 spatialAnchorsAccount Response. + * @return spatialAnchorsAccount Response along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> updateWithResponseAsync( @@ -920,7 +921,7 @@ private Mono> updateWithResponseAsync( * @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 spatialAnchorsAccount Response. + * @return spatialAnchorsAccount Response on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateAsync( @@ -963,7 +964,7 @@ public SpatialAnchorsAccountInner update( * @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 spatialAnchorsAccount Response. + * @return spatialAnchorsAccount Response along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response updateWithResponse( @@ -983,7 +984,7 @@ public Response updateWithResponse( * @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 spatialAnchorsAccount Response. + * @return spatialAnchorsAccount Response along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> createWithResponseAsync( @@ -1040,7 +1041,7 @@ private Mono> createWithResponseAsync( * @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 spatialAnchorsAccount Response. + * @return spatialAnchorsAccount Response along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> createWithResponseAsync( @@ -1096,7 +1097,7 @@ private Mono> createWithResponseAsync( * @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 spatialAnchorsAccount Response. + * @return spatialAnchorsAccount Response on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createAsync( @@ -1139,7 +1140,7 @@ public SpatialAnchorsAccountInner create( * @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 spatialAnchorsAccount Response. + * @return spatialAnchorsAccount Response along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response createWithResponse( @@ -1158,7 +1159,7 @@ public Response createWithResponse( * @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. + * @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) { @@ -1206,7 +1207,7 @@ private Mono> listKeysWithResponseAsync(String resour * @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. + * @return developer Keys of account along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listKeysWithResponseAsync( @@ -1251,7 +1252,7 @@ private Mono> listKeysWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return developer Keys of account. + * @return developer Keys of account on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono listKeysAsync(String resourceGroupName, String accountName) { @@ -1290,7 +1291,7 @@ public AccountKeysInner listKeys(String resourceGroupName, String accountName) { * @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. + * @return developer Keys of account along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response listKeysWithResponse( @@ -1307,7 +1308,7 @@ public Response listKeysWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return developer Keys of account. + * @return developer Keys of account along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> regenerateKeysWithResponseAsync( @@ -1363,7 +1364,7 @@ private Mono> regenerateKeysWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return developer Keys of account. + * @return developer Keys of account along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> regenerateKeysWithResponseAsync( @@ -1415,7 +1416,7 @@ private Mono> regenerateKeysWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return developer Keys of account. + * @return developer Keys of account on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono regenerateKeysAsync( @@ -1458,7 +1459,7 @@ public AccountKeysInner regenerateKeys( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return developer Keys of account. + * @return developer Keys of account along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response regenerateKeysWithResponse( @@ -1473,7 +1474,8 @@ public Response regenerateKeysWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the request to get resource collection. + * @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) { @@ -1510,7 +1512,8 @@ private Mono> listBySubscriptionNextSi * @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. + * @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( @@ -1546,7 +1549,8 @@ private Mono> listBySubscriptionNextSi * @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. + * @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) { @@ -1583,7 +1587,8 @@ private Mono> listByResourceGroupNextS * @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. + * @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( diff --git a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/implementation/SpatialAnchorsAccountsImpl.java b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/implementation/SpatialAnchorsAccountsImpl.java index 5432195eb1506..108b8e88dc210 100644 --- a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/implementation/SpatialAnchorsAccountsImpl.java +++ b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/implementation/SpatialAnchorsAccountsImpl.java @@ -16,10 +16,9 @@ import com.azure.resourcemanager.mixedreality.models.AccountKeys; import com.azure.resourcemanager.mixedreality.models.SpatialAnchorsAccount; import com.azure.resourcemanager.mixedreality.models.SpatialAnchorsAccounts; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class SpatialAnchorsAccountsImpl implements SpatialAnchorsAccounts { - @JsonIgnore private final ClientLogger logger = new ClientLogger(SpatialAnchorsAccountsImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(SpatialAnchorsAccountsImpl.class); private final SpatialAnchorsAccountsClient innerClient; @@ -136,7 +135,7 @@ public Response regenerateKeysWithResponse( public SpatialAnchorsAccount getById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -144,7 +143,7 @@ public SpatialAnchorsAccount getById(String id) { } String accountName = Utils.getValueFromIdByName(id, "spatialAnchorsAccounts"); if (accountName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -158,7 +157,7 @@ public SpatialAnchorsAccount getById(String id) { public Response getByIdWithResponse(String id, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -166,7 +165,7 @@ public Response getByIdWithResponse(String id, Context co } String accountName = Utils.getValueFromIdByName(id, "spatialAnchorsAccounts"); if (accountName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -180,7 +179,7 @@ public Response getByIdWithResponse(String id, Context co public void deleteById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -188,7 +187,7 @@ public void deleteById(String id) { } String accountName = Utils.getValueFromIdByName(id, "spatialAnchorsAccounts"); if (accountName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -196,13 +195,13 @@ public void deleteById(String id) { "The resource ID '%s' is not valid. Missing path segment 'spatialAnchorsAccounts'.", id))); } - this.deleteWithResponse(resourceGroupName, accountName, Context.NONE).getValue(); + this.deleteWithResponse(resourceGroupName, accountName, Context.NONE); } public Response deleteByIdWithResponse(String id, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -210,7 +209,7 @@ public Response deleteByIdWithResponse(String id, Context context) { } String accountName = Utils.getValueFromIdByName(id, "spatialAnchorsAccounts"); if (accountName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String diff --git a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/models/AccountKeyRegenerateRequest.java b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/models/AccountKeyRegenerateRequest.java index 6d7bcba560a6e..3a1d68c90e2fb 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 @@ -5,23 +5,19 @@ package com.azure.resourcemanager.mixedreality.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Request for account key regeneration. */ @Fluent public final class AccountKeyRegenerateRequest { - @JsonIgnore private final ClientLogger logger = new ClientLogger(AccountKeyRegenerateRequest.class); - /* - * serial of key to be regenerated + * Serial of key to be regenerated */ @JsonProperty(value = "serial") private Serial serial; /** - * Get the serial property: serial of key to be regenerated. + * Get the serial property: Serial of key to be regenerated. * * @return the serial value. */ @@ -30,7 +26,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/CheckNameAvailabilityRequest.java b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/models/CheckNameAvailabilityRequest.java index 7d218026030c4..8dfe0e7b7b691 100644 --- a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/models/CheckNameAvailabilityRequest.java +++ b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/models/CheckNameAvailabilityRequest.java @@ -6,14 +6,11 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Check Name Availability Request. */ @Fluent public final class CheckNameAvailabilityRequest { - @JsonIgnore private final ClientLogger logger = new ClientLogger(CheckNameAvailabilityRequest.class); - /* * Resource Name To Verify */ @@ -73,16 +70,18 @@ public CheckNameAvailabilityRequest withType(String type) { */ public void validate() { if (name() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property name in model CheckNameAvailabilityRequest")); } if (type() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property type in model CheckNameAvailabilityRequest")); } } + + private static final ClientLogger LOGGER = new ClientLogger(CheckNameAvailabilityRequest.class); } 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 3c32b6c56d9e0..414fd97dbcdbd 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 @@ -5,15 +5,11 @@ package com.azure.resourcemanager.mixedreality.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Identity for the resource. */ @Fluent public class Identity { - @JsonIgnore private final ClientLogger logger = new ClientLogger(Identity.class); - /* * The principal ID of resource identity. */ diff --git a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/models/LogSpecification.java b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/models/LogSpecification.java index bdb0ec6487409..5c090bd32af4a 100644 --- a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/models/LogSpecification.java +++ b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/models/LogSpecification.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.mixedreality.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Specifications of the Log for Azure Monitoring. */ @Fluent public final class LogSpecification { - @JsonIgnore private final ClientLogger logger = new ClientLogger(LogSpecification.class); - /* * Name of the log */ diff --git a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/models/MetricDimension.java b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/models/MetricDimension.java index 697973d407b67..88012a2ec97d4 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 @@ -5,15 +5,11 @@ package com.azure.resourcemanager.mixedreality.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Specifications of the Dimension of metrics. */ @Fluent public final class MetricDimension { - @JsonIgnore private final ClientLogger logger = new ClientLogger(MetricDimension.class); - /* * Name of the dimension */ @@ -32,6 +28,12 @@ public final class MetricDimension { @JsonProperty(value = "internalName") private String internalName; + /* + * Flag to indicate export for Shoebox + */ + @JsonProperty(value = "toBeExportedForShoebox") + private Boolean toBeExportedForShoebox; + /** * Get the name property: Name of the dimension. * @@ -92,6 +94,26 @@ public MetricDimension withInternalName(String internalName) { return this; } + /** + * Get the toBeExportedForShoebox property: Flag to indicate export for Shoebox. + * + * @return the toBeExportedForShoebox value. + */ + public Boolean toBeExportedForShoebox() { + return this.toBeExportedForShoebox; + } + + /** + * Set the toBeExportedForShoebox property: Flag to indicate export for Shoebox. + * + * @param toBeExportedForShoebox the toBeExportedForShoebox value to set. + * @return the MetricDimension object itself. + */ + public MetricDimension withToBeExportedForShoebox(Boolean toBeExportedForShoebox) { + this.toBeExportedForShoebox = toBeExportedForShoebox; + return this; + } + /** * Validates the instance. * diff --git a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/models/MetricSpecification.java b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/models/MetricSpecification.java index 929f90474b1d0..7dc17cc3208a2 100644 --- a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/models/MetricSpecification.java +++ b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/models/MetricSpecification.java @@ -5,16 +5,12 @@ package com.azure.resourcemanager.mixedreality.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** Specifications of the Metrics for Azure Monitoring. */ @Fluent public final class MetricSpecification { - @JsonIgnore private final ClientLogger logger = new ClientLogger(MetricSpecification.class); - /* * Name of the metric */ @@ -46,6 +42,57 @@ public final class MetricSpecification { @JsonProperty(value = "aggregationType") private String aggregationType; + /* + * Supported aggregation types. Valid values: Average, Minimum, Maximum, + * Total, Count. + */ + @JsonProperty(value = "supportedAggregationTypes") + private List supportedAggregationTypes; + + /* + * Supported time grains. Valid values: PT1M, PT5M, PT15M, PT30M, PT1H, + * PT6H, PT12H, P1D + */ + @JsonProperty(value = "supportedTimeGrainTypes") + private List supportedTimeGrainTypes; + + /* + * Flag to indicate use of regional Mdm accounts + */ + @JsonProperty(value = "enableRegionalMdmAccount") + private Boolean enableRegionalMdmAccount; + + /* + * Source mdm account + */ + @JsonProperty(value = "sourceMdmAccount") + private String sourceMdmAccount; + + /* + * Source mdm namespace + */ + @JsonProperty(value = "sourceMdmNamespace") + private String sourceMdmNamespace; + + /* + * Metric filter regex pattern + */ + @JsonProperty(value = "metricFilterPattern") + private String metricFilterPattern; + + /* + * Flag to determine is Zero is returned for time duration where no metric + * is emitted + */ + @JsonProperty(value = "fillGapWithZero") + private Boolean fillGapWithZero; + + /* + * Metric category + */ + @JsonProperty(value = "category") + private String category; + /* * Internal metric name. */ @@ -58,6 +105,12 @@ public final class MetricSpecification { @JsonProperty(value = "dimensions") private List dimensions; + /* + * Locked aggregation type of the metric + */ + @JsonProperty(value = "lockedAggregationType") + private String lockedAggregationType; + /** * Get the name property: Name of the metric. * @@ -160,6 +213,172 @@ public MetricSpecification withAggregationType(String aggregationType) { return this; } + /** + * Get the supportedAggregationTypes property: Supported aggregation types. Valid values: Average, Minimum, Maximum, + * Total, Count. + * + * @return the supportedAggregationTypes value. + */ + public List supportedAggregationTypes() { + return this.supportedAggregationTypes; + } + + /** + * Set the supportedAggregationTypes property: Supported aggregation types. Valid values: Average, Minimum, Maximum, + * Total, Count. + * + * @param supportedAggregationTypes the supportedAggregationTypes value to set. + * @return the MetricSpecification object itself. + */ + public MetricSpecification withSupportedAggregationTypes(List supportedAggregationTypes) { + this.supportedAggregationTypes = supportedAggregationTypes; + return this; + } + + /** + * Get the supportedTimeGrainTypes property: Supported time grains. Valid values: PT1M, PT5M, PT15M, PT30M, PT1H, + * PT6H, PT12H, P1D. + * + * @return the supportedTimeGrainTypes value. + */ + public List supportedTimeGrainTypes() { + return this.supportedTimeGrainTypes; + } + + /** + * Set the supportedTimeGrainTypes property: Supported time grains. Valid values: PT1M, PT5M, PT15M, PT30M, PT1H, + * PT6H, PT12H, P1D. + * + * @param supportedTimeGrainTypes the supportedTimeGrainTypes value to set. + * @return the MetricSpecification object itself. + */ + public MetricSpecification withSupportedTimeGrainTypes(List supportedTimeGrainTypes) { + this.supportedTimeGrainTypes = supportedTimeGrainTypes; + return this; + } + + /** + * Get the enableRegionalMdmAccount property: Flag to indicate use of regional Mdm accounts. + * + * @return the enableRegionalMdmAccount value. + */ + public Boolean enableRegionalMdmAccount() { + return this.enableRegionalMdmAccount; + } + + /** + * Set the enableRegionalMdmAccount property: Flag to indicate use of regional Mdm accounts. + * + * @param enableRegionalMdmAccount the enableRegionalMdmAccount value to set. + * @return the MetricSpecification object itself. + */ + public MetricSpecification withEnableRegionalMdmAccount(Boolean enableRegionalMdmAccount) { + this.enableRegionalMdmAccount = enableRegionalMdmAccount; + return this; + } + + /** + * Get the sourceMdmAccount property: Source mdm account. + * + * @return the sourceMdmAccount value. + */ + public String sourceMdmAccount() { + return this.sourceMdmAccount; + } + + /** + * Set the sourceMdmAccount property: Source mdm account. + * + * @param sourceMdmAccount the sourceMdmAccount value to set. + * @return the MetricSpecification object itself. + */ + public MetricSpecification withSourceMdmAccount(String sourceMdmAccount) { + this.sourceMdmAccount = sourceMdmAccount; + return this; + } + + /** + * Get the sourceMdmNamespace property: Source mdm namespace. + * + * @return the sourceMdmNamespace value. + */ + public String sourceMdmNamespace() { + return this.sourceMdmNamespace; + } + + /** + * Set the sourceMdmNamespace property: Source mdm namespace. + * + * @param sourceMdmNamespace the sourceMdmNamespace value to set. + * @return the MetricSpecification object itself. + */ + public MetricSpecification withSourceMdmNamespace(String sourceMdmNamespace) { + this.sourceMdmNamespace = sourceMdmNamespace; + return this; + } + + /** + * Get the metricFilterPattern property: Metric filter regex pattern. + * + * @return the metricFilterPattern value. + */ + public String metricFilterPattern() { + return this.metricFilterPattern; + } + + /** + * Set the metricFilterPattern property: Metric filter regex pattern. + * + * @param metricFilterPattern the metricFilterPattern value to set. + * @return the MetricSpecification object itself. + */ + public MetricSpecification withMetricFilterPattern(String metricFilterPattern) { + this.metricFilterPattern = metricFilterPattern; + return this; + } + + /** + * Get the fillGapWithZero property: Flag to determine is Zero is returned for time duration where no metric is + * emitted. + * + * @return the fillGapWithZero value. + */ + public Boolean fillGapWithZero() { + return this.fillGapWithZero; + } + + /** + * Set the fillGapWithZero property: Flag to determine is Zero is returned for time duration where no metric is + * emitted. + * + * @param fillGapWithZero the fillGapWithZero value to set. + * @return the MetricSpecification object itself. + */ + public MetricSpecification withFillGapWithZero(Boolean fillGapWithZero) { + this.fillGapWithZero = fillGapWithZero; + return this; + } + + /** + * Get the category property: Metric category. + * + * @return the category value. + */ + public String category() { + return this.category; + } + + /** + * Set the category property: Metric category. + * + * @param category the category value to set. + * @return the MetricSpecification object itself. + */ + public MetricSpecification withCategory(String category) { + this.category = category; + return this; + } + /** * Get the internalMetricName property: Internal metric name. * @@ -200,6 +419,26 @@ public MetricSpecification withDimensions(List dimensions) { return this; } + /** + * Get the lockedAggregationType property: Locked aggregation type of the metric. + * + * @return the lockedAggregationType value. + */ + public String lockedAggregationType() { + return this.lockedAggregationType; + } + + /** + * Set the lockedAggregationType property: Locked aggregation type of the metric. + * + * @param lockedAggregationType the lockedAggregationType value to set. + * @return the MetricSpecification object itself. + */ + public MetricSpecification withLockedAggregationType(String lockedAggregationType) { + this.lockedAggregationType = lockedAggregationType; + return this; + } + /** * Validates the instance. * diff --git a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/models/ObjectAnchorsAccount.java b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/models/ObjectAnchorsAccount.java new file mode 100644 index 0000000000000..dcce4e41c3063 --- /dev/null +++ b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/models/ObjectAnchorsAccount.java @@ -0,0 +1,407 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mixedreality.models; + +import com.azure.core.http.rest.Response; +import com.azure.core.management.Region; +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.mixedreality.fluent.models.ObjectAnchorsAccountInner; +import java.util.Map; + +/** An immutable client-side representation of ObjectAnchorsAccount. */ +public interface ObjectAnchorsAccount { + /** + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the resource. + * + * @return the type value. + */ + String type(); + + /** + * Gets the location property: The geo-location where the resource lives. + * + * @return the location value. + */ + String location(); + + /** + * Gets the tags property: Resource tags. + * + * @return the tags value. + */ + Map tags(); + + /** + * Gets the identity property: The identity property. + * + * @return the identity value. + */ + ObjectAnchorsAccountIdentity identity(); + + /** + * Gets the plan property: The plan associated with this account. + * + * @return the plan value. + */ + Identity plan(); + + /** + * Gets the sku property: The sku associated with this account. + * + * @return the sku value. + */ + Sku sku(); + + /** + * Gets the kind property: The kind of account, if supported. + * + * @return the kind value. + */ + Sku kind(); + + /** + * Gets the systemData property: The system metadata related to an object anchors account. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the storageAccountName property: The name of the storage account associated with this accountId. + * + * @return the storageAccountName value. + */ + String storageAccountName(); + + /** + * Gets the accountId property: unique id of certain account. + * + * @return the accountId value. + */ + String accountId(); + + /** + * Gets the accountDomain property: Correspond domain name of certain Spatial Anchors Account. + * + * @return the accountDomain value. + */ + String accountDomain(); + + /** + * Gets the region of the resource. + * + * @return the region of the resource. + */ + Region region(); + + /** + * Gets the name of the resource region. + * + * @return the name of the resource region. + */ + String regionName(); + + /** + * Gets the inner com.azure.resourcemanager.mixedreality.fluent.models.ObjectAnchorsAccountInner object. + * + * @return the inner object. + */ + ObjectAnchorsAccountInner innerModel(); + + /** The entirety of the ObjectAnchorsAccount definition. */ + interface Definition + extends DefinitionStages.Blank, + DefinitionStages.WithLocation, + DefinitionStages.WithResourceGroup, + DefinitionStages.WithCreate { + } + /** The ObjectAnchorsAccount definition stages. */ + interface DefinitionStages { + /** The first stage of the ObjectAnchorsAccount definition. */ + interface Blank extends WithLocation { + } + /** The stage of the ObjectAnchorsAccount definition allowing to specify location. */ + interface WithLocation { + /** + * Specifies the region for the resource. + * + * @param location The geo-location where the resource lives. + * @return the next definition stage. + */ + WithResourceGroup withRegion(Region location); + + /** + * Specifies the region for the resource. + * + * @param location The geo-location where the resource lives. + * @return the next definition stage. + */ + WithResourceGroup withRegion(String location); + } + /** The stage of the ObjectAnchorsAccount definition allowing to specify parent resource. */ + interface WithResourceGroup { + /** + * Specifies resourceGroupName. + * + * @param resourceGroupName Name of an Azure resource group. + * @return the next definition stage. + */ + WithCreate withExistingResourceGroup(String resourceGroupName); + } + /** + * The stage of the ObjectAnchorsAccount definition which contains all the minimum required properties for the + * resource to be created, but also allows for any other optional properties to be specified. + */ + interface WithCreate + extends DefinitionStages.WithTags, + DefinitionStages.WithIdentity, + DefinitionStages.WithPlan, + DefinitionStages.WithSku, + DefinitionStages.WithKind, + DefinitionStages.WithStorageAccountName { + /** + * Executes the create request. + * + * @return the created resource. + */ + ObjectAnchorsAccount create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + ObjectAnchorsAccount create(Context context); + } + /** The stage of the ObjectAnchorsAccount definition allowing to specify tags. */ + interface WithTags { + /** + * Specifies the tags property: Resource tags.. + * + * @param tags Resource tags. + * @return the next definition stage. + */ + WithCreate withTags(Map tags); + } + /** The stage of the ObjectAnchorsAccount definition allowing to specify identity. */ + interface WithIdentity { + /** + * Specifies the identity property: The identity property.. + * + * @param identity The identity property. + * @return the next definition stage. + */ + WithCreate withIdentity(ObjectAnchorsAccountIdentity identity); + } + /** The stage of the ObjectAnchorsAccount definition allowing to specify plan. */ + interface WithPlan { + /** + * Specifies the plan property: The plan associated with this account. + * + * @param plan The plan associated with this account. + * @return the next definition stage. + */ + WithCreate withPlan(Identity plan); + } + /** The stage of the ObjectAnchorsAccount definition allowing to specify sku. */ + interface WithSku { + /** + * Specifies the sku property: The sku associated with this account. + * + * @param sku The sku associated with this account. + * @return the next definition stage. + */ + WithCreate withSku(Sku sku); + } + /** The stage of the ObjectAnchorsAccount definition allowing to specify kind. */ + interface WithKind { + /** + * Specifies the kind property: The kind of account, if supported. + * + * @param kind The kind of account, if supported. + * @return the next definition stage. + */ + WithCreate withKind(Sku kind); + } + /** The stage of the ObjectAnchorsAccount definition allowing to specify storageAccountName. */ + interface WithStorageAccountName { + /** + * Specifies the storageAccountName property: The name of the storage account associated with this + * accountId. + * + * @param storageAccountName The name of the storage account associated with this accountId. + * @return the next definition stage. + */ + WithCreate withStorageAccountName(String storageAccountName); + } + } + /** + * Begins update for the ObjectAnchorsAccount resource. + * + * @return the stage of resource update. + */ + ObjectAnchorsAccount.Update update(); + + /** The template for ObjectAnchorsAccount update. */ + interface Update + extends UpdateStages.WithTags, + UpdateStages.WithIdentity, + UpdateStages.WithPlan, + UpdateStages.WithSku, + UpdateStages.WithKind, + UpdateStages.WithStorageAccountName { + /** + * Executes the update request. + * + * @return the updated resource. + */ + ObjectAnchorsAccount apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + ObjectAnchorsAccount apply(Context context); + } + /** The ObjectAnchorsAccount update stages. */ + interface UpdateStages { + /** The stage of the ObjectAnchorsAccount update allowing to specify tags. */ + interface WithTags { + /** + * Specifies the tags property: Resource tags.. + * + * @param tags Resource tags. + * @return the next definition stage. + */ + Update withTags(Map tags); + } + /** The stage of the ObjectAnchorsAccount update allowing to specify identity. */ + interface WithIdentity { + /** + * Specifies the identity property: The identity property.. + * + * @param identity The identity property. + * @return the next definition stage. + */ + Update withIdentity(ObjectAnchorsAccountIdentity identity); + } + /** The stage of the ObjectAnchorsAccount update allowing to specify plan. */ + interface WithPlan { + /** + * Specifies the plan property: The plan associated with this account. + * + * @param plan The plan associated with this account. + * @return the next definition stage. + */ + Update withPlan(Identity plan); + } + /** The stage of the ObjectAnchorsAccount update allowing to specify sku. */ + interface WithSku { + /** + * Specifies the sku property: The sku associated with this account. + * + * @param sku The sku associated with this account. + * @return the next definition stage. + */ + Update withSku(Sku sku); + } + /** The stage of the ObjectAnchorsAccount update allowing to specify kind. */ + interface WithKind { + /** + * Specifies the kind property: The kind of account, if supported. + * + * @param kind The kind of account, if supported. + * @return the next definition stage. + */ + Update withKind(Sku kind); + } + /** The stage of the ObjectAnchorsAccount update allowing to specify storageAccountName. */ + interface WithStorageAccountName { + /** + * Specifies the storageAccountName property: The name of the storage account associated with this + * accountId. + * + * @param storageAccountName The name of the storage account associated with this accountId. + * @return the next definition stage. + */ + Update withStorageAccountName(String storageAccountName); + } + } + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + ObjectAnchorsAccount refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + ObjectAnchorsAccount refresh(Context context); + + /** + * List Both of the 2 Keys of an object anchors Account. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return developer Keys of account. + */ + AccountKeys listKeys(); + + /** + * List Both of the 2 Keys of an object anchors Account. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return developer Keys of account along with {@link Response}. + */ + Response listKeysWithResponse(Context context); + + /** + * Regenerate specified Key of an object anchors Account. + * + * @param regenerate Required information for key regeneration. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return developer Keys of account. + */ + AccountKeys regenerateKeys(AccountKeyRegenerateRequest regenerate); + + /** + * Regenerate specified Key of an object anchors Account. + * + * @param regenerate Required information for key regeneration. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return developer Keys of account along with {@link Response}. + */ + Response regenerateKeysWithResponse(AccountKeyRegenerateRequest regenerate, Context context); +} diff --git a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/models/ObjectAnchorsAccountIdentity.java b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/models/ObjectAnchorsAccountIdentity.java new file mode 100644 index 0000000000000..62c766c564da7 --- /dev/null +++ b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/models/ObjectAnchorsAccountIdentity.java @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mixedreality.models; + +import com.azure.core.annotation.Fluent; + +/** The ObjectAnchorsAccountIdentity model. */ +@Fluent +public class ObjectAnchorsAccountIdentity extends Identity { + /** {@inheritDoc} */ + @Override + public ObjectAnchorsAccountIdentity withType(ResourceIdentityType type) { + super.withType(type); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + } +} diff --git a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/models/ObjectAnchorsAccountPage.java b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/models/ObjectAnchorsAccountPage.java new file mode 100644 index 0000000000000..bf82a22c89eef --- /dev/null +++ b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/models/ObjectAnchorsAccountPage.java @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mixedreality.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.mixedreality.fluent.models.ObjectAnchorsAccountInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * Result of the request to get resource collection. It contains a list of resources and a URL link to get the next set + * of results. + */ +@Fluent +public final class ObjectAnchorsAccountPage { + /* + * List of resources supported by the Resource Provider. + */ + @JsonProperty(value = "value") + private List value; + + /* + * URL to get the next set of resource list results if there are any. + */ + @JsonProperty(value = "nextLink") + private String nextLink; + + /** + * Get the value property: List of resources supported by the Resource Provider. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: List of resources supported by the Resource Provider. + * + * @param value the value value to set. + * @return the ObjectAnchorsAccountPage object itself. + */ + public ObjectAnchorsAccountPage withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: URL to get the next set of resource list results if there are any. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Set the nextLink property: URL to get the next set of resource list results if there are any. + * + * @param nextLink the nextLink value to set. + * @return the ObjectAnchorsAccountPage object itself. + */ + public ObjectAnchorsAccountPage withNextLink(String nextLink) { + this.nextLink = nextLink; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() != null) { + value().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/models/ObjectAnchorsAccounts.java b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/models/ObjectAnchorsAccounts.java new file mode 100644 index 0000000000000..7f303c5478749 --- /dev/null +++ b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/models/ObjectAnchorsAccounts.java @@ -0,0 +1,211 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mixedreality.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +/** Resource collection API of ObjectAnchorsAccounts. */ +public interface ObjectAnchorsAccounts { + /** + * List Object Anchors Accounts by Subscription. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return result of the request to get resource collection as paginated response with {@link PagedIterable}. + */ + PagedIterable list(); + + /** + * List Object Anchors Accounts by Subscription. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return result of the request to get resource collection as paginated response with {@link PagedIterable}. + */ + PagedIterable list(Context context); + + /** + * List Resources by Resource Group. + * + * @param resourceGroupName Name of an Azure resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return result of the request to get resource collection as paginated response with {@link PagedIterable}. + */ + PagedIterable listByResourceGroup(String resourceGroupName); + + /** + * List Resources by Resource Group. + * + * @param resourceGroupName Name of an Azure resource group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return result of the request to get resource collection as paginated response with {@link PagedIterable}. + */ + PagedIterable listByResourceGroup(String resourceGroupName, Context context); + + /** + * Delete an Object Anchors Account. + * + * @param resourceGroupName Name of an Azure resource group. + * @param accountName Name of an Mixed Reality Account. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteByResourceGroup(String resourceGroupName, String accountName); + + /** + * Delete an Object Anchors Account. + * + * @param resourceGroupName Name of an Azure resource group. + * @param accountName Name of an Mixed Reality Account. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + Response deleteWithResponse(String resourceGroupName, String accountName, Context context); + + /** + * Retrieve an Object Anchors Account. + * + * @param resourceGroupName Name of an Azure resource group. + * @param accountName Name of an Mixed Reality Account. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return objectAnchorsAccount Response. + */ + ObjectAnchorsAccount getByResourceGroup(String resourceGroupName, String accountName); + + /** + * Retrieve an Object Anchors Account. + * + * @param resourceGroupName Name of an Azure resource group. + * @param accountName Name of an Mixed Reality Account. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return objectAnchorsAccount Response along with {@link Response}. + */ + Response getByResourceGroupWithResponse( + String resourceGroupName, String accountName, Context context); + + /** + * List Both of the 2 Keys of an object anchors Account. + * + * @param resourceGroupName Name of an Azure resource group. + * @param accountName Name of an Mixed Reality Account. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return developer Keys of account. + */ + AccountKeys listKeys(String resourceGroupName, String accountName); + + /** + * List Both of the 2 Keys of an object anchors Account. + * + * @param resourceGroupName Name of an Azure resource group. + * @param accountName Name of an Mixed Reality Account. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return developer Keys of account along with {@link Response}. + */ + Response listKeysWithResponse(String resourceGroupName, String accountName, Context context); + + /** + * Regenerate specified Key of an object anchors Account. + * + * @param resourceGroupName Name of an Azure resource group. + * @param accountName Name of an Mixed Reality Account. + * @param regenerate Required information for key regeneration. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return developer Keys of account. + */ + AccountKeys regenerateKeys(String resourceGroupName, String accountName, AccountKeyRegenerateRequest regenerate); + + /** + * Regenerate specified Key of an object anchors Account. + * + * @param resourceGroupName Name of an Azure resource group. + * @param accountName Name of an Mixed Reality Account. + * @param regenerate Required information for key regeneration. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return developer Keys of account along with {@link Response}. + */ + Response regenerateKeysWithResponse( + String resourceGroupName, String accountName, AccountKeyRegenerateRequest regenerate, Context context); + + /** + * Retrieve an Object Anchors Account. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return objectAnchorsAccount Response along with {@link Response}. + */ + ObjectAnchorsAccount getById(String id); + + /** + * Retrieve an Object Anchors Account. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return objectAnchorsAccount Response along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Delete an Object Anchors Account. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteById(String id); + + /** + * Delete an Object Anchors Account. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@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/OperationDisplay.java b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/models/OperationDisplay.java index 820d3a340529a..6fa12fc0b4be4 100644 --- a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/models/OperationDisplay.java +++ b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/models/OperationDisplay.java @@ -6,14 +6,11 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** The object that represents the operation. */ @Fluent public final class OperationDisplay { - @JsonIgnore private final ClientLogger logger = new ClientLogger(OperationDisplay.class); - /* * Service provider: Microsoft.ResourceProvider */ @@ -125,24 +122,26 @@ public OperationDisplay withDescription(String description) { */ public void validate() { if (provider() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException("Missing required property provider in model OperationDisplay")); } if (resource() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException("Missing required property resource in model OperationDisplay")); } if (operation() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException("Missing required property operation in model OperationDisplay")); } if (description() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException("Missing required property description in model OperationDisplay")); } } + + private static final ClientLogger LOGGER = new ClientLogger(OperationDisplay.class); } diff --git a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/models/OperationPage.java b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/models/OperationPage.java index 3489cefc438d7..577ebd8bff8c0 100644 --- a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/models/OperationPage.java +++ b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/models/OperationPage.java @@ -5,9 +5,7 @@ package com.azure.resourcemanager.mixedreality.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.mixedreality.fluent.models.OperationInner; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; @@ -17,8 +15,6 @@ */ @Fluent public final class OperationPage { - @JsonIgnore private final ClientLogger logger = new ClientLogger(OperationPage.class); - /* * List of operations supported by the Resource Provider. */ diff --git a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/models/OperationProperties.java b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/models/OperationProperties.java index 509725923d4a9..ab55e604814ae 100644 --- a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/models/OperationProperties.java +++ b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/models/OperationProperties.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.mixedreality.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Operation properties. */ @Fluent public final class OperationProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(OperationProperties.class); - /* * Service specification. */ diff --git a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/models/Operations.java b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/models/Operations.java index 93a1384b66235..832f8c5449835 100644 --- a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/models/Operations.java +++ b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/models/Operations.java @@ -14,7 +14,8 @@ public interface Operations { * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the request to list Resource Provider operations. + * @return result of the request to list Resource Provider operations as paginated response with {@link + * PagedIterable}. */ PagedIterable list(); @@ -25,7 +26,8 @@ public interface Operations { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the request to list Resource Provider operations. + * @return result of the request to list Resource Provider operations as paginated response with {@link + * PagedIterable}. */ PagedIterable list(Context context); } 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 657e3782728e1..4a6dc148a742f 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 @@ -378,7 +378,7 @@ interface WithStorageAccountName { * @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. + * @return developer Keys of account along with {@link Response}. */ Response listKeysWithResponse(Context context); @@ -401,7 +401,7 @@ interface WithStorageAccountName { * @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. + * @return developer Keys of account along with {@link Response}. */ Response regenerateKeysWithResponse(AccountKeyRegenerateRequest regenerate, Context context); } diff --git a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/models/RemoteRenderingAccountPage.java b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/models/RemoteRenderingAccountPage.java index 9efb74c5f0931..eff19856b5d9a 100644 --- a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/models/RemoteRenderingAccountPage.java +++ b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/models/RemoteRenderingAccountPage.java @@ -5,9 +5,7 @@ package com.azure.resourcemanager.mixedreality.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.mixedreality.fluent.models.RemoteRenderingAccountInner; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; @@ -17,8 +15,6 @@ */ @Fluent public final class RemoteRenderingAccountPage { - @JsonIgnore private final ClientLogger logger = new ClientLogger(RemoteRenderingAccountPage.class); - /* * List of resources supported by the Resource Provider. */ 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 ce8f5fb2f2b5f..ca57fd7964ddb 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 @@ -15,7 +15,7 @@ public interface RemoteRenderingAccounts { * * @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. + * @return result of the request to get resource collection as paginated response with {@link PagedIterable}. */ PagedIterable list(); @@ -26,7 +26,7 @@ public interface RemoteRenderingAccounts { * @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. + * @return result of the request to get resource collection as paginated response with {@link PagedIterable}. */ PagedIterable list(Context context); @@ -37,7 +37,7 @@ public interface RemoteRenderingAccounts { * @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. + * @return result of the request to get resource collection as paginated response with {@link PagedIterable}. */ PagedIterable listByResourceGroup(String resourceGroupName); @@ -49,7 +49,7 @@ public interface RemoteRenderingAccounts { * @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. + * @return result of the request to get resource collection as paginated response with {@link PagedIterable}. */ PagedIterable listByResourceGroup(String resourceGroupName, Context context); @@ -73,7 +73,7 @@ public interface RemoteRenderingAccounts { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the {@link Response}. */ Response deleteWithResponse(String resourceGroupName, String accountName, Context context); @@ -98,7 +98,7 @@ public interface RemoteRenderingAccounts { * @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 remoteRenderingAccount Response. + * @return remoteRenderingAccount Response along with {@link Response}. */ Response getByResourceGroupWithResponse( String resourceGroupName, String accountName, Context context); @@ -124,7 +124,7 @@ Response getByResourceGroupWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return developer Keys of account. + * @return developer Keys of account along with {@link Response}. */ Response listKeysWithResponse(String resourceGroupName, String accountName, Context context); @@ -151,7 +151,7 @@ Response getByResourceGroupWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return developer Keys of account. + * @return developer Keys of account along with {@link Response}. */ Response regenerateKeysWithResponse( String resourceGroupName, String accountName, AccountKeyRegenerateRequest regenerate, Context context); @@ -163,7 +163,7 @@ Response regenerateKeysWithResponse( * @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 remoteRenderingAccount Response. + * @return remoteRenderingAccount Response along with {@link Response}. */ RemoteRenderingAccount getById(String id); @@ -175,7 +175,7 @@ Response regenerateKeysWithResponse( * @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 remoteRenderingAccount Response. + * @return remoteRenderingAccount Response along with {@link Response}. */ Response getByIdWithResponse(String id, Context context); @@ -197,7 +197,7 @@ Response regenerateKeysWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the {@link Response}. */ Response deleteByIdWithResponse(String id, Context context); diff --git a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/models/ResourceProviders.java b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/models/ResourceProviders.java index 5f1732f1bb50d..b6d0d8d2984a4 100644 --- a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/models/ResourceProviders.java +++ b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/models/ResourceProviders.java @@ -31,7 +31,7 @@ CheckNameAvailabilityResponse checkNameAvailabilityLocal( * @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 check Name Availability Response. + * @return check Name Availability Response along with {@link Response}. */ Response checkNameAvailabilityLocalWithResponse( String location, CheckNameAvailabilityRequest checkNameAvailability, Context context); diff --git a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/models/ServiceSpecification.java b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/models/ServiceSpecification.java index 3a52044c06987..f490475c040f8 100644 --- a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/models/ServiceSpecification.java +++ b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/models/ServiceSpecification.java @@ -5,16 +5,12 @@ package com.azure.resourcemanager.mixedreality.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** Service specification payload. */ @Fluent public final class ServiceSpecification { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ServiceSpecification.class); - /* * Specifications of the Log for Azure Monitoring */ diff --git a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/models/Sku.java b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/models/Sku.java index 88adcc466b7e8..b7855ca3b69b1 100644 --- a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/models/Sku.java +++ b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/models/Sku.java @@ -6,14 +6,11 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** The resource model definition representing SKU. */ @Fluent public final class Sku { - @JsonIgnore private final ClientLogger logger = new ClientLogger(Sku.class); - /* * The name of the SKU. Ex - P3. It is typically a letter+number code */ @@ -164,8 +161,10 @@ public Sku withCapacity(Integer capacity) { */ public void validate() { if (name() == null) { - throw logger + throw LOGGER .logExceptionAsError(new IllegalArgumentException("Missing required property name in model Sku")); } } + + private static final ClientLogger LOGGER = new ClientLogger(Sku.class); } 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 c265d5eada1ff..6ba2b543bb88f 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 @@ -378,7 +378,7 @@ interface WithStorageAccountName { * @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. + * @return developer Keys of account along with {@link Response}. */ Response listKeysWithResponse(Context context); @@ -401,7 +401,7 @@ interface WithStorageAccountName { * @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. + * @return developer Keys of account along with {@link Response}. */ Response regenerateKeysWithResponse(AccountKeyRegenerateRequest regenerate, Context context); } diff --git a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/models/SpatialAnchorsAccountPage.java b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/models/SpatialAnchorsAccountPage.java index 1cf655633112c..1acd6ffc2ce66 100644 --- a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/models/SpatialAnchorsAccountPage.java +++ b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/models/SpatialAnchorsAccountPage.java @@ -5,9 +5,7 @@ package com.azure.resourcemanager.mixedreality.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.mixedreality.fluent.models.SpatialAnchorsAccountInner; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; @@ -17,8 +15,6 @@ */ @Fluent public final class SpatialAnchorsAccountPage { - @JsonIgnore private final ClientLogger logger = new ClientLogger(SpatialAnchorsAccountPage.class); - /* * List of resources supported by the Resource Provider. */ 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 2d79e5ddacc93..eee2c50c34a86 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 @@ -15,7 +15,7 @@ public interface SpatialAnchorsAccounts { * * @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. + * @return result of the request to get resource collection as paginated response with {@link PagedIterable}. */ PagedIterable list(); @@ -26,7 +26,7 @@ public interface SpatialAnchorsAccounts { * @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. + * @return result of the request to get resource collection as paginated response with {@link PagedIterable}. */ PagedIterable list(Context context); @@ -37,7 +37,7 @@ public interface SpatialAnchorsAccounts { * @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. + * @return result of the request to get resource collection as paginated response with {@link PagedIterable}. */ PagedIterable listByResourceGroup(String resourceGroupName); @@ -49,7 +49,7 @@ public interface SpatialAnchorsAccounts { * @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. + * @return result of the request to get resource collection as paginated response with {@link PagedIterable}. */ PagedIterable listByResourceGroup(String resourceGroupName, Context context); @@ -73,7 +73,7 @@ public interface SpatialAnchorsAccounts { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the {@link Response}. */ Response deleteWithResponse(String resourceGroupName, String accountName, Context context); @@ -98,7 +98,7 @@ public interface SpatialAnchorsAccounts { * @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 spatialAnchorsAccount Response. + * @return spatialAnchorsAccount Response along with {@link Response}. */ Response getByResourceGroupWithResponse( String resourceGroupName, String accountName, Context context); @@ -124,7 +124,7 @@ Response getByResourceGroupWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return developer Keys of account. + * @return developer Keys of account along with {@link Response}. */ Response listKeysWithResponse(String resourceGroupName, String accountName, Context context); @@ -151,7 +151,7 @@ Response getByResourceGroupWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return developer Keys of account. + * @return developer Keys of account along with {@link Response}. */ Response regenerateKeysWithResponse( String resourceGroupName, String accountName, AccountKeyRegenerateRequest regenerate, Context context); @@ -163,7 +163,7 @@ Response regenerateKeysWithResponse( * @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 spatialAnchorsAccount Response. + * @return spatialAnchorsAccount Response along with {@link Response}. */ SpatialAnchorsAccount getById(String id); @@ -175,7 +175,7 @@ Response regenerateKeysWithResponse( * @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 spatialAnchorsAccount Response. + * @return spatialAnchorsAccount Response along with {@link Response}. */ Response getByIdWithResponse(String id, Context context); @@ -197,7 +197,7 @@ Response regenerateKeysWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the {@link Response}. */ Response deleteByIdWithResponse(String id, Context context); diff --git a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/samples/java/com/azure/resourcemanager/mixedreality/generated/ObjectAnchorsAccountsCreateSamples.java b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/samples/java/com/azure/resourcemanager/mixedreality/generated/ObjectAnchorsAccountsCreateSamples.java new file mode 100644 index 0000000000000..290fc894fa7f2 --- /dev/null +++ b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/samples/java/com/azure/resourcemanager/mixedreality/generated/ObjectAnchorsAccountsCreateSamples.java @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mixedreality.generated; + +import com.azure.resourcemanager.mixedreality.models.ObjectAnchorsAccountIdentity; +import com.azure.resourcemanager.mixedreality.models.ResourceIdentityType; + +/** Samples for ObjectAnchorsAccounts Create. */ +public final class ObjectAnchorsAccountsCreateSamples { + /* + * x-ms-original-file: specification/mixedreality/resource-manager/Microsoft.MixedReality/preview/2021-03-01-preview/examples/object-anchors/Put.json + */ + /** + * Sample code: Create object anchors account. + * + * @param manager Entry point to MixedRealityManager. + */ + public static void createObjectAnchorsAccount(com.azure.resourcemanager.mixedreality.MixedRealityManager manager) { + manager + .objectAnchorsAccounts() + .define("MyAccount") + .withRegion("eastus2euap") + .withExistingResourceGroup("MyResourceGroup") + .withIdentity(new ObjectAnchorsAccountIdentity().withType(ResourceIdentityType.SYSTEM_ASSIGNED)) + .create(); + } +} diff --git a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/samples/java/com/azure/resourcemanager/mixedreality/generated/ObjectAnchorsAccountsDeleteSamples.java b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/samples/java/com/azure/resourcemanager/mixedreality/generated/ObjectAnchorsAccountsDeleteSamples.java new file mode 100644 index 0000000000000..68bb5d316f656 --- /dev/null +++ b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/samples/java/com/azure/resourcemanager/mixedreality/generated/ObjectAnchorsAccountsDeleteSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mixedreality.generated; + +import com.azure.core.util.Context; + +/** Samples for ObjectAnchorsAccounts Delete. */ +public final class ObjectAnchorsAccountsDeleteSamples { + /* + * x-ms-original-file: specification/mixedreality/resource-manager/Microsoft.MixedReality/preview/2021-03-01-preview/examples/object-anchors/Delete.json + */ + /** + * Sample code: Delete object anchors account. + * + * @param manager Entry point to MixedRealityManager. + */ + public static void deleteObjectAnchorsAccount(com.azure.resourcemanager.mixedreality.MixedRealityManager manager) { + manager.objectAnchorsAccounts().deleteWithResponse("MyResourceGroup", "MyAccount", Context.NONE); + } +} diff --git a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/samples/java/com/azure/resourcemanager/mixedreality/generated/ObjectAnchorsAccountsGetByResourceGroupSamples.java b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/samples/java/com/azure/resourcemanager/mixedreality/generated/ObjectAnchorsAccountsGetByResourceGroupSamples.java new file mode 100644 index 0000000000000..1e102787e9d34 --- /dev/null +++ b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/samples/java/com/azure/resourcemanager/mixedreality/generated/ObjectAnchorsAccountsGetByResourceGroupSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mixedreality.generated; + +import com.azure.core.util.Context; + +/** Samples for ObjectAnchorsAccounts GetByResourceGroup. */ +public final class ObjectAnchorsAccountsGetByResourceGroupSamples { + /* + * x-ms-original-file: specification/mixedreality/resource-manager/Microsoft.MixedReality/preview/2021-03-01-preview/examples/object-anchors/Get.json + */ + /** + * Sample code: Get object anchors account. + * + * @param manager Entry point to MixedRealityManager. + */ + public static void getObjectAnchorsAccount(com.azure.resourcemanager.mixedreality.MixedRealityManager manager) { + manager.objectAnchorsAccounts().getByResourceGroupWithResponse("MyResourceGroup", "MyAccount", Context.NONE); + } +} diff --git a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/samples/java/com/azure/resourcemanager/mixedreality/generated/ObjectAnchorsAccountsListByResourceGroupSamples.java b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/samples/java/com/azure/resourcemanager/mixedreality/generated/ObjectAnchorsAccountsListByResourceGroupSamples.java new file mode 100644 index 0000000000000..ff0caa280845b --- /dev/null +++ b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/samples/java/com/azure/resourcemanager/mixedreality/generated/ObjectAnchorsAccountsListByResourceGroupSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mixedreality.generated; + +import com.azure.core.util.Context; + +/** Samples for ObjectAnchorsAccounts ListByResourceGroup. */ +public final class ObjectAnchorsAccountsListByResourceGroupSamples { + /* + * x-ms-original-file: specification/mixedreality/resource-manager/Microsoft.MixedReality/preview/2021-03-01-preview/examples/object-anchors/GetByResourceGroup.json + */ + /** + * Sample code: List object anchors accounts by resource group. + * + * @param manager Entry point to MixedRealityManager. + */ + public static void listObjectAnchorsAccountsByResourceGroup( + com.azure.resourcemanager.mixedreality.MixedRealityManager manager) { + manager.objectAnchorsAccounts().listByResourceGroup("MyResourceGroup", Context.NONE); + } +} diff --git a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/samples/java/com/azure/resourcemanager/mixedreality/generated/ObjectAnchorsAccountsListKeysSamples.java b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/samples/java/com/azure/resourcemanager/mixedreality/generated/ObjectAnchorsAccountsListKeysSamples.java new file mode 100644 index 0000000000000..af03693443a80 --- /dev/null +++ b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/samples/java/com/azure/resourcemanager/mixedreality/generated/ObjectAnchorsAccountsListKeysSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mixedreality.generated; + +import com.azure.core.util.Context; + +/** Samples for ObjectAnchorsAccounts ListKeys. */ +public final class ObjectAnchorsAccountsListKeysSamples { + /* + * x-ms-original-file: specification/mixedreality/resource-manager/Microsoft.MixedReality/preview/2021-03-01-preview/examples/object-anchors/ListKeys.json + */ + /** + * Sample code: List object anchors account key. + * + * @param manager Entry point to MixedRealityManager. + */ + public static void listObjectAnchorsAccountKey(com.azure.resourcemanager.mixedreality.MixedRealityManager manager) { + manager.objectAnchorsAccounts().listKeysWithResponse("MyResourceGroup", "MyAccount", Context.NONE); + } +} diff --git a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/samples/java/com/azure/resourcemanager/mixedreality/generated/ObjectAnchorsAccountsListSamples.java b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/samples/java/com/azure/resourcemanager/mixedreality/generated/ObjectAnchorsAccountsListSamples.java new file mode 100644 index 0000000000000..ae86c72e0207e --- /dev/null +++ b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/samples/java/com/azure/resourcemanager/mixedreality/generated/ObjectAnchorsAccountsListSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mixedreality.generated; + +import com.azure.core.util.Context; + +/** Samples for ObjectAnchorsAccounts List. */ +public final class ObjectAnchorsAccountsListSamples { + /* + * x-ms-original-file: specification/mixedreality/resource-manager/Microsoft.MixedReality/preview/2021-03-01-preview/examples/object-anchors/GetBySubscription.json + */ + /** + * Sample code: List object anchors accounts by subscription. + * + * @param manager Entry point to MixedRealityManager. + */ + public static void listObjectAnchorsAccountsBySubscription( + com.azure.resourcemanager.mixedreality.MixedRealityManager manager) { + manager.objectAnchorsAccounts().list(Context.NONE); + } +} diff --git a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/samples/java/com/azure/resourcemanager/mixedreality/generated/ObjectAnchorsAccountsRegenerateKeysSamples.java b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/samples/java/com/azure/resourcemanager/mixedreality/generated/ObjectAnchorsAccountsRegenerateKeysSamples.java new file mode 100644 index 0000000000000..1808558092649 --- /dev/null +++ b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/samples/java/com/azure/resourcemanager/mixedreality/generated/ObjectAnchorsAccountsRegenerateKeysSamples.java @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mixedreality.generated; + +import com.azure.core.util.Context; +import com.azure.resourcemanager.mixedreality.models.AccountKeyRegenerateRequest; +import com.azure.resourcemanager.mixedreality.models.Serial; + +/** Samples for ObjectAnchorsAccounts RegenerateKeys. */ +public final class ObjectAnchorsAccountsRegenerateKeysSamples { + /* + * x-ms-original-file: specification/mixedreality/resource-manager/Microsoft.MixedReality/preview/2021-03-01-preview/examples/object-anchors/RegenerateKey.json + */ + /** + * Sample code: Regenerate object anchors account keys. + * + * @param manager Entry point to MixedRealityManager. + */ + public static void regenerateObjectAnchorsAccountKeys( + com.azure.resourcemanager.mixedreality.MixedRealityManager manager) { + manager + .objectAnchorsAccounts() + .regenerateKeysWithResponse( + "MyResourceGroup", "MyAccount", new AccountKeyRegenerateRequest().withSerial(Serial.ONE), Context.NONE); + } +} diff --git a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/samples/java/com/azure/resourcemanager/mixedreality/generated/ObjectAnchorsAccountsUpdateSamples.java b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/samples/java/com/azure/resourcemanager/mixedreality/generated/ObjectAnchorsAccountsUpdateSamples.java new file mode 100644 index 0000000000000..450da972170b2 --- /dev/null +++ b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/samples/java/com/azure/resourcemanager/mixedreality/generated/ObjectAnchorsAccountsUpdateSamples.java @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mixedreality.generated; + +import com.azure.core.util.Context; +import com.azure.resourcemanager.mixedreality.models.ObjectAnchorsAccount; +import com.azure.resourcemanager.mixedreality.models.ObjectAnchorsAccountIdentity; +import com.azure.resourcemanager.mixedreality.models.ResourceIdentityType; +import java.util.HashMap; +import java.util.Map; + +/** Samples for ObjectAnchorsAccounts Update. */ +public final class ObjectAnchorsAccountsUpdateSamples { + /* + * x-ms-original-file: specification/mixedreality/resource-manager/Microsoft.MixedReality/preview/2021-03-01-preview/examples/object-anchors/Patch.json + */ + /** + * Sample code: Update object anchors account. + * + * @param manager Entry point to MixedRealityManager. + */ + public static void updateObjectAnchorsAccount(com.azure.resourcemanager.mixedreality.MixedRealityManager manager) { + ObjectAnchorsAccount resource = + manager + .objectAnchorsAccounts() + .getByResourceGroupWithResponse("MyResourceGroup", "MyAccount", Context.NONE) + .getValue(); + resource + .update() + .withTags(mapOf("hero", "romeo", "heroine", "juliet")) + .withIdentity(new ObjectAnchorsAccountIdentity().withType(ResourceIdentityType.SYSTEM_ASSIGNED)) + .apply(); + } + + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/samples/java/com/azure/resourcemanager/mixedreality/generated/OperationsListSamples.java b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/samples/java/com/azure/resourcemanager/mixedreality/generated/OperationsListSamples.java new file mode 100644 index 0000000000000..a009dc8a68386 --- /dev/null +++ b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/samples/java/com/azure/resourcemanager/mixedreality/generated/OperationsListSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mixedreality.generated; + +import com.azure.core.util.Context; + +/** Samples for Operations List. */ +public final class OperationsListSamples { + /* + * x-ms-original-file: specification/mixedreality/resource-manager/Microsoft.MixedReality/preview/2021-03-01-preview/examples/proxy/ExposingAvailableOperations.json + */ + /** + * Sample code: List available operations. + * + * @param manager Entry point to MixedRealityManager. + */ + public static void listAvailableOperations(com.azure.resourcemanager.mixedreality.MixedRealityManager manager) { + manager.operations().list(Context.NONE); + } +} diff --git a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/samples/java/com/azure/resourcemanager/mixedreality/generated/RemoteRenderingAccountsCreateSamples.java b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/samples/java/com/azure/resourcemanager/mixedreality/generated/RemoteRenderingAccountsCreateSamples.java new file mode 100644 index 0000000000000..47fd9c7fd233b --- /dev/null +++ b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/samples/java/com/azure/resourcemanager/mixedreality/generated/RemoteRenderingAccountsCreateSamples.java @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mixedreality.generated; + +import com.azure.resourcemanager.mixedreality.models.Identity; +import com.azure.resourcemanager.mixedreality.models.ResourceIdentityType; + +/** Samples for RemoteRenderingAccounts Create. */ +public final class RemoteRenderingAccountsCreateSamples { + /* + * x-ms-original-file: specification/mixedreality/resource-manager/Microsoft.MixedReality/preview/2021-03-01-preview/examples/remote-rendering/Put.json + */ + /** + * Sample code: Create remote rendering account. + * + * @param manager Entry point to MixedRealityManager. + */ + public static void createRemoteRenderingAccount( + com.azure.resourcemanager.mixedreality.MixedRealityManager manager) { + manager + .remoteRenderingAccounts() + .define("MyAccount") + .withRegion("eastus2euap") + .withExistingResourceGroup("MyResourceGroup") + .withIdentity(new Identity().withType(ResourceIdentityType.SYSTEM_ASSIGNED)) + .create(); + } +} diff --git a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/samples/java/com/azure/resourcemanager/mixedreality/generated/RemoteRenderingAccountsDeleteSamples.java b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/samples/java/com/azure/resourcemanager/mixedreality/generated/RemoteRenderingAccountsDeleteSamples.java new file mode 100644 index 0000000000000..bf6102cad074b --- /dev/null +++ b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/samples/java/com/azure/resourcemanager/mixedreality/generated/RemoteRenderingAccountsDeleteSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mixedreality.generated; + +import com.azure.core.util.Context; + +/** Samples for RemoteRenderingAccounts Delete. */ +public final class RemoteRenderingAccountsDeleteSamples { + /* + * x-ms-original-file: specification/mixedreality/resource-manager/Microsoft.MixedReality/preview/2021-03-01-preview/examples/remote-rendering/Delete.json + */ + /** + * Sample code: Delete remote rendering account. + * + * @param manager Entry point to MixedRealityManager. + */ + public static void deleteRemoteRenderingAccount( + com.azure.resourcemanager.mixedreality.MixedRealityManager manager) { + manager.remoteRenderingAccounts().deleteWithResponse("MyResourceGroup", "MyAccount", Context.NONE); + } +} diff --git a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/samples/java/com/azure/resourcemanager/mixedreality/generated/RemoteRenderingAccountsGetByResourceGroupSamples.java b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/samples/java/com/azure/resourcemanager/mixedreality/generated/RemoteRenderingAccountsGetByResourceGroupSamples.java new file mode 100644 index 0000000000000..bf2db448612b6 --- /dev/null +++ b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/samples/java/com/azure/resourcemanager/mixedreality/generated/RemoteRenderingAccountsGetByResourceGroupSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mixedreality.generated; + +import com.azure.core.util.Context; + +/** Samples for RemoteRenderingAccounts GetByResourceGroup. */ +public final class RemoteRenderingAccountsGetByResourceGroupSamples { + /* + * x-ms-original-file: specification/mixedreality/resource-manager/Microsoft.MixedReality/preview/2021-03-01-preview/examples/remote-rendering/Get.json + */ + /** + * Sample code: Get remote rendering account. + * + * @param manager Entry point to MixedRealityManager. + */ + public static void getRemoteRenderingAccount(com.azure.resourcemanager.mixedreality.MixedRealityManager manager) { + manager.remoteRenderingAccounts().getByResourceGroupWithResponse("MyResourceGroup", "MyAccount", Context.NONE); + } +} diff --git a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/samples/java/com/azure/resourcemanager/mixedreality/generated/RemoteRenderingAccountsListByResourceGroupSamples.java b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/samples/java/com/azure/resourcemanager/mixedreality/generated/RemoteRenderingAccountsListByResourceGroupSamples.java new file mode 100644 index 0000000000000..b9263ab8d8778 --- /dev/null +++ b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/samples/java/com/azure/resourcemanager/mixedreality/generated/RemoteRenderingAccountsListByResourceGroupSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mixedreality.generated; + +import com.azure.core.util.Context; + +/** Samples for RemoteRenderingAccounts ListByResourceGroup. */ +public final class RemoteRenderingAccountsListByResourceGroupSamples { + /* + * x-ms-original-file: specification/mixedreality/resource-manager/Microsoft.MixedReality/preview/2021-03-01-preview/examples/remote-rendering/GetByResourceGroup.json + */ + /** + * Sample code: List remote rendering accounts by resource group. + * + * @param manager Entry point to MixedRealityManager. + */ + public static void listRemoteRenderingAccountsByResourceGroup( + com.azure.resourcemanager.mixedreality.MixedRealityManager manager) { + manager.remoteRenderingAccounts().listByResourceGroup("MyResourceGroup", Context.NONE); + } +} diff --git a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/samples/java/com/azure/resourcemanager/mixedreality/generated/RemoteRenderingAccountsListKeysSamples.java b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/samples/java/com/azure/resourcemanager/mixedreality/generated/RemoteRenderingAccountsListKeysSamples.java new file mode 100644 index 0000000000000..7d64cdb40ae07 --- /dev/null +++ b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/samples/java/com/azure/resourcemanager/mixedreality/generated/RemoteRenderingAccountsListKeysSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mixedreality.generated; + +import com.azure.core.util.Context; + +/** Samples for RemoteRenderingAccounts ListKeys. */ +public final class RemoteRenderingAccountsListKeysSamples { + /* + * x-ms-original-file: specification/mixedreality/resource-manager/Microsoft.MixedReality/preview/2021-03-01-preview/examples/remote-rendering/ListKeys.json + */ + /** + * Sample code: List remote rendering account key. + * + * @param manager Entry point to MixedRealityManager. + */ + public static void listRemoteRenderingAccountKey( + com.azure.resourcemanager.mixedreality.MixedRealityManager manager) { + manager.remoteRenderingAccounts().listKeysWithResponse("MyResourceGroup", "MyAccount", Context.NONE); + } +} diff --git a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/samples/java/com/azure/resourcemanager/mixedreality/generated/RemoteRenderingAccountsListSamples.java b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/samples/java/com/azure/resourcemanager/mixedreality/generated/RemoteRenderingAccountsListSamples.java new file mode 100644 index 0000000000000..d861058f62c4c --- /dev/null +++ b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/samples/java/com/azure/resourcemanager/mixedreality/generated/RemoteRenderingAccountsListSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mixedreality.generated; + +import com.azure.core.util.Context; + +/** Samples for RemoteRenderingAccounts List. */ +public final class RemoteRenderingAccountsListSamples { + /* + * x-ms-original-file: specification/mixedreality/resource-manager/Microsoft.MixedReality/preview/2021-03-01-preview/examples/remote-rendering/GetBySubscription.json + */ + /** + * Sample code: List remote rendering accounts by subscription. + * + * @param manager Entry point to MixedRealityManager. + */ + public static void listRemoteRenderingAccountsBySubscription( + com.azure.resourcemanager.mixedreality.MixedRealityManager manager) { + manager.remoteRenderingAccounts().list(Context.NONE); + } +} diff --git a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/samples/java/com/azure/resourcemanager/mixedreality/generated/RemoteRenderingAccountsRegenerateKeysSamples.java b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/samples/java/com/azure/resourcemanager/mixedreality/generated/RemoteRenderingAccountsRegenerateKeysSamples.java new file mode 100644 index 0000000000000..27da310ae7ea6 --- /dev/null +++ b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/samples/java/com/azure/resourcemanager/mixedreality/generated/RemoteRenderingAccountsRegenerateKeysSamples.java @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mixedreality.generated; + +import com.azure.core.util.Context; +import com.azure.resourcemanager.mixedreality.models.AccountKeyRegenerateRequest; +import com.azure.resourcemanager.mixedreality.models.Serial; + +/** Samples for RemoteRenderingAccounts RegenerateKeys. */ +public final class RemoteRenderingAccountsRegenerateKeysSamples { + /* + * x-ms-original-file: specification/mixedreality/resource-manager/Microsoft.MixedReality/preview/2021-03-01-preview/examples/remote-rendering/RegenerateKey.json + */ + /** + * Sample code: Regenerate remote rendering account keys. + * + * @param manager Entry point to MixedRealityManager. + */ + public static void regenerateRemoteRenderingAccountKeys( + com.azure.resourcemanager.mixedreality.MixedRealityManager manager) { + manager + .remoteRenderingAccounts() + .regenerateKeysWithResponse( + "MyResourceGroup", "MyAccount", new AccountKeyRegenerateRequest().withSerial(Serial.ONE), Context.NONE); + } +} diff --git a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/samples/java/com/azure/resourcemanager/mixedreality/generated/RemoteRenderingAccountsUpdateSamples.java b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/samples/java/com/azure/resourcemanager/mixedreality/generated/RemoteRenderingAccountsUpdateSamples.java new file mode 100644 index 0000000000000..0580d0cfac00a --- /dev/null +++ b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/samples/java/com/azure/resourcemanager/mixedreality/generated/RemoteRenderingAccountsUpdateSamples.java @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mixedreality.generated; + +import com.azure.core.util.Context; +import com.azure.resourcemanager.mixedreality.models.Identity; +import com.azure.resourcemanager.mixedreality.models.RemoteRenderingAccount; +import com.azure.resourcemanager.mixedreality.models.ResourceIdentityType; +import java.util.HashMap; +import java.util.Map; + +/** Samples for RemoteRenderingAccounts Update. */ +public final class RemoteRenderingAccountsUpdateSamples { + /* + * x-ms-original-file: specification/mixedreality/resource-manager/Microsoft.MixedReality/preview/2021-03-01-preview/examples/remote-rendering/Patch.json + */ + /** + * Sample code: Update remote rendering account. + * + * @param manager Entry point to MixedRealityManager. + */ + public static void updateRemoteRenderingAccount( + com.azure.resourcemanager.mixedreality.MixedRealityManager manager) { + RemoteRenderingAccount resource = + manager + .remoteRenderingAccounts() + .getByResourceGroupWithResponse("MyResourceGroup", "MyAccount", Context.NONE) + .getValue(); + resource + .update() + .withTags(mapOf("hero", "romeo", "heroine", "juliet")) + .withIdentity(new Identity().withType(ResourceIdentityType.SYSTEM_ASSIGNED)) + .apply(); + } + + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/samples/java/com/azure/resourcemanager/mixedreality/generated/ResourceProviderCheckNameAvailabilityLocalSamples.java b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/samples/java/com/azure/resourcemanager/mixedreality/generated/ResourceProviderCheckNameAvailabilityLocalSamples.java new file mode 100644 index 0000000000000..598856ab24b19 --- /dev/null +++ b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/samples/java/com/azure/resourcemanager/mixedreality/generated/ResourceProviderCheckNameAvailabilityLocalSamples.java @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mixedreality.generated; + +import com.azure.core.util.Context; +import com.azure.resourcemanager.mixedreality.models.CheckNameAvailabilityRequest; + +/** Samples for ResourceProvider CheckNameAvailabilityLocal. */ +public final class ResourceProviderCheckNameAvailabilityLocalSamples { + /* + * x-ms-original-file: specification/mixedreality/resource-manager/Microsoft.MixedReality/preview/2021-03-01-preview/examples/proxy/CheckNameAvailabilityForLocalUniqueness.json + */ + /** + * Sample code: CheckLocalNameAvailability. + * + * @param manager Entry point to MixedRealityManager. + */ + public static void checkLocalNameAvailability(com.azure.resourcemanager.mixedreality.MixedRealityManager manager) { + manager + .resourceProviders() + .checkNameAvailabilityLocalWithResponse( + "eastus2euap", + new CheckNameAvailabilityRequest() + .withName("MyAccount") + .withType("Microsoft.MixedReality/spatialAnchorsAccounts"), + Context.NONE); + } +} diff --git a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/samples/java/com/azure/resourcemanager/mixedreality/generated/SpatialAnchorsAccountsCreateSamples.java b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/samples/java/com/azure/resourcemanager/mixedreality/generated/SpatialAnchorsAccountsCreateSamples.java new file mode 100644 index 0000000000000..e3ac633983255 --- /dev/null +++ b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/samples/java/com/azure/resourcemanager/mixedreality/generated/SpatialAnchorsAccountsCreateSamples.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mixedreality.generated; + +/** Samples for SpatialAnchorsAccounts Create. */ +public final class SpatialAnchorsAccountsCreateSamples { + /* + * x-ms-original-file: specification/mixedreality/resource-manager/Microsoft.MixedReality/preview/2021-03-01-preview/examples/spatial-anchors/Put.json + */ + /** + * Sample code: Create spatial anchor account. + * + * @param manager Entry point to MixedRealityManager. + */ + public static void createSpatialAnchorAccount(com.azure.resourcemanager.mixedreality.MixedRealityManager manager) { + manager + .spatialAnchorsAccounts() + .define("MyAccount") + .withRegion("eastus2euap") + .withExistingResourceGroup("MyResourceGroup") + .create(); + } +} diff --git a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/samples/java/com/azure/resourcemanager/mixedreality/generated/SpatialAnchorsAccountsDeleteSamples.java b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/samples/java/com/azure/resourcemanager/mixedreality/generated/SpatialAnchorsAccountsDeleteSamples.java new file mode 100644 index 0000000000000..0abbdeba0d933 --- /dev/null +++ b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/samples/java/com/azure/resourcemanager/mixedreality/generated/SpatialAnchorsAccountsDeleteSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mixedreality.generated; + +import com.azure.core.util.Context; + +/** Samples for SpatialAnchorsAccounts Delete. */ +public final class SpatialAnchorsAccountsDeleteSamples { + /* + * x-ms-original-file: specification/mixedreality/resource-manager/Microsoft.MixedReality/preview/2021-03-01-preview/examples/spatial-anchors/Delete.json + */ + /** + * Sample code: Delete spatial anchors account. + * + * @param manager Entry point to MixedRealityManager. + */ + public static void deleteSpatialAnchorsAccount(com.azure.resourcemanager.mixedreality.MixedRealityManager manager) { + manager.spatialAnchorsAccounts().deleteWithResponse("MyResourceGroup", "MyAccount", Context.NONE); + } +} diff --git a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/samples/java/com/azure/resourcemanager/mixedreality/generated/SpatialAnchorsAccountsGetByResourceGroupSamples.java b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/samples/java/com/azure/resourcemanager/mixedreality/generated/SpatialAnchorsAccountsGetByResourceGroupSamples.java new file mode 100644 index 0000000000000..05466121b746f --- /dev/null +++ b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/samples/java/com/azure/resourcemanager/mixedreality/generated/SpatialAnchorsAccountsGetByResourceGroupSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mixedreality.generated; + +import com.azure.core.util.Context; + +/** Samples for SpatialAnchorsAccounts GetByResourceGroup. */ +public final class SpatialAnchorsAccountsGetByResourceGroupSamples { + /* + * x-ms-original-file: specification/mixedreality/resource-manager/Microsoft.MixedReality/preview/2021-03-01-preview/examples/spatial-anchors/Get.json + */ + /** + * Sample code: Get spatial anchors account. + * + * @param manager Entry point to MixedRealityManager. + */ + public static void getSpatialAnchorsAccount(com.azure.resourcemanager.mixedreality.MixedRealityManager manager) { + manager.spatialAnchorsAccounts().getByResourceGroupWithResponse("MyResourceGroup", "MyAccount", Context.NONE); + } +} diff --git a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/samples/java/com/azure/resourcemanager/mixedreality/generated/SpatialAnchorsAccountsListByResourceGroupSamples.java b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/samples/java/com/azure/resourcemanager/mixedreality/generated/SpatialAnchorsAccountsListByResourceGroupSamples.java new file mode 100644 index 0000000000000..29d81ed4466e0 --- /dev/null +++ b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/samples/java/com/azure/resourcemanager/mixedreality/generated/SpatialAnchorsAccountsListByResourceGroupSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mixedreality.generated; + +import com.azure.core.util.Context; + +/** Samples for SpatialAnchorsAccounts ListByResourceGroup. */ +public final class SpatialAnchorsAccountsListByResourceGroupSamples { + /* + * x-ms-original-file: specification/mixedreality/resource-manager/Microsoft.MixedReality/preview/2021-03-01-preview/examples/spatial-anchors/GetByResourceGroup.json + */ + /** + * Sample code: List spatial anchor accounts by resource group. + * + * @param manager Entry point to MixedRealityManager. + */ + public static void listSpatialAnchorAccountsByResourceGroup( + com.azure.resourcemanager.mixedreality.MixedRealityManager manager) { + manager.spatialAnchorsAccounts().listByResourceGroup("MyResourceGroup", Context.NONE); + } +} diff --git a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/samples/java/com/azure/resourcemanager/mixedreality/generated/SpatialAnchorsAccountsListKeysSamples.java b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/samples/java/com/azure/resourcemanager/mixedreality/generated/SpatialAnchorsAccountsListKeysSamples.java new file mode 100644 index 0000000000000..cde196ac312ca --- /dev/null +++ b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/samples/java/com/azure/resourcemanager/mixedreality/generated/SpatialAnchorsAccountsListKeysSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mixedreality.generated; + +import com.azure.core.util.Context; + +/** Samples for SpatialAnchorsAccounts ListKeys. */ +public final class SpatialAnchorsAccountsListKeysSamples { + /* + * x-ms-original-file: specification/mixedreality/resource-manager/Microsoft.MixedReality/preview/2021-03-01-preview/examples/spatial-anchors/ListKeys.json + */ + /** + * Sample code: List spatial anchor account key. + * + * @param manager Entry point to MixedRealityManager. + */ + public static void listSpatialAnchorAccountKey(com.azure.resourcemanager.mixedreality.MixedRealityManager manager) { + manager.spatialAnchorsAccounts().listKeysWithResponse("MyResourceGroup", "MyAccount", Context.NONE); + } +} diff --git a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/samples/java/com/azure/resourcemanager/mixedreality/generated/SpatialAnchorsAccountsListSamples.java b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/samples/java/com/azure/resourcemanager/mixedreality/generated/SpatialAnchorsAccountsListSamples.java new file mode 100644 index 0000000000000..5f6df44056e9e --- /dev/null +++ b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/samples/java/com/azure/resourcemanager/mixedreality/generated/SpatialAnchorsAccountsListSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mixedreality.generated; + +import com.azure.core.util.Context; + +/** Samples for SpatialAnchorsAccounts List. */ +public final class SpatialAnchorsAccountsListSamples { + /* + * x-ms-original-file: specification/mixedreality/resource-manager/Microsoft.MixedReality/preview/2021-03-01-preview/examples/spatial-anchors/GetBySubscription.json + */ + /** + * Sample code: List spatial anchors accounts by subscription. + * + * @param manager Entry point to MixedRealityManager. + */ + public static void listSpatialAnchorsAccountsBySubscription( + com.azure.resourcemanager.mixedreality.MixedRealityManager manager) { + manager.spatialAnchorsAccounts().list(Context.NONE); + } +} diff --git a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/samples/java/com/azure/resourcemanager/mixedreality/generated/SpatialAnchorsAccountsRegenerateKeysSamples.java b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/samples/java/com/azure/resourcemanager/mixedreality/generated/SpatialAnchorsAccountsRegenerateKeysSamples.java new file mode 100644 index 0000000000000..f2d66f5d60659 --- /dev/null +++ b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/samples/java/com/azure/resourcemanager/mixedreality/generated/SpatialAnchorsAccountsRegenerateKeysSamples.java @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mixedreality.generated; + +import com.azure.core.util.Context; +import com.azure.resourcemanager.mixedreality.models.AccountKeyRegenerateRequest; +import com.azure.resourcemanager.mixedreality.models.Serial; + +/** Samples for SpatialAnchorsAccounts RegenerateKeys. */ +public final class SpatialAnchorsAccountsRegenerateKeysSamples { + /* + * x-ms-original-file: specification/mixedreality/resource-manager/Microsoft.MixedReality/preview/2021-03-01-preview/examples/spatial-anchors/RegenerateKey.json + */ + /** + * Sample code: Regenerate spatial anchors account keys. + * + * @param manager Entry point to MixedRealityManager. + */ + public static void regenerateSpatialAnchorsAccountKeys( + com.azure.resourcemanager.mixedreality.MixedRealityManager manager) { + manager + .spatialAnchorsAccounts() + .regenerateKeysWithResponse( + "MyResourceGroup", "MyAccount", new AccountKeyRegenerateRequest().withSerial(Serial.ONE), Context.NONE); + } +} diff --git a/sdk/mixedreality/azure-resourcemanager-mixedreality/src/samples/java/com/azure/resourcemanager/mixedreality/generated/SpatialAnchorsAccountsUpdateSamples.java b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/samples/java/com/azure/resourcemanager/mixedreality/generated/SpatialAnchorsAccountsUpdateSamples.java new file mode 100644 index 0000000000000..05150457f8b18 --- /dev/null +++ b/sdk/mixedreality/azure-resourcemanager-mixedreality/src/samples/java/com/azure/resourcemanager/mixedreality/generated/SpatialAnchorsAccountsUpdateSamples.java @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mixedreality.generated; + +import com.azure.core.util.Context; +import com.azure.resourcemanager.mixedreality.models.SpatialAnchorsAccount; +import java.util.HashMap; +import java.util.Map; + +/** Samples for SpatialAnchorsAccounts Update. */ +public final class SpatialAnchorsAccountsUpdateSamples { + /* + * x-ms-original-file: specification/mixedreality/resource-manager/Microsoft.MixedReality/preview/2021-03-01-preview/examples/spatial-anchors/Patch.json + */ + /** + * Sample code: Update spatial anchors account. + * + * @param manager Entry point to MixedRealityManager. + */ + public static void updateSpatialAnchorsAccount(com.azure.resourcemanager.mixedreality.MixedRealityManager manager) { + SpatialAnchorsAccount resource = + manager + .spatialAnchorsAccounts() + .getByResourceGroupWithResponse("MyResourceGroup", "MyAccount", Context.NONE) + .getValue(); + resource.update().withTags(mapOf("hero", "romeo", "heroine", "juliet")).apply(); + } + + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +}