From b64d7c1b4b99d8b909bab3e2dad3b28d202dc4d5 Mon Sep 17 00:00:00 2001 From: Michael Zappe Date: Thu, 2 Oct 2025 11:03:09 +0200 Subject: [PATCH] Remove remoterendering SDK --- .../Azure.MixedReality.RemoteRendering.sln | 41 - .../CHANGELOG.md | 32 - .../Directory.Build.props | 6 - .../README.md | 344 -------- ...dReality.RemoteRendering.netstandard2.0.cs | 203 ----- .../assets.json | 6 - .../src/AssetConversionOperation.cs | 117 --- .../src/AssetConversionOutput.cs | 17 - .../Authentication/AuthenticationEndpoint.cs | 31 - .../MixedRealityAccountKeyCredential.cs | 64 -- .../MixedRealityTokenCredential.cs | 75 -- .../StaticAccessTokenCredential.cs | 43 - .../Azure.MixedReality.RemoteRendering.csproj | 25 - .../Customizations/Models/AssetConversion.cs | 27 - .../Models/AssetConversionInputOptions.cs | 20 - .../Models/AssetConversionOptions.cs | 22 - .../Models/AssetConversionOutput.cs | 13 - .../Models/AssetConversionOutputOptions.cs | 16 - .../Models/AssetConversionStatus.cs | 13 - .../Customizations/Models/ConversionList.cs | 12 - .../Models/CreateConversionSettings.cs | 12 - .../Models/RemoteRenderingModelFactory.cs | 41 - .../Models/RemoteRenderingServiceError.cs | 15 - .../Models/RenderingServerSize.cs | 15 - .../Customizations/Models/RenderingSession.cs | 47 -- .../Models/RenderingSessionOptions.cs | 44 - .../Models/RenderingSessionStatus.cs | 15 - .../src/Customizations/Models/SessionsList.cs | 12 - .../Models/UpdateSessionOptions.cs | 46 -- .../src/Generated/Internal/Argument.cs | 129 --- .../Generated/Internal/ChangeTrackingList.cs | 153 ---- .../src/Generated/Internal/Optional.cs | 52 -- .../Internal/RequestContentHelper.cs | 122 --- .../Models/AssetConversion.Serialization.cs | 79 -- .../src/Generated/Models/AssetConversion.cs | 57 -- ...setConversionInputOptions.Serialization.cs | 72 -- .../Models/AssetConversionInputOptions.cs | 45 - .../AssetConversionOptions.Serialization.cs | 49 -- .../Models/AssetConversionOptions.cs | 28 - .../AssetConversionOutput.Serialization.cs | 32 - .../Generated/Models/AssetConversionOutput.cs | 25 - ...etConversionOutputOptions.Serialization.cs | 75 -- .../Models/AssetConversionOutputOptions.cs | 44 - .../Generated/Models/AssetConversionStatus.cs | 60 -- .../Models/ConversionList.Serialization.cs | 44 - .../src/Generated/Models/ConversionList.cs | 41 - .../CreateConversionSettings.Serialization.cs | 23 - .../Models/CreateConversionSettings.cs | 28 - .../Models/ErrorResponse.Serialization.cs | 33 - .../src/Generated/Models/ErrorResponse.cs | 29 - ...moteRenderingServiceError.Serialization.cs | 70 -- .../Models/RemoteRenderingServiceError.cs | 56 -- .../Generated/Models/RenderingServerSize.cs | 51 -- .../Models/RenderingSession.Serialization.cs | 134 --- .../src/Generated/Models/RenderingSession.cs | 70 -- .../RenderingSessionOptions.Serialization.cs | 25 - .../Models/RenderingSessionOptions.cs | 16 - .../Models/RenderingSessionStatus.cs | 60 -- .../Models/SessionsList.Serialization.cs | 44 - .../src/Generated/Models/SessionsList.cs | 41 - .../UpdateSessionOptions.Serialization.cs | 23 - .../Generated/Models/UpdateSessionOptions.cs | 14 - .../RemoteRenderingCreateConversionHeaders.cs | 23 - .../RemoteRenderingCreateSessionHeaders.cs | 23 - .../RemoteRenderingGetConversionHeaders.cs | 25 - .../RemoteRenderingListConversionsHeaders.cs | 23 - .../Generated/RemoteRenderingRestClient.cs | 782 ------------------ .../RemoteRenderingStopSessionHeaders.cs | 23 - .../src/GlobalSuppressions.cs | 12 - .../src/RemoteRenderingClient.cs | 564 ------------- .../src/RemoteRenderingClientOptions.cs | 53 -- .../src/StartRenderingSessionOperation.cs | 118 --- .../src/autorest.md | 9 - .../src/properties/AssemblyInfo.cs | 13 - ....MixedReality.RemoteRendering.Tests.csproj | 22 - .../tests/RemoteRenderingLiveTests.cs | 215 ----- .../tests/RemoteRenderingTestEnvironment.cs | 68 -- .../RemoteRenderingConvertAssetSample.cs | 119 --- .../RemoteRenderingCreateSessionSample.cs | 228 ----- sdk/remoterendering/Directory.Build.props | 10 - sdk/remoterendering/TestResources/testBox.fbx | 346 -------- sdk/remoterendering/ci.yml | 30 - sdk/remoterendering/test-resources-post.ps1 | 30 - sdk/remoterendering/test-resources.json | 121 --- sdk/remoterendering/tests.yml | 7 - 85 files changed, 6062 deletions(-) delete mode 100644 sdk/remoterendering/Azure.MixedReality.RemoteRendering/Azure.MixedReality.RemoteRendering.sln delete mode 100644 sdk/remoterendering/Azure.MixedReality.RemoteRendering/CHANGELOG.md delete mode 100644 sdk/remoterendering/Azure.MixedReality.RemoteRendering/Directory.Build.props delete mode 100644 sdk/remoterendering/Azure.MixedReality.RemoteRendering/README.md delete mode 100644 sdk/remoterendering/Azure.MixedReality.RemoteRendering/api/Azure.MixedReality.RemoteRendering.netstandard2.0.cs delete mode 100644 sdk/remoterendering/Azure.MixedReality.RemoteRendering/assets.json delete mode 100644 sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/AssetConversionOperation.cs delete mode 100644 sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/AssetConversionOutput.cs delete mode 100644 sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Authentication/AuthenticationEndpoint.cs delete mode 100644 sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Authentication/MixedRealityAccountKeyCredential.cs delete mode 100644 sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Authentication/MixedRealityTokenCredential.cs delete mode 100644 sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Authentication/StaticAccessTokenCredential.cs delete mode 100644 sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Azure.MixedReality.RemoteRendering.csproj delete mode 100644 sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Customizations/Models/AssetConversion.cs delete mode 100644 sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Customizations/Models/AssetConversionInputOptions.cs delete mode 100644 sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Customizations/Models/AssetConversionOptions.cs delete mode 100644 sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Customizations/Models/AssetConversionOutput.cs delete mode 100644 sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Customizations/Models/AssetConversionOutputOptions.cs delete mode 100644 sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Customizations/Models/AssetConversionStatus.cs delete mode 100644 sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Customizations/Models/ConversionList.cs delete mode 100644 sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Customizations/Models/CreateConversionSettings.cs delete mode 100644 sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Customizations/Models/RemoteRenderingModelFactory.cs delete mode 100644 sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Customizations/Models/RemoteRenderingServiceError.cs delete mode 100644 sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Customizations/Models/RenderingServerSize.cs delete mode 100644 sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Customizations/Models/RenderingSession.cs delete mode 100644 sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Customizations/Models/RenderingSessionOptions.cs delete mode 100644 sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Customizations/Models/RenderingSessionStatus.cs delete mode 100644 sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Customizations/Models/SessionsList.cs delete mode 100644 sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Customizations/Models/UpdateSessionOptions.cs delete mode 100644 sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Generated/Internal/Argument.cs delete mode 100644 sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Generated/Internal/ChangeTrackingList.cs delete mode 100644 sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Generated/Internal/Optional.cs delete mode 100644 sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Generated/Internal/RequestContentHelper.cs delete mode 100644 sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Generated/Models/AssetConversion.Serialization.cs delete mode 100644 sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Generated/Models/AssetConversion.cs delete mode 100644 sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Generated/Models/AssetConversionInputOptions.Serialization.cs delete mode 100644 sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Generated/Models/AssetConversionInputOptions.cs delete mode 100644 sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Generated/Models/AssetConversionOptions.Serialization.cs delete mode 100644 sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Generated/Models/AssetConversionOptions.cs delete mode 100644 sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Generated/Models/AssetConversionOutput.Serialization.cs delete mode 100644 sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Generated/Models/AssetConversionOutput.cs delete mode 100644 sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Generated/Models/AssetConversionOutputOptions.Serialization.cs delete mode 100644 sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Generated/Models/AssetConversionOutputOptions.cs delete mode 100644 sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Generated/Models/AssetConversionStatus.cs delete mode 100644 sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Generated/Models/ConversionList.Serialization.cs delete mode 100644 sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Generated/Models/ConversionList.cs delete mode 100644 sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Generated/Models/CreateConversionSettings.Serialization.cs delete mode 100644 sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Generated/Models/CreateConversionSettings.cs delete mode 100644 sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Generated/Models/ErrorResponse.Serialization.cs delete mode 100644 sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Generated/Models/ErrorResponse.cs delete mode 100644 sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Generated/Models/RemoteRenderingServiceError.Serialization.cs delete mode 100644 sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Generated/Models/RemoteRenderingServiceError.cs delete mode 100644 sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Generated/Models/RenderingServerSize.cs delete mode 100644 sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Generated/Models/RenderingSession.Serialization.cs delete mode 100644 sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Generated/Models/RenderingSession.cs delete mode 100644 sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Generated/Models/RenderingSessionOptions.Serialization.cs delete mode 100644 sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Generated/Models/RenderingSessionOptions.cs delete mode 100644 sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Generated/Models/RenderingSessionStatus.cs delete mode 100644 sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Generated/Models/SessionsList.Serialization.cs delete mode 100644 sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Generated/Models/SessionsList.cs delete mode 100644 sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Generated/Models/UpdateSessionOptions.Serialization.cs delete mode 100644 sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Generated/Models/UpdateSessionOptions.cs delete mode 100644 sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Generated/RemoteRenderingCreateConversionHeaders.cs delete mode 100644 sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Generated/RemoteRenderingCreateSessionHeaders.cs delete mode 100644 sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Generated/RemoteRenderingGetConversionHeaders.cs delete mode 100644 sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Generated/RemoteRenderingListConversionsHeaders.cs delete mode 100644 sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Generated/RemoteRenderingRestClient.cs delete mode 100644 sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Generated/RemoteRenderingStopSessionHeaders.cs delete mode 100644 sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/GlobalSuppressions.cs delete mode 100644 sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/RemoteRenderingClient.cs delete mode 100644 sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/RemoteRenderingClientOptions.cs delete mode 100644 sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/StartRenderingSessionOperation.cs delete mode 100644 sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/autorest.md delete mode 100644 sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/properties/AssemblyInfo.cs delete mode 100644 sdk/remoterendering/Azure.MixedReality.RemoteRendering/tests/Azure.MixedReality.RemoteRendering.Tests.csproj delete mode 100644 sdk/remoterendering/Azure.MixedReality.RemoteRendering/tests/RemoteRenderingLiveTests.cs delete mode 100644 sdk/remoterendering/Azure.MixedReality.RemoteRendering/tests/RemoteRenderingTestEnvironment.cs delete mode 100644 sdk/remoterendering/Azure.MixedReality.RemoteRendering/tests/Samples/RemoteRenderingConvertAssetSample.cs delete mode 100644 sdk/remoterendering/Azure.MixedReality.RemoteRendering/tests/Samples/RemoteRenderingCreateSessionSample.cs delete mode 100644 sdk/remoterendering/Directory.Build.props delete mode 100644 sdk/remoterendering/TestResources/testBox.fbx delete mode 100644 sdk/remoterendering/ci.yml delete mode 100644 sdk/remoterendering/test-resources-post.ps1 delete mode 100644 sdk/remoterendering/test-resources.json delete mode 100644 sdk/remoterendering/tests.yml diff --git a/sdk/remoterendering/Azure.MixedReality.RemoteRendering/Azure.MixedReality.RemoteRendering.sln b/sdk/remoterendering/Azure.MixedReality.RemoteRendering/Azure.MixedReality.RemoteRendering.sln deleted file mode 100644 index 883d95314dd0..000000000000 --- a/sdk/remoterendering/Azure.MixedReality.RemoteRendering/Azure.MixedReality.RemoteRendering.sln +++ /dev/null @@ -1,41 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 16 -VisualStudioVersion = 16.0.30804.86 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Azure.MixedReality.RemoteRendering", "src\Azure.MixedReality.RemoteRendering.csproj", "{A3E40E85-87E1-4238-BBBB-00E232EFD822}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Azure.MixedReality.RemoteRendering.Tests", "tests\Azure.MixedReality.RemoteRendering.Tests.csproj", "{2B67CBA1-55D8-491E-80CC-96A590E3F4F7}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Azure.Core.TestFramework", "..\..\core\Azure.Core.TestFramework\src\Azure.Core.TestFramework.csproj", "{85271BAE-8B48-43B6-8A16-BBD3F14F7AA1}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {A3E40E85-87E1-4238-BBBB-00E232EFD822}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {A3E40E85-87E1-4238-BBBB-00E232EFD822}.Debug|Any CPU.Build.0 = Debug|Any CPU - {A3E40E85-87E1-4238-BBBB-00E232EFD822}.Release|Any CPU.ActiveCfg = Release|Any CPU - {A3E40E85-87E1-4238-BBBB-00E232EFD822}.Release|Any CPU.Build.0 = Release|Any CPU - {2B67CBA1-55D8-491E-80CC-96A590E3F4F7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {2B67CBA1-55D8-491E-80CC-96A590E3F4F7}.Debug|Any CPU.Build.0 = Debug|Any CPU - {2B67CBA1-55D8-491E-80CC-96A590E3F4F7}.Release|Any CPU.ActiveCfg = Release|Any CPU - {2B67CBA1-55D8-491E-80CC-96A590E3F4F7}.Release|Any CPU.Build.0 = Release|Any CPU - {85271BAE-8B48-43B6-8A16-BBD3F14F7AA1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {85271BAE-8B48-43B6-8A16-BBD3F14F7AA1}.Debug|Any CPU.Build.0 = Debug|Any CPU - {85271BAE-8B48-43B6-8A16-BBD3F14F7AA1}.Release|Any CPU.ActiveCfg = Release|Any CPU - {85271BAE-8B48-43B6-8A16-BBD3F14F7AA1}.Release|Any CPU.Build.0 = Release|Any CPU - {44601A61-63BA-4251-88EE-3BFF39E8D05E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {44601A61-63BA-4251-88EE-3BFF39E8D05E}.Debug|Any CPU.Build.0 = Debug|Any CPU - {44601A61-63BA-4251-88EE-3BFF39E8D05E}.Release|Any CPU.ActiveCfg = Release|Any CPU - {44601A61-63BA-4251-88EE-3BFF39E8D05E}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {DC488E19-B259-4BFE-A0F2-ABE222B90514} - EndGlobalSection -EndGlobal diff --git a/sdk/remoterendering/Azure.MixedReality.RemoteRendering/CHANGELOG.md b/sdk/remoterendering/Azure.MixedReality.RemoteRendering/CHANGELOG.md deleted file mode 100644 index ad61db17ae84..000000000000 --- a/sdk/remoterendering/Azure.MixedReality.RemoteRendering/CHANGELOG.md +++ /dev/null @@ -1,32 +0,0 @@ -# Release History - -## 1.2.1-beta.1 (Unreleased) - -### Other Changes -- Renamed `conversionId` and `sessionId` tags reported on `RemoteRenderingClient` activities to `az.remoterendering.conversion.id` and `az.remoterendering.session.id` following OpenTelemetry attribute naming conventions. - -## 1.2.1 (2022-08-09) -- Minor documentation fixes. - -## 1.2.0-beta.1 (2021-11-16) -- The SDK now defaults to a 2s polling interval when waiting for a Standard sized rendering VM. For Premium, 10s is still used. - -## 1.1.0 (2021-09-17) -- Ensure the MS-CV header is not redacted in logs. If you are logging an issue, it can be useful to quote this value. - -## 1.0.1 (2021-05-25) -- Update dependency versions - -## 1.0.0 (2021-03-02) -- Release client. - -## 1.0.0-beta.3 (2021-02-24) -- Allow the STS endpoint to be customized. -- Changed constructors to align with guidance. - -## 1.0.0-beta.2 (2021-02-16) -- Reflect minor REST API improvements. -- Make more classes mockable. - -## 1.0.0-beta.1 (2021-02-10) -- Initial version of client. diff --git a/sdk/remoterendering/Azure.MixedReality.RemoteRendering/Directory.Build.props b/sdk/remoterendering/Azure.MixedReality.RemoteRendering/Directory.Build.props deleted file mode 100644 index 1a9611bd4924..000000000000 --- a/sdk/remoterendering/Azure.MixedReality.RemoteRendering/Directory.Build.props +++ /dev/null @@ -1,6 +0,0 @@ - - - - diff --git a/sdk/remoterendering/Azure.MixedReality.RemoteRendering/README.md b/sdk/remoterendering/Azure.MixedReality.RemoteRendering/README.md deleted file mode 100644 index 2a8af891f098..000000000000 --- a/sdk/remoterendering/Azure.MixedReality.RemoteRendering/README.md +++ /dev/null @@ -1,344 +0,0 @@ -# Azure Remote Rendering client library for .NET - -Azure Remote Rendering (ARR) is a service that enables you to render high-quality, interactive 3D content in the cloud and stream it in real time to devices, such as the HoloLens 2. - -This SDK offers functionality to convert assets to the format expected by the runtime, and also to manage -the lifetime of remote rendering sessions. - -> NOTE: Once a session is running, a client application will connect to it using one of the "runtime SDKs". -> These SDKs are designed to best support the needs of an interactive application doing 3d rendering. -> They are available in ([.net](https://docs.microsoft.com/dotnet/api/microsoft.azure.remoterendering) -> or ([C++](https://docs.microsoft.com/cpp/api/remote-rendering/)). - -[Product documentation](https://docs.microsoft.com/azure/remote-rendering/) - -## Getting started - -### Install the package - -Install the Azure Mixed Reality ARR client library for .NET with [NuGet](https://www.nuget.org/): - -```dotnetcli -dotnet add package Azure.MixedReality.RemoteRendering -``` - -Add a package reference: - -```xml - -``` - -### Prerequisites - -You will need an [Azure subscription](https://azure.microsoft.com/free/dotnet/) and an [Azure Remote Rendering account](https://docs.microsoft.com/azure/remote-rendering/how-tos/create-an-account) to use this package. - -### Authenticate the client - -Constructing a remote rendering client requires an authenticated account, and a remote rendering endpoint. -For an account created in the eastus region, the account domain will have the form "eastus.mixedreality.azure.com". -There are several different forms of authentication: - -- Account Key authentication - - Account keys enable you to get started quickly with using Azure Remote Rendering. But before you deploy your application - to production, we recommend that you update your app to use Azure AD authentication. -- Azure Active Directory (AD) token authentication - - If you're building an enterprise application and your company is using Azure AD as its identity system, you can use - user-based Azure AD authentication in your app. You then grant access to your Azure Remote Rendering accounts by using - your existing Azure AD security groups. You can also grant access directly to users in your organization. - - Otherwise, we recommend that you obtain Azure AD tokens from a web service that supports your app. We recommend this - method for production applications because it allows you to avoid embedding the credentials for access to Azure Spatial - Anchors in your client application. - -See [here](https://docs.microsoft.com/azure/remote-rendering/how-tos/authentication) for detailed instructions and information. - -In all the following examples, the client is constructed with a `remoteRenderingEndpoint` Uri object. -The available endpoints correspond to regions, and the choice of endpoint determines the region in which the service performs its work. -An example is `https://remoterendering.eastus2.mixedreality.azure.com`. - -> NOTE: For converting assets, it is preferable to pick a region close to the storage containing the assets. - -> NOTE: For rendering, it is strongly recommended that you pick the closest region to the devices using the service. -> The time taken to communicate with the server impacts the quality of the experience. - -#### Authenticating with account key authentication - -Use the `AccountKeyCredential` object to use an account identifier and account key to authenticate: - -```C# Snippet:CreateAClient -AzureKeyCredential accountKeyCredential = new AzureKeyCredential(accountKey); - -RemoteRenderingClient client = new RemoteRenderingClient(remoteRenderingEndpoint, accountId, accountDomain, accountKeyCredential); -``` - -#### Authenticating with an AAD client secret - -Use the `ClientSecretCredential` object to perform client secret authentication. - -```C# Snippet:CreateAClientWithAAD -TokenCredential credential = new ClientSecretCredential(tenantId, clientId, clientSecret, new TokenCredentialOptions -{ - AuthorityHost = new Uri($"https://login.microsoftonline.com/{tenantId}") -}); - -RemoteRenderingClient client = new RemoteRenderingClient(remoteRenderingEndpoint, accountId, accountDomain, credential); -``` - -#### Authenticating a user using device code authentication - -Use the `DeviceCodeCredential` object to perform device code authentication. - -```C# Snippet:CreateAClientWithDeviceCode -Task deviceCodeCallback(DeviceCodeInfo deviceCodeInfo, CancellationToken cancellationToken) -{ - Console.WriteLine(deviceCodeInfo.Message); - return Task.FromResult(0); -} - -TokenCredential credential = new DeviceCodeCredential(deviceCodeCallback, tenantId, clientId, new TokenCredentialOptions -{ - AuthorityHost = new Uri($"https://login.microsoftonline.com/{tenantId}"), -}); - -RemoteRenderingClient client = new RemoteRenderingClient(remoteRenderingEndpoint, accountId, accountDomain, credential); -``` - -See [here](https://github.com/AzureAD/microsoft-authentication-library-for-dotnet/wiki/Device-Code-Flow) for more -information about using device code authentication flow. - -#### Interactive authentication with DefaultAzureCredential - -Use the `DefaultAzureCredential` object with `includeInteractiveCredentials: true` to use default interactive authentication -flow: - -```C# Snippet:CreateAClientWithAzureCredential -TokenCredential credential = new DefaultAzureCredential(includeInteractiveCredentials: true); - -RemoteRenderingClient client = new RemoteRenderingClient(remoteRenderingEndpoint, accountId, accountDomain, credential); -``` - -#### Authenticating with a static access token - -You can pass a Mixed Reality access token as an `AccessToken` previously retrieved from the -[Mixed Reality STS service](https://github.com/Azure/azure-sdk-for-net/tree/main/sdk/mixedreality/Azure.MixedReality.Authentication) -to be used with a Mixed Reality client library: - -```C# Snippet:CreateAClientWithStaticAccessToken -// GetMixedRealityAccessTokenFromWebService is a hypothetical method that retrieves -// a Mixed Reality access token from a web service. The web service would use the -// MixedRealityStsClient and credentials to obtain an access token to be returned -// to the client. -AccessToken accessToken = GetMixedRealityAccessTokenFromWebService(); - -RemoteRenderingClient client = new RemoteRenderingClient(remoteRenderingEndpoint, accountId, accountDomain, accessToken); -``` - -## Key concepts - -### RemoteRenderingClient - -The `RemoteRenderingClient` is the client library used to access the RemoteRenderingService. -It provides methods to create and manage asset conversions and rendering sessions. - -## Examples - -- [Convert a simple asset](#convert-a-simple-asset) -- [Convert a more complex asset](#convert-a-more-complex-asset) -- [Get the output when an asset conversion has finished](#get-the-output-when-an-asset-conversion-has-finished) -- [List conversions](#list-conversions) -- [Create a session](#create-a-session) -- [Extend the lease time of a session](#extend-the-lease-time-of-a-session) -- [List sessions](#list-sessions) -- [Stop a session](#stop-a-session) - -### Convert a simple asset - -We assume that a RemoteRenderingClient has been constructed as described in the [Authenticate the Client](#authenticate-the-client) section. -The following snippet describes how to request that "box.fbx", found at the root of the blob container at the given URI, gets converted. - -```C# Snippet:StartAnAssetConversion -AssetConversionInputOptions inputOptions = new AssetConversionInputOptions(storageUri, "box.fbx"); -AssetConversionOutputOptions outputOptions = new AssetConversionOutputOptions(storageUri); -AssetConversionOptions conversionOptions = new AssetConversionOptions(inputOptions, outputOptions); - -// A randomly generated GUID is a good choice for a conversionId. -string conversionId = Guid.NewGuid().ToString(); - -AssetConversionOperation conversionOperation = client.StartConversion(conversionId, conversionOptions); -``` - -The output files will be placed beside the input asset. - -### Convert a more complex asset - -Assets can reference other files, and blob containers can contain files belonging to many different assets. -In this example, we show how prefixes can be used to organize your blobs and how to convert an asset to take account of that organization. -Assume that the blob container at `inputStorageUri` contains many files, including "Bicycle/bicycle.gltf", "Bicycle/bicycle.bin" and "Bicycle/saddleTexture.jpg". -(So the prefix "Bicycle" is acting very like a folder.) -We want to convert the gltf so that it has access to the other files which share the prefix, without requiring the conversion service to access any other files. -To keep things tidy, we also want the output files to be written to a different storage container and given a common prefix: "ConvertedBicycle". -The code is as follows: - -```C# Snippet:StartAComplexAssetConversion -AssetConversionInputOptions inputOptions = new AssetConversionInputOptions(inputStorageUri, "bicycle.gltf") -{ - BlobPrefix = "Bicycle" -}; -AssetConversionOutputOptions outputOptions = new AssetConversionOutputOptions(outputStorageUri) -{ - BlobPrefix = "ConvertedBicycle" -}; -AssetConversionOptions conversionOptions = new AssetConversionOptions(inputOptions, outputOptions); - -string conversionId = Guid.NewGuid().ToString(); - -AssetConversionOperation conversionOperation = client.StartConversion(conversionId, conversionOptions); -``` - -> NOTE: when a prefix is given in the input options, then the input file parameter is assumed to be relative to that prefix. -> The same applies to the output file parameter in output options. - -### Get the output when an asset conversion has finished - -Converting an asset can take anywhere from seconds to hours. -This code uses an existing conversionOperation and polls regularly until the conversion has finished or failed. -The default polling period is 10 seconds. -Note that a conversionOperation can be constructed from the conversionId of an existing conversion and a client. - -```C# Snippet:QueryConversionStatus -AssetConversion conversion = conversionOperation.WaitForCompletionAsync().Result; -if (conversion.Status == AssetConversionStatus.Succeeded) -{ - Console.WriteLine($"Conversion succeeded: Output written to {conversion.Output.OutputAssetUri}"); -} -else if (conversion.Status == AssetConversionStatus.Failed) -{ - Console.WriteLine($"Conversion failed: {conversion.Error.Code} {conversion.Error.Message}"); -} -``` - -### List conversions - -You can get information about your conversions using the `getConversions` method. -This method may return conversions which have yet to start, conversions which are running and conversions which have finished. -In this example, we just list the output URIs of successful conversions started in the last day. - -```C# Snippet:GetConversions -foreach (var conversion in client.GetConversions()) -{ - if ((conversion.Status == AssetConversionStatus.Succeeded) && (conversion.CreatedOn > DateTimeOffset.Now.AddDays(-1))) - { - Console.WriteLine($"output asset URI: {conversion.Output.OutputAssetUri}"); - } -} -``` - -### Create a session - -We assume that a RemoteRenderingClient has been constructed as described in the [Authenticate the Client](#authenticate-the-client) section. -The following snippet describes how to request that a new rendering session be started. - -```C# Snippet:CreateASession -RenderingSessionOptions options = new RenderingSessionOptions(TimeSpan.FromMinutes(30), RenderingServerSize.Standard); - -// A randomly generated GUID is a good choice for a sessionId. -string sessionId = Guid.NewGuid().ToString(); - -StartRenderingSessionOperation startSessionOperation = client.StartSession(sessionId, options); - -RenderingSession newSession = startSessionOperation.WaitForCompletionAsync().Result; -if (newSession.Status == RenderingSessionStatus.Ready) -{ - Console.WriteLine($"Session {sessionId} is ready."); -} -else if (newSession.Status == RenderingSessionStatus.Error) -{ - Console.WriteLine($"Session {sessionId} encountered an error: {newSession.Error.Code} {newSession.Error.Message}"); -} -``` - -### Extend the lease time of a session - -If a session is approaching its maximum lease time, but you want to keep it alive, you will need to make a call to increase -its maximum lease time. -This example shows how to query the current properties and then extend the lease if it will expire soon. - -> NOTE: The runtime SDKs also offer this functionality, and in many typical scenarios, you would use them to -> extend the session lease. - -```C# Snippet:UpdateSession -RenderingSession currentSession = client.GetSession(sessionId); - -if (currentSession.MaxLeaseTime - DateTimeOffset.Now.Subtract(currentSession.CreatedOn.Value) < TimeSpan.FromMinutes(2)) -{ - TimeSpan newLeaseTime = currentSession.MaxLeaseTime.Value.Add(TimeSpan.FromMinutes(30)); - - UpdateSessionOptions longerLeaseSettings = new UpdateSessionOptions(newLeaseTime); - - client.UpdateSession(sessionId, longerLeaseSettings); -} -``` - -### List sessions - -You can get information about your sessions using the `getSessions` method. -This method may return sessions which have yet to start and sessions which are ready. - -```C# Snippet:ListSessions -foreach (var properties in client.GetSessions()) -{ - if (properties.Status == RenderingSessionStatus.Starting) - { - Console.WriteLine($"Session \"{properties.SessionId}\" is starting."); - } - else if (properties.Status == RenderingSessionStatus.Ready) - { - Console.WriteLine($"Session \"{properties.SessionId}\" is ready at host {properties.Host}"); - } -} -``` - -### Stop a session - -The following code will stop a running session with given id. - -```C# Snippet:StopSession -client.StopSession(sessionId); -``` - -## Troubleshooting - -For general troubleshooting advice concerning Azure Remote Rendering, see [the Troubleshoot page](https://docs.microsoft.com/azure/remote-rendering/resources/troubleshoot) for remote rendering at docs.microsoft.com. - -The client methods will throw exceptions if the request cannot be made. -However, in the case of both conversions and sessions, the requests can succeed but the requested operation may not be successful. -In this case, no exception will be thrown, but the returned objects can be inspected to understand what happened. - -If the asset in a conversion is invalid, the conversion operation will return an AssetConversion object -with a Failed status and carrying a RemoteRenderingServiceError with details. -Once the conversion service is able to process the file, a <assetName>.result.json file will be written to the output container. -If the input asset is invalid, then that file will contain a more detailed description of the problem. - -Similarly, sometimes when a session is requested, the session ends up in an error state. -The startSessionOperation method will return a RenderingSession object, but that object will have an Error status and carry a -RemoteRenderingServiceError with details. - -## Next steps - -- Read the [Product documentation](https://docs.microsoft.com/azure/remote-rendering/) -- Learn about the runtime SDKs: - - .NET: https://docs.microsoft.com/dotnet/api/microsoft.azure.remoterendering - - C++: https://docs.microsoft.com/cpp/api/remote-rendering/ - -## Contributing - -This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License -Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. -For details, visit [https://cla.microsoft.com](https://cla.microsoft.com). - -When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the -PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this -once across all repos using our CLA. - -This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). -For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact -[opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments. diff --git a/sdk/remoterendering/Azure.MixedReality.RemoteRendering/api/Azure.MixedReality.RemoteRendering.netstandard2.0.cs b/sdk/remoterendering/Azure.MixedReality.RemoteRendering/api/Azure.MixedReality.RemoteRendering.netstandard2.0.cs deleted file mode 100644 index 60d9994988c0..000000000000 --- a/sdk/remoterendering/Azure.MixedReality.RemoteRendering/api/Azure.MixedReality.RemoteRendering.netstandard2.0.cs +++ /dev/null @@ -1,203 +0,0 @@ -namespace Azure.MixedReality.RemoteRendering -{ - public partial class AssetConversion - { - internal AssetConversion() { } - public string ConversionId { get { throw null; } } - public System.DateTimeOffset CreatedOn { get { throw null; } } - public Azure.MixedReality.RemoteRendering.RemoteRenderingServiceError Error { get { throw null; } } - public Azure.MixedReality.RemoteRendering.AssetConversionOptions Options { get { throw null; } } - public Azure.MixedReality.RemoteRendering.AssetConversionOutput Output { get { throw null; } } - public Azure.MixedReality.RemoteRendering.AssetConversionStatus Status { get { throw null; } } - } - public partial class AssetConversionInputOptions - { - public AssetConversionInputOptions(System.Uri storageContainerUri, string relativeInputAssetPath) { } - public string BlobPrefix { get { throw null; } set { } } - public string RelativeInputAssetPath { get { throw null; } } - public string StorageContainerReadListSas { get { throw null; } set { } } - public System.Uri StorageContainerUri { get { throw null; } } - } - public partial class AssetConversionOperation : Azure.Operation - { - protected AssetConversionOperation() { } - public AssetConversionOperation(string conversionId, Azure.MixedReality.RemoteRendering.RemoteRenderingClient client) { } - public override bool HasCompleted { get { throw null; } } - public override bool HasValue { get { throw null; } } - public override string Id { get { throw null; } } - public override Azure.MixedReality.RemoteRendering.AssetConversion Value { get { throw null; } } - public override Azure.Response GetRawResponse() { throw null; } - public override Azure.Response UpdateStatus(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public override System.Threading.Tasks.ValueTask UpdateStatusAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public override System.Threading.Tasks.ValueTask> WaitForCompletionAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public override System.Threading.Tasks.ValueTask> WaitForCompletionAsync(System.TimeSpan pollingInterval, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - } - public partial class AssetConversionOptions - { - public AssetConversionOptions(Azure.MixedReality.RemoteRendering.AssetConversionInputOptions inputOptions, Azure.MixedReality.RemoteRendering.AssetConversionOutputOptions outputOptions) { } - public Azure.MixedReality.RemoteRendering.AssetConversionInputOptions InputOptions { get { throw null; } } - public Azure.MixedReality.RemoteRendering.AssetConversionOutputOptions OutputOptions { get { throw null; } } - } - public partial class AssetConversionOutput - { - internal AssetConversionOutput() { } - public string OutputAssetUri { get { throw null; } } - } - public partial class AssetConversionOutputOptions - { - public AssetConversionOutputOptions(System.Uri storageContainerUri) { } - public string BlobPrefix { get { throw null; } set { } } - public string OutputAssetFilename { get { throw null; } set { } } - public System.Uri StorageContainerUri { get { throw null; } } - public string StorageContainerWriteSas { get { throw null; } set { } } - } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct AssetConversionStatus : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public AssetConversionStatus(string value) { throw null; } - public static Azure.MixedReality.RemoteRendering.AssetConversionStatus Cancelled { get { throw null; } } - public static Azure.MixedReality.RemoteRendering.AssetConversionStatus Failed { get { throw null; } } - public static Azure.MixedReality.RemoteRendering.AssetConversionStatus NotStarted { get { throw null; } } - public static Azure.MixedReality.RemoteRendering.AssetConversionStatus Running { get { throw null; } } - public static Azure.MixedReality.RemoteRendering.AssetConversionStatus Succeeded { get { throw null; } } - public bool Equals(Azure.MixedReality.RemoteRendering.AssetConversionStatus other) { throw null; } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public override bool Equals(object obj) { throw null; } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public override int GetHashCode() { throw null; } - public static bool operator ==(Azure.MixedReality.RemoteRendering.AssetConversionStatus left, Azure.MixedReality.RemoteRendering.AssetConversionStatus right) { throw null; } - public static implicit operator Azure.MixedReality.RemoteRendering.AssetConversionStatus (string value) { throw null; } - public static bool operator !=(Azure.MixedReality.RemoteRendering.AssetConversionStatus left, Azure.MixedReality.RemoteRendering.AssetConversionStatus right) { throw null; } - public override string ToString() { throw null; } - } - public partial class RemoteRenderingClient - { - protected RemoteRenderingClient() { } - public RemoteRenderingClient(System.Uri remoteRenderingEndpoint, System.Guid accountId, string accountDomain, Azure.AzureKeyCredential keyCredential) { } - public RemoteRenderingClient(System.Uri remoteRenderingEndpoint, System.Guid accountId, string accountDomain, Azure.AzureKeyCredential keyCredential, Azure.MixedReality.RemoteRendering.RemoteRenderingClientOptions options) { } - public RemoteRenderingClient(System.Uri remoteRenderingEndpoint, System.Guid accountId, string accountDomain, Azure.Core.AccessToken accessToken, Azure.MixedReality.RemoteRendering.RemoteRenderingClientOptions options = null) { } - public RemoteRenderingClient(System.Uri remoteRenderingEndpoint, System.Guid accountId, string accountDomain, Azure.Core.TokenCredential credential, Azure.MixedReality.RemoteRendering.RemoteRenderingClientOptions options = null) { } - public virtual Azure.Response GetConversion(string conversionId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetConversionAsync(string conversionId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Pageable GetConversions(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.AsyncPageable GetConversionsAync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response GetSession(string sessionId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetSessionAsync(string sessionId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Pageable GetSessions(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.AsyncPageable GetSessionsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.MixedReality.RemoteRendering.AssetConversionOperation StartConversion(string conversionId, Azure.MixedReality.RemoteRendering.AssetConversionOptions options, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task StartConversionAsync(string conversionId, Azure.MixedReality.RemoteRendering.AssetConversionOptions options, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.MixedReality.RemoteRendering.StartRenderingSessionOperation StartSession(string sessionId, Azure.MixedReality.RemoteRendering.RenderingSessionOptions options, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task StartSessionAsync(string sessionId, Azure.MixedReality.RemoteRendering.RenderingSessionOptions options, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response StopSession(string sessionId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task StopSessionAsync(string sessionId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response UpdateSession(string sessionId, Azure.MixedReality.RemoteRendering.UpdateSessionOptions options, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> UpdateSessionAsync(string sessionId, Azure.MixedReality.RemoteRendering.UpdateSessionOptions options, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - } - public partial class RemoteRenderingClientOptions : Azure.Core.ClientOptions - { - public RemoteRenderingClientOptions(Azure.MixedReality.RemoteRendering.RemoteRenderingClientOptions.ServiceVersion version = Azure.MixedReality.RemoteRendering.RemoteRenderingClientOptions.ServiceVersion.V2021_01_01) { } - public System.Uri AuthenticationEndpoint { get { throw null; } set { } } - public enum ServiceVersion - { - V2021_01_01 = 1, - } - } - public static partial class RemoteRenderingModelFactory - { - public static Azure.MixedReality.RemoteRendering.AssetConversion AssetConversion(string conversionId, Azure.MixedReality.RemoteRendering.AssetConversionOptions options, Azure.MixedReality.RemoteRendering.AssetConversionOutput output, Azure.MixedReality.RemoteRendering.RemoteRenderingServiceError error, Azure.MixedReality.RemoteRendering.AssetConversionStatus status, System.DateTimeOffset createdOn) { throw null; } - public static Azure.MixedReality.RemoteRendering.AssetConversionOutput AssetConversionOutput(System.Uri outputAssetUri) { throw null; } - public static Azure.MixedReality.RemoteRendering.RemoteRenderingServiceError RemoteRenderingServiceError(string code, string message, System.Collections.Generic.IReadOnlyList details, string target, Azure.MixedReality.RemoteRendering.RemoteRenderingServiceError innerError) { throw null; } - public static Azure.MixedReality.RemoteRendering.RenderingSession RenderingSession(string sessionId, int? arrInspectorPort, int? handshakePort, int? elapsedTimeMinutes, string host, int? maxLeaseTimeMinutes, Azure.MixedReality.RemoteRendering.RenderingServerSize size, Azure.MixedReality.RemoteRendering.RenderingSessionStatus status, float? teraflops, Azure.MixedReality.RemoteRendering.RemoteRenderingServiceError error, System.DateTimeOffset? createdOn) { throw null; } - } - public partial class RemoteRenderingServiceError - { - internal RemoteRenderingServiceError() { } - public string Code { get { throw null; } } - public System.Collections.Generic.IReadOnlyList Details { get { throw null; } } - public Azure.MixedReality.RemoteRendering.RemoteRenderingServiceError InnerError { get { throw null; } } - public string Message { get { throw null; } } - public string Target { get { throw null; } } - } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct RenderingServerSize : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public RenderingServerSize(string value) { throw null; } - public static Azure.MixedReality.RemoteRendering.RenderingServerSize Premium { get { throw null; } } - public static Azure.MixedReality.RemoteRendering.RenderingServerSize Standard { get { throw null; } } - public bool Equals(Azure.MixedReality.RemoteRendering.RenderingServerSize other) { throw null; } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public override bool Equals(object obj) { throw null; } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public override int GetHashCode() { throw null; } - public static bool operator ==(Azure.MixedReality.RemoteRendering.RenderingServerSize left, Azure.MixedReality.RemoteRendering.RenderingServerSize right) { throw null; } - public static implicit operator Azure.MixedReality.RemoteRendering.RenderingServerSize (string value) { throw null; } - public static bool operator !=(Azure.MixedReality.RemoteRendering.RenderingServerSize left, Azure.MixedReality.RemoteRendering.RenderingServerSize right) { throw null; } - public override string ToString() { throw null; } - } - public partial class RenderingSession - { - internal RenderingSession() { } - public int? ArrInspectorPort { get { throw null; } } - public System.DateTimeOffset? CreatedOn { get { throw null; } } - public int? ElapsedTimeMinutes { get { throw null; } } - public Azure.MixedReality.RemoteRendering.RemoteRenderingServiceError Error { get { throw null; } } - public int? HandshakePort { get { throw null; } } - public string Host { get { throw null; } } - public System.TimeSpan? MaxLeaseTime { get { throw null; } } - public string SessionId { get { throw null; } } - public Azure.MixedReality.RemoteRendering.RenderingServerSize Size { get { throw null; } } - public Azure.MixedReality.RemoteRendering.RenderingSessionStatus Status { get { throw null; } } - public float? Teraflops { get { throw null; } } - } - public partial class RenderingSessionOptions - { - public RenderingSessionOptions(System.TimeSpan maxLeaseTime, Azure.MixedReality.RemoteRendering.RenderingServerSize size) { } - public System.TimeSpan MaxLeaseTime { get { throw null; } } - public Azure.MixedReality.RemoteRendering.RenderingServerSize Size { get { throw null; } } - } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct RenderingSessionStatus : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public RenderingSessionStatus(string value) { throw null; } - public static Azure.MixedReality.RemoteRendering.RenderingSessionStatus Error { get { throw null; } } - public static Azure.MixedReality.RemoteRendering.RenderingSessionStatus Expired { get { throw null; } } - public static Azure.MixedReality.RemoteRendering.RenderingSessionStatus Ready { get { throw null; } } - public static Azure.MixedReality.RemoteRendering.RenderingSessionStatus Starting { get { throw null; } } - public static Azure.MixedReality.RemoteRendering.RenderingSessionStatus Stopped { get { throw null; } } - public bool Equals(Azure.MixedReality.RemoteRendering.RenderingSessionStatus other) { throw null; } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public override bool Equals(object obj) { throw null; } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public override int GetHashCode() { throw null; } - public static bool operator ==(Azure.MixedReality.RemoteRendering.RenderingSessionStatus left, Azure.MixedReality.RemoteRendering.RenderingSessionStatus right) { throw null; } - public static implicit operator Azure.MixedReality.RemoteRendering.RenderingSessionStatus (string value) { throw null; } - public static bool operator !=(Azure.MixedReality.RemoteRendering.RenderingSessionStatus left, Azure.MixedReality.RemoteRendering.RenderingSessionStatus right) { throw null; } - public override string ToString() { throw null; } - } - public partial class StartRenderingSessionOperation : Azure.Operation - { - protected StartRenderingSessionOperation() { } - public StartRenderingSessionOperation(string sessionId, Azure.MixedReality.RemoteRendering.RemoteRenderingClient client) { } - public override bool HasCompleted { get { throw null; } } - public override bool HasValue { get { throw null; } } - public override string Id { get { throw null; } } - public override Azure.MixedReality.RemoteRendering.RenderingSession Value { get { throw null; } } - public override Azure.Response GetRawResponse() { throw null; } - public override Azure.Response UpdateStatus(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public override System.Threading.Tasks.ValueTask UpdateStatusAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public override System.Threading.Tasks.ValueTask> WaitForCompletionAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public override System.Threading.Tasks.ValueTask> WaitForCompletionAsync(System.TimeSpan pollingInterval, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - } - public partial class UpdateSessionOptions - { - public UpdateSessionOptions(System.TimeSpan maxLeaseTime) { } - public System.TimeSpan MaxLeaseTime { get { throw null; } } - } -} diff --git a/sdk/remoterendering/Azure.MixedReality.RemoteRendering/assets.json b/sdk/remoterendering/Azure.MixedReality.RemoteRendering/assets.json deleted file mode 100644 index b375980653f0..000000000000 --- a/sdk/remoterendering/Azure.MixedReality.RemoteRendering/assets.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "AssetsRepo": "Azure/azure-sdk-assets", - "AssetsRepoPrefixPath": "net", - "TagPrefix": "net/remoterendering/Azure.MixedReality.RemoteRendering", - "Tag": "net/remoterendering/Azure.MixedReality.RemoteRendering_e2127af3a5" -} diff --git a/sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/AssetConversionOperation.cs b/sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/AssetConversionOperation.cs deleted file mode 100644 index 79bf31a6efdf..000000000000 --- a/sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/AssetConversionOperation.cs +++ /dev/null @@ -1,117 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using System; -using System.Threading; -using System.Threading.Tasks; - -namespace Azure.MixedReality.RemoteRendering -{ - /// - /// Operation which represents an ongoing conversion operation. - /// It is returned by StartConversion, but can also be constructed from the id of a preexisting conversion. - /// - public class AssetConversionOperation : Operation - { - private RemoteRenderingClient _client; - private Response _response; - - /// - /// Construct an operation from a conversion which already exists. - /// - /// - /// - public AssetConversionOperation(string conversionId, RemoteRenderingClient client) - { - _client = client; - _response = client.GetConversionInternal(conversionId, $"{nameof(AssetConversionOperation)}.{nameof(AssetConversionOperation)}"); - } - - /// - /// Internal constructor. - /// - /// - /// - internal AssetConversionOperation(RemoteRenderingClient client, Response response) - { - _client = client; - _response = response; - } - - /// - public override string Id => _response.Value.ConversionId; - - /// - public override AssetConversion Value - { - get - { - return _response.Value; - } - } - - /// - public override bool HasCompleted - { - get { return (_response.Value.Status != AssetConversionStatus.NotStarted) && (_response.Value.Status != AssetConversionStatus.Running); } - } - - /// - public override bool HasValue - { - get { return true; } - } - - /// - public override Response GetRawResponse() - { - return _response.GetRawResponse(); - } - - /// - public override Response UpdateStatus(CancellationToken cancellationToken = default) - { - if (!HasCompleted) - { - _response = _client.GetConversionInternal(_response.Value.ConversionId, $"{nameof(AssetConversionOperation)}.{nameof(UpdateStatus)}", cancellationToken); - } - return _response.GetRawResponse(); - } - - /// - public async override ValueTask UpdateStatusAsync(CancellationToken cancellationToken = default) - { - if (!HasCompleted) - { - _response = await _client.GetConversionInternalAsync(_response.Value.ConversionId, $"{nameof(AssetConversionOperation)}.{nameof(UpdateStatus)}", cancellationToken).ConfigureAwait(false); - } - return _response.GetRawResponse(); - } - - /// - public async override ValueTask> WaitForCompletionAsync(CancellationToken cancellationToken = default) - { - return await WaitForCompletionAsync(TimeSpan.FromSeconds(10), cancellationToken).ConfigureAwait(false); - } - - /// - public async override ValueTask> WaitForCompletionAsync(TimeSpan pollingInterval, CancellationToken cancellationToken = default) - { - while (true) - { - await UpdateStatusAsync(cancellationToken).ConfigureAwait(false); - if (HasCompleted) - { - break; - } - await Task.Delay(pollingInterval, cancellationToken).ConfigureAwait(false); - } - return _response; - } - - /// Initializes a new instance of AssetConversionOperation for mocking. - protected AssetConversionOperation() - { - } - } -} diff --git a/sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/AssetConversionOutput.cs b/sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/AssetConversionOutput.cs deleted file mode 100644 index afa6e31a5521..000000000000 --- a/sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/AssetConversionOutput.cs +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -#nullable disable - -using System; - -namespace Azure.MixedReality.RemoteRendering -{ - public partial class AssetConversionOutput - { - /// URI of the asset generated by the conversion process. -#pragma warning disable CA1056 // URI-like properties should not be strings - public string OutputAssetUri { get; } -#pragma warning restore CA1056 // URI-like properties should not be strings - } -} diff --git a/sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Authentication/AuthenticationEndpoint.cs b/sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Authentication/AuthenticationEndpoint.cs deleted file mode 100644 index e9ba3f54896f..000000000000 --- a/sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Authentication/AuthenticationEndpoint.cs +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using Azure.Core; -using Azure.MixedReality.RemoteRendering; -using System; - -#nullable enable - -namespace Azure.MixedReality.Authentication -{ - internal static class AuthenticationEndpoint - { - /// - /// Constructs an authentication endpoint from a service domain. - /// - /// The account domain. - /// . - public static Uri ConstructFromDomain(string accountDomain) - { - Argument.AssertNotNullOrWhiteSpace(accountDomain, nameof(accountDomain)); - - if (!Uri.TryCreate($"https://sts.{accountDomain}", UriKind.Absolute, out Uri? result)) - { - throw new ArgumentException("The value could not be used to construct a valid endpoint.", nameof(accountDomain)); - } - - return result; - } - } -} diff --git a/sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Authentication/MixedRealityAccountKeyCredential.cs b/sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Authentication/MixedRealityAccountKeyCredential.cs deleted file mode 100644 index 055f2cf9d5b7..000000000000 --- a/sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Authentication/MixedRealityAccountKeyCredential.cs +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using System; -using System.Threading; -using System.Threading.Tasks; -using Azure.Core; -using Azure.MixedReality.RemoteRendering; - -namespace Azure.MixedReality.Authentication -{ - /// - /// Represents an object used for Mixed Reality account key authentication. - /// - /// - internal class MixedRealityAccountKeyCredential : TokenCredential - { - private readonly Guid _accountId; - - private readonly AzureKeyCredential _accountKey; - - /// - /// Initializes a new instance of the class. - /// - /// The Mixed Reality service account identifier. - /// The Mixed Reality service account primary or secondary key. - public MixedRealityAccountKeyCredential(Guid accountId, string accountKey) - : this(accountId, new AzureKeyCredential(accountKey)) - { - } - - /// - /// Initializes a new instance of the class. - /// - /// The Mixed Reality service account identifier. - /// The Mixed Reality service account primary or secondary key credential. - public MixedRealityAccountKeyCredential(Guid accountId, AzureKeyCredential keyCredential) - { - Argument.AssertNotDefault(ref accountId, nameof(accountId)); - Argument.AssertNotNull(keyCredential, nameof(keyCredential)); - - _accountId = accountId; - _accountKey = keyCredential; - } - - /// - /// Gets an for the specified set of scopes. - /// - /// The with authentication information. - /// The to use. - /// A valid . - public override AccessToken GetToken(TokenRequestContext requestContext, CancellationToken cancellationToken) - => new AccessToken($"{_accountId}:{_accountKey.Key}", DateTimeOffset.MaxValue); - - /// - /// Gets an for the specified set of scopes. - /// - /// The with authentication information. - /// The to use. - /// A valid . - public override ValueTask GetTokenAsync(TokenRequestContext requestContext, CancellationToken cancellationToken) - => new ValueTask(GetToken(requestContext, cancellationToken)); - } -} diff --git a/sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Authentication/MixedRealityTokenCredential.cs b/sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Authentication/MixedRealityTokenCredential.cs deleted file mode 100644 index 990f62975ff7..000000000000 --- a/sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Authentication/MixedRealityTokenCredential.cs +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using System; -using System.Threading; -using System.Threading.Tasks; -using Azure.Core; - -#nullable enable - -namespace Azure.MixedReality.Authentication -{ - /// - /// Represents a token credential that can be used to access a Mixed Reality service. - /// Implements . - /// - /// - internal class MixedRealityTokenCredential : TokenCredential - { - private readonly MixedRealityStsClient _stsClient; - - /// - /// Initializes a new instance of the class. - /// - /// The Mixed Reality service account identifier. - /// The Mixed Reality STS service endpoint. - /// The credential used to access the Mixed Reality service. - /// The options. - private MixedRealityTokenCredential(Guid accountId, Uri endpoint, TokenCredential credential, MixedRealityStsClientOptions? options = null) - { - _stsClient = new MixedRealityStsClient(accountId, endpoint, credential, options); - } - - /// - /// Gets an for the specified set of scopes. - /// - /// The with authentication information. - /// The to use. - /// A valid . - public override AccessToken GetToken(TokenRequestContext requestContext, CancellationToken cancellationToken) - => _stsClient.GetToken(cancellationToken); - - /// - /// get token as an asynchronous operation. - /// - /// The with authentication information. - /// The to use. - /// A valid . - public override async ValueTask GetTokenAsync(TokenRequestContext requestContext, CancellationToken cancellationToken) - => await _stsClient.GetTokenAsync(cancellationToken).ConfigureAwait(false); - - /// - /// Gets a Mixed Reality credential using the specified . - /// Azure credentials are exchanged with the Mixed Reality STS service for Mixed Reality access tokens. - /// In the case of a , the credential is assumed to be a Mixed Reality - /// access token previously retrieved from the Mixed Reality STS service, so it is simply returned. - /// - /// The Mixed Reality service account identifier. - /// The Mixed Reality STS service endpoint. - /// The credential used to access the Mixed Reality service. - /// The options. - /// . - public static TokenCredential GetMixedRealityCredential(Guid accountId, Uri endpoint, TokenCredential credential, MixedRealityStsClientOptions? options = null) - { - if (credential is StaticAccessTokenCredential) - { - // Static access tokens are assumed to be Mixed Reality access tokens already, so we don't need to exchange - // them using the MixedRealityTokenCredential. - return credential; - } - - return new MixedRealityTokenCredential(accountId, endpoint, credential, options); - } - } -} diff --git a/sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Authentication/StaticAccessTokenCredential.cs b/sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Authentication/StaticAccessTokenCredential.cs deleted file mode 100644 index cedd9ea42430..000000000000 --- a/sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Authentication/StaticAccessTokenCredential.cs +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using Azure.Core; -using System.Threading; -using System.Threading.Tasks; - -namespace Azure.MixedReality.Authentication -{ - /// - /// Represents a static access token credential. - /// Implements the . - /// - /// - internal class StaticAccessTokenCredential : TokenCredential - { - private readonly AccessToken _token; - - /// - /// Initializes a new instance of the class. - /// - /// The token. - public StaticAccessTokenCredential(AccessToken token) => _token = token; - - /// - /// Gets an for the specified set of scopes. - /// - /// The with authentication information. - /// The to use. - /// A valid . - public override AccessToken GetToken(TokenRequestContext requestContext, CancellationToken cancellationToken) - => this._token; - - /// - /// Gets an for the specified set of scopes. - /// - /// The with authentication information. - /// The to use. - /// A valid . - public override ValueTask GetTokenAsync(TokenRequestContext requestContext, CancellationToken cancellationToken) - => new ValueTask(this._token); - } -} diff --git a/sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Azure.MixedReality.RemoteRendering.csproj b/sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Azure.MixedReality.RemoteRendering.csproj deleted file mode 100644 index f787f521ae57..000000000000 --- a/sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Azure.MixedReality.RemoteRendering.csproj +++ /dev/null @@ -1,25 +0,0 @@ - - - Microsoft Azure Mixed Reality ARR Client - 1.2.1-beta.1 - - 1.1.0 - Azure MixedReality - true - Microsoft - $(RequiredTargetFrameworks) - false - true - - - - - - - - - - - - - diff --git a/sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Customizations/Models/AssetConversion.cs b/sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Customizations/Models/AssetConversion.cs deleted file mode 100644 index afdc2f9ae640..000000000000 --- a/sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Customizations/Models/AssetConversion.cs +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using Azure.Core; -using System; - -namespace Azure.MixedReality.RemoteRendering -{ - /// - /// Information concerning the state of a conversion. - /// - [CodeGenModel("Conversion")] - public partial class AssetConversion - { - /// The id of the conversion supplied when the conversion was created. - [CodeGenMember("Id")] - public string ConversionId { get; } - - /// Settings for where to retrieve input files from and where to write output files. Supplied when creating the conversion. - [CodeGenMember("Settings")] - public AssetConversionOptions Options { get; } - - /// The time when the conversion was created. Date and time in ISO 8601 format. - [CodeGenMember("CreationTime")] - public DateTimeOffset CreatedOn { get; } - } -} diff --git a/sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Customizations/Models/AssetConversionInputOptions.cs b/sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Customizations/Models/AssetConversionInputOptions.cs deleted file mode 100644 index c7c99aac5693..000000000000 --- a/sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Customizations/Models/AssetConversionInputOptions.cs +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using Azure.Core; -using System; - -namespace Azure.MixedReality.RemoteRendering -{ - /// Settings for the conversion input. - [CodeGenModel("ConversionInputSettings")] - public partial class AssetConversionInputOptions - { - /// The URI of the Azure blob storage container containing the input model. - [CodeGenMember("StorageContainerUri")] - public Uri StorageContainerUri { get; } - /// The relative path starting at blobPrefix (or at the container root if blobPrefix is not specified) to the input model. Must point to file with a supported file format ending. - [CodeGenMember("RelativeInputAssetPath")] - public string RelativeInputAssetPath { get; } - } -} diff --git a/sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Customizations/Models/AssetConversionOptions.cs b/sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Customizations/Models/AssetConversionOptions.cs deleted file mode 100644 index 764eb3b5c29c..000000000000 --- a/sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Customizations/Models/AssetConversionOptions.cs +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using Azure.Core; - -namespace Azure.MixedReality.RemoteRendering -{ - /// - /// Information concerning the state of a conversion. - /// - [CodeGenModel("ConversionSettings")] - public partial class AssetConversionOptions - { - /// Options for the conversion input. - [CodeGenMember("InputLocation")] - public AssetConversionInputOptions InputOptions { get; } - - /// Options for the conversion output. - [CodeGenMember("OutputLocation")] - public AssetConversionOutputOptions OutputOptions { get; } - } -} diff --git a/sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Customizations/Models/AssetConversionOutput.cs b/sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Customizations/Models/AssetConversionOutput.cs deleted file mode 100644 index 95c90536ef14..000000000000 --- a/sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Customizations/Models/AssetConversionOutput.cs +++ /dev/null @@ -1,13 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using Azure.Core; - -namespace Azure.MixedReality.RemoteRendering -{ - /// Information about the output of a successful conversion. Only present when the status of the conversion is 'Succeeded'. - [CodeGenModel("ConversionOutput")] - public partial class AssetConversionOutput - { - } -} diff --git a/sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Customizations/Models/AssetConversionOutputOptions.cs b/sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Customizations/Models/AssetConversionOutputOptions.cs deleted file mode 100644 index 94baed6e2489..000000000000 --- a/sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Customizations/Models/AssetConversionOutputOptions.cs +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using Azure.Core; -using System; - -namespace Azure.MixedReality.RemoteRendering -{ - [CodeGenModel("ConversionOutputSettings")] - public partial class AssetConversionOutputOptions - { - /// The URI of the Azure blob storage container containing the input model. - [CodeGenMember("StorageContainerUri")] - public Uri StorageContainerUri { get; } - } -} diff --git a/sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Customizations/Models/AssetConversionStatus.cs b/sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Customizations/Models/AssetConversionStatus.cs deleted file mode 100644 index aeb1fbb7a2e2..000000000000 --- a/sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Customizations/Models/AssetConversionStatus.cs +++ /dev/null @@ -1,13 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using Azure.Core; - -namespace Azure.MixedReality.RemoteRendering -{ - /// The status of the conversion. Terminal states are 'Cancelled', 'Failed', 'Succeeded'. - [CodeGenModel("ConversionStatus")] - public partial struct AssetConversionStatus - { - } -} diff --git a/sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Customizations/Models/ConversionList.cs b/sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Customizations/Models/ConversionList.cs deleted file mode 100644 index 19ab2bd92618..000000000000 --- a/sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Customizations/Models/ConversionList.cs +++ /dev/null @@ -1,12 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using Azure.Core; - -namespace Azure.MixedReality.RemoteRendering -{ - [CodeGenModel("ConversionList")] - internal partial class ConversionList - { - } -} diff --git a/sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Customizations/Models/CreateConversionSettings.cs b/sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Customizations/Models/CreateConversionSettings.cs deleted file mode 100644 index 650ed793c1ba..000000000000 --- a/sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Customizations/Models/CreateConversionSettings.cs +++ /dev/null @@ -1,12 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using Azure.Core; - -namespace Azure.MixedReality.RemoteRendering -{ - [CodeGenModel("CreateConversionSettings")] - internal partial class CreateConversionSettings - { - } -} diff --git a/sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Customizations/Models/RemoteRenderingModelFactory.cs b/sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Customizations/Models/RemoteRenderingModelFactory.cs deleted file mode 100644 index 323fd797b5ec..000000000000 --- a/sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Customizations/Models/RemoteRenderingModelFactory.cs +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using System; -using System.Collections.Generic; -using Azure.Core; - -[assembly: CodeGenSuppressType("MixedRealityRemoteRenderingModelFactory")] - -namespace Azure.MixedReality.RemoteRendering -{ - /// - /// Model factory that enables mocking for the Remote Rendering library. - /// - public static partial class RemoteRenderingModelFactory - { - /// - /// Initializes a new instance of the class for mocking purposes. - /// - public static AssetConversionOutput AssetConversionOutput(Uri outputAssetUri) - => new AssetConversionOutput(outputAssetUri.ToString()); - - /// - /// Initializes a new instance of the class for mocking purposes. - /// - public static RemoteRenderingServiceError RemoteRenderingServiceError(string code, string message, IReadOnlyList details, string target, RemoteRenderingServiceError innerError) - => new RemoteRenderingServiceError(code, message, details, target, innerError); - - /// - /// Initializes a new instance of the class for mocking purposes. - /// - public static AssetConversion AssetConversion(string conversionId, AssetConversionOptions options, AssetConversionOutput output, RemoteRenderingServiceError error, AssetConversionStatus status, DateTimeOffset createdOn) - => new AssetConversion(conversionId, options, output, error, status, createdOn); - - /// - /// Initializes a new instance of the class for mocking purposes. - /// - public static RenderingSession RenderingSession(string sessionId, int? arrInspectorPort, int? handshakePort, int? elapsedTimeMinutes, string host, int? maxLeaseTimeMinutes, RenderingServerSize size, RenderingSessionStatus status, float? teraflops, RemoteRenderingServiceError error, DateTimeOffset? createdOn) - => new RenderingSession(sessionId, arrInspectorPort, handshakePort, elapsedTimeMinutes, host, maxLeaseTimeMinutes, size, status, teraflops, error, createdOn); - } -} diff --git a/sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Customizations/Models/RemoteRenderingServiceError.cs b/sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Customizations/Models/RemoteRenderingServiceError.cs deleted file mode 100644 index 6e935e5cf167..000000000000 --- a/sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Customizations/Models/RemoteRenderingServiceError.cs +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using Azure.Core; - -namespace Azure.MixedReality.RemoteRendering -{ - /// - /// Specific details about errors that occurred, describing why a conversion failed or a rendering session is in an error state. - /// - [CodeGenModel("Error")] - public partial class RemoteRenderingServiceError - { - } -} diff --git a/sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Customizations/Models/RenderingServerSize.cs b/sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Customizations/Models/RenderingServerSize.cs deleted file mode 100644 index 5a5f2122011d..000000000000 --- a/sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Customizations/Models/RenderingServerSize.cs +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using Azure.Core; - -namespace Azure.MixedReality.RemoteRendering -{ - /// - /// The "size" of server to use for a rendering session: Standard or Premium. - /// - [CodeGenModel("SessionSize")] - public partial struct RenderingServerSize - { - } -} diff --git a/sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Customizations/Models/RenderingSession.cs b/sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Customizations/Models/RenderingSession.cs deleted file mode 100644 index fbbd8390a14b..000000000000 --- a/sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Customizations/Models/RenderingSession.cs +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using Azure.Core; -using System; - -namespace Azure.MixedReality.RemoteRendering -{ - /// - /// The properties of a remote rendering session. - /// - [CodeGenModel("SessionProperties")] - public partial class RenderingSession - { - /// The id of the session supplied when the session was created. - [CodeGenMember("Id")] - public string SessionId { get; } - - /// The host where the rendering session is reachable. - [CodeGenMember("Hostname")] - public string Host { get; } - - /// The time in minutes the session will run after reaching the 'Ready' state. - [CodeGenMember("MaxLeaseTimeMinutes")] - internal int? MaxLeaseTimeMinutes { get; } - - /// The time the session will run after reaching the 'Ready' state. - public TimeSpan? MaxLeaseTime - { - get - { - if (MaxLeaseTimeMinutes.HasValue) - { - return TimeSpan.FromMinutes(MaxLeaseTimeMinutes.Value); - } - else - { - return null; - } - } - } - - /// The time when the rendering session was created. Date and time in ISO 8601 format. - [CodeGenMember("CreationTime")] - public DateTimeOffset? CreatedOn { get; } - } -} diff --git a/sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Customizations/Models/RenderingSessionOptions.cs b/sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Customizations/Models/RenderingSessionOptions.cs deleted file mode 100644 index fb5005df661c..000000000000 --- a/sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Customizations/Models/RenderingSessionOptions.cs +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using Azure.Core; -using System; - -namespace Azure.MixedReality.RemoteRendering -{ - /// The Options requested when starting a session. - [CodeGenModel("CreateSessionSettings")] - public partial class RenderingSessionOptions - { - /// Initializes a new instance of RenderingSessionOptions. - /// The time the session will run after reaching the 'Ready' state. The provided values will be rounded to the nearest minute. - /// Size of the server used for the rendering session. Remote Rendering with Standard size server has a maximum scene size of 20 million polygons. Remote Rendering with Premium size does not enforce a hard maximum, but performance may be degraded if your content exceeds the rendering capabilities of the service. - public RenderingSessionOptions(TimeSpan maxLeaseTime, RenderingServerSize size) - { - MaxLeaseTimeMinutes = (int)Math.Round(maxLeaseTime.TotalMinutes); - Size = size; - } - - /// Initializes a new instance of RenderingSessionOptions. - /// The time in minutes the session will run after reaching the 'Ready' state. - /// Size of the server used for the rendering session. Remote Rendering with Standard size server has a maximum scene size of 20 million polygons. Remote Rendering with Premium size does not enforce a hard maximum, but performance may be degraded if your content exceeds the rendering capabilities of the service. - internal RenderingSessionOptions(int maxLeaseTimeMinutes, RenderingServerSize size) - { - MaxLeaseTimeMinutes = maxLeaseTimeMinutes; - Size = size; - } - - /// The time in minutes the session will run after reaching the 'Ready' state. - [CodeGenMember("MaxLeaseTimeMinutes")] - internal int MaxLeaseTimeMinutes { get; } - - /// The time the session will run after reaching the 'Ready' state. - public TimeSpan MaxLeaseTime - { - get - { - return TimeSpan.FromMinutes(MaxLeaseTimeMinutes); - } - } - } -} \ No newline at end of file diff --git a/sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Customizations/Models/RenderingSessionStatus.cs b/sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Customizations/Models/RenderingSessionStatus.cs deleted file mode 100644 index 5e3a5feece90..000000000000 --- a/sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Customizations/Models/RenderingSessionStatus.cs +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using Azure.Core; - -namespace Azure.MixedReality.RemoteRendering -{ - /// - /// The status of the rendering session. Once the status reached the 'Ready' state it can be connected to. The terminal state is 'Stopped'. - /// - [CodeGenModel("SessionStatus")] - public partial struct RenderingSessionStatus - { - } -} diff --git a/sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Customizations/Models/SessionsList.cs b/sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Customizations/Models/SessionsList.cs deleted file mode 100644 index 2abcc0e2c99b..000000000000 --- a/sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Customizations/Models/SessionsList.cs +++ /dev/null @@ -1,12 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using Azure.Core; - -namespace Azure.MixedReality.RemoteRendering -{ - [CodeGenModel("SessionsList")] - internal partial class SessionsList - { - } -} diff --git a/sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Customizations/Models/UpdateSessionOptions.cs b/sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Customizations/Models/UpdateSessionOptions.cs deleted file mode 100644 index fd2d0a41ef46..000000000000 --- a/sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Customizations/Models/UpdateSessionOptions.cs +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using Azure.Core; -using System; - -namespace Azure.MixedReality.RemoteRendering -{ - /// - /// This defines new values for session properties which can be adjusted. - /// - [CodeGenModel("UpdateSessionSettings")] - public partial class UpdateSessionOptions - { - /// Initializes a new instance of UpdateSessionOptions. - /// Update to the time the session will run after it reached the 'Ready' state. It has to be bigger than the current value of maxLeaseTimeMinutes. - internal UpdateSessionOptions(int maxLeaseTimeMinutes) - { - MaxLeaseTimeMinutes = maxLeaseTimeMinutes; - } - - /// - /// Options requesting that the lease time should be set to the given value (which is rounded to minutes). - /// - /// Update to the time the session will run after it reached the 'Ready' state. It has to be bigger than the current value. - public UpdateSessionOptions(TimeSpan maxLeaseTime) - { - MaxLeaseTimeMinutes = (int)Math.Round(maxLeaseTime.TotalMinutes); - } - - /// Update to the time the session will run after it reached the 'Ready' state. It has to be bigger than the current value of maxLeaseTimeMinutes. - [CodeGenMember("MaxTimeSpanMinutes")] - internal int MaxLeaseTimeMinutes { get; } - - /// - /// The new lease time to use for the session. - /// - public TimeSpan MaxLeaseTime - { - get - { - return TimeSpan.FromMinutes(MaxLeaseTimeMinutes); - } - } - } -} diff --git a/sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Generated/Internal/Argument.cs b/sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Generated/Internal/Argument.cs deleted file mode 100644 index ba273d38ed93..000000000000 --- a/sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Generated/Internal/Argument.cs +++ /dev/null @@ -1,129 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections; -using System.Collections.Generic; - -namespace Azure.MixedReality.RemoteRendering -{ - internal static class Argument - { - public static void AssertNotNull(T value, string name) - { - if (value is null) - { - throw new ArgumentNullException(name); - } - } - - public static void AssertNotNull(T? value, string name) - where T : struct - { - if (!value.HasValue) - { - throw new ArgumentNullException(name); - } - } - - public static void AssertNotNullOrEmpty(IEnumerable value, string name) - { - if (value is null) - { - throw new ArgumentNullException(name); - } - if (value is ICollection collectionOfT && collectionOfT.Count == 0) - { - throw new ArgumentException("Value cannot be an empty collection.", name); - } - if (value is ICollection collection && collection.Count == 0) - { - throw new ArgumentException("Value cannot be an empty collection.", name); - } - using IEnumerator e = value.GetEnumerator(); - if (!e.MoveNext()) - { - throw new ArgumentException("Value cannot be an empty collection.", name); - } - } - - public static void AssertNotNullOrEmpty(string value, string name) - { - if (value is null) - { - throw new ArgumentNullException(name); - } - if (value.Length == 0) - { - throw new ArgumentException("Value cannot be an empty string.", name); - } - } - - public static void AssertNotNullOrWhiteSpace(string value, string name) - { - if (value is null) - { - throw new ArgumentNullException(name); - } - if (string.IsNullOrWhiteSpace(value)) - { - throw new ArgumentException("Value cannot be empty or contain only white-space characters.", name); - } - } - - public static void AssertNotDefault(ref T value, string name) - where T : struct, IEquatable - { - if (value.Equals(default)) - { - throw new ArgumentException("Value cannot be empty.", name); - } - } - - public static void AssertInRange(T value, T minimum, T maximum, string name) - where T : notnull, IComparable - { - if (minimum.CompareTo(value) > 0) - { - throw new ArgumentOutOfRangeException(name, "Value is less than the minimum allowed."); - } - if (maximum.CompareTo(value) < 0) - { - throw new ArgumentOutOfRangeException(name, "Value is greater than the maximum allowed."); - } - } - - public static void AssertEnumDefined(Type enumType, object value, string name) - { - if (!Enum.IsDefined(enumType, value)) - { - throw new ArgumentException($"Value not defined for {enumType.FullName}.", name); - } - } - - public static T CheckNotNull(T value, string name) - where T : class - { - AssertNotNull(value, name); - return value; - } - - public static string CheckNotNullOrEmpty(string value, string name) - { - AssertNotNullOrEmpty(value, name); - return value; - } - - public static void AssertNull(T value, string name, string message = null) - { - if (value != null) - { - throw new ArgumentException(message ?? "Value must be null.", name); - } - } - } -} diff --git a/sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Generated/Internal/ChangeTrackingList.cs b/sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Generated/Internal/ChangeTrackingList.cs deleted file mode 100644 index 8fd6b6fbcee0..000000000000 --- a/sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Generated/Internal/ChangeTrackingList.cs +++ /dev/null @@ -1,153 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Linq; - -namespace Azure.MixedReality.RemoteRendering -{ - internal class ChangeTrackingList : IList, IReadOnlyList - { - private IList _innerList; - - public ChangeTrackingList() - { - } - - public ChangeTrackingList(IList innerList) - { - if (innerList != null) - { - _innerList = innerList; - } - } - - public ChangeTrackingList(IReadOnlyList innerList) - { - if (innerList != null) - { - _innerList = innerList.ToList(); - } - } - - public bool IsUndefined => _innerList == null; - - public int Count => IsUndefined ? 0 : EnsureList().Count; - - public bool IsReadOnly => IsUndefined ? false : EnsureList().IsReadOnly; - - public T this[int index] - { - get - { - if (IsUndefined) - { - throw new ArgumentOutOfRangeException(nameof(index)); - } - return EnsureList()[index]; - } - set - { - if (IsUndefined) - { - throw new ArgumentOutOfRangeException(nameof(index)); - } - EnsureList()[index] = value; - } - } - - public void Reset() - { - _innerList = null; - } - - public IEnumerator GetEnumerator() - { - if (IsUndefined) - { - IEnumerator enumerateEmpty() - { - yield break; - } - return enumerateEmpty(); - } - return EnsureList().GetEnumerator(); - } - - IEnumerator IEnumerable.GetEnumerator() - { - return GetEnumerator(); - } - - public void Add(T item) - { - EnsureList().Add(item); - } - - public void Clear() - { - EnsureList().Clear(); - } - - public bool Contains(T item) - { - if (IsUndefined) - { - return false; - } - return EnsureList().Contains(item); - } - - public void CopyTo(T[] array, int arrayIndex) - { - if (IsUndefined) - { - return; - } - EnsureList().CopyTo(array, arrayIndex); - } - - public bool Remove(T item) - { - if (IsUndefined) - { - return false; - } - return EnsureList().Remove(item); - } - - public int IndexOf(T item) - { - if (IsUndefined) - { - return -1; - } - return EnsureList().IndexOf(item); - } - - public void Insert(int index, T item) - { - EnsureList().Insert(index, item); - } - - public void RemoveAt(int index) - { - if (IsUndefined) - { - throw new ArgumentOutOfRangeException(nameof(index)); - } - EnsureList().RemoveAt(index); - } - - public IList EnsureList() - { - return _innerList ??= new List(); - } - } -} diff --git a/sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Generated/Internal/Optional.cs b/sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Generated/Internal/Optional.cs deleted file mode 100644 index dda42e6e9a4f..000000000000 --- a/sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Generated/Internal/Optional.cs +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.MixedReality.RemoteRendering -{ - internal static class Optional - { - public static bool IsCollectionDefined(IEnumerable collection) - { - return !(collection is ChangeTrackingList changeTrackingList && changeTrackingList.IsUndefined); - } - - public static bool IsCollectionDefined(IDictionary collection) - { - return !(collection is ChangeTrackingDictionary changeTrackingDictionary && changeTrackingDictionary.IsUndefined); - } - - public static bool IsCollectionDefined(IReadOnlyDictionary collection) - { - return !(collection is ChangeTrackingDictionary changeTrackingDictionary && changeTrackingDictionary.IsUndefined); - } - - public static bool IsDefined(T? value) - where T : struct - { - return value.HasValue; - } - - public static bool IsDefined(object value) - { - return value != null; - } - - public static bool IsDefined(JsonElement value) - { - return value.ValueKind != JsonValueKind.Undefined; - } - - public static bool IsDefined(string value) - { - return value != null; - } - } -} diff --git a/sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Generated/Internal/RequestContentHelper.cs b/sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Generated/Internal/RequestContentHelper.cs deleted file mode 100644 index e8fb908d32df..000000000000 --- a/sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Generated/Internal/RequestContentHelper.cs +++ /dev/null @@ -1,122 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.MixedReality.RemoteRendering -{ - internal static class RequestContentHelper - { - public static RequestContent FromEnumerable(IEnumerable enumerable) - where T : notnull - { - Utf8JsonRequestContent content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteStartArray(); - foreach (var item in enumerable) - { - content.JsonWriter.WriteObjectValue(item); - } - content.JsonWriter.WriteEndArray(); - - return content; - } - - public static RequestContent FromEnumerable(IEnumerable enumerable) - { - Utf8JsonRequestContent content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteStartArray(); - foreach (var item in enumerable) - { - if (item == null) - { - content.JsonWriter.WriteNullValue(); - } - else - { -#if NET6_0_OR_GREATER - content.JsonWriter.WriteRawValue(item); -#else - using (JsonDocument document = JsonDocument.Parse(item)) - { - JsonSerializer.Serialize(content.JsonWriter, document.RootElement); - } -#endif - } - } - content.JsonWriter.WriteEndArray(); - - return content; - } - - public static RequestContent FromDictionary(IDictionary dictionary) - where TValue : notnull - { - Utf8JsonRequestContent content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteStartObject(); - foreach (var item in dictionary) - { - content.JsonWriter.WritePropertyName(item.Key); - content.JsonWriter.WriteObjectValue(item.Value); - } - content.JsonWriter.WriteEndObject(); - - return content; - } - - public static RequestContent FromDictionary(IDictionary dictionary) - { - Utf8JsonRequestContent content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteStartObject(); - foreach (var item in dictionary) - { - content.JsonWriter.WritePropertyName(item.Key); - if (item.Value == null) - { - content.JsonWriter.WriteNullValue(); - } - else - { -#if NET6_0_OR_GREATER - content.JsonWriter.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(content.JsonWriter, document.RootElement); - } -#endif - } - } - content.JsonWriter.WriteEndObject(); - - return content; - } - - public static RequestContent FromObject(object value) - { - Utf8JsonRequestContent content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(value); - return content; - } - - public static RequestContent FromObject(BinaryData value) - { - Utf8JsonRequestContent content = new Utf8JsonRequestContent(); -#if NET6_0_OR_GREATER - content.JsonWriter.WriteRawValue(value); -#else - using (JsonDocument document = JsonDocument.Parse(value)) - { - JsonSerializer.Serialize(content.JsonWriter, document.RootElement); - } -#endif - return content; - } - } -} diff --git a/sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Generated/Models/AssetConversion.Serialization.cs b/sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Generated/Models/AssetConversion.Serialization.cs deleted file mode 100644 index 1f3f5890a266..000000000000 --- a/sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Generated/Models/AssetConversion.Serialization.cs +++ /dev/null @@ -1,79 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Text.Json; -using Azure.Core; - -namespace Azure.MixedReality.RemoteRendering -{ - public partial class AssetConversion - { - internal static AssetConversion DeserializeAssetConversion(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string id = default; - AssetConversionOptions settings = default; - AssetConversionOutput output = default; - RemoteRenderingServiceError error = default; - AssetConversionStatus status = default; - DateTimeOffset creationTime = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("id"u8)) - { - id = property.Value.GetString(); - continue; - } - if (property.NameEquals("settings"u8)) - { - settings = AssetConversionOptions.DeserializeAssetConversionOptions(property.Value); - continue; - } - if (property.NameEquals("output"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - output = AssetConversionOutput.DeserializeAssetConversionOutput(property.Value); - continue; - } - if (property.NameEquals("error"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - error = null; - continue; - } - error = RemoteRenderingServiceError.DeserializeRemoteRenderingServiceError(property.Value); - continue; - } - if (property.NameEquals("status"u8)) - { - status = new AssetConversionStatus(property.Value.GetString()); - continue; - } - if (property.NameEquals("creationTime"u8)) - { - creationTime = property.Value.GetDateTimeOffset("O"); - continue; - } - } - return new AssetConversion( - id, - settings, - output, - error, - status, - creationTime); - } - } -} diff --git a/sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Generated/Models/AssetConversion.cs b/sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Generated/Models/AssetConversion.cs deleted file mode 100644 index e5ba5f52c496..000000000000 --- a/sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Generated/Models/AssetConversion.cs +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; - -namespace Azure.MixedReality.RemoteRendering -{ - /// The properties of the conversion. - public partial class AssetConversion - { - /// Initializes a new instance of . - /// The ID of the conversion supplied when the conversion was created. - /// Conversion settings describe the origin of input files and destination of output files. - /// The error object containing details about the conversion failure. - /// The status of the conversion. Terminal states are 'Cancelled', 'Failed', and 'Succeeded'. - /// The time when the conversion was created. Date and time in ISO 8601 format. - /// or is null. - internal AssetConversion(string conversionId, AssetConversionOptions options, RemoteRenderingServiceError error, AssetConversionStatus status, DateTimeOffset createdOn) - { - Argument.AssertNotNull(conversionId, nameof(conversionId)); - Argument.AssertNotNull(options, nameof(options)); - - ConversionId = conversionId; - Options = options; - Error = error; - Status = status; - CreatedOn = createdOn; - } - - /// Initializes a new instance of . - /// The ID of the conversion supplied when the conversion was created. - /// Conversion settings describe the origin of input files and destination of output files. - /// Information about the output of a successful conversion. Only present when the status of the conversion is 'Succeeded'. - /// The error object containing details about the conversion failure. - /// The status of the conversion. Terminal states are 'Cancelled', 'Failed', and 'Succeeded'. - /// The time when the conversion was created. Date and time in ISO 8601 format. - internal AssetConversion(string conversionId, AssetConversionOptions options, AssetConversionOutput output, RemoteRenderingServiceError error, AssetConversionStatus status, DateTimeOffset createdOn) - { - ConversionId = conversionId; - Options = options; - Output = output; - Error = error; - Status = status; - CreatedOn = createdOn; - } - /// Information about the output of a successful conversion. Only present when the status of the conversion is 'Succeeded'. - public AssetConversionOutput Output { get; } - /// The error object containing details about the conversion failure. - public RemoteRenderingServiceError Error { get; } - /// The status of the conversion. Terminal states are 'Cancelled', 'Failed', and 'Succeeded'. - public AssetConversionStatus Status { get; } - } -} diff --git a/sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Generated/Models/AssetConversionInputOptions.Serialization.cs b/sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Generated/Models/AssetConversionInputOptions.Serialization.cs deleted file mode 100644 index fdd278949f13..000000000000 --- a/sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Generated/Models/AssetConversionInputOptions.Serialization.cs +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Text.Json; -using Azure.Core; - -namespace Azure.MixedReality.RemoteRendering -{ - public partial class AssetConversionInputOptions : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("storageContainerUri"u8); - writer.WriteStringValue(StorageContainerUri.AbsoluteUri); - if (Optional.IsDefined(StorageContainerReadListSas)) - { - writer.WritePropertyName("storageContainerReadListSas"u8); - writer.WriteStringValue(StorageContainerReadListSas); - } - if (Optional.IsDefined(BlobPrefix)) - { - writer.WritePropertyName("blobPrefix"u8); - writer.WriteStringValue(BlobPrefix); - } - writer.WritePropertyName("relativeInputAssetPath"u8); - writer.WriteStringValue(RelativeInputAssetPath); - writer.WriteEndObject(); - } - - internal static AssetConversionInputOptions DeserializeAssetConversionInputOptions(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Uri storageContainerUri = default; - string storageContainerReadListSas = default; - string blobPrefix = default; - string relativeInputAssetPath = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("storageContainerUri"u8)) - { - storageContainerUri = new Uri(property.Value.GetString()); - continue; - } - if (property.NameEquals("storageContainerReadListSas"u8)) - { - storageContainerReadListSas = property.Value.GetString(); - continue; - } - if (property.NameEquals("blobPrefix"u8)) - { - blobPrefix = property.Value.GetString(); - continue; - } - if (property.NameEquals("relativeInputAssetPath"u8)) - { - relativeInputAssetPath = property.Value.GetString(); - continue; - } - } - return new AssetConversionInputOptions(storageContainerUri, storageContainerReadListSas, blobPrefix, relativeInputAssetPath); - } - } -} diff --git a/sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Generated/Models/AssetConversionInputOptions.cs b/sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Generated/Models/AssetConversionInputOptions.cs deleted file mode 100644 index b7959564adf9..000000000000 --- a/sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Generated/Models/AssetConversionInputOptions.cs +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; - -namespace Azure.MixedReality.RemoteRendering -{ - /// Conversion input settings describe the origin of conversion input. - public partial class AssetConversionInputOptions - { - /// Initializes a new instance of . - /// The URI of the Azure blob storage container containing the input model. - /// The relative path starting at blobPrefix (or at the container root if blobPrefix is not provided) to the input model. Must point to a file with a supported file format ending. See https://docs.microsoft.com/azure/remote-rendering/how-tos/conversion/model-conversion for details. - /// or is null. - public AssetConversionInputOptions(Uri storageContainerUri, string relativeInputAssetPath) - { - Argument.AssertNotNull(storageContainerUri, nameof(storageContainerUri)); - Argument.AssertNotNull(relativeInputAssetPath, nameof(relativeInputAssetPath)); - - StorageContainerUri = storageContainerUri; - RelativeInputAssetPath = relativeInputAssetPath; - } - - /// Initializes a new instance of . - /// The URI of the Azure blob storage container containing the input model. - /// An Azure blob storage container shared access signature giving read and list access to the storage container. Optional. If not provided, the Azure Remote Rendering account needs to be linked with the storage account containing the blob container. See https://docs.microsoft.com/azure/remote-rendering/how-tos/create-an-account#link-storage-accounts for details. For security purposes this field will never be filled out in responses bodies. - /// Only Blobs starting with this prefix will be downloaded to perform the conversion. Optional. If not provided, all Blobs from the container will be downloaded. - /// The relative path starting at blobPrefix (or at the container root if blobPrefix is not provided) to the input model. Must point to a file with a supported file format ending. See https://docs.microsoft.com/azure/remote-rendering/how-tos/conversion/model-conversion for details. - internal AssetConversionInputOptions(Uri storageContainerUri, string storageContainerReadListSas, string blobPrefix, string relativeInputAssetPath) - { - StorageContainerUri = storageContainerUri; - StorageContainerReadListSas = storageContainerReadListSas; - BlobPrefix = blobPrefix; - RelativeInputAssetPath = relativeInputAssetPath; - } - /// An Azure blob storage container shared access signature giving read and list access to the storage container. Optional. If not provided, the Azure Remote Rendering account needs to be linked with the storage account containing the blob container. See https://docs.microsoft.com/azure/remote-rendering/how-tos/create-an-account#link-storage-accounts for details. For security purposes this field will never be filled out in responses bodies. - public string StorageContainerReadListSas { get; set; } - /// Only Blobs starting with this prefix will be downloaded to perform the conversion. Optional. If not provided, all Blobs from the container will be downloaded. - public string BlobPrefix { get; set; } - } -} diff --git a/sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Generated/Models/AssetConversionOptions.Serialization.cs b/sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Generated/Models/AssetConversionOptions.Serialization.cs deleted file mode 100644 index 8dac587f4c2e..000000000000 --- a/sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Generated/Models/AssetConversionOptions.Serialization.cs +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.MixedReality.RemoteRendering -{ - public partial class AssetConversionOptions : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("inputLocation"u8); - writer.WriteObjectValue(InputOptions); - writer.WritePropertyName("outputLocation"u8); - writer.WriteObjectValue(OutputOptions); - writer.WriteEndObject(); - } - - internal static AssetConversionOptions DeserializeAssetConversionOptions(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - AssetConversionInputOptions inputLocation = default; - AssetConversionOutputOptions outputLocation = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("inputLocation"u8)) - { - inputLocation = AssetConversionInputOptions.DeserializeAssetConversionInputOptions(property.Value); - continue; - } - if (property.NameEquals("outputLocation"u8)) - { - outputLocation = AssetConversionOutputOptions.DeserializeAssetConversionOutputOptions(property.Value); - continue; - } - } - return new AssetConversionOptions(inputLocation, outputLocation); - } - } -} diff --git a/sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Generated/Models/AssetConversionOptions.cs b/sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Generated/Models/AssetConversionOptions.cs deleted file mode 100644 index 247735700184..000000000000 --- a/sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Generated/Models/AssetConversionOptions.cs +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; - -namespace Azure.MixedReality.RemoteRendering -{ - /// Conversion settings describe the origin of input files and destination of output files. - public partial class AssetConversionOptions - { - /// Initializes a new instance of . - /// Conversion input settings describe the origin of conversion input. - /// Conversion output settings describe the destination of conversion output. - /// or is null. - public AssetConversionOptions(AssetConversionInputOptions inputOptions, AssetConversionOutputOptions outputOptions) - { - Argument.AssertNotNull(inputOptions, nameof(inputOptions)); - Argument.AssertNotNull(outputOptions, nameof(outputOptions)); - - InputOptions = inputOptions; - OutputOptions = outputOptions; - } - } -} diff --git a/sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Generated/Models/AssetConversionOutput.Serialization.cs b/sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Generated/Models/AssetConversionOutput.Serialization.cs deleted file mode 100644 index e614cd0e18d4..000000000000 --- a/sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Generated/Models/AssetConversionOutput.Serialization.cs +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; - -namespace Azure.MixedReality.RemoteRendering -{ - public partial class AssetConversionOutput - { - internal static AssetConversionOutput DeserializeAssetConversionOutput(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string outputAssetUri = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("outputAssetUri"u8)) - { - outputAssetUri = property.Value.GetString(); - continue; - } - } - return new AssetConversionOutput(outputAssetUri); - } - } -} diff --git a/sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Generated/Models/AssetConversionOutput.cs b/sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Generated/Models/AssetConversionOutput.cs deleted file mode 100644 index 0d862708ec4f..000000000000 --- a/sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Generated/Models/AssetConversionOutput.cs +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.MixedReality.RemoteRendering -{ - /// Information about the output of a successful conversion. Only present when the status of the conversion is 'Succeeded'. - public partial class AssetConversionOutput - { - /// Initializes a new instance of . - internal AssetConversionOutput() - { - } - - /// Initializes a new instance of . - /// URI of the asset generated by the conversion process. - internal AssetConversionOutput(string outputAssetUri) - { - OutputAssetUri = outputAssetUri; - } - } -} diff --git a/sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Generated/Models/AssetConversionOutputOptions.Serialization.cs b/sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Generated/Models/AssetConversionOutputOptions.Serialization.cs deleted file mode 100644 index 75a3ac044cb7..000000000000 --- a/sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Generated/Models/AssetConversionOutputOptions.Serialization.cs +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Text.Json; -using Azure.Core; - -namespace Azure.MixedReality.RemoteRendering -{ - public partial class AssetConversionOutputOptions : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("storageContainerUri"u8); - writer.WriteStringValue(StorageContainerUri.AbsoluteUri); - if (Optional.IsDefined(StorageContainerWriteSas)) - { - writer.WritePropertyName("storageContainerWriteSas"u8); - writer.WriteStringValue(StorageContainerWriteSas); - } - if (Optional.IsDefined(BlobPrefix)) - { - writer.WritePropertyName("blobPrefix"u8); - writer.WriteStringValue(BlobPrefix); - } - if (Optional.IsDefined(OutputAssetFilename)) - { - writer.WritePropertyName("outputAssetFilename"u8); - writer.WriteStringValue(OutputAssetFilename); - } - writer.WriteEndObject(); - } - - internal static AssetConversionOutputOptions DeserializeAssetConversionOutputOptions(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Uri storageContainerUri = default; - string storageContainerWriteSas = default; - string blobPrefix = default; - string outputAssetFilename = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("storageContainerUri"u8)) - { - storageContainerUri = new Uri(property.Value.GetString()); - continue; - } - if (property.NameEquals("storageContainerWriteSas"u8)) - { - storageContainerWriteSas = property.Value.GetString(); - continue; - } - if (property.NameEquals("blobPrefix"u8)) - { - blobPrefix = property.Value.GetString(); - continue; - } - if (property.NameEquals("outputAssetFilename"u8)) - { - outputAssetFilename = property.Value.GetString(); - continue; - } - } - return new AssetConversionOutputOptions(storageContainerUri, storageContainerWriteSas, blobPrefix, outputAssetFilename); - } - } -} diff --git a/sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Generated/Models/AssetConversionOutputOptions.cs b/sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Generated/Models/AssetConversionOutputOptions.cs deleted file mode 100644 index 0677c6fd8993..000000000000 --- a/sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Generated/Models/AssetConversionOutputOptions.cs +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; - -namespace Azure.MixedReality.RemoteRendering -{ - /// Conversion output settings describe the destination of conversion output. - public partial class AssetConversionOutputOptions - { - /// Initializes a new instance of . - /// The URI of the Azure blob storage container where the result of the conversion should be written to. - /// is null. - public AssetConversionOutputOptions(Uri storageContainerUri) - { - Argument.AssertNotNull(storageContainerUri, nameof(storageContainerUri)); - - StorageContainerUri = storageContainerUri; - } - - /// Initializes a new instance of . - /// The URI of the Azure blob storage container where the result of the conversion should be written to. - /// An Azure blob storage container shared access signature giving write access to the storage container. Optional. If not provided, the Azure Remote Rendering account needs to be linked with the storage account containing the blob container. See https://docs.microsoft.com/azure/remote-rendering/how-tos/create-an-account#link-storage-accounts for details. For security purposes this field will never be filled out in responses bodies. - /// A prefix which gets prepended in front of all files produced by the conversion process. Will be treated as a virtual folder. Optional. If not provided, output files will be stored at the container root. - /// The file name of the output asset. Must end in '.arrAsset'. Optional. If not provided, file name will the same name as the input asset, with '.arrAsset' extension. - internal AssetConversionOutputOptions(Uri storageContainerUri, string storageContainerWriteSas, string blobPrefix, string outputAssetFilename) - { - StorageContainerUri = storageContainerUri; - StorageContainerWriteSas = storageContainerWriteSas; - BlobPrefix = blobPrefix; - OutputAssetFilename = outputAssetFilename; - } - /// An Azure blob storage container shared access signature giving write access to the storage container. Optional. If not provided, the Azure Remote Rendering account needs to be linked with the storage account containing the blob container. See https://docs.microsoft.com/azure/remote-rendering/how-tos/create-an-account#link-storage-accounts for details. For security purposes this field will never be filled out in responses bodies. - public string StorageContainerWriteSas { get; set; } - /// A prefix which gets prepended in front of all files produced by the conversion process. Will be treated as a virtual folder. Optional. If not provided, output files will be stored at the container root. - public string BlobPrefix { get; set; } - /// The file name of the output asset. Must end in '.arrAsset'. Optional. If not provided, file name will the same name as the input asset, with '.arrAsset' extension. - public string OutputAssetFilename { get; set; } - } -} diff --git a/sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Generated/Models/AssetConversionStatus.cs b/sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Generated/Models/AssetConversionStatus.cs deleted file mode 100644 index 55c1c0d0be73..000000000000 --- a/sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Generated/Models/AssetConversionStatus.cs +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.MixedReality.RemoteRendering -{ - /// The status of the conversion. Terminal states are 'Cancelled', 'Failed', and 'Succeeded'. - public readonly partial struct AssetConversionStatus : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public AssetConversionStatus(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string NotStartedValue = "NotStarted"; - private const string RunningValue = "Running"; - private const string CancelledValue = "Cancelled"; - private const string FailedValue = "Failed"; - private const string SucceededValue = "Succeeded"; - - /// The conversion was created but hasn't started. - public static AssetConversionStatus NotStarted { get; } = new AssetConversionStatus(NotStartedValue); - /// The conversion is running. - public static AssetConversionStatus Running { get; } = new AssetConversionStatus(RunningValue); - /// The conversion was cancelled. This is a terminal state. - public static AssetConversionStatus Cancelled { get; } = new AssetConversionStatus(CancelledValue); - /// The conversion has failed. Check the 'error' field for more details. This is a terminal state. - public static AssetConversionStatus Failed { get; } = new AssetConversionStatus(FailedValue); - /// The conversion has succeeded. Check the 'output' field for output asset location. This is a terminal state. - public static AssetConversionStatus Succeeded { get; } = new AssetConversionStatus(SucceededValue); - /// Determines if two values are the same. - public static bool operator ==(AssetConversionStatus left, AssetConversionStatus right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(AssetConversionStatus left, AssetConversionStatus right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator AssetConversionStatus(string value) => new AssetConversionStatus(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is AssetConversionStatus other && Equals(other); - /// - public bool Equals(AssetConversionStatus other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Generated/Models/ConversionList.Serialization.cs b/sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Generated/Models/ConversionList.Serialization.cs deleted file mode 100644 index 88067eb3fe34..000000000000 --- a/sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Generated/Models/ConversionList.Serialization.cs +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using System.Text.Json; - -namespace Azure.MixedReality.RemoteRendering -{ - internal partial class ConversionList - { - internal static ConversionList DeserializeConversionList(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - IReadOnlyList conversions = default; - string nextLink = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("conversions"u8)) - { - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(AssetConversion.DeserializeAssetConversion(item)); - } - conversions = array; - continue; - } - if (property.NameEquals("@nextLink"u8)) - { - nextLink = property.Value.GetString(); - continue; - } - } - return new ConversionList(conversions, nextLink); - } - } -} diff --git a/sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Generated/Models/ConversionList.cs b/sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Generated/Models/ConversionList.cs deleted file mode 100644 index b83c61988001..000000000000 --- a/sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Generated/Models/ConversionList.cs +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; -using System.Linq; - -namespace Azure.MixedReality.RemoteRendering -{ - /// List of conversions. - internal partial class ConversionList - { - /// Initializes a new instance of . - /// The list of conversions. - /// is null. - internal ConversionList(IEnumerable conversions) - { - Argument.AssertNotNull(conversions, nameof(conversions)); - - Conversions = conversions.ToList(); - } - - /// Initializes a new instance of . - /// The list of conversions. - /// If more conversions are available this field will contain a URL where the next batch of conversions can be requested. This URL will need the same authentication as all calls to the Azure Remote Rendering API. - internal ConversionList(IReadOnlyList conversions, string nextLink) - { - Conversions = conversions; - NextLink = nextLink; - } - - /// The list of conversions. - public IReadOnlyList Conversions { get; } - /// If more conversions are available this field will contain a URL where the next batch of conversions can be requested. This URL will need the same authentication as all calls to the Azure Remote Rendering API. - public string NextLink { get; } - } -} diff --git a/sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Generated/Models/CreateConversionSettings.Serialization.cs b/sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Generated/Models/CreateConversionSettings.Serialization.cs deleted file mode 100644 index 6a207fd31d5f..000000000000 --- a/sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Generated/Models/CreateConversionSettings.Serialization.cs +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.MixedReality.RemoteRendering -{ - internal partial class CreateConversionSettings : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("settings"u8); - writer.WriteObjectValue(Settings); - writer.WriteEndObject(); - } - } -} diff --git a/sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Generated/Models/CreateConversionSettings.cs b/sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Generated/Models/CreateConversionSettings.cs deleted file mode 100644 index d65e2b3dd5f0..000000000000 --- a/sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Generated/Models/CreateConversionSettings.cs +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; - -namespace Azure.MixedReality.RemoteRendering -{ - /// Request to start a conversion. - internal partial class CreateConversionSettings - { - /// Initializes a new instance of . - /// Conversion settings describe the origin of input files and destination of output files. - /// is null. - public CreateConversionSettings(AssetConversionOptions settings) - { - Argument.AssertNotNull(settings, nameof(settings)); - - Settings = settings; - } - - /// Conversion settings describe the origin of input files and destination of output files. - public AssetConversionOptions Settings { get; } - } -} diff --git a/sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Generated/Models/ErrorResponse.Serialization.cs b/sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Generated/Models/ErrorResponse.Serialization.cs deleted file mode 100644 index a0b4efe89c31..000000000000 --- a/sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Generated/Models/ErrorResponse.Serialization.cs +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.MixedReality.RemoteRendering; - -namespace Azure.MixedReality.RemoteRendering.Models -{ - internal partial class ErrorResponse - { - internal static ErrorResponse DeserializeErrorResponse(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - RemoteRenderingServiceError error = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("error"u8)) - { - error = RemoteRenderingServiceError.DeserializeRemoteRenderingServiceError(property.Value); - continue; - } - } - return new ErrorResponse(error); - } - } -} diff --git a/sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Generated/Models/ErrorResponse.cs b/sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Generated/Models/ErrorResponse.cs deleted file mode 100644 index 917bc42c3196..000000000000 --- a/sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Generated/Models/ErrorResponse.cs +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using Azure.MixedReality.RemoteRendering; - -namespace Azure.MixedReality.RemoteRendering.Models -{ - /// The error response containing details of why the request failed. - internal partial class ErrorResponse - { - /// Initializes a new instance of . - /// The error object containing details of why the request failed. - /// is null. - internal ErrorResponse(RemoteRenderingServiceError error) - { - Argument.AssertNotNull(error, nameof(error)); - - Error = error; - } - - /// The error object containing details of why the request failed. - public RemoteRenderingServiceError Error { get; } - } -} diff --git a/sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Generated/Models/RemoteRenderingServiceError.Serialization.cs b/sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Generated/Models/RemoteRenderingServiceError.Serialization.cs deleted file mode 100644 index bb995a9b68f8..000000000000 --- a/sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Generated/Models/RemoteRenderingServiceError.Serialization.cs +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using System.Text.Json; - -namespace Azure.MixedReality.RemoteRendering -{ - public partial class RemoteRenderingServiceError - { - internal static RemoteRenderingServiceError DeserializeRemoteRenderingServiceError(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string code = default; - string message = default; - IReadOnlyList details = default; - string target = default; - RemoteRenderingServiceError innerError = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("code"u8)) - { - code = property.Value.GetString(); - continue; - } - if (property.NameEquals("message"u8)) - { - message = property.Value.GetString(); - continue; - } - if (property.NameEquals("details"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(DeserializeRemoteRenderingServiceError(item)); - } - details = array; - continue; - } - if (property.NameEquals("target"u8)) - { - target = property.Value.GetString(); - continue; - } - if (property.NameEquals("innerError"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - innerError = DeserializeRemoteRenderingServiceError(property.Value); - continue; - } - } - return new RemoteRenderingServiceError(code, message, details ?? new ChangeTrackingList(), target, innerError); - } - } -} diff --git a/sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Generated/Models/RemoteRenderingServiceError.cs b/sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Generated/Models/RemoteRenderingServiceError.cs deleted file mode 100644 index d6b094b10805..000000000000 --- a/sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Generated/Models/RemoteRenderingServiceError.cs +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace Azure.MixedReality.RemoteRendering -{ - /// The error object containing details of why the request failed. - public partial class RemoteRenderingServiceError - { - /// Initializes a new instance of . - /// Error code. - /// A human-readable representation of the error. - /// or is null. - internal RemoteRenderingServiceError(string code, string message) - { - Argument.AssertNotNull(code, nameof(code)); - Argument.AssertNotNull(message, nameof(message)); - - Code = code; - Message = message; - Details = new ChangeTrackingList(); - } - - /// Initializes a new instance of . - /// Error code. - /// A human-readable representation of the error. - /// An array of details about specific errors that led to this reported error. - /// The target of the particular error (e.g., the name of the property in error). - /// An object containing more specific information than the current object about the error. - internal RemoteRenderingServiceError(string code, string message, IReadOnlyList details, string target, RemoteRenderingServiceError innerError) - { - Code = code; - Message = message; - Details = details; - Target = target; - InnerError = innerError; - } - - /// Error code. - public string Code { get; } - /// A human-readable representation of the error. - public string Message { get; } - /// An array of details about specific errors that led to this reported error. - public IReadOnlyList Details { get; } - /// The target of the particular error (e.g., the name of the property in error). - public string Target { get; } - /// An object containing more specific information than the current object about the error. - public RemoteRenderingServiceError InnerError { get; } - } -} diff --git a/sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Generated/Models/RenderingServerSize.cs b/sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Generated/Models/RenderingServerSize.cs deleted file mode 100644 index 70c05e974491..000000000000 --- a/sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Generated/Models/RenderingServerSize.cs +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.MixedReality.RemoteRendering -{ - /// The size of the server used for the rendering session. The size impacts the number of polygons the server can render. Refer to https://docs.microsoft.com/azure/remote-rendering/reference/vm-sizes for details. - public readonly partial struct RenderingServerSize : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public RenderingServerSize(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string StandardValue = "Standard"; - private const string PremiumValue = "Premium"; - - /// Standard rendering session size. - public static RenderingServerSize Standard { get; } = new RenderingServerSize(StandardValue); - /// Premium rendering session size. - public static RenderingServerSize Premium { get; } = new RenderingServerSize(PremiumValue); - /// Determines if two values are the same. - public static bool operator ==(RenderingServerSize left, RenderingServerSize right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(RenderingServerSize left, RenderingServerSize right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator RenderingServerSize(string value) => new RenderingServerSize(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is RenderingServerSize other && Equals(other); - /// - public bool Equals(RenderingServerSize other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Generated/Models/RenderingSession.Serialization.cs b/sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Generated/Models/RenderingSession.Serialization.cs deleted file mode 100644 index 450a6e4938ea..000000000000 --- a/sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Generated/Models/RenderingSession.Serialization.cs +++ /dev/null @@ -1,134 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Text.Json; -using Azure.Core; - -namespace Azure.MixedReality.RemoteRendering -{ - public partial class RenderingSession - { - internal static RenderingSession DeserializeRenderingSession(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string id = default; - int? arrInspectorPort = default; - int? handshakePort = default; - int? elapsedTimeMinutes = default; - string hostname = default; - int? maxLeaseTimeMinutes = default; - RenderingServerSize size = default; - RenderingSessionStatus status = default; - float? teraflops = default; - RemoteRenderingServiceError error = default; - DateTimeOffset? creationTime = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("id"u8)) - { - id = property.Value.GetString(); - continue; - } - if (property.NameEquals("arrInspectorPort"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - arrInspectorPort = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("handshakePort"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - handshakePort = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("elapsedTimeMinutes"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - elapsedTimeMinutes = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("hostname"u8)) - { - hostname = property.Value.GetString(); - continue; - } - if (property.NameEquals("maxLeaseTimeMinutes"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - maxLeaseTimeMinutes = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("size"u8)) - { - size = new RenderingServerSize(property.Value.GetString()); - continue; - } - if (property.NameEquals("status"u8)) - { - status = new RenderingSessionStatus(property.Value.GetString()); - continue; - } - if (property.NameEquals("teraflops"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - teraflops = property.Value.GetSingle(); - continue; - } - if (property.NameEquals("error"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - error = null; - continue; - } - error = RemoteRenderingServiceError.DeserializeRemoteRenderingServiceError(property.Value); - continue; - } - if (property.NameEquals("creationTime"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - creationTime = property.Value.GetDateTimeOffset("O"); - continue; - } - } - return new RenderingSession( - id, - arrInspectorPort, - handshakePort, - elapsedTimeMinutes, - hostname, - maxLeaseTimeMinutes, - size, - status, - teraflops, - error, - creationTime); - } - } -} diff --git a/sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Generated/Models/RenderingSession.cs b/sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Generated/Models/RenderingSession.cs deleted file mode 100644 index bd17b48f6bb2..000000000000 --- a/sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Generated/Models/RenderingSession.cs +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; - -namespace Azure.MixedReality.RemoteRendering -{ - /// The properties of a rendering session. - public partial class RenderingSession - { - /// Initializes a new instance of . - /// The ID of the session supplied when the session was created. - /// The size of the server used for the rendering session. The size impacts the number of polygons the server can render. Refer to https://docs.microsoft.com/azure/remote-rendering/reference/vm-sizes for details. - /// The status of the rendering session. Terminal states are 'Error', 'Expired', and 'Stopped'. - /// is null. - internal RenderingSession(string sessionId, RenderingServerSize size, RenderingSessionStatus status) - { - Argument.AssertNotNull(sessionId, nameof(sessionId)); - - SessionId = sessionId; - Size = size; - Status = status; - } - - /// Initializes a new instance of . - /// The ID of the session supplied when the session was created. - /// The TCP port at which the Azure Remote Rendering Inspector tool is hosted. - /// The TCP port used for the handshake when establishing a connection. - /// Amount of time in minutes the session is or was in the 'Ready' state. Time is rounded down to a full minute. - /// The hostname under which the rendering session is reachable. - /// The time in minutes the session will run after reaching the 'Ready' state. - /// The size of the server used for the rendering session. The size impacts the number of polygons the server can render. Refer to https://docs.microsoft.com/azure/remote-rendering/reference/vm-sizes for details. - /// The status of the rendering session. Terminal states are 'Error', 'Expired', and 'Stopped'. - /// The computational power of the rendering session GPU measured in teraflops. - /// The error object containing details about the rendering session startup failure. - /// The time when the rendering session was created. Date and time in ISO 8601 format. - internal RenderingSession(string sessionId, int? arrInspectorPort, int? handshakePort, int? elapsedTimeMinutes, string host, int? maxLeaseTimeMinutes, RenderingServerSize size, RenderingSessionStatus status, float? teraflops, RemoteRenderingServiceError error, DateTimeOffset? createdOn) - { - SessionId = sessionId; - ArrInspectorPort = arrInspectorPort; - HandshakePort = handshakePort; - ElapsedTimeMinutes = elapsedTimeMinutes; - Host = host; - MaxLeaseTimeMinutes = maxLeaseTimeMinutes; - Size = size; - Status = status; - Teraflops = teraflops; - Error = error; - CreatedOn = createdOn; - } - /// The TCP port at which the Azure Remote Rendering Inspector tool is hosted. - public int? ArrInspectorPort { get; } - /// The TCP port used for the handshake when establishing a connection. - public int? HandshakePort { get; } - /// Amount of time in minutes the session is or was in the 'Ready' state. Time is rounded down to a full minute. - public int? ElapsedTimeMinutes { get; } - /// The size of the server used for the rendering session. The size impacts the number of polygons the server can render. Refer to https://docs.microsoft.com/azure/remote-rendering/reference/vm-sizes for details. - public RenderingServerSize Size { get; } - /// The status of the rendering session. Terminal states are 'Error', 'Expired', and 'Stopped'. - public RenderingSessionStatus Status { get; } - /// The computational power of the rendering session GPU measured in teraflops. - public float? Teraflops { get; } - /// The error object containing details about the rendering session startup failure. - public RemoteRenderingServiceError Error { get; } - } -} diff --git a/sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Generated/Models/RenderingSessionOptions.Serialization.cs b/sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Generated/Models/RenderingSessionOptions.Serialization.cs deleted file mode 100644 index b4e481991065..000000000000 --- a/sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Generated/Models/RenderingSessionOptions.Serialization.cs +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.MixedReality.RemoteRendering -{ - public partial class RenderingSessionOptions : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("maxLeaseTimeMinutes"u8); - writer.WriteNumberValue(MaxLeaseTimeMinutes); - writer.WritePropertyName("size"u8); - writer.WriteStringValue(Size.ToString()); - writer.WriteEndObject(); - } - } -} diff --git a/sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Generated/Models/RenderingSessionOptions.cs b/sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Generated/Models/RenderingSessionOptions.cs deleted file mode 100644 index 41dad9cd76b4..000000000000 --- a/sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Generated/Models/RenderingSessionOptions.cs +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.MixedReality.RemoteRendering -{ - /// Settings of the session to be created. - public partial class RenderingSessionOptions - { - /// The size of the server used for the rendering session. The size impacts the number of polygons the server can render. Refer to https://docs.microsoft.com/azure/remote-rendering/reference/vm-sizes for details. - public RenderingServerSize Size { get; } - } -} diff --git a/sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Generated/Models/RenderingSessionStatus.cs b/sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Generated/Models/RenderingSessionStatus.cs deleted file mode 100644 index 33110ceebf29..000000000000 --- a/sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Generated/Models/RenderingSessionStatus.cs +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.MixedReality.RemoteRendering -{ - /// The status of the rendering session. Terminal states are 'Error', 'Expired', and 'Stopped'. - public readonly partial struct RenderingSessionStatus : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public RenderingSessionStatus(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string ErrorValue = "Error"; - private const string ExpiredValue = "Expired"; - private const string StartingValue = "Starting"; - private const string ReadyValue = "Ready"; - private const string StoppedValue = "Stopped"; - - /// The rendering session has encountered an error, and is unusable. This is a terminal state. - public static RenderingSessionStatus Error { get; } = new RenderingSessionStatus(ErrorValue); - /// The rendering session enters the 'Expired' state when it has been in the 'Ready' state longer than its lease time. This is a terminal state. - public static RenderingSessionStatus Expired { get; } = new RenderingSessionStatus(ExpiredValue); - /// The rendering session is starting, but not accepting incoming connections yet. - public static RenderingSessionStatus Starting { get; } = new RenderingSessionStatus(StartingValue); - /// The rendering session is ready for incoming connections. - public static RenderingSessionStatus Ready { get; } = new RenderingSessionStatus(ReadyValue); - /// The rendering session has been stopped with the 'Stop Session' operation. This is a terminal state. - public static RenderingSessionStatus Stopped { get; } = new RenderingSessionStatus(StoppedValue); - /// Determines if two values are the same. - public static bool operator ==(RenderingSessionStatus left, RenderingSessionStatus right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(RenderingSessionStatus left, RenderingSessionStatus right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator RenderingSessionStatus(string value) => new RenderingSessionStatus(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is RenderingSessionStatus other && Equals(other); - /// - public bool Equals(RenderingSessionStatus other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Generated/Models/SessionsList.Serialization.cs b/sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Generated/Models/SessionsList.Serialization.cs deleted file mode 100644 index 936742cbada5..000000000000 --- a/sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Generated/Models/SessionsList.Serialization.cs +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using System.Text.Json; - -namespace Azure.MixedReality.RemoteRendering -{ - internal partial class SessionsList - { - internal static SessionsList DeserializeSessionsList(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - IReadOnlyList sessions = default; - string nextLink = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("sessions"u8)) - { - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(RenderingSession.DeserializeRenderingSession(item)); - } - sessions = array; - continue; - } - if (property.NameEquals("@nextLink"u8)) - { - nextLink = property.Value.GetString(); - continue; - } - } - return new SessionsList(sessions, nextLink); - } - } -} diff --git a/sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Generated/Models/SessionsList.cs b/sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Generated/Models/SessionsList.cs deleted file mode 100644 index e23f8f893e0f..000000000000 --- a/sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Generated/Models/SessionsList.cs +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; -using System.Linq; - -namespace Azure.MixedReality.RemoteRendering -{ - /// The result of a list sessions request. - internal partial class SessionsList - { - /// Initializes a new instance of . - /// The list of rendering sessions. Does not include sessions in 'Stopped' state. - /// is null. - internal SessionsList(IEnumerable sessions) - { - Argument.AssertNotNull(sessions, nameof(sessions)); - - Sessions = sessions.ToList(); - } - - /// Initializes a new instance of . - /// The list of rendering sessions. Does not include sessions in 'Stopped' state. - /// If more rendering sessions are available this field will contain a URL where the next batch of sessions can be requested. This URL will need the same authentication as all calls to the Azure Remote Rendering API. - internal SessionsList(IReadOnlyList sessions, string nextLink) - { - Sessions = sessions; - NextLink = nextLink; - } - - /// The list of rendering sessions. Does not include sessions in 'Stopped' state. - public IReadOnlyList Sessions { get; } - /// If more rendering sessions are available this field will contain a URL where the next batch of sessions can be requested. This URL will need the same authentication as all calls to the Azure Remote Rendering API. - public string NextLink { get; } - } -} diff --git a/sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Generated/Models/UpdateSessionOptions.Serialization.cs b/sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Generated/Models/UpdateSessionOptions.Serialization.cs deleted file mode 100644 index 9fcc726a37bd..000000000000 --- a/sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Generated/Models/UpdateSessionOptions.Serialization.cs +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.MixedReality.RemoteRendering -{ - public partial class UpdateSessionOptions : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("maxLeaseTimeMinutes"u8); - writer.WriteNumberValue(MaxLeaseTimeMinutes); - writer.WriteEndObject(); - } - } -} diff --git a/sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Generated/Models/UpdateSessionOptions.cs b/sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Generated/Models/UpdateSessionOptions.cs deleted file mode 100644 index 2e1ab97a3536..000000000000 --- a/sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Generated/Models/UpdateSessionOptions.cs +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.MixedReality.RemoteRendering -{ - /// Settings used to update the session. - public partial class UpdateSessionOptions - { - } -} diff --git a/sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Generated/RemoteRenderingCreateConversionHeaders.cs b/sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Generated/RemoteRenderingCreateConversionHeaders.cs deleted file mode 100644 index 52840782d4b8..000000000000 --- a/sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Generated/RemoteRenderingCreateConversionHeaders.cs +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using Azure; -using Azure.Core; - -namespace Azure.MixedReality.RemoteRendering -{ - internal partial class RemoteRenderingCreateConversionHeaders - { - private readonly Response _response; - public RemoteRenderingCreateConversionHeaders(Response response) - { - _response = response; - } - /// Microsoft Correlation Vector. Include this value when reporting issues. - public string MSCV => _response.Headers.TryGetValue("MS-CV", out string value) ? value : null; - } -} diff --git a/sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Generated/RemoteRenderingCreateSessionHeaders.cs b/sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Generated/RemoteRenderingCreateSessionHeaders.cs deleted file mode 100644 index 8256ee0b00d3..000000000000 --- a/sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Generated/RemoteRenderingCreateSessionHeaders.cs +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using Azure; -using Azure.Core; - -namespace Azure.MixedReality.RemoteRendering -{ - internal partial class RemoteRenderingCreateSessionHeaders - { - private readonly Response _response; - public RemoteRenderingCreateSessionHeaders(Response response) - { - _response = response; - } - /// Microsoft Correlation Vector. Include this value when reporting issues. - public string MSCV => _response.Headers.TryGetValue("MS-CV", out string value) ? value : null; - } -} diff --git a/sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Generated/RemoteRenderingGetConversionHeaders.cs b/sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Generated/RemoteRenderingGetConversionHeaders.cs deleted file mode 100644 index bdea7116f5ff..000000000000 --- a/sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Generated/RemoteRenderingGetConversionHeaders.cs +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using Azure; -using Azure.Core; - -namespace Azure.MixedReality.RemoteRendering -{ - internal partial class RemoteRenderingGetConversionHeaders - { - private readonly Response _response; - public RemoteRenderingGetConversionHeaders(Response response) - { - _response = response; - } - /// Microsoft Correlation Vector. Include this value when reporting issues. - public string MSCV => _response.Headers.TryGetValue("MS-CV", out string value) ? value : null; - /// Time in seconds when the status of this conversion should be polled again. - public int? RetryAfter => _response.Headers.TryGetValue("Retry-After", out int? value) ? value : null; - } -} diff --git a/sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Generated/RemoteRenderingListConversionsHeaders.cs b/sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Generated/RemoteRenderingListConversionsHeaders.cs deleted file mode 100644 index 302168af7f3f..000000000000 --- a/sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Generated/RemoteRenderingListConversionsHeaders.cs +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using Azure; -using Azure.Core; - -namespace Azure.MixedReality.RemoteRendering -{ - internal partial class RemoteRenderingListConversionsHeaders - { - private readonly Response _response; - public RemoteRenderingListConversionsHeaders(Response response) - { - _response = response; - } - /// Microsoft Correlation Vector. Include this value when reporting issues. - public string MSCV => _response.Headers.TryGetValue("MS-CV", out string value) ? value : null; - } -} diff --git a/sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Generated/RemoteRenderingRestClient.cs b/sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Generated/RemoteRenderingRestClient.cs deleted file mode 100644 index 5b206e8c4d41..000000000000 --- a/sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Generated/RemoteRenderingRestClient.cs +++ /dev/null @@ -1,782 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Text.Json; -using System.Threading; -using System.Threading.Tasks; -using Azure; -using Azure.Core; -using Azure.Core.Pipeline; - -namespace Azure.MixedReality.RemoteRendering -{ - internal partial class RemoteRenderingRestClient - { - private readonly HttpPipeline _pipeline; - private readonly string _endpoint; - private readonly string _apiVersion; - - /// The ClientDiagnostics is used to provide tracing support for the client library. - internal ClientDiagnostics ClientDiagnostics { get; } - - /// Initializes a new instance of RemoteRenderingRestClient. - /// The handler for diagnostic messaging in the client. - /// The HTTP pipeline for sending and receiving REST requests and responses. - /// The endpoint to use e.g. https://remoterendering.eastus.mixedreality.azure.com. A list can be found at https://docs.microsoft.com/azure/remote-rendering/reference/regions. - /// Api Version. - /// , , or is null. - public RemoteRenderingRestClient(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string endpoint, string apiVersion = "2021-01-01") - { - ClientDiagnostics = clientDiagnostics ?? throw new ArgumentNullException(nameof(clientDiagnostics)); - _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); - _endpoint = endpoint ?? throw new ArgumentNullException(nameof(endpoint)); - _apiVersion = apiVersion ?? throw new ArgumentNullException(nameof(apiVersion)); - } - - internal HttpMessage CreateCreateConversionRequest(Guid accountId, string conversionId, CreateConversionSettings body) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Put; - var uri = new RawRequestUriBuilder(); - uri.AppendRaw(_endpoint, false); - uri.AppendPath("/accounts/", false); - uri.AppendPath(accountId, true); - uri.AppendPath("/conversions/", false); - uri.AppendPath(conversionId, true); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(body); - request.Content = content; - return message; - } - - /// Creates a conversion using an asset stored in an Azure Blob Storage account. - /// The Azure Remote Rendering account ID. - /// An ID uniquely identifying the conversion for the given account. The ID is case sensitive, can contain any combination of alphanumeric characters including hyphens and underscores, and cannot contain more than 256 characters. - /// Request body configuring the settings for an asset conversion. - /// The cancellation token to use. - /// or is null. - public async Task> CreateConversionAsync(Guid accountId, string conversionId, CreateConversionSettings body, CancellationToken cancellationToken = default) - { - if (conversionId == null) - { - throw new ArgumentNullException(nameof(conversionId)); - } - if (body == null) - { - throw new ArgumentNullException(nameof(body)); - } - - using var message = CreateCreateConversionRequest(accountId, conversionId, body); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - var headers = new RemoteRenderingCreateConversionHeaders(message.Response); - switch (message.Response.Status) - { - case 200: - case 201: - { - AssetConversion value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = AssetConversion.DeserializeAssetConversion(document.RootElement); - return ResponseWithHeaders.FromValue(value, headers, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Creates a conversion using an asset stored in an Azure Blob Storage account. - /// The Azure Remote Rendering account ID. - /// An ID uniquely identifying the conversion for the given account. The ID is case sensitive, can contain any combination of alphanumeric characters including hyphens and underscores, and cannot contain more than 256 characters. - /// Request body configuring the settings for an asset conversion. - /// The cancellation token to use. - /// or is null. - public ResponseWithHeaders CreateConversion(Guid accountId, string conversionId, CreateConversionSettings body, CancellationToken cancellationToken = default) - { - if (conversionId == null) - { - throw new ArgumentNullException(nameof(conversionId)); - } - if (body == null) - { - throw new ArgumentNullException(nameof(body)); - } - - using var message = CreateCreateConversionRequest(accountId, conversionId, body); - _pipeline.Send(message, cancellationToken); - var headers = new RemoteRenderingCreateConversionHeaders(message.Response); - switch (message.Response.Status) - { - case 200: - case 201: - { - AssetConversion value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = AssetConversion.DeserializeAssetConversion(document.RootElement); - return ResponseWithHeaders.FromValue(value, headers, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateGetConversionRequest(Guid accountId, string conversionId) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.AppendRaw(_endpoint, false); - uri.AppendPath("/accounts/", false); - uri.AppendPath(accountId, true); - uri.AppendPath("/conversions/", false); - uri.AppendPath(conversionId, true); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - return message; - } - - /// Gets the status of a particular conversion. - /// The Azure Remote Rendering account ID. - /// An ID uniquely identifying the conversion for the given account. The ID is case sensitive, can contain any combination of alphanumeric characters including hyphens and underscores, and cannot contain more than 256 characters. - /// The cancellation token to use. - /// is null. - public async Task> GetConversionAsync(Guid accountId, string conversionId, CancellationToken cancellationToken = default) - { - if (conversionId == null) - { - throw new ArgumentNullException(nameof(conversionId)); - } - - using var message = CreateGetConversionRequest(accountId, conversionId); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - var headers = new RemoteRenderingGetConversionHeaders(message.Response); - switch (message.Response.Status) - { - case 200: - { - AssetConversion value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = AssetConversion.DeserializeAssetConversion(document.RootElement); - return ResponseWithHeaders.FromValue(value, headers, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Gets the status of a particular conversion. - /// The Azure Remote Rendering account ID. - /// An ID uniquely identifying the conversion for the given account. The ID is case sensitive, can contain any combination of alphanumeric characters including hyphens and underscores, and cannot contain more than 256 characters. - /// The cancellation token to use. - /// is null. - public ResponseWithHeaders GetConversion(Guid accountId, string conversionId, CancellationToken cancellationToken = default) - { - if (conversionId == null) - { - throw new ArgumentNullException(nameof(conversionId)); - } - - using var message = CreateGetConversionRequest(accountId, conversionId); - _pipeline.Send(message, cancellationToken); - var headers = new RemoteRenderingGetConversionHeaders(message.Response); - switch (message.Response.Status) - { - case 200: - { - AssetConversion value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = AssetConversion.DeserializeAssetConversion(document.RootElement); - return ResponseWithHeaders.FromValue(value, headers, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateListConversionsRequest(Guid accountId) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.AppendRaw(_endpoint, false); - uri.AppendPath("/accounts/", false); - uri.AppendPath(accountId, true); - uri.AppendPath("/conversions", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - return message; - } - - /// Gets a list of all conversions. - /// The Azure Remote Rendering account ID. - /// The cancellation token to use. - public async Task> ListConversionsAsync(Guid accountId, CancellationToken cancellationToken = default) - { - using var message = CreateListConversionsRequest(accountId); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - var headers = new RemoteRenderingListConversionsHeaders(message.Response); - switch (message.Response.Status) - { - case 200: - { - ConversionList value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = ConversionList.DeserializeConversionList(document.RootElement); - return ResponseWithHeaders.FromValue(value, headers, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Gets a list of all conversions. - /// The Azure Remote Rendering account ID. - /// The cancellation token to use. - public ResponseWithHeaders ListConversions(Guid accountId, CancellationToken cancellationToken = default) - { - using var message = CreateListConversionsRequest(accountId); - _pipeline.Send(message, cancellationToken); - var headers = new RemoteRenderingListConversionsHeaders(message.Response); - switch (message.Response.Status) - { - case 200: - { - ConversionList value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = ConversionList.DeserializeConversionList(document.RootElement); - return ResponseWithHeaders.FromValue(value, headers, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateCreateSessionRequest(Guid accountId, string sessionId, RenderingSessionOptions body) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Put; - var uri = new RawRequestUriBuilder(); - uri.AppendRaw(_endpoint, false); - uri.AppendPath("/accounts/", false); - uri.AppendPath(accountId, true); - uri.AppendPath("/sessions/", false); - uri.AppendPath(sessionId, true); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(body); - request.Content = content; - return message; - } - - /// Creates a new rendering session. - /// The Azure Remote Rendering account ID. - /// An ID uniquely identifying the rendering session for the given account. The ID is case sensitive, can contain any combination of alphanumeric characters including hyphens and underscores, and cannot contain more than 256 characters. - /// Settings of the session to be created. - /// The cancellation token to use. - /// or is null. - public async Task> CreateSessionAsync(Guid accountId, string sessionId, RenderingSessionOptions body, CancellationToken cancellationToken = default) - { - if (sessionId == null) - { - throw new ArgumentNullException(nameof(sessionId)); - } - if (body == null) - { - throw new ArgumentNullException(nameof(body)); - } - - using var message = CreateCreateSessionRequest(accountId, sessionId, body); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - var headers = new RemoteRenderingCreateSessionHeaders(message.Response); - switch (message.Response.Status) - { - case 200: - case 201: - { - RenderingSession value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = RenderingSession.DeserializeRenderingSession(document.RootElement); - return ResponseWithHeaders.FromValue(value, headers, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Creates a new rendering session. - /// The Azure Remote Rendering account ID. - /// An ID uniquely identifying the rendering session for the given account. The ID is case sensitive, can contain any combination of alphanumeric characters including hyphens and underscores, and cannot contain more than 256 characters. - /// Settings of the session to be created. - /// The cancellation token to use. - /// or is null. - public ResponseWithHeaders CreateSession(Guid accountId, string sessionId, RenderingSessionOptions body, CancellationToken cancellationToken = default) - { - if (sessionId == null) - { - throw new ArgumentNullException(nameof(sessionId)); - } - if (body == null) - { - throw new ArgumentNullException(nameof(body)); - } - - using var message = CreateCreateSessionRequest(accountId, sessionId, body); - _pipeline.Send(message, cancellationToken); - var headers = new RemoteRenderingCreateSessionHeaders(message.Response); - switch (message.Response.Status) - { - case 200: - case 201: - { - RenderingSession value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = RenderingSession.DeserializeRenderingSession(document.RootElement); - return ResponseWithHeaders.FromValue(value, headers, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateGetSessionRequest(Guid accountId, string sessionId) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.AppendRaw(_endpoint, false); - uri.AppendPath("/accounts/", false); - uri.AppendPath(accountId, true); - uri.AppendPath("/sessions/", false); - uri.AppendPath(sessionId, true); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - return message; - } - - /// Gets the properties of a particular rendering session. - /// The Azure Remote Rendering account ID. - /// An ID uniquely identifying the rendering session for the given account. The ID is case sensitive, can contain any combination of alphanumeric characters including hyphens and underscores, and cannot contain more than 256 characters. - /// The cancellation token to use. - /// is null. - public async Task> GetSessionAsync(Guid accountId, string sessionId, CancellationToken cancellationToken = default) - { - if (sessionId == null) - { - throw new ArgumentNullException(nameof(sessionId)); - } - - using var message = CreateGetSessionRequest(accountId, sessionId); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - RenderingSession value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = RenderingSession.DeserializeRenderingSession(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Gets the properties of a particular rendering session. - /// The Azure Remote Rendering account ID. - /// An ID uniquely identifying the rendering session for the given account. The ID is case sensitive, can contain any combination of alphanumeric characters including hyphens and underscores, and cannot contain more than 256 characters. - /// The cancellation token to use. - /// is null. - public Response GetSession(Guid accountId, string sessionId, CancellationToken cancellationToken = default) - { - if (sessionId == null) - { - throw new ArgumentNullException(nameof(sessionId)); - } - - using var message = CreateGetSessionRequest(accountId, sessionId); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - RenderingSession value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = RenderingSession.DeserializeRenderingSession(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateUpdateSessionRequest(Guid accountId, string sessionId, UpdateSessionOptions body) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Patch; - var uri = new RawRequestUriBuilder(); - uri.AppendRaw(_endpoint, false); - uri.AppendPath("/accounts/", false); - uri.AppendPath(accountId, true); - uri.AppendPath("/sessions/", false); - uri.AppendPath(sessionId, true); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(body); - request.Content = content; - return message; - } - - /// Updates the max lease time of a particular rendering session. - /// The Azure Remote Rendering account ID. - /// An ID uniquely identifying the rendering session for the given account. The ID is case sensitive, can contain any combination of alphanumeric characters including hyphens and underscores, and cannot contain more than 256 characters. - /// Settings used to update the session. - /// The cancellation token to use. - /// or is null. - public async Task> UpdateSessionAsync(Guid accountId, string sessionId, UpdateSessionOptions body, CancellationToken cancellationToken = default) - { - if (sessionId == null) - { - throw new ArgumentNullException(nameof(sessionId)); - } - if (body == null) - { - throw new ArgumentNullException(nameof(body)); - } - - using var message = CreateUpdateSessionRequest(accountId, sessionId, body); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - RenderingSession value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = RenderingSession.DeserializeRenderingSession(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Updates the max lease time of a particular rendering session. - /// The Azure Remote Rendering account ID. - /// An ID uniquely identifying the rendering session for the given account. The ID is case sensitive, can contain any combination of alphanumeric characters including hyphens and underscores, and cannot contain more than 256 characters. - /// Settings used to update the session. - /// The cancellation token to use. - /// or is null. - public Response UpdateSession(Guid accountId, string sessionId, UpdateSessionOptions body, CancellationToken cancellationToken = default) - { - if (sessionId == null) - { - throw new ArgumentNullException(nameof(sessionId)); - } - if (body == null) - { - throw new ArgumentNullException(nameof(body)); - } - - using var message = CreateUpdateSessionRequest(accountId, sessionId, body); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - RenderingSession value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = RenderingSession.DeserializeRenderingSession(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateStopSessionRequest(Guid accountId, string sessionId) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Post; - var uri = new RawRequestUriBuilder(); - uri.AppendRaw(_endpoint, false); - uri.AppendPath("/accounts/", false); - uri.AppendPath(accountId, true); - uri.AppendPath("/sessions/", false); - uri.AppendPath(sessionId, true); - uri.AppendPath("/:stop", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - return message; - } - - /// Stops a particular rendering session. - /// The Azure Remote Rendering account ID. - /// An ID uniquely identifying the rendering session for the given account. The ID is case sensitive, can contain any combination of alphanumeric characters including hyphens and underscores, and cannot contain more than 256 characters. - /// The cancellation token to use. - /// is null. - public async Task> StopSessionAsync(Guid accountId, string sessionId, CancellationToken cancellationToken = default) - { - if (sessionId == null) - { - throw new ArgumentNullException(nameof(sessionId)); - } - - using var message = CreateStopSessionRequest(accountId, sessionId); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - var headers = new RemoteRenderingStopSessionHeaders(message.Response); - switch (message.Response.Status) - { - case 204: - return ResponseWithHeaders.FromValue(headers, message.Response); - default: - throw new RequestFailedException(message.Response); - } - } - - /// Stops a particular rendering session. - /// The Azure Remote Rendering account ID. - /// An ID uniquely identifying the rendering session for the given account. The ID is case sensitive, can contain any combination of alphanumeric characters including hyphens and underscores, and cannot contain more than 256 characters. - /// The cancellation token to use. - /// is null. - public ResponseWithHeaders StopSession(Guid accountId, string sessionId, CancellationToken cancellationToken = default) - { - if (sessionId == null) - { - throw new ArgumentNullException(nameof(sessionId)); - } - - using var message = CreateStopSessionRequest(accountId, sessionId); - _pipeline.Send(message, cancellationToken); - var headers = new RemoteRenderingStopSessionHeaders(message.Response); - switch (message.Response.Status) - { - case 204: - return ResponseWithHeaders.FromValue(headers, message.Response); - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateListSessionsRequest(Guid accountId) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.AppendRaw(_endpoint, false); - uri.AppendPath("/accounts/", false); - uri.AppendPath(accountId, true); - uri.AppendPath("/sessions", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - return message; - } - - /// Gets a list of all rendering sessions. - /// The Azure Remote Rendering account ID. - /// The cancellation token to use. - public async Task> ListSessionsAsync(Guid accountId, CancellationToken cancellationToken = default) - { - using var message = CreateListSessionsRequest(accountId); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - SessionsList value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = SessionsList.DeserializeSessionsList(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Gets a list of all rendering sessions. - /// The Azure Remote Rendering account ID. - /// The cancellation token to use. - public Response ListSessions(Guid accountId, CancellationToken cancellationToken = default) - { - using var message = CreateListSessionsRequest(accountId); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - SessionsList value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = SessionsList.DeserializeSessionsList(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateListConversionsNextPageRequest(string nextLink, Guid accountId) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.AppendRaw(_endpoint, false); - uri.AppendRawNextLink(nextLink, false); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - return message; - } - - /// Gets a list of all conversions. - /// The URL to the next page of results. - /// The Azure Remote Rendering account ID. - /// The cancellation token to use. - /// is null. - public async Task> ListConversionsNextPageAsync(string nextLink, Guid accountId, CancellationToken cancellationToken = default) - { - if (nextLink == null) - { - throw new ArgumentNullException(nameof(nextLink)); - } - - using var message = CreateListConversionsNextPageRequest(nextLink, accountId); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - var headers = new RemoteRenderingListConversionsHeaders(message.Response); - switch (message.Response.Status) - { - case 200: - { - ConversionList value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = ConversionList.DeserializeConversionList(document.RootElement); - return ResponseWithHeaders.FromValue(value, headers, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Gets a list of all conversions. - /// The URL to the next page of results. - /// The Azure Remote Rendering account ID. - /// The cancellation token to use. - /// is null. - public ResponseWithHeaders ListConversionsNextPage(string nextLink, Guid accountId, CancellationToken cancellationToken = default) - { - if (nextLink == null) - { - throw new ArgumentNullException(nameof(nextLink)); - } - - using var message = CreateListConversionsNextPageRequest(nextLink, accountId); - _pipeline.Send(message, cancellationToken); - var headers = new RemoteRenderingListConversionsHeaders(message.Response); - switch (message.Response.Status) - { - case 200: - { - ConversionList value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = ConversionList.DeserializeConversionList(document.RootElement); - return ResponseWithHeaders.FromValue(value, headers, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateListSessionsNextPageRequest(string nextLink, Guid accountId) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.AppendRaw(_endpoint, false); - uri.AppendRawNextLink(nextLink, false); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - return message; - } - - /// Gets a list of all rendering sessions. - /// The URL to the next page of results. - /// The Azure Remote Rendering account ID. - /// The cancellation token to use. - /// is null. - public async Task> ListSessionsNextPageAsync(string nextLink, Guid accountId, CancellationToken cancellationToken = default) - { - if (nextLink == null) - { - throw new ArgumentNullException(nameof(nextLink)); - } - - using var message = CreateListSessionsNextPageRequest(nextLink, accountId); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - SessionsList value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = SessionsList.DeserializeSessionsList(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Gets a list of all rendering sessions. - /// The URL to the next page of results. - /// The Azure Remote Rendering account ID. - /// The cancellation token to use. - /// is null. - public Response ListSessionsNextPage(string nextLink, Guid accountId, CancellationToken cancellationToken = default) - { - if (nextLink == null) - { - throw new ArgumentNullException(nameof(nextLink)); - } - - using var message = CreateListSessionsNextPageRequest(nextLink, accountId); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - SessionsList value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = SessionsList.DeserializeSessionsList(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - } -} diff --git a/sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Generated/RemoteRenderingStopSessionHeaders.cs b/sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Generated/RemoteRenderingStopSessionHeaders.cs deleted file mode 100644 index 2a191b54e36d..000000000000 --- a/sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Generated/RemoteRenderingStopSessionHeaders.cs +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using Azure; -using Azure.Core; - -namespace Azure.MixedReality.RemoteRendering -{ - internal partial class RemoteRenderingStopSessionHeaders - { - private readonly Response _response; - public RemoteRenderingStopSessionHeaders(Response response) - { - _response = response; - } - /// Microsoft Correlation Vector. Include this value when reporting issues. - public string MSCV => _response.Headers.TryGetValue("MS-CV", out string value) ? value : null; - } -} diff --git a/sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/GlobalSuppressions.cs b/sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/GlobalSuppressions.cs deleted file mode 100644 index 9f29ed00d8a0..000000000000 --- a/sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/GlobalSuppressions.cs +++ /dev/null @@ -1,12 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// This file is used by Code Analysis to maintain SuppressMessage -// attributes that are applied to this project. -// Project-level suppressions either have no target or are given -// a specific target and scoped to a namespace, type, member, etc. - -using System.Diagnostics.CodeAnalysis; - -[assembly: SuppressMessage("Usage", "AZC0001:Use one of the following pre-approved namespace groups (https://azure.github.io/azure-sdk/registered_namespaces.html): Azure.AI, Azure.Analytics, Azure.Communication, Azure.Data, Azure.DigitalTwins, Azure.Iot, Azure.Learn, Azure.Media, Azure.Management, Azure.Messaging, Azure.Search, Azure.Security, Azure.Storage, Azure.Template, Azure.Identity, Microsoft.Extensions.Azure", Justification = "", Scope = "namespace", Target = "~N:Azure.MixedReality.RemoteRendering")] -[assembly: SuppressMessage("Usage", "AZC0001:Use one of the following pre-approved namespace groups (https://azure.github.io/azure-sdk/registered_namespaces.html): Azure.AI, Azure.Analytics, Azure.Communication, Azure.Data, Azure.DigitalTwins, Azure.Iot, Azure.Learn, Azure.Media, Azure.Management, Azure.Messaging, Azure.Search, Azure.Security, Azure.Storage, Azure.Template, Azure.Identity, Microsoft.Extensions.Azure", Justification = "", Scope = "namespace", Target = "~N:Azure.MixedReality.RemoteRendering.Models")] diff --git a/sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/RemoteRenderingClient.cs b/sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/RemoteRenderingClient.cs deleted file mode 100644 index 21c9f2b48244..000000000000 --- a/sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/RemoteRenderingClient.cs +++ /dev/null @@ -1,564 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using System; -using System.Threading; -using System.Threading.Tasks; -using Azure.Core.Pipeline; -using Azure.MixedReality.Authentication; -using Azure.Core; - -namespace Azure.MixedReality.RemoteRendering -{ - /// - /// The client to use for interacting with the Azure Remote Rendering. - /// - public class RemoteRenderingClient - { - private const string OTelConversionIdKey = "az.remoterendering.conversion.id"; - private const string OTelSessionIdKey = "az.remoterendering.session.id"; - private readonly Guid _accountId; - - private readonly ClientDiagnostics _clientDiagnostics; - - private readonly HttpPipeline _pipeline; - - private readonly RemoteRenderingRestClient _restClient; - - /// - /// Initializes a new instance of the class. - /// - /// The rendering service endpoint. This determines the region in which the rendering VM is created. - /// The Azure Remote Rendering account identifier. - /// The Azure Remote Rendering account domain. - /// The Azure Remote Rendering account primary or secondary key credential. - public RemoteRenderingClient(Uri remoteRenderingEndpoint, Guid accountId, string accountDomain, AzureKeyCredential keyCredential) - : this(remoteRenderingEndpoint, accountId, accountDomain, new MixedRealityAccountKeyCredential(accountId, keyCredential), null) { } - - /// - /// Initializes a new instance of the class. - /// - /// The rendering service endpoint. This determines the region in which the rendering VM is created. - /// The Azure Remote Rendering account identifier. - /// The Azure Remote Rendering account domain. - /// The Azure Remote Rendering account primary or secondary key credential. - /// The options. - public RemoteRenderingClient(Uri remoteRenderingEndpoint, Guid accountId, string accountDomain, AzureKeyCredential keyCredential, RemoteRenderingClientOptions options) - : this(remoteRenderingEndpoint, accountId, accountDomain, new MixedRealityAccountKeyCredential(accountId, keyCredential), options) { } - - /// - /// Initializes a new instance of the class. - /// - /// The rendering service endpoint. This determines the region in which the rendering VM is created. - /// The Azure Remote Rendering account identifier. - /// The Azure Remote Rendering account domain. - /// An access token used to access the specified Azure Remote Rendering account. - /// The options. - public RemoteRenderingClient(Uri remoteRenderingEndpoint, Guid accountId, string accountDomain, AccessToken accessToken, RemoteRenderingClientOptions options = null) - : this(remoteRenderingEndpoint, accountId, accountDomain, new StaticAccessTokenCredential(accessToken), options) { } - - /// - /// Initializes a new instance of the class. - /// - /// The rendering service endpoint. This determines the region in which the rendering VM is created. - /// The Azure Remote Rendering account identifier. - /// The Azure Remote Rendering account domain. - /// The credential used to access the Mixed Reality service. - /// The options. - public RemoteRenderingClient(Uri remoteRenderingEndpoint, Guid accountId, string accountDomain, TokenCredential credential, RemoteRenderingClientOptions options = null) - { - Argument.AssertNotDefault(ref accountId, nameof(accountId)); - Argument.AssertNotNullOrWhiteSpace(accountDomain, nameof(accountDomain)); - Argument.AssertNotNull(credential, nameof(credential)); - - options ??= new RemoteRenderingClientOptions(); - - Uri authenticationEndpoint = options.AuthenticationEndpoint ?? AuthenticationEndpoint.ConstructFromDomain(accountDomain); - TokenCredential mrTokenCredential = MixedRealityTokenCredential.GetMixedRealityCredential(accountId, authenticationEndpoint, credential); - - _accountId = accountId; - _clientDiagnostics = new ClientDiagnostics(options); - _pipeline = HttpPipelineBuilder.Build(options, new BearerTokenAuthenticationPolicy(mrTokenCredential, GetDefaultScope(remoteRenderingEndpoint))); - _restClient = new RemoteRenderingRestClient(_clientDiagnostics, _pipeline, remoteRenderingEndpoint.ToString(), options.Version); - } - -#pragma warning disable CS8618 // Non-nullable field is uninitialized. Consider declaring as nullable. - - /// Initializes a new instance of RemoteRenderingClient for mocking. - protected RemoteRenderingClient() - { - } - -#pragma warning restore CS8618 // Non-nullable field is uninitialized. Consider declaring as nullable. - - #region Conversions - - /// - /// Creates a conversion using an asset stored in an Azure Blob Storage account. - /// If the remote rendering account has been linked with the storage account no Shared Access Signatures (storageContainerReadListSas, storageContainerWriteSas) for storage access need to be provided. - /// Documentation how to link your Azure Remote Rendering account with the Azure Blob Storage account can be found in the [documentation](https://docs.microsoft.com/azure/remote-rendering/how-tos/create-an-account#link-storage-accounts). - /// All files in the input container starting with the blobPrefix will be retrieved to perform the conversion. To cut down on conversion times only necessary files should be available under the blobPrefix. - /// . - /// - /// An ID uniquely identifying the conversion for the given account. The ID is case sensitive, can contain any combination of alphanumeric characters including hyphens and underscores, and cannot contain more than 256 characters. - /// The settings for an asset conversion. - /// The cancellation token to use. - /// or is null. - public virtual AssetConversionOperation StartConversion(string conversionId, AssetConversionOptions options, CancellationToken cancellationToken = default) - { - using DiagnosticScope scope = _clientDiagnostics.CreateScope($"{nameof(RemoteRenderingClient)}.{nameof(StartConversion)}"); - scope.AddAttribute(OTelConversionIdKey, conversionId); - scope.Start(); - try - { - var result = _restClient.CreateConversion(_accountId, conversionId, new CreateConversionSettings(options), cancellationToken); - return new AssetConversionOperation(this, result); - } - catch (Exception ex) - { - scope.Failed(ex); - throw; - } - } - - /// - /// Creates a conversion using an asset stored in an Azure Blob Storage account. - /// If the remote rendering account has been linked with the storage account no Shared Access Signatures (storageContainerReadListSas, storageContainerWriteSas) for storage access need to be provided. - /// Documentation how to link your Azure Remote Rendering account with the Azure Blob Storage account can be found in the [documentation](https://docs.microsoft.com/azure/remote-rendering/how-tos/create-an-account#link-storage-accounts). - /// All files in the input container starting with the blobPrefix will be retrieved to perform the conversion. To cut down on conversion times only necessary files should be available under the blobPrefix. - /// . - /// - /// An ID uniquely identifying the conversion for the given account. The ID is case sensitive, can contain any combination of alphanumeric characters including hyphens and underscores, and cannot contain more than 256 characters. - /// Request body configuring the settings for an asset conversion. - /// The cancellation token to use. - /// or is null. - public virtual async Task StartConversionAsync(string conversionId, AssetConversionOptions options, CancellationToken cancellationToken = default) - { - using DiagnosticScope scope = _clientDiagnostics.CreateScope($"{nameof(RemoteRenderingClient)}.{nameof(StartConversion)}"); - scope.AddAttribute(OTelConversionIdKey, conversionId); - scope.Start(); - try - { - var result = await _restClient.CreateConversionAsync(_accountId, conversionId, new CreateConversionSettings(options), cancellationToken).ConfigureAwait(false); - return new AssetConversionOperation(this, result); - } - catch (Exception ex) - { - scope.Failed(ex); - throw; - } - } - - /// Gets the status of a previously created asset conversion. - /// the conversion id. - /// The cancellation token to use. - /// is null. - public virtual Response GetConversion(string conversionId, CancellationToken cancellationToken = default) - { - return GetConversionInternal(conversionId, $"{nameof(RemoteRenderingClient)}.{nameof(GetConversion)}", cancellationToken); - } - - /// Gets the status of a previously created asset conversion. - /// the conversion id. - /// The cancellation token to use. - /// is null. - public virtual async Task> GetConversionAsync(string conversionId, CancellationToken cancellationToken = default) - { - return await GetConversionInternalAsync(conversionId, $"{nameof(RemoteRenderingClient)}.{nameof(GetConversion)}", cancellationToken).ConfigureAwait(false); - } - - /// Gets a list of all conversions. - /// The cancellation token to use. - public virtual Pageable GetConversions(CancellationToken cancellationToken = default) - { - Page FirstPageFunc(int? pageSizeHint) - { - using var scope = _clientDiagnostics.CreateScope($"{nameof(RemoteRenderingClient)}.{nameof(GetConversions)}"); - scope.Start(); - try - { - var result = _restClient.ListConversions(_accountId, cancellationToken); - return Page.FromValues(result.Value.Conversions, result.Value.NextLink, result.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - Page NextPageFunc(string nextLink, int? pageSizeHint) - { - using var scope = _clientDiagnostics.CreateScope($"{nameof(RemoteRenderingClient)}.{nameof(GetConversions)}"); - scope.Start(); - try - { - var result = _restClient.ListConversionsNextPage(nextLink, _accountId, cancellationToken); - return Page.FromValues(result.Value.Conversions, result.Value.NextLink, result.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - return PageableHelpers.CreateEnumerable(FirstPageFunc, NextPageFunc); - } - - /// Gets a list of all conversions. - /// The cancellation token to use. - public virtual AsyncPageable GetConversionsAync(CancellationToken cancellationToken = default) - { - async Task> FirstPageFunc(int? pageSizeHint) - { - using var scope = _clientDiagnostics.CreateScope($"{nameof(RemoteRenderingClient)}.{nameof(GetConversionsAync)}"); - scope.Start(); - try - { - var result = await _restClient.ListConversionsAsync(_accountId, cancellationToken).ConfigureAwait(false); - return Page.FromValues(result.Value.Conversions, result.Value.NextLink, result.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - async Task> NextPageFunc(string nextLink, int? pageSizeHint) - { - using var scope = _clientDiagnostics.CreateScope($"{nameof(RemoteRenderingClient)}.{nameof(GetConversionsAync)}"); - scope.Start(); - try - { - var result = await _restClient.ListConversionsNextPageAsync(nextLink, _accountId, cancellationToken).ConfigureAwait(false); - return Page.FromValues(result.Value.Conversions, result.Value.NextLink, result.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - return PageableHelpers.CreateAsyncEnumerable(FirstPageFunc, NextPageFunc); - } - - #endregion - #region Sessions - - /// Creates a new rendering session. - /// An ID uniquely identifying the rendering session for the given account. The ID is case sensitive, can contain any combination of alphanumeric characters including hyphens and underscores, and cannot contain more than 256 characters. - /// Options of session to be created. - /// The cancellation token to use. - /// or is null. - public virtual StartRenderingSessionOperation StartSession(string sessionId, RenderingSessionOptions options, CancellationToken cancellationToken = default) - { - using DiagnosticScope scope = _clientDiagnostics.CreateScope($"{nameof(RemoteRenderingClient)}.{nameof(StartSession)}"); - scope.AddAttribute(OTelSessionIdKey, sessionId); - scope.Start(); - try - { - var result = _restClient.CreateSession(_accountId, sessionId, options, cancellationToken); - return new StartRenderingSessionOperation(this, Response.FromValue(result.Value, result.GetRawResponse())); - } - catch (Exception ex) - { - scope.Failed(ex); - throw; - } - } - - /// Creates a new rendering session. - /// An ID uniquely identifying the rendering session for the given account. The ID is case sensitive, can contain any combination of alphanumeric characters including hyphens and underscores, and cannot contain more than 256 characters. - /// Options of the session to be created. - /// The cancellation token to use. - /// or is null. - public virtual async Task StartSessionAsync(string sessionId, RenderingSessionOptions options, CancellationToken cancellationToken = default) - { - using DiagnosticScope scope = _clientDiagnostics.CreateScope($"{nameof(RemoteRenderingClient)}.{nameof(StartSession)}"); - scope.AddAttribute(OTelSessionIdKey, sessionId); - scope.Start(); - try - { - var result = await _restClient.CreateSessionAsync(_accountId, sessionId, options, cancellationToken).ConfigureAwait(false); - return new StartRenderingSessionOperation(this, Response.FromValue(result.Value, result.GetRawResponse())); - } - catch (Exception ex) - { - scope.Failed(ex); - throw; - } - } - - /// Gets properties of a particular rendering session. - /// ID of a previously created session. - /// The cancellation token to use. - /// is null. - public virtual Response GetSession(string sessionId, CancellationToken cancellationToken = default) - { - return GetSessionInternal(sessionId, $"{nameof(RemoteRenderingClient)}.{nameof(GetSession)}", cancellationToken); - } - - /// Gets properties of a particular rendering session. - /// ID of a previously created session. - /// The cancellation token to use. - /// is null. - public virtual async Task> GetSessionAsync(string sessionId, CancellationToken cancellationToken = default) - { - return await GetSessionInternalAsync(sessionId, $"{nameof(RemoteRenderingClient)}.{nameof(GetSession)}", cancellationToken).ConfigureAwait(false); - } - - /// Updates a particular rendering session. - /// ID of a previously created session. - /// Settings of the session to be updated. - /// The cancellation token to use. - /// or is null. - public virtual Response UpdateSession(string sessionId, UpdateSessionOptions options, CancellationToken cancellationToken = default) - { - using DiagnosticScope scope = _clientDiagnostics.CreateScope($"{nameof(RemoteRenderingClient)}.{nameof(UpdateSession)}"); - scope.AddAttribute(OTelSessionIdKey, sessionId); - scope.Start(); - try - { - var result = _restClient.UpdateSession(_accountId, sessionId, options, cancellationToken); - return Response.FromValue(result.Value, result.GetRawResponse()); - } - catch (Exception ex) - { - scope.Failed(ex); - throw; - } - } - - /// Updates a particular rendering session. - /// ID of a previously created session. - /// Settings of the session to be updated. - /// The cancellation token to use. - /// or is null. - public virtual async Task> UpdateSessionAsync(string sessionId, UpdateSessionOptions options, CancellationToken cancellationToken = default) - { - using DiagnosticScope scope = _clientDiagnostics.CreateScope($"{nameof(RemoteRenderingClient)}.{nameof(UpdateSession)}"); - scope.AddAttribute(OTelSessionIdKey, sessionId); - scope.Start(); - try - { - var result = await _restClient.UpdateSessionAsync(_accountId, sessionId, options, cancellationToken).ConfigureAwait(false); - return Response.FromValue(result.Value, result.GetRawResponse()); - } - catch (Exception ex) - { - scope.Failed(ex); - throw; - } - } - - /// Stops a particular rendering session. - /// ID of the session to stop. - /// The cancellation token to use. - /// is null. - public virtual Response StopSession(string sessionId, CancellationToken cancellationToken = default) - { - using DiagnosticScope scope = _clientDiagnostics.CreateScope($"{nameof(RemoteRenderingClient)}.{nameof(StopSession)}"); - scope.AddAttribute(OTelSessionIdKey, sessionId); - scope.Start(); - try - { - return _restClient.StopSession(_accountId, sessionId, cancellationToken); - } - catch (Exception ex) - { - scope.Failed(ex); - throw; - } - } - - /// Stops a particular rendering session. - /// ID of the session to stop. - /// The cancellation token to use. - /// is null. - public virtual async Task StopSessionAsync(string sessionId, CancellationToken cancellationToken = default) - { - using DiagnosticScope scope = _clientDiagnostics.CreateScope($"{nameof(RemoteRenderingClient)}.{nameof(StopSession)}"); - scope.AddAttribute(OTelSessionIdKey, sessionId); - scope.Start(); - - try - { - return await _restClient.StopSessionAsync(_accountId, sessionId, cancellationToken).ConfigureAwait(false); - } - catch (Exception ex) - { - scope.Failed(ex); - throw; - } - } - - /// Get a list of all rendering sessions. - /// The cancellation token to use. - public virtual Pageable GetSessions(CancellationToken cancellationToken = default) - { - Page FirstPageFunc(int? pageSizeHint) - { - using var scope = _clientDiagnostics.CreateScope($"{nameof(RemoteRenderingClient)}.{nameof(GetSessions)}"); - scope.Start(); - try - { - var result = _restClient.ListSessions(_accountId, cancellationToken); - return Page.FromValues(result.Value.Sessions, result.Value.NextLink, result.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - Page NextPageFunc(string nextLink, int? pageSizeHint) - { - using var scope = _clientDiagnostics.CreateScope($"{nameof(RemoteRenderingClient)}.{nameof(GetSessions)}"); - scope.Start(); - try - { - var result = _restClient.ListSessionsNextPage(nextLink, _accountId, cancellationToken); - return Page.FromValues(result.Value.Sessions, result.Value.NextLink, result.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - return PageableHelpers.CreateEnumerable(FirstPageFunc, NextPageFunc); - } - - /// Get a list of all rendering sessions. - /// The cancellation token to use. - public virtual AsyncPageable GetSessionsAsync(CancellationToken cancellationToken = default) - { - async Task> FirstPageFunc(int? pageSizeHint) - { - using var scope = _clientDiagnostics.CreateScope($"{nameof(RemoteRenderingClient)}.{nameof(GetSessions)}"); - scope.Start(); - try - { - var result = await _restClient.ListSessionsAsync(_accountId, cancellationToken).ConfigureAwait(false); - return Page.FromValues(result.Value.Sessions, result.Value.NextLink, result.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - async Task> NextPageFunc(string nextLink, int? pageSizeHint) - { - using var scope = _clientDiagnostics.CreateScope($"{nameof(RemoteRenderingClient)}.{nameof(GetSessions)}"); - scope.Start(); - try - { - var result = await _restClient.ListSessionsNextPageAsync(nextLink, _accountId, cancellationToken).ConfigureAwait(false); - return Page.FromValues(result.Value.Sessions, result.Value.NextLink, result.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - return PageableHelpers.CreateAsyncEnumerable(FirstPageFunc, NextPageFunc); - } - - #endregion - #region Private methods - - private static string GetDefaultScope(Uri uri) - => $"{uri.GetComponents(UriComponents.SchemeAndServer, UriFormat.SafeUnescaped)}/.default"; - - /// Gets the status of a previously created asset conversion. - /// the conversion id. - /// A string to for a diagnostic scope. - /// The cancellation token to use. - /// is null. - internal Response GetConversionInternal(string conversionId, string diagnosticScopeName, CancellationToken cancellationToken = default) - { - using DiagnosticScope scope = _clientDiagnostics.CreateScope(diagnosticScopeName); - scope.AddAttribute(OTelConversionIdKey, conversionId); - scope.Start(); - try - { - var result = _restClient.GetConversion(_accountId, conversionId, cancellationToken); - return Response.FromValue(result.Value, result.GetRawResponse()); - } - catch (Exception ex) - { - scope.Failed(ex); - throw; - } - } - - /// Gets the status of a previously created asset conversion. - /// the conversion id. - /// A string to for a diagnostic scope. - /// The cancellation token to use. - /// is null. - internal async Task> GetConversionInternalAsync(string conversionId, string diagnosticScopeName, CancellationToken cancellationToken = default) - { - using DiagnosticScope scope = _clientDiagnostics.CreateScope(diagnosticScopeName); - scope.AddAttribute(OTelConversionIdKey, conversionId); - scope.Start(); - try - { - var result = await _restClient.GetConversionAsync(_accountId, conversionId, cancellationToken).ConfigureAwait(false); - return Response.FromValue(result.Value, result.GetRawResponse()); - } - catch (Exception ex) - { - scope.Failed(ex); - throw; - } - } - - /// Gets properties of a particular rendering session. - /// ID of a previously created session. - /// A string to for a diagnostic scope. - /// The cancellation token to use. - /// is null. - internal Response GetSessionInternal(string sessionId, string diagnosticScopeName, CancellationToken cancellationToken = default) - { - using DiagnosticScope scope = _clientDiagnostics.CreateScope(diagnosticScopeName); - scope.AddAttribute(OTelSessionIdKey, sessionId); - scope.Start(); - try - { - var result = _restClient.GetSession(_accountId, sessionId, cancellationToken); - return Response.FromValue(result.Value, result.GetRawResponse()); - } - catch (Exception ex) - { - scope.Failed(ex); - throw; - } - } - - /// Gets properties of a particular rendering session. - /// ID of a previously created session. - /// A string to for a diagnostic scope. - /// The cancellation token to use. - /// is null. - internal async Task> GetSessionInternalAsync(string sessionId, string diagnosticScopeName, CancellationToken cancellationToken = default) - { - using DiagnosticScope scope = _clientDiagnostics.CreateScope(diagnosticScopeName); - scope.AddAttribute(OTelSessionIdKey, sessionId); - scope.Start(); - try - { - var result = await _restClient.GetSessionAsync(_accountId, sessionId, cancellationToken).ConfigureAwait(false); - return Response.FromValue(result.Value, result.GetRawResponse()); - } - catch (Exception ex) - { - scope.Failed(ex); - throw; - } - } - - #endregion - } -} diff --git a/sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/RemoteRenderingClientOptions.cs b/sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/RemoteRenderingClientOptions.cs deleted file mode 100644 index b56eb7f9648c..000000000000 --- a/sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/RemoteRenderingClientOptions.cs +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using System; -using Azure.Core; - -namespace Azure.MixedReality.RemoteRendering -{ - /// - /// The . - /// Implements the . - /// - /// - public class RemoteRenderingClientOptions : ClientOptions - { - internal string Version { get; } - - /// - /// The authentication endpoint. If this is not set, the RemoteRenderingClient will use a value based on the account domain. - /// - public Uri AuthenticationEndpoint { get; set; } - - /// - /// Initializes a new instance of the class. - /// - /// The version. - public RemoteRenderingClientOptions(ServiceVersion version = ServiceVersion.V2021_01_01) - { - Diagnostics.LoggedHeaderNames.Add("MS-CV"); - - Version = version switch - { - ServiceVersion.V2021_01_01 => "2021-01-01", - _ => throw new ArgumentException($"The service version {version} is not supported by this library.", nameof(version)) - }; - - AuthenticationEndpoint = null; - } - - /// - /// The Azure Remote Rendering service version. - /// - public enum ServiceVersion - { - /// - /// Version V2021_01_01_preview of the Azure Remote Rendering service. - /// -#pragma warning disable CA1707 // Identifiers should not contain underscores - V2021_01_01 = 1, -#pragma warning restore CA1707 // Identifiers should not contain underscores - } - } -} diff --git a/sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/StartRenderingSessionOperation.cs b/sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/StartRenderingSessionOperation.cs deleted file mode 100644 index 6035d7308dff..000000000000 --- a/sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/StartRenderingSessionOperation.cs +++ /dev/null @@ -1,118 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using System; -using System.Threading; -using System.Threading.Tasks; - -namespace Azure.MixedReality.RemoteRendering -{ - /// - /// Operation which represents the starting of a session. - /// It is returned by StartSession, but you can also construct a StartSessionOperation for a sessionId which already exists. - /// - public class StartRenderingSessionOperation : Operation - { - private RemoteRenderingClient _client; - private Response _response; - - /// - /// Construct a StartSessionOperation from a session which already exists. - /// - /// - /// - public StartRenderingSessionOperation(string sessionId, RemoteRenderingClient client) - { - _client = client; - _response = client.GetSessionInternal(sessionId, $"{nameof(StartRenderingSessionOperation)}.{nameof(StartRenderingSessionOperation)}"); - } - - /// - /// Internal constructor. - /// - /// - /// - internal StartRenderingSessionOperation(RemoteRenderingClient client, Response response) - { - _client = client; - _response = response; - } - - /// - public override string Id => _response.Value.SessionId; - - /// - public override RenderingSession Value - { - get - { - return _response.Value; - } - } - - /// - public override bool HasCompleted - { - get { return (_response.Value.Status != RenderingSessionStatus.Starting); } - } - - /// - public override bool HasValue - { - get { return true; } - } - - /// - public override Response GetRawResponse() - { - return _response.GetRawResponse(); - } - - /// - public override Response UpdateStatus(CancellationToken cancellationToken = default) - { - if (!HasCompleted) - { - _response = _client.GetSessionInternal(_response.Value.SessionId, $"{nameof(StartRenderingSessionOperation)}.{nameof(UpdateStatus)}", cancellationToken); - } - return _response.GetRawResponse(); - } - - /// - public async override ValueTask UpdateStatusAsync(CancellationToken cancellationToken = default) - { - if (!HasCompleted) - { - _response = await _client.GetSessionInternalAsync(_response.Value.SessionId, $"{nameof(StartRenderingSessionOperation)}.{nameof(UpdateStatus)}", cancellationToken).ConfigureAwait(false); - } - return _response.GetRawResponse(); - } - - /// - public async override ValueTask> WaitForCompletionAsync(CancellationToken cancellationToken = default) - { - int pollingPeriodInSeconds = (_response.Value.Size == RenderingServerSize.Standard) ? 2 : 10; - return await WaitForCompletionAsync(TimeSpan.FromSeconds(pollingPeriodInSeconds), cancellationToken).ConfigureAwait(false); - } - - /// - public async override ValueTask> WaitForCompletionAsync(TimeSpan pollingInterval, CancellationToken cancellationToken = default) - { - while (true) - { - await UpdateStatusAsync(cancellationToken).ConfigureAwait(false); - if (HasCompleted) - { - break; - } - await Task.Delay(pollingInterval, cancellationToken).ConfigureAwait(false); - } - return _response; - } - - /// Initializes a new instance of StartRenderingSessionOperation for mocking. - protected StartRenderingSessionOperation() - { - } - } -} diff --git a/sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/autorest.md b/sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/autorest.md deleted file mode 100644 index 0bd3243a1295..000000000000 --- a/sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/autorest.md +++ /dev/null @@ -1,9 +0,0 @@ -# Generated code configuration - -Run `dotnet build /t:GenerateCode` to generate code. - -``` yaml -input-file: - - https://raw.githubusercontent.com/Azure/azure-rest-api-specs/2a65b0a2bbd9113b91c889f187d8778c2725c0b9/specification/mixedreality/data-plane/Microsoft.MixedReality/stable/2021-01-01/mr-arr.json -generation1-convenience-client: true -``` diff --git a/sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/properties/AssemblyInfo.cs b/sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/properties/AssemblyInfo.cs deleted file mode 100644 index a6aac63d45b3..000000000000 --- a/sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/properties/AssemblyInfo.cs +++ /dev/null @@ -1,13 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using System.Runtime.CompilerServices; - -// Replace with test project/test project public key and uncomment to make internal members visible to -// your test project. If not needed, this can be deleted. -// [assembly: InternalsVisibleTo("Azure.Template.Tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100d15ddcb29688295338af4b7686603fe614abd555e09efba8fb88ee09e1f7b1ccaeed2e8f823fa9eef3fdd60217fc012ea67d2479751a0b8c087a4185541b851bd8b16f8d91b840e51b1cb0ba6fe647997e57429265e85ef62d565db50a69ae1647d54d7bd855e4db3d8a91510e5bcbd0edfbbecaa20a7bd9ae74593daa7b11b4")] - -// Replace Microsoft.Test with the correct resource provider namepace for your service and uncomment. -// See https://docs.microsoft.com/en-us/azure/azure-resource-manager/management/azure-services-resource-providers -// for the list of possible values. -[assembly: Azure.Core.AzureResourceProviderNamespace("Microsoft.MixedReality")] diff --git a/sdk/remoterendering/Azure.MixedReality.RemoteRendering/tests/Azure.MixedReality.RemoteRendering.Tests.csproj b/sdk/remoterendering/Azure.MixedReality.RemoteRendering/tests/Azure.MixedReality.RemoteRendering.Tests.csproj deleted file mode 100644 index 1d96da999fbd..000000000000 --- a/sdk/remoterendering/Azure.MixedReality.RemoteRendering/tests/Azure.MixedReality.RemoteRendering.Tests.csproj +++ /dev/null @@ -1,22 +0,0 @@ - - - $(RequiredTargetFrameworks) - - - - - - - - - - - - - - - - - - - diff --git a/sdk/remoterendering/Azure.MixedReality.RemoteRendering/tests/RemoteRenderingLiveTests.cs b/sdk/remoterendering/Azure.MixedReality.RemoteRendering/tests/RemoteRenderingLiveTests.cs deleted file mode 100644 index aa0ef469ad8f..000000000000 --- a/sdk/remoterendering/Azure.MixedReality.RemoteRendering/tests/RemoteRenderingLiveTests.cs +++ /dev/null @@ -1,215 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using Azure.Core.TestFramework; -using NUnit.Framework; -using System; -using System.Threading.Tasks; -using Azure.Core; - -namespace Azure.MixedReality.RemoteRendering.Tests -{ - public class RemoteRenderingLiveTests : RecordedTestBase - { - public RemoteRenderingLiveTests(bool isAsync) : - base(isAsync/*, RecordedTestMode.Record*/) - { - // TODO (39914): enable after Azure.MixedReality.Authentication is released - TestDiagnostics = false; - } - - [RecordedTest] - public async Task TestSimpleConversion() - { - var client = GetClient(); - - Uri storageUri = new Uri($"https://{TestEnvironment.StorageAccountName}.blob.core.windows.net/{TestEnvironment.BlobContainerName}"); - - AssetConversionInputOptions input = new AssetConversionInputOptions(storageUri, "testBox.fbx") - { - // We use SAS for live testing, as there can be a delay before DRAM-based access is available for new accounts. - StorageContainerReadListSas = TestEnvironment.SasToken, - BlobPrefix = "Input" - }; - AssetConversionOutputOptions output = new AssetConversionOutputOptions(storageUri) - { - StorageContainerWriteSas = TestEnvironment.SasToken, - BlobPrefix = "Output" - }; - AssetConversionOptions conversionOptions = new AssetConversionOptions(input, output); - - string conversionId = Recording.Random.NewGuid().ToString(); - - AssetConversionOperation conversionOperation = await client.StartConversionAsync(conversionId, conversionOptions); - Assert.AreEqual(conversionId, conversionOperation.Id); - Assert.AreEqual(conversionOptions.InputOptions.RelativeInputAssetPath, conversionOperation.Value.Options.InputOptions.RelativeInputAssetPath); - Assert.AreNotEqual(AssetConversionStatus.Failed, conversionOperation.Value.Status); - - AssetConversion conversion = await client.GetConversionAsync(conversionId); - Assert.AreEqual(conversion.ConversionId, conversionId); - Assert.AreNotEqual(AssetConversionStatus.Failed, conversion.Status); - - AssetConversion conversion2 = await conversionOperation.WaitForCompletionAsync(); - Assert.AreEqual(conversionId, conversion2.ConversionId); - Assert.AreEqual(AssetConversionStatus.Succeeded, conversion2.Status); - Assert.IsTrue(conversionOperation.Value.Output.OutputAssetUri.EndsWith("Output/testBox.arrAsset")); - - bool foundConversion = false; - await foreach (var s in client.GetConversionsAync()) - { - if (s.ConversionId == conversionId) - { - foundConversion = true; - } - } - Assert.IsTrue(foundConversion); - } - - [RecordedTest] - public void TestFailedConversionsNoAccess() - { - var client = GetClient(); - - Uri storageUri = new Uri($"https://{TestEnvironment.StorageAccountName}.blob.core.windows.net/{TestEnvironment.BlobContainerName}"); - - AssetConversionInputOptions input = new AssetConversionInputOptions(storageUri, "testBox.fbx") - { - // Do not provide SAS access to the container, and assume the test account is not linked to the storage. - BlobPrefix = "Input" - }; - AssetConversionOutputOptions output = new AssetConversionOutputOptions(storageUri) - { - BlobPrefix = "Output" - }; - AssetConversionOptions conversionOptions = new AssetConversionOptions(input, output); - - string conversionId = Recording.Random.NewGuid().ToString(); - - RequestFailedException ex = Assert.ThrowsAsync(() => client.StartConversionAsync(conversionId, conversionOptions)); - Assert.AreEqual(403, ex.Status); - // Error accessing connected storage account due to insufficient permissions. Check if the Mixed Reality resource has correct permissions assigned - Assert.IsTrue(ex.Message.ToLower().Contains("storage")); - Assert.IsTrue(ex.Message.ToLower().Contains("permissions")); - } - - [RecordedTest] - public async Task TestFailedConversionsMissingAsset() - { - var client = GetClient(); - - Uri storageUri = new Uri($"https://{TestEnvironment.StorageAccountName}.blob.core.windows.net/{TestEnvironment.BlobContainerName}"); - - AssetConversionInputOptions input = new AssetConversionInputOptions(storageUri, "boxWhichDoesNotExist.fbx") - { - // We use SAS for live testing, as there can be a delay before DRAM-based access is available for new accounts. - StorageContainerReadListSas = TestEnvironment.SasToken, - BlobPrefix = "Input" - }; - AssetConversionOutputOptions output = new AssetConversionOutputOptions(storageUri) - { - StorageContainerWriteSas = TestEnvironment.SasToken, - BlobPrefix = "Output" - }; - AssetConversionOptions conversionOptions = new AssetConversionOptions(input, output); - - string conversionId = Recording.Random.NewGuid().ToString(); - - AssetConversionOperation conversionOperation = await client.StartConversionAsync(conversionId, conversionOptions); - AssetConversion conversion = await conversionOperation.WaitForCompletionAsync(); - Assert.AreEqual(AssetConversionStatus.Failed, conversion.Status); - Assert.IsNotNull(conversion.Error); - // Invalid input provided. Check logs in output container for details. - Assert.IsTrue(conversion.Error.Message.ToLower().Contains("invalid input")); - Assert.IsTrue(conversion.Error.Message.ToLower().Contains("logs")); - } - - [RecordedTest] - public async Task TestSimpleSession() - { - var client = GetClient(); - - RenderingSessionOptions options = new RenderingSessionOptions(TimeSpan.FromMinutes(4), RenderingServerSize.Standard); - - string sessionId = Recording.Random.NewGuid().ToString(); - - StartRenderingSessionOperation startSessionOperation = await client.StartSessionAsync(sessionId, options); - Assert.IsTrue(startSessionOperation.HasValue); - Assert.AreEqual(options.Size, startSessionOperation.Value.Size); - Assert.AreEqual(sessionId, startSessionOperation.Value.SessionId); - - RenderingSession sessionProperties = await client.GetSessionAsync(sessionId); - Assert.AreEqual(startSessionOperation.Value.CreatedOn, sessionProperties.CreatedOn); - - UpdateSessionOptions updateOptions = new UpdateSessionOptions(TimeSpan.FromMinutes(5)); - - RenderingSession updatedSession = await client.UpdateSessionAsync(sessionId, updateOptions); - Assert.AreEqual(updatedSession.MaxLeaseTime, TimeSpan.FromMinutes(5)); - - RenderingSession readyRenderingSession = await startSessionOperation.WaitForCompletionAsync(); - Assert.IsTrue((readyRenderingSession.MaxLeaseTime == TimeSpan.FromMinutes(4)) || (readyRenderingSession.MaxLeaseTime == TimeSpan.FromMinutes(5))); - Assert.IsNotNull(readyRenderingSession.Host); - Assert.IsNotNull(readyRenderingSession.ArrInspectorPort); - Assert.IsNotNull(readyRenderingSession.HandshakePort); - Assert.AreEqual(readyRenderingSession.Size, options.Size); - - UpdateSessionOptions updateOptions2 = new UpdateSessionOptions(TimeSpan.FromMinutes(6)); - Assert.AreEqual(TimeSpan.FromMinutes(6), updateOptions2.MaxLeaseTime); - - bool foundSession = false; - await foreach (var s in client.GetSessionsAsync()) - { - if (s.SessionId == sessionId) - { - foundSession = true; - } - } - Assert.IsTrue(foundSession); - await client.StopSessionAsync(sessionId); - - RenderingSession stoppedRenderingSession = await client.GetSessionAsync(sessionId); - Assert.AreEqual(RenderingSessionStatus.Stopped, stoppedRenderingSession.Status); - } - - [RecordedTest] - public void TestFailedSessionRequest() - { - var client = GetClient(); - - // Make an invalid request (negative lease time). - RenderingSessionOptions options = new RenderingSessionOptions(TimeSpan.FromMinutes(-4), RenderingServerSize.Standard); - - string sessionId = Recording.Random.NewGuid().ToString(); - - RequestFailedException ex = Assert.ThrowsAsync(() => client.StartSessionAsync(sessionId, options)); - Assert.AreEqual(400, ex.Status); - - // The maxLeaseTimeMinutes value cannot be negative - Assert.IsTrue(ex.Message.ToLower().Contains("lease")); - Assert.IsTrue(ex.Message.ToLower().Contains("negative")); - } - - private RemoteRenderingClient GetClient() - { - Guid accountId = new Guid(TestEnvironment.AccountId); - string accountDomain = TestEnvironment.AccountDomain; - Uri serviceEndpoint = new Uri(TestEnvironment.ServiceEndpoint); - - var options = InstrumentClientOptions(new RemoteRenderingClientOptions()); - - // We don't need to test communication with the STS Authentication Library, so in playback - // we use a code-path which does not attempt to contact that service. - RemoteRenderingClient client; - if (Mode != RecordedTestMode.Playback) - { - AzureKeyCredential accountKeyCredential = new AzureKeyCredential(TestEnvironment.AccountKey); - client = new RemoteRenderingClient(serviceEndpoint, accountId, accountDomain, accountKeyCredential, options); - } - else - { - AccessToken artificialToken = new AccessToken("TestToken", DateTimeOffset.MaxValue); - client = new RemoteRenderingClient(serviceEndpoint, accountId, accountDomain, artificialToken, options); - } - return InstrumentClient(client); - } - } -} diff --git a/sdk/remoterendering/Azure.MixedReality.RemoteRendering/tests/RemoteRenderingTestEnvironment.cs b/sdk/remoterendering/Azure.MixedReality.RemoteRendering/tests/RemoteRenderingTestEnvironment.cs deleted file mode 100644 index 54113317cb77..000000000000 --- a/sdk/remoterendering/Azure.MixedReality.RemoteRendering/tests/RemoteRenderingTestEnvironment.cs +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using Azure.Core.TestFramework; -using System; - -namespace Azure.MixedReality.RemoteRendering.Tests -{ - public class RemoteRenderingTestEnvironment : TestEnvironment - { - /// - /// Gets the account domain. - /// - /// - /// Set the MIXEDREALITY_ARR_ACCOUNT_DOMAIN environment variable. - /// - public string AccountDomain => GetRecordedVariable("ARR_ACCOUNT_DOMAIN"); - - /// - /// Gets the account identifier. - /// - /// - /// Set the MIXEDREALITY_ARR_ACCOUNT_ID environment variable. - /// - public string AccountId => GetRecordedVariable("ARR_ACCOUNT_ID"); - - /// - /// Gets the account key. - /// - /// - /// Set the MIXEDREALITY_ARR_ACCOUNT_KEY environment variable. - /// - public string AccountKey => GetRecordedVariable("ARR_ACCOUNT_KEY", options => options.IsSecret()); - - /// - /// Gets the service endpoint. - /// - /// - /// Set the MIXEDREALITY_ARR_SERVICE_ENDPOINT environment variable. - /// - public string ServiceEndpoint => GetRecordedVariable("ARR_SERVICE_ENDPOINT"); - - /// - /// Gets the storage account name used by conversion tests. - /// - /// - /// Set the MIXEDREALITY_ARR_STORAGE_ACCOUNT_NAME environment variable. - /// - public string StorageAccountName => GetRecordedVariable("ARR_STORAGE_ACCOUNT_NAME"); - - /// - /// Gets the blob container name used by the conversion tests. - /// - /// - /// Set the MIXEDREALITY_ARR_BLOB_CONTAINER_NAME environment variable. - /// - public string BlobContainerName => GetRecordedVariable("ARR_BLOB_CONTAINER_NAME"); - - /// - /// Get a SAS token which entitles the service to access storage. - /// - /// - /// Set the MIXEDREALITY_ARR_SAS_TOKEN environment variable. - /// We use SAS for live testing, as there can be a delay before DRAM-based access is available. - /// - public string SasToken => GetRecordedVariable("ARR_SAS_TOKEN", options => options.IsSecret()); - } -} diff --git a/sdk/remoterendering/Azure.MixedReality.RemoteRendering/tests/Samples/RemoteRenderingConvertAssetSample.cs b/sdk/remoterendering/Azure.MixedReality.RemoteRendering/tests/Samples/RemoteRenderingConvertAssetSample.cs deleted file mode 100644 index 4bfb5d30e0a0..000000000000 --- a/sdk/remoterendering/Azure.MixedReality.RemoteRendering/tests/Samples/RemoteRenderingConvertAssetSample.cs +++ /dev/null @@ -1,119 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using System; -using Azure.Core.TestFramework; -using NUnit.Framework; - -namespace Azure.MixedReality.RemoteRendering.Tests.Samples -{ - // These tests assume that the storage account is accessible from the remote rendering account. - // See https://docs.microsoft.com/azure/remote-rendering/how-tos/create-an-account - // Since the roles can take a while to propagate, we do not live test these samples. - - public class RemoteRenderingConvertAssetSample : SamplesBase - { - private RemoteRenderingClient GetClient() - { - Guid accountId = new Guid(TestEnvironment.AccountId); - string accountDomain = TestEnvironment.AccountDomain; - string accountKey = TestEnvironment.AccountKey; - Uri remoteRenderingEndpoint = new Uri(TestEnvironment.ServiceEndpoint); - - AzureKeyCredential accountKeyCredential = new AzureKeyCredential(accountKey); - - RemoteRenderingClient client = new RemoteRenderingClient(remoteRenderingEndpoint, accountId, accountDomain, accountKeyCredential); - return client; - } - - [Test] - [Explicit("This test assume DRAM is set up, so we do not run them live.")] - public void ConvertSimpleAsset() - { - RemoteRenderingClient client = GetClient(); - - Uri storageUri = new Uri($"https://{TestEnvironment.StorageAccountName}.blob.core.windows.net/{TestEnvironment.BlobContainerName}"); - - #region Snippet:StartAnAssetConversion - - AssetConversionInputOptions inputOptions = new AssetConversionInputOptions(storageUri, "box.fbx"); - AssetConversionOutputOptions outputOptions = new AssetConversionOutputOptions(storageUri); - AssetConversionOptions conversionOptions = new AssetConversionOptions(inputOptions, outputOptions); - - // A randomly generated GUID is a good choice for a conversionId. - string conversionId = Guid.NewGuid().ToString(); - - AssetConversionOperation conversionOperation = client.StartConversion(conversionId, conversionOptions); - - #endregion Snippet:StartAnAssetConversion - - AssetConversion conversion = conversionOperation.WaitForCompletionAsync().Result; - if (conversion.Status == AssetConversionStatus.Succeeded) - { - Console.WriteLine($"Conversion succeeded: Output written to {conversion.Output.OutputAssetUri}"); - } - else if (conversion.Status == AssetConversionStatus.Failed) - { - Console.WriteLine($"Conversion failed: {conversion.Error.Code} {conversion.Error.Message}"); - } - } - - [Test] - [Explicit("This test assume DRAM is set up, so we do not run them live.")] - public void ConvertMoreComplexAsset() - { - RemoteRenderingClient client = GetClient(); - - Uri inputStorageUri = new Uri($"https://{TestEnvironment.StorageAccountName}.blob.core.windows.net/{TestEnvironment.BlobContainerName}"); - Uri outputStorageUri = new Uri($"https://{TestEnvironment.StorageAccountName}.blob.core.windows.net/{TestEnvironment.BlobContainerName}"); - - #region Snippet:StartAComplexAssetConversion - AssetConversionInputOptions inputOptions = new AssetConversionInputOptions(inputStorageUri, "bicycle.gltf") - { - BlobPrefix = "Bicycle" - }; - AssetConversionOutputOptions outputOptions = new AssetConversionOutputOptions(outputStorageUri) - { - BlobPrefix = "ConvertedBicycle" - }; - AssetConversionOptions conversionOptions = new AssetConversionOptions(inputOptions, outputOptions); - - string conversionId = Guid.NewGuid().ToString(); - - AssetConversionOperation conversionOperation = client.StartConversion(conversionId, conversionOptions); - #endregion Snippet:StartAComplexAssetConversion - - #region Snippet:QueryConversionStatus - AssetConversion conversion = conversionOperation.WaitForCompletionAsync().Result; - if (conversion.Status == AssetConversionStatus.Succeeded) - { - Console.WriteLine($"Conversion succeeded: Output written to {conversion.Output.OutputAssetUri}"); - } - else if (conversion.Status == AssetConversionStatus.Failed) - { - Console.WriteLine($"Conversion failed: {conversion.Error.Code} {conversion.Error.Message}"); - } - #endregion Snippet:QueryConversionStatus - } - - [Test] - [Explicit("This test assume DRAM is set up, so we do not run them live.")] - public void GetConversions() - { - RemoteRenderingClient client = GetClient(); - - Console.WriteLine("Successful conversions since yesterday:"); - #region Snippet:GetConversions - - foreach (var conversion in client.GetConversions()) - { - if ((conversion.Status == AssetConversionStatus.Succeeded) && (conversion.CreatedOn > DateTimeOffset.Now.AddDays(-1))) - { - Console.WriteLine($"output asset URI: {conversion.Output.OutputAssetUri}"); - } - } - - #endregion Snippet:GetConversions - } - } -} diff --git a/sdk/remoterendering/Azure.MixedReality.RemoteRendering/tests/Samples/RemoteRenderingCreateSessionSample.cs b/sdk/remoterendering/Azure.MixedReality.RemoteRendering/tests/Samples/RemoteRenderingCreateSessionSample.cs deleted file mode 100644 index 92f9cf0f79b9..000000000000 --- a/sdk/remoterendering/Azure.MixedReality.RemoteRendering/tests/Samples/RemoteRenderingCreateSessionSample.cs +++ /dev/null @@ -1,228 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using System; -using Azure.Core.TestFramework; -using NUnit.Framework; -using System.Threading; -using Azure.Core; -using Azure.Identity; -using System.Reflection.Emit; -using System.Threading.Tasks; - -namespace Azure.MixedReality.RemoteRendering.Tests.Samples -{ - public class RemoteRenderingCreateSessionSample : SamplesBase - { - /// - /// Demonstrates how to obtain a client with an AzureKeyCredential. - /// Methods which demonstrate other authentication schemes are at the bottom of the file. - /// - /// - private RemoteRenderingClient GetClientWithAccountKey() - { - Guid accountId = new Guid(TestEnvironment.AccountId); - string accountDomain = TestEnvironment.AccountDomain; - string accountKey = TestEnvironment.AccountKey; - Uri remoteRenderingEndpoint = new Uri(TestEnvironment.ServiceEndpoint); - - #region Snippet:CreateAClient - AzureKeyCredential accountKeyCredential = new AzureKeyCredential(accountKey); - - RemoteRenderingClient client = new RemoteRenderingClient(remoteRenderingEndpoint, accountId, accountDomain, accountKeyCredential); - #endregion Snippet:CreateAClient - return client; - } - - [Test] - [Explicit("To avoid launching too many sessions during testing, we rely on the live tests.")] - public void CreateSession() - { - RemoteRenderingClient client = GetClientWithAccountKey(); - - #region Snippet:CreateASession - - RenderingSessionOptions options = new RenderingSessionOptions(TimeSpan.FromMinutes(30), RenderingServerSize.Standard); - - // A randomly generated GUID is a good choice for a sessionId. - string sessionId = Guid.NewGuid().ToString(); - - StartRenderingSessionOperation startSessionOperation = client.StartSession(sessionId, options); - - RenderingSession newSession = startSessionOperation.WaitForCompletionAsync().Result; - if (newSession.Status == RenderingSessionStatus.Ready) - { - Console.WriteLine($"Session {sessionId} is ready."); - } - else if (newSession.Status == RenderingSessionStatus.Error) - { - Console.WriteLine($"Session {sessionId} encountered an error: {newSession.Error.Code} {newSession.Error.Message}"); - } - - #endregion Snippet:CreateASession - - // Use the session here. - // ... - - // The session will automatically timeout, but in this sample we also demonstrate how to shut it down explicitly. - #region Snippet:StopSession - - client.StopSession(sessionId); - - #endregion Snippet:StopSession - } - - [Test] - [Explicit("To avoid launching too many sessions during testing, we rely on the live tests.")] - public void QueryAndUpdateASession() - { - RemoteRenderingClient client = GetClientWithAccountKey(); - - string sessionId = Guid.NewGuid().ToString(); - - RenderingSessionOptions settings = new RenderingSessionOptions(TimeSpan.FromMinutes(30), RenderingServerSize.Standard); - - RenderingSession newSession = client.StartSession(sessionId, settings).WaitForCompletionAsync().Result; - - #region Snippet:UpdateSession - - RenderingSession currentSession = client.GetSession(sessionId); - - if (currentSession.MaxLeaseTime - DateTimeOffset.Now.Subtract(currentSession.CreatedOn.Value) < TimeSpan.FromMinutes(2)) - { - TimeSpan newLeaseTime = currentSession.MaxLeaseTime.Value.Add(TimeSpan.FromMinutes(30)); - - UpdateSessionOptions longerLeaseSettings = new UpdateSessionOptions(newLeaseTime); - - client.UpdateSession(sessionId, longerLeaseSettings); - } - - #endregion Snippet:UpdateSession - - client.StopSession(sessionId); - } - - [Test] - [Explicit("To avoid launching too many sessions during testing, we rely on the live tests.")] - public void GetInformationAboutSessions() - { - RemoteRenderingClient client = GetClientWithAccountKey(); - - // Ensure there's at least one session to query. - string sessionId = Guid.NewGuid().ToString(); - RenderingSessionOptions settings = new RenderingSessionOptions(TimeSpan.FromMinutes(30), RenderingServerSize.Standard); - client.StartSession(sessionId, settings); - Thread.Sleep(TimeSpan.FromSeconds(10)); - - #region Snippet:ListSessions - - foreach (var properties in client.GetSessions()) - { - if (properties.Status == RenderingSessionStatus.Starting) - { - Console.WriteLine($"Session \"{properties.SessionId}\" is starting."); - } - else if (properties.Status == RenderingSessionStatus.Ready) - { - Console.WriteLine($"Session \"{properties.SessionId}\" is ready at host {properties.Host}"); - } - } - - #endregion Snippet:ListSessions - - client.StopSession(sessionId); - } - - #region Other ways of authenticating the RemoteRenderingClient. - - private RemoteRenderingClient GetClientWithAAD() - { - Guid accountId = new Guid(TestEnvironment.AccountId); - string accountDomain = TestEnvironment.AccountDomain; - string tenantId = TestEnvironment.TenantId; - string clientId = TestEnvironment.ClientId; - string clientSecret = TestEnvironment.ClientSecret; - Uri remoteRenderingEndpoint = new Uri(TestEnvironment.ServiceEndpoint); - - #region Snippet:CreateAClientWithAAD - - TokenCredential credential = new ClientSecretCredential(tenantId, clientId, clientSecret, new TokenCredentialOptions - { - AuthorityHost = new Uri($"https://login.microsoftonline.com/{tenantId}") - }); - - RemoteRenderingClient client = new RemoteRenderingClient(remoteRenderingEndpoint, accountId, accountDomain, credential); - #endregion Snippet:CreateAClientWithAAD - return client; - } - - private RemoteRenderingClient GetClientWithDeviceCode() - { - Guid accountId = new Guid(TestEnvironment.AccountId); - string accountDomain = TestEnvironment.AccountDomain; - string tenantId = TestEnvironment.TenantId; - string clientId = TestEnvironment.ClientId; - Uri remoteRenderingEndpoint = new Uri(TestEnvironment.ServiceEndpoint); - - #region Snippet:CreateAClientWithDeviceCode - - Task deviceCodeCallback(DeviceCodeInfo deviceCodeInfo, CancellationToken cancellationToken) - { - Console.WriteLine(deviceCodeInfo.Message); - return Task.FromResult(0); - } - - TokenCredential credential = new DeviceCodeCredential(deviceCodeCallback, tenantId, clientId, new TokenCredentialOptions - { - AuthorityHost = new Uri($"https://login.microsoftonline.com/{tenantId}"), - }); - - RemoteRenderingClient client = new RemoteRenderingClient(remoteRenderingEndpoint, accountId, accountDomain, credential); - #endregion Snippet:CreateAClientWithDeviceCode - return client; - } - - private RemoteRenderingClient GetClientWithDefaultAzureCredential() - { - Guid accountId = new Guid(TestEnvironment.AccountId); - string accountDomain = TestEnvironment.AccountDomain; - Uri remoteRenderingEndpoint = new Uri(TestEnvironment.ServiceEndpoint); - - #region Snippet:CreateAClientWithAzureCredential - - TokenCredential credential = new DefaultAzureCredential(includeInteractiveCredentials: true); - - RemoteRenderingClient client = new RemoteRenderingClient(remoteRenderingEndpoint, accountId, accountDomain, credential); - #endregion Snippet:CreateAClientWithAzureCredential - - return client; - } - - private AccessToken GetMixedRealityAccessTokenFromWebService() - { - return new AccessToken("TokenObtainedFromStsClientRunningInWebservice", DateTimeOffset.MaxValue); - } - - private RemoteRenderingClient GetClientWithStaticAccessToken() - { - Guid accountId = new Guid(TestEnvironment.AccountId); - string accountDomain = TestEnvironment.AccountDomain; - Uri remoteRenderingEndpoint = new Uri(TestEnvironment.ServiceEndpoint); - - #region Snippet:CreateAClientWithStaticAccessToken - - // GetMixedRealityAccessTokenFromWebService is a hypothetical method that retrieves - // a Mixed Reality access token from a web service. The web service would use the - // MixedRealityStsClient and credentials to obtain an access token to be returned - // to the client. - AccessToken accessToken = GetMixedRealityAccessTokenFromWebService(); - - RemoteRenderingClient client = new RemoteRenderingClient(remoteRenderingEndpoint, accountId, accountDomain, accessToken); - #endregion Snippet:CreateAClientWithStaticAccessToken - - return client; - } - - #endregion - } -} diff --git a/sdk/remoterendering/Directory.Build.props b/sdk/remoterendering/Directory.Build.props deleted file mode 100644 index 3cbc51e499f5..000000000000 --- a/sdk/remoterendering/Directory.Build.props +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - $(MSBuildThisFileDirectory)\Azure.MixedReality.Authentication\shared\ - - diff --git a/sdk/remoterendering/TestResources/testBox.fbx b/sdk/remoterendering/TestResources/testBox.fbx deleted file mode 100644 index 13b967f33315..000000000000 --- a/sdk/remoterendering/TestResources/testBox.fbx +++ /dev/null @@ -1,346 +0,0 @@ -; FBX 7.5.0 project file -; ---------------------------------------------------- - -FBXHeaderExtension: { - FBXHeaderVersion: 1003 - FBXVersion: 7500 - CreationTimeStamp: { - Version: 1000 - Year: 2021 - Month: 1 - Day: 24 - Hour: 10 - Minute: 15 - Second: 0 - Millisecond: 529 - } - Creator: "FBX SDK/FBX Plugins version 2018.1.1" - SceneInfo: "SceneInfo::GlobalInfo", "UserData" { - Type: "UserData" - Version: 100 - MetaData: { - Version: 100 - Title: "Exported .fbx from Lift" - Subject: "fbx" - Author: "" - Keywords: "Microsoft Community Paint" - Revision: "rev. 1.0" - Comment: "" - } - Properties70: { - P: "DocumentUrl", "KString", "Url", "", "testBox.fbx" - P: "SrcDocumentUrl", "KString", "Url", "", "testBox.fbx" - P: "Original", "Compound", "", "" - P: "Original|ApplicationVendor", "KString", "", "", "" - P: "Original|ApplicationName", "KString", "", "", "" - P: "Original|ApplicationVersion", "KString", "", "", "" - P: "Original|DateTime_GMT", "DateTime", "", "", "" - P: "Original|FileName", "KString", "", "", "" - P: "LastSaved", "Compound", "", "" - P: "LastSaved|ApplicationVendor", "KString", "", "", "" - P: "LastSaved|ApplicationName", "KString", "", "", "" - P: "LastSaved|ApplicationVersion", "KString", "", "", "" - P: "LastSaved|DateTime_GMT", "DateTime", "", "", "" - } - } -} -GlobalSettings: { - Version: 1000 - Properties70: { - P: "UpAxis", "int", "Integer", "",1 - P: "UpAxisSign", "int", "Integer", "",1 - P: "FrontAxis", "int", "Integer", "",2 - P: "FrontAxisSign", "int", "Integer", "",1 - P: "CoordAxis", "int", "Integer", "",0 - P: "CoordAxisSign", "int", "Integer", "",1 - P: "OriginalUpAxis", "int", "Integer", "",-1 - P: "OriginalUpAxisSign", "int", "Integer", "",1 - P: "UnitScaleFactor", "double", "Number", "",100 - P: "OriginalUnitScaleFactor", "double", "Number", "",1 - P: "AmbientColor", "ColorRGB", "Color", "",0,0,0 - P: "DefaultCamera", "KString", "", "", "Producer Perspective" - P: "TimeMode", "enum", "", "",0 - P: "TimeProtocol", "enum", "", "",2 - P: "SnapOnFrameMode", "enum", "", "",0 - P: "TimeSpanStart", "KTime", "Time", "",0 - P: "TimeSpanStop", "KTime", "Time", "",46186158000 - P: "CustomFrameRate", "double", "Number", "",-1 - P: "TimeMarker", "Compound", "", "" - P: "CurrentTimeMarker", "int", "Integer", "",-1 - } -} - -; Documents Description -;------------------------------------------------------------------ - -Documents: { - Count: 1 - Document: 2520542649728, "Scene", "Scene" { - Properties70: { - P: "SourceObject", "object", "", "" - P: "ActiveAnimStackName", "KString", "", "", "" - } - RootNode: 0 - } -} - -; Document References -;------------------------------------------------------------------ - -References: { -} - -; Object definitions -;------------------------------------------------------------------ - -Definitions: { - Version: 100 - Count: 4 - ObjectType: "GlobalSettings" { - Count: 1 - } - ObjectType: "Model" { - Count: 1 - PropertyTemplate: "FbxNode" { - Properties70: { - P: "QuaternionInterpolate", "enum", "", "",0 - P: "RotationOffset", "Vector3D", "Vector", "",0,0,0 - P: "RotationPivot", "Vector3D", "Vector", "",0,0,0 - P: "ScalingOffset", "Vector3D", "Vector", "",0,0,0 - P: "ScalingPivot", "Vector3D", "Vector", "",0,0,0 - P: "TranslationActive", "bool", "", "",0 - P: "TranslationMin", "Vector3D", "Vector", "",0,0,0 - P: "TranslationMax", "Vector3D", "Vector", "",0,0,0 - P: "TranslationMinX", "bool", "", "",0 - P: "TranslationMinY", "bool", "", "",0 - P: "TranslationMinZ", "bool", "", "",0 - P: "TranslationMaxX", "bool", "", "",0 - P: "TranslationMaxY", "bool", "", "",0 - P: "TranslationMaxZ", "bool", "", "",0 - P: "RotationOrder", "enum", "", "",0 - P: "RotationSpaceForLimitOnly", "bool", "", "",0 - P: "RotationStiffnessX", "double", "Number", "",0 - P: "RotationStiffnessY", "double", "Number", "",0 - P: "RotationStiffnessZ", "double", "Number", "",0 - P: "AxisLen", "double", "Number", "",10 - P: "PreRotation", "Vector3D", "Vector", "",0,0,0 - P: "PostRotation", "Vector3D", "Vector", "",0,0,0 - P: "RotationActive", "bool", "", "",0 - P: "RotationMin", "Vector3D", "Vector", "",0,0,0 - P: "RotationMax", "Vector3D", "Vector", "",0,0,0 - P: "RotationMinX", "bool", "", "",0 - P: "RotationMinY", "bool", "", "",0 - P: "RotationMinZ", "bool", "", "",0 - P: "RotationMaxX", "bool", "", "",0 - P: "RotationMaxY", "bool", "", "",0 - P: "RotationMaxZ", "bool", "", "",0 - P: "InheritType", "enum", "", "",0 - P: "ScalingActive", "bool", "", "",0 - P: "ScalingMin", "Vector3D", "Vector", "",0,0,0 - P: "ScalingMax", "Vector3D", "Vector", "",1,1,1 - P: "ScalingMinX", "bool", "", "",0 - P: "ScalingMinY", "bool", "", "",0 - P: "ScalingMinZ", "bool", "", "",0 - P: "ScalingMaxX", "bool", "", "",0 - P: "ScalingMaxY", "bool", "", "",0 - P: "ScalingMaxZ", "bool", "", "",0 - P: "GeometricTranslation", "Vector3D", "Vector", "",0,0,0 - P: "GeometricRotation", "Vector3D", "Vector", "",0,0,0 - P: "GeometricScaling", "Vector3D", "Vector", "",1,1,1 - P: "MinDampRangeX", "double", "Number", "",0 - P: "MinDampRangeY", "double", "Number", "",0 - P: "MinDampRangeZ", "double", "Number", "",0 - P: "MaxDampRangeX", "double", "Number", "",0 - P: "MaxDampRangeY", "double", "Number", "",0 - P: "MaxDampRangeZ", "double", "Number", "",0 - P: "MinDampStrengthX", "double", "Number", "",0 - P: "MinDampStrengthY", "double", "Number", "",0 - P: "MinDampStrengthZ", "double", "Number", "",0 - P: "MaxDampStrengthX", "double", "Number", "",0 - P: "MaxDampStrengthY", "double", "Number", "",0 - P: "MaxDampStrengthZ", "double", "Number", "",0 - P: "PreferedAngleX", "double", "Number", "",0 - P: "PreferedAngleY", "double", "Number", "",0 - P: "PreferedAngleZ", "double", "Number", "",0 - P: "LookAtProperty", "object", "", "" - P: "UpVectorProperty", "object", "", "" - P: "Show", "bool", "", "",1 - P: "NegativePercentShapeSupport", "bool", "", "",1 - P: "DefaultAttributeIndex", "int", "Integer", "",-1 - P: "Freeze", "bool", "", "",0 - P: "LODBox", "bool", "", "",0 - P: "Lcl Translation", "Lcl Translation", "", "A",0,0,0 - P: "Lcl Rotation", "Lcl Rotation", "", "A",0,0,0 - P: "Lcl Scaling", "Lcl Scaling", "", "A",1,1,1 - P: "Visibility", "Visibility", "", "A",1 - P: "Visibility Inheritance", "Visibility Inheritance", "", "",1 - } - } - } - ObjectType: "Material" { - Count: 1 - PropertyTemplate: "FbxSurfacePhong" { - Properties70: { - P: "ShadingModel", "KString", "", "", "Phong" - P: "MultiLayer", "bool", "", "",0 - P: "EmissiveColor", "Color", "", "A",0,0,0 - P: "EmissiveFactor", "Number", "", "A",1 - P: "AmbientColor", "Color", "", "A",0.2,0.2,0.2 - P: "AmbientFactor", "Number", "", "A",1 - P: "DiffuseColor", "Color", "", "A",0.8,0.8,0.8 - P: "DiffuseFactor", "Number", "", "A",1 - P: "Bump", "Vector3D", "Vector", "",0,0,0 - P: "NormalMap", "Vector3D", "Vector", "",0,0,0 - P: "BumpFactor", "double", "Number", "",1 - P: "TransparentColor", "Color", "", "A",0,0,0 - P: "TransparencyFactor", "Number", "", "A",0 - P: "DisplacementColor", "ColorRGB", "Color", "",0,0,0 - P: "DisplacementFactor", "double", "Number", "",1 - P: "VectorDisplacementColor", "ColorRGB", "Color", "",0,0,0 - P: "VectorDisplacementFactor", "double", "Number", "",1 - P: "SpecularColor", "Color", "", "A",0.2,0.2,0.2 - P: "SpecularFactor", "Number", "", "A",1 - P: "ShininessExponent", "Number", "", "A",20 - P: "ReflectionColor", "Color", "", "A",0,0,0 - P: "ReflectionFactor", "Number", "", "A",1 - } - } - } - ObjectType: "Geometry" { - Count: 1 - PropertyTemplate: "FbxMesh" { - Properties70: { - P: "Color", "ColorRGB", "Color", "",0.8,0.8,0.8 - P: "BBoxMin", "Vector3D", "Vector", "",0,0,0 - P: "BBoxMax", "Vector3D", "Vector", "",0,0,0 - P: "Primary Visibility", "bool", "", "",1 - P: "Casts Shadows", "bool", "", "",1 - P: "Receive Shadows", "bool", "", "",1 - } - } - } -} - -; Object properties -;------------------------------------------------------------------ - -Objects: { - Geometry: 2520544655040, "Geometry::mesh_id43", "Mesh" { - Properties70: { - P: "BBoxMin", "Vector3D", "Vector", "",-100,-100,-100 - P: "BBoxMax", "Vector3D", "Vector", "",100,100,100 - } - Vertices: *72 { - a: 100,100,-100,-100,-100,-100,-100,100,-100,100,-100,-100,-100,100,100,100,-100,100,100,100,100,-100,-100,100,100,100,100,100,-100,-100,100,100,-100,100,-100,100,-100,100,-100,-100,-100,100,-100,100,100,-100,-100,-100,-100,100,-100,100,100,100,100,100,-100,-100,100,100,-100,-100,100,100,-100,-100,100,-100,100,-100,-100,-100 - } - PolygonVertexIndex: *36 { - a: 0,1,-3,0,3,-2,4,5,-7,4,7,-6,8,9,-11,8,11,-10,12,13,-15,12,15,-14,16,17,-19,16,19,-18,20,21,-23,20,23,-22 - } - GeometryVersion: 124 - LayerElementNormal: 0 { - Version: 102 - Name: "" - MappingInformationType: "ByVertice" - ReferenceInformationType: "Direct" - Normals: *72 { - a: 0,0,-1,0,0,-1,0,0,-1,0,0,-1,0,0,1,0,0,1,0,0,1,0,0,1,1,0,0,1,0,0,1,0,0,1,0,0,-1,0,0,-1,0,0,-1,0,0,-1,0,0,0,1,0,0,1,0,0,1,0,0,1,0,0,-1,0,0,-1,0,0,-1,0,0,-1,0 - } - NormalsW: *24 { - a: 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1 - } - } - LayerElementColor: 0 { - Version: 101 - Name: "VertexColors" - MappingInformationType: "ByVertice" - ReferenceInformationType: "IndexToDirect" - Colors: *96 { - a: 0.980392156862745,0.843137254901961,0.388235294117647,1,0.980392156862745,0.843137254901961,0.388235294117647,1,0.980392156862745,0.843137254901961,0.388235294117647,1,0.980392156862745,0.843137254901961,0.388235294117647,1,0.980392156862745,0.843137254901961,0.388235294117647,1,0.980392156862745,0.843137254901961,0.388235294117647,1,0.980392156862745,0.843137254901961,0.388235294117647,1,0.980392156862745,0.843137254901961,0.388235294117647,1,0.980392156862745,0.843137254901961,0.388235294117647,1,0.980392156862745,0.843137254901961,0.388235294117647,1,0.980392156862745,0.843137254901961,0.388235294117647,1,0.980392156862745,0.843137254901961,0.388235294117647,1,0.980392156862745,0.843137254901961,0.388235294117647,1,0.980392156862745,0.843137254901961,0.388235294117647,1,0.980392156862745,0.843137254901961,0.388235294117647,1,0.980392156862745,0.843137254901961,0.388235294117647,1,0.980392156862745,0.843137254901961,0.388235294117647,1,0.980392156862745,0.843137254901961,0.388235294117647,1,0.980392156862745,0.843137254901961,0.388235294117647,1,0.980392156862745,0.843137254901961,0.388235294117647,1,0.980392156862745,0.843137254901961,0.388235294117647,1,0.980392156862745,0.843137254901961,0.388235294117647,1,0.980392156862745,0.843137254901961,0.388235294117647,1,0.980392156862745,0.843137254901961,0.388235294117647,1 - } - } - LayerElementUV: 0 { - Version: 101 - Name: "" - MappingInformationType: "ByVertice" - ReferenceInformationType: "Direct" - } - LayerElementMaterial: 0 { - Version: 101 - Name: "" - MappingInformationType: "AllSame" - ReferenceInformationType: "IndexToDirect" - Materials: *1 { - a: 0 - } - } - Layer: 0 { - Version: 100 - LayerElement: { - Type: "LayerElementNormal" - TypedIndex: 0 - } - LayerElement: { - Type: "LayerElementMaterial" - TypedIndex: 0 - } - LayerElement: { - Type: "LayerElementColor" - TypedIndex: 0 - } - LayerElement: { - Type: "LayerElementUV" - TypedIndex: 0 - } - } - } - Model: 2520544652560, "Model::root", "Mesh" { - Version: 232 - Properties70: { - P: "ScalingMax", "Vector3D", "Vector", "",0,0,0 - P: "GeometricTranslation", "Vector3D", "Vector", "",0.029182942584157,0.0412420704960823,0.200006887316704 - P: "GeometricRotation", "Vector3D", "Vector", "",19.5286376895952,-30.3983310953995,0 - P: "GeometricScaling", "Vector3D", "Vector", "",0.00176811746427344,0.00159080407945701,0.00159080401671689 - P: "DefaultAttributeIndex", "int", "Integer", "",0 - } - Shading: T - Culling: "CullingOff" - } - Material: 2520544654560, "Material::Material_50", "" { - Version: 102 - ShadingModel: "phong" - MultiLayer: 0 - Properties70: { - P: "DiffuseColor", "Color", "", "A",0.992156862745098,0.925490196078431,0.650980392156863 - P: "SpecularColor", "Color", "", "A",0.0352941176470588,0.0352941176470588,0.0352941176470588 - P: "ShininessExponent", "Number", "", "A",62.8694496154785 - P: "Emissive", "Vector3D", "Vector", "",0,0,0 - P: "Ambient", "Vector3D", "Vector", "",0.2,0.2,0.2 - P: "Diffuse", "Vector3D", "Vector", "",0.992156862745098,0.925490196078431,0.650980392156863 - P: "Specular", "Vector3D", "Vector", "",0.0352941176470588,0.0352941176470588,0.0352941176470588 - P: "Shininess", "double", "Number", "",62.8694496154785 - P: "Opacity", "double", "Number", "",1 - P: "Reflectivity", "double", "Number", "",0 - } - } -} - -; Object connections -;------------------------------------------------------------------ - -Connections: { - - ;Model::root, Model::RootNode - C: "OO",2520544652560,0 - - ;Geometry::mesh_id43, Model::root - C: "OO",2520544655040,2520544652560 - - ;Material::Material_50, Model::root - C: "OO",2520544654560,2520544652560 -} -;Takes section -;---------------------------------------------------- - -Takes: { - Current: "" -} diff --git a/sdk/remoterendering/ci.yml b/sdk/remoterendering/ci.yml deleted file mode 100644 index b8d96f70b5b7..000000000000 --- a/sdk/remoterendering/ci.yml +++ /dev/null @@ -1,30 +0,0 @@ -# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. -trigger: - branches: - include: - - main - - hotfix/* - - release/* - paths: - include: - - sdk/remoterendering/ - -pr: - branches: - include: - - main - - feature/* - - hotfix/* - - release/* - paths: - include: - - sdk/remoterendering/ - -extends: - template: /eng/pipelines/templates/stages/archetype-sdk-client.yml - parameters: - ServiceDirectory: remoterendering - ArtifactName: packages - Artifacts: - - name: Azure.MixedReality.RemoteRendering - safeName: AzureMixedRealityRemoteRendering diff --git a/sdk/remoterendering/test-resources-post.ps1 b/sdk/remoterendering/test-resources-post.ps1 deleted file mode 100644 index 134d7cd534cb..000000000000 --- a/sdk/remoterendering/test-resources-post.ps1 +++ /dev/null @@ -1,30 +0,0 @@ -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. - -# This script is used to generate the Test Configuration file for Storage live tests. -# It is invoked by the https://github.com/Azure/azure-sdk-for-net/blob/main/eng/New-TestResources.ps1 -# script after the ARM template, defined in https://github.com/Azure/azure-sdk-for-net/blob/arm-template-storage/sdk/storage/test-resources.json, -# is finished being deployed. The ARM template is responsible for creating the Storage accounts needed for live tests. - -param ( - [hashtable] $DeploymentOutputs, - [string] $TenantId, - [string] $TestApplicationId, - [string] $TestApplicationSecret -) - -# outputs from the ARM deployment passed in from New-TestResources -$StorageAccountName = $DeploymentOutputs['REMOTERENDERING_ARR_STORAGE_ACCOUNT_NAME'] -$StorageAccountKey = $DeploymentOutputs['REMOTERENDERING_ARR_STORAGE_ACCOUNT_KEY'] -$BlobContainerName = $DeploymentOutputs['REMOTERENDERING_ARR_BLOB_CONTAINER_NAME'] - -$LocalFilePath = Join-Path $PSScriptRoot "TestResources\testBox.fbx" -$TargetBlob = "Input/testBox.fbx" - -Write-Verbose ( "Copying test asset to blob storage") - -$StorageContext = New-AzStorageContext -StorageAccountName $StorageAccountName -StorageAccountKey $StorageAccountKey - -$blob = Set-AzStorageBlobContent -File $LocalFilePath -Blob $TargetBlob -Container $BlobContainerName -Context $StorageContext -Force - -Write-Verbose ("Test asset successfully copied to blob storage") diff --git a/sdk/remoterendering/test-resources.json b/sdk/remoterendering/test-resources.json deleted file mode 100644 index 1f58ffde4441..000000000000 --- a/sdk/remoterendering/test-resources.json +++ /dev/null @@ -1,121 +0,0 @@ -{ - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "baseName": { - "type": "string", - "defaultValue": "[resourceGroup().name]", - "metadata": { - "description": "The base resource name." - } - }, - "tenantId": { - "type": "string", - "defaultValue": "72f988bf-86f1-41af-91ab-2d7cd011db47", - "metadata": { - "description": "The tenant ID to which the application and resources belong." - } - }, - "location": { - "type": "string", - "defaultValue": "[resourceGroup().location]", - "metadata": { - "description": "The location of the resource. By default, this is the same as the resource group." - } - }, - "baseTime": { - "type": "string", - "defaultValue": "[utcNow('u')]" - } - }, - "variables": { - "apiVersion": "2020-05-01", - "arrApiVersion": "2021-03-01-preview", - "arrAccountName": "[concat(parameters('baseName'), '-arr-account')]", - "storageApiVersion": "2019-06-01", - "storageAccountName": "[parameters('baseName')]", - "blobContainerName": "test", - "blobContainerResourceName": "[concat(variables('storageAccountName'), '/default/', variables('blobContainerName'))]", - "sasProperties": { - "signedPermission": "rwl", - "signedExpiry": "[dateTimeAdd(parameters('baseTime'), 'P1D')]", - "signedResource": "c", - "canonicalizedResource": "[concat('/blob/', variables('storageAccountName'), '/', variables('blobContainerName'))]" - } - }, - "resources": [ - { - "type": "Microsoft.MixedReality/remoteRenderingAccounts", - "name": "[variables('arrAccountName')]", - "apiVersion": "[variables('arrApiVersion')]", - "location": "[parameters('location')]", - "properties": {}, - "identity": { "type": "systemAssigned" } - }, - { - "type": "Microsoft.Storage/storageAccounts", - "apiVersion": "[variables('storageApiVersion')]", - "name": "[variables('storageAccountName')]", - "location": "[parameters('location')]", - "sku": { - "name": "Standard_RAGRS", - "tier": "Standard" - }, - "kind": "StorageV2", - "properties": { - "supportsHttpsTrafficOnly": true, - "encryption": { - "keySource": "Microsoft.Storage", - "services": { - "blob": { - "enabled": true - } - }, - }, - "accessTier": "Hot" - } - }, - { - "type": "Microsoft.Storage/storageAccounts/blobServices/containers", - "apiVersion": "[variables('storageApiVersion')]", - "name": "[variables('blobContainerResourceName')]", - "dependsOn": [ - "[variables('storageAccountName')]" - ] - } - ], - "outputs": { - "REMOTERENDERING_ARR_ACCOUNT_ID": { - "type": "string", - "value": "[reference(variables('arrAccountName')).accountId]" - }, - "REMOTERENDERING_ARR_ACCOUNT_DOMAIN": { - "type": "string", - "value": "[reference(variables('arrAccountName')).accountDomain]" - }, - "REMOTERENDERING_ARR_ACCOUNT_KEY": { - "type": "string", - "value": "[listKeys(resourceId('Microsoft.MixedReality/remoteRenderingAccounts', variables('arrAccountName')), variables('arrApiVersion')).primaryKey]" - }, - "REMOTERENDERING_ARR_STORAGE_ACCOUNT_NAME": { - "type": "string", - "value": "[variables('storageAccountName')]" - }, - "REMOTERENDERING_ARR_STORAGE_ACCOUNT_KEY": { - "type": "string", - "value": "[listKeys(resourceId('Microsoft.Storage/storageAccounts', variables('storageAccountName')), variables('storageApiVersion')).keys[0].value]" - }, - "REMOTERENDERING_ARR_BLOB_CONTAINER_NAME": { - "type": "string", - "value": "[variables('blobContainerName')]" - }, - "REMOTERENDERING_ARR_SAS_TOKEN": { - "type": "string", - "value": "[listServiceSas(variables('storageAccountName'), variables('storageApiVersion'), variables('sasProperties')).serviceSasToken]" - }, - "REMOTERENDERING_ARR_SERVICE_ENDPOINT": { - "type": "string", - "value": "[concat('https://remoterendering.', parameters('location'), '.mixedreality.azure.com')]" - } - } -} \ No newline at end of file diff --git a/sdk/remoterendering/tests.yml b/sdk/remoterendering/tests.yml deleted file mode 100644 index a9402e48802b..000000000000 --- a/sdk/remoterendering/tests.yml +++ /dev/null @@ -1,7 +0,0 @@ -trigger: none - -extends: - template: ../../eng/pipelines/templates/stages/archetype-sdk-tests.yml - parameters: - ServiceDirectory: remoterendering - Location: eastus2