diff --git a/sdk/microsoft.app/Microsoft.App/Microsoft.App.sln b/sdk/microsoft.app/Microsoft.App/Microsoft.App.sln
new file mode 100644
index 000000000000..c81a7592cc4f
--- /dev/null
+++ b/sdk/microsoft.app/Microsoft.App/Microsoft.App.sln
@@ -0,0 +1,50 @@
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio Version 16
+VisualStudioVersion = 16.0.29709.97
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.App", "src\Microsoft.App.csproj", "{28FF4005-4467-4E36-92E7-DEA27DEB1519}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.App.Tests", "tests\Microsoft.App.Tests.csproj", "{1F1CD1D4-9932-4B73-99D8-C252A67D4B46}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Release|Any CPU = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {B0C276D1-2930-4887-B29A-D1A33E7009A2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {B0C276D1-2930-4887-B29A-D1A33E7009A2}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {B0C276D1-2930-4887-B29A-D1A33E7009A2}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {B0C276D1-2930-4887-B29A-D1A33E7009A2}.Release|Any CPU.Build.0 = Release|Any CPU
+ {8E9A77AC-792A-4432-8320-ACFD46730401}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {8E9A77AC-792A-4432-8320-ACFD46730401}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {8E9A77AC-792A-4432-8320-ACFD46730401}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {8E9A77AC-792A-4432-8320-ACFD46730401}.Release|Any CPU.Build.0 = Release|Any CPU
+ {A4241C1F-A53D-474C-9E4E-075054407E74}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {A4241C1F-A53D-474C-9E4E-075054407E74}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {A4241C1F-A53D-474C-9E4E-075054407E74}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {A4241C1F-A53D-474C-9E4E-075054407E74}.Release|Any CPU.Build.0 = Release|Any CPU
+ {FA8BD3F1-8616-47B6-974C-7576CDF4717E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {FA8BD3F1-8616-47B6-974C-7576CDF4717E}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {FA8BD3F1-8616-47B6-974C-7576CDF4717E}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {FA8BD3F1-8616-47B6-974C-7576CDF4717E}.Release|Any CPU.Build.0 = Release|Any CPU
+ {85677AD3-C214-42FA-AE6E-49B956CAC8DC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {85677AD3-C214-42FA-AE6E-49B956CAC8DC}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {85677AD3-C214-42FA-AE6E-49B956CAC8DC}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {85677AD3-C214-42FA-AE6E-49B956CAC8DC}.Release|Any CPU.Build.0 = Release|Any CPU
+ {28FF4005-4467-4E36-92E7-DEA27DEB1519}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {28FF4005-4467-4E36-92E7-DEA27DEB1519}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {28FF4005-4467-4E36-92E7-DEA27DEB1519}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {28FF4005-4467-4E36-92E7-DEA27DEB1519}.Release|Any CPU.Build.0 = Release|Any CPU
+ {1F1CD1D4-9932-4B73-99D8-C252A67D4B46}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {1F1CD1D4-9932-4B73-99D8-C252A67D4B46}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {1F1CD1D4-9932-4B73-99D8-C252A67D4B46}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {1F1CD1D4-9932-4B73-99D8-C252A67D4B46}.Release|Any CPU.Build.0 = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+ GlobalSection(ExtensibilityGlobals) = postSolution
+ SolutionGuid = {A97F4B90-2591-4689-B1F8-5F21FE6D6CAE}
+ EndGlobalSection
+EndGlobal
diff --git a/sdk/microsoft.app/Microsoft.App/src/Generated/AppClient.cs b/sdk/microsoft.app/Microsoft.App/src/Generated/AppClient.cs
new file mode 100644
index 000000000000..e7e483b53f3d
--- /dev/null
+++ b/sdk/microsoft.app/Microsoft.App/src/Generated/AppClient.cs
@@ -0,0 +1,349 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Threading;
+using System.Threading.Tasks;
+using Azure;
+using Azure.Core;
+using Azure.Core.Pipeline;
+
+namespace Microsoft.App
+{
+ // Data plane generated client.
+ /// The App service client.
+ public partial class AppClient
+ {
+ private static readonly string[] AuthorizationScopes = new string[] { "https://dynamicsessions.io/.default" };
+ private readonly TokenCredential _tokenCredential;
+ private readonly HttpPipeline _pipeline;
+ private readonly Uri _endpoint;
+ private readonly string _apiVersion;
+
+ /// The ClientDiagnostics is used to provide tracing support for the client library.
+ internal ClientDiagnostics ClientDiagnostics { get; }
+
+ /// The HTTP pipeline for sending and receiving REST requests and responses.
+ public virtual HttpPipeline Pipeline => _pipeline;
+
+ /// Initializes a new instance of AppClient for mocking.
+ protected AppClient()
+ {
+ }
+
+ /// Initializes a new instance of AppClient.
+ /// The management endpoint of the session pool.
+ /// A credential used to authenticate to an Azure Service.
+ /// or is null.
+ public AppClient(Uri endpoint, TokenCredential credential) : this(endpoint, credential, new AppClientOptions())
+ {
+ }
+
+ /// Initializes a new instance of AppClient.
+ /// The management endpoint of the session pool.
+ /// A credential used to authenticate to an Azure Service.
+ /// The options for configuring the client.
+ /// or is null.
+ public AppClient(Uri endpoint, TokenCredential credential, AppClientOptions options)
+ {
+ Argument.AssertNotNull(endpoint, nameof(endpoint));
+ Argument.AssertNotNull(credential, nameof(credential));
+ options ??= new AppClientOptions();
+
+ ClientDiagnostics = new ClientDiagnostics(options, true);
+ _tokenCredential = credential;
+ _pipeline = HttpPipelineBuilder.Build(options, Array.Empty(), new HttpPipelinePolicy[] { new BearerTokenAuthenticationPolicy(_tokenCredential, AuthorizationScopes) }, new ResponseClassifier());
+ _endpoint = endpoint;
+ _apiVersion = options.Version;
+ }
+
+ /// Execute code in a session.
+ /// The identifier of the session.
+ /// The request to execute code.
+ /// The cancellation token to use.
+ /// or is null.
+ ///
+ public virtual async Task> ExecuteCodeAsync(string identifier, SessionCodeExecutionRequest codeExecutionRequest, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNull(identifier, nameof(identifier));
+ Argument.AssertNotNull(codeExecutionRequest, nameof(codeExecutionRequest));
+
+ using RequestContent content = codeExecutionRequest.ToRequestContent();
+ RequestContext context = FromCancellationToken(cancellationToken);
+ Response response = await ExecuteCodeAsync(identifier, content, context).ConfigureAwait(false);
+ return Response.FromValue(SessionCodeExecutionResult.FromResponse(response), response);
+ }
+
+ /// Execute code in a session.
+ /// The identifier of the session.
+ /// The request to execute code.
+ /// The cancellation token to use.
+ /// or is null.
+ ///
+ public virtual Response ExecuteCode(string identifier, SessionCodeExecutionRequest codeExecutionRequest, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNull(identifier, nameof(identifier));
+ Argument.AssertNotNull(codeExecutionRequest, nameof(codeExecutionRequest));
+
+ using RequestContent content = codeExecutionRequest.ToRequestContent();
+ RequestContext context = FromCancellationToken(cancellationToken);
+ Response response = ExecuteCode(identifier, content, context);
+ return Response.FromValue(SessionCodeExecutionResult.FromResponse(response), response);
+ }
+
+ ///
+ /// [Protocol Method] Execute code in a session.
+ ///
+ /// -
+ ///
+ /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios.
+ ///
+ ///
+ /// -
+ ///
+ /// Please try the simpler convenience overload with strongly typed models first.
+ ///
+ ///
+ ///
+ ///
+ /// The identifier of the session.
+ /// The content to send as the body of the request.
+ /// The request context, which can override default behaviors of the client pipeline on a per-call basis.
+ /// or is null.
+ /// Service returned a non-success status code.
+ /// The response returned from the service.
+ ///
+ public virtual async Task ExecuteCodeAsync(string identifier, RequestContent content, RequestContext context = null)
+ {
+ Argument.AssertNotNull(identifier, nameof(identifier));
+ Argument.AssertNotNull(content, nameof(content));
+
+ using var scope = ClientDiagnostics.CreateScope("AppClient.ExecuteCode");
+ scope.Start();
+ try
+ {
+ using HttpMessage message = CreateExecuteCodeRequest(identifier, content, context);
+ return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false);
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// [Protocol Method] Execute code in a session.
+ ///
+ /// -
+ ///
+ /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios.
+ ///
+ ///
+ /// -
+ ///
+ /// Please try the simpler convenience overload with strongly typed models first.
+ ///
+ ///
+ ///
+ ///
+ /// The identifier of the session.
+ /// The content to send as the body of the request.
+ /// The request context, which can override default behaviors of the client pipeline on a per-call basis.
+ /// or is null.
+ /// Service returned a non-success status code.
+ /// The response returned from the service.
+ ///
+ public virtual Response ExecuteCode(string identifier, RequestContent content, RequestContext context = null)
+ {
+ Argument.AssertNotNull(identifier, nameof(identifier));
+ Argument.AssertNotNull(content, nameof(content));
+
+ using var scope = ClientDiagnostics.CreateScope("AppClient.ExecuteCode");
+ scope.Start();
+ try
+ {
+ using HttpMessage message = CreateExecuteCodeRequest(identifier, content, context);
+ return _pipeline.ProcessMessage(message, context);
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ /// Get the code execution result.
+ /// The identifier of the session.
+ /// The identifier of code execution.
+ /// The cancellation token to use.
+ /// or is null.
+ ///
+ public virtual async Task> GetCodeExecutionResultAsync(string identifier, string executionId, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNull(identifier, nameof(identifier));
+ Argument.AssertNotNull(executionId, nameof(executionId));
+
+ RequestContext context = FromCancellationToken(cancellationToken);
+ Response response = await GetCodeExecutionResultAsync(identifier, executionId, context).ConfigureAwait(false);
+ return Response.FromValue(SessionCodeExecutionResult.FromResponse(response), response);
+ }
+
+ /// Get the code execution result.
+ /// The identifier of the session.
+ /// The identifier of code execution.
+ /// The cancellation token to use.
+ /// or is null.
+ ///
+ public virtual Response GetCodeExecutionResult(string identifier, string executionId, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNull(identifier, nameof(identifier));
+ Argument.AssertNotNull(executionId, nameof(executionId));
+
+ RequestContext context = FromCancellationToken(cancellationToken);
+ Response response = GetCodeExecutionResult(identifier, executionId, context);
+ return Response.FromValue(SessionCodeExecutionResult.FromResponse(response), response);
+ }
+
+ ///
+ /// [Protocol Method] Get the code execution result.
+ ///
+ /// -
+ ///
+ /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios.
+ ///
+ ///
+ /// -
+ ///
+ /// Please try the simpler convenience overload with strongly typed models first.
+ ///
+ ///
+ ///
+ ///
+ /// The identifier of the session.
+ /// The identifier of code execution.
+ /// The request context, which can override default behaviors of the client pipeline on a per-call basis.
+ /// or is null.
+ /// Service returned a non-success status code.
+ /// The response returned from the service.
+ ///
+ public virtual async Task GetCodeExecutionResultAsync(string identifier, string executionId, RequestContext context)
+ {
+ Argument.AssertNotNull(identifier, nameof(identifier));
+ Argument.AssertNotNull(executionId, nameof(executionId));
+
+ using var scope = ClientDiagnostics.CreateScope("AppClient.GetCodeExecutionResult");
+ scope.Start();
+ try
+ {
+ using HttpMessage message = CreateGetCodeExecutionResultRequest(identifier, executionId, context);
+ return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false);
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// [Protocol Method] Get the code execution result.
+ ///
+ /// -
+ ///
+ /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios.
+ ///
+ ///
+ /// -
+ ///
+ /// Please try the simpler convenience overload with strongly typed models first.
+ ///
+ ///
+ ///
+ ///
+ /// The identifier of the session.
+ /// The identifier of code execution.
+ /// The request context, which can override default behaviors of the client pipeline on a per-call basis.
+ /// or is null.
+ /// Service returned a non-success status code.
+ /// The response returned from the service.
+ ///
+ public virtual Response GetCodeExecutionResult(string identifier, string executionId, RequestContext context)
+ {
+ Argument.AssertNotNull(identifier, nameof(identifier));
+ Argument.AssertNotNull(executionId, nameof(executionId));
+
+ using var scope = ClientDiagnostics.CreateScope("AppClient.GetCodeExecutionResult");
+ scope.Start();
+ try
+ {
+ using HttpMessage message = CreateGetCodeExecutionResultRequest(identifier, executionId, context);
+ return _pipeline.ProcessMessage(message, context);
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ private SessionResourceFiles _cachedSessionResourceFiles;
+
+ /// Initializes a new instance of SessionResourceFiles.
+ public virtual SessionResourceFiles GetSessionResourceFilesClient()
+ {
+ return Volatile.Read(ref _cachedSessionResourceFiles) ?? Interlocked.CompareExchange(ref _cachedSessionResourceFiles, new SessionResourceFiles(ClientDiagnostics, _pipeline, _tokenCredential, _endpoint, _apiVersion), null) ?? _cachedSessionResourceFiles;
+ }
+
+ internal HttpMessage CreateExecuteCodeRequest(string identifier, RequestContent content, RequestContext context)
+ {
+ var message = _pipeline.CreateMessage(context, ResponseClassifier200);
+ var request = message.Request;
+ request.Method = RequestMethod.Post;
+ var uri = new RawRequestUriBuilder();
+ uri.Reset(_endpoint);
+ uri.AppendPath("/codeExecute", false);
+ uri.AppendQuery("identifier", identifier, true);
+ uri.AppendQuery("api-version", _apiVersion, true);
+ request.Uri = uri;
+ request.Headers.Add("Accept", "application/json");
+ request.Headers.Add("Content-Type", "application/json");
+ request.Content = content;
+ return message;
+ }
+
+ internal HttpMessage CreateGetCodeExecutionResultRequest(string identifier, string executionId, RequestContext context)
+ {
+ var message = _pipeline.CreateMessage(context, ResponseClassifier200);
+ var request = message.Request;
+ request.Method = RequestMethod.Get;
+ var uri = new RawRequestUriBuilder();
+ uri.Reset(_endpoint);
+ uri.AppendPath("/codeExecutionResult", false);
+ uri.AppendQuery("identifier", identifier, true);
+ uri.AppendQuery("executionId", executionId, true);
+ uri.AppendQuery("api-version", _apiVersion, true);
+ request.Uri = uri;
+ request.Headers.Add("Accept", "application/json");
+ return message;
+ }
+
+ private static RequestContext DefaultRequestContext = new RequestContext();
+ internal static RequestContext FromCancellationToken(CancellationToken cancellationToken = default)
+ {
+ if (!cancellationToken.CanBeCanceled)
+ {
+ return DefaultRequestContext;
+ }
+
+ return new RequestContext() { CancellationToken = cancellationToken };
+ }
+
+ private static ResponseClassifier _responseClassifier200;
+ private static ResponseClassifier ResponseClassifier200 => _responseClassifier200 ??= new StatusCodeClassifier(stackalloc ushort[] { 200 });
+ }
+}
diff --git a/sdk/microsoft.app/Microsoft.App/src/Generated/AppClientOptions.cs b/sdk/microsoft.app/Microsoft.App/src/Generated/AppClientOptions.cs
new file mode 100644
index 000000000000..b63f1f4e612b
--- /dev/null
+++ b/sdk/microsoft.app/Microsoft.App/src/Generated/AppClientOptions.cs
@@ -0,0 +1,37 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using Azure.Core;
+
+namespace Microsoft.App
+{
+ /// Client options for AppClient.
+ public partial class AppClientOptions : ClientOptions
+ {
+ private const ServiceVersion LatestVersion = ServiceVersion.V2024_09_01;
+
+ /// The version of the service to use.
+ public enum ServiceVersion
+ {
+ /// Service version "2024-09-01".
+ V2024_09_01 = 1,
+ }
+
+ internal string Version { get; }
+
+ /// Initializes new instance of AppClientOptions.
+ public AppClientOptions(ServiceVersion version = LatestVersion)
+ {
+ Version = version switch
+ {
+ ServiceVersion.V2024_09_01 => "2024-09-01",
+ _ => throw new NotSupportedException()
+ };
+ }
+ }
+}
diff --git a/sdk/microsoft.app/Microsoft.App/src/Generated/CodeExecutionStatus.cs b/sdk/microsoft.app/Microsoft.App/src/Generated/CodeExecutionStatus.cs
new file mode 100644
index 000000000000..b36411e9f003
--- /dev/null
+++ b/sdk/microsoft.app/Microsoft.App/src/Generated/CodeExecutionStatus.cs
@@ -0,0 +1,51 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.ComponentModel;
+
+namespace Microsoft.App
+{
+ /// Code execution status.
+ public readonly partial struct CodeExecutionStatus : IEquatable
+ {
+ private readonly string _value;
+
+ /// Initializes a new instance of .
+ /// is null.
+ public CodeExecutionStatus(string value)
+ {
+ _value = value ?? throw new ArgumentNullException(nameof(value));
+ }
+
+ private const string SuccessValue = "Success";
+ private const string FailureValue = "Failure";
+
+ /// The code execution succeeded.
+ public static CodeExecutionStatus Success { get; } = new CodeExecutionStatus(SuccessValue);
+ /// The code execution failed.
+ public static CodeExecutionStatus Failure { get; } = new CodeExecutionStatus(FailureValue);
+ /// Determines if two values are the same.
+ public static bool operator ==(CodeExecutionStatus left, CodeExecutionStatus right) => left.Equals(right);
+ /// Determines if two values are not the same.
+ public static bool operator !=(CodeExecutionStatus left, CodeExecutionStatus right) => !left.Equals(right);
+ /// Converts a string to a .
+ public static implicit operator CodeExecutionStatus(string value) => new CodeExecutionStatus(value);
+
+ ///
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public override bool Equals(object obj) => obj is CodeExecutionStatus other && Equals(other);
+ ///
+ public bool Equals(CodeExecutionStatus other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase);
+
+ ///
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0;
+ ///
+ public override string ToString() => _value;
+ }
+}
diff --git a/sdk/microsoft.app/Microsoft.App/src/Generated/CodeInputType.cs b/sdk/microsoft.app/Microsoft.App/src/Generated/CodeInputType.cs
new file mode 100644
index 000000000000..61707294e064
--- /dev/null
+++ b/sdk/microsoft.app/Microsoft.App/src/Generated/CodeInputType.cs
@@ -0,0 +1,54 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.ComponentModel;
+
+namespace Microsoft.App
+{
+ /// Code input type.
+ public readonly partial struct CodeInputType : IEquatable
+ {
+ private readonly string _value;
+
+ /// Initializes a new instance of .
+ /// is null.
+ public CodeInputType(string value)
+ {
+ _value = value ?? throw new ArgumentNullException(nameof(value));
+ }
+
+ private const string InlineValue = "Inline";
+ private const string InlineBase64Value = "InlineBase64";
+ private const string InlineTextValue = "InlineText";
+
+ /// Inline.
+ public static CodeInputType Inline { get; } = new CodeInputType(InlineValue);
+ /// InlineBase64.
+ public static CodeInputType InlineBase64 { get; } = new CodeInputType(InlineBase64Value);
+ /// InlineText.
+ public static CodeInputType InlineText { get; } = new CodeInputType(InlineTextValue);
+ /// Determines if two values are the same.
+ public static bool operator ==(CodeInputType left, CodeInputType right) => left.Equals(right);
+ /// Determines if two values are not the same.
+ public static bool operator !=(CodeInputType left, CodeInputType right) => !left.Equals(right);
+ /// Converts a string to a .
+ public static implicit operator CodeInputType(string value) => new CodeInputType(value);
+
+ ///
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public override bool Equals(object obj) => obj is CodeInputType other && Equals(other);
+ ///
+ public bool Equals(CodeInputType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase);
+
+ ///
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0;
+ ///
+ public override string ToString() => _value;
+ }
+}
diff --git a/sdk/microsoft.app/Microsoft.App/src/Generated/Docs/AppClient.xml b/sdk/microsoft.app/Microsoft.App/src/Generated/Docs/AppClient.xml
new file mode 100644
index 000000000000..86e4a942e8f3
--- /dev/null
+++ b/sdk/microsoft.app/Microsoft.App/src/Generated/Docs/AppClient.xml
@@ -0,0 +1,333 @@
+
+
+
+
+
+This sample shows how to call ExecuteCodeAsync.
+");
+TokenCredential credential = new DefaultAzureCredential();
+AppClient client = new AppClient(endpoint, credential);
+
+SessionCodeExecutionRequest codeExecutionRequest = new SessionCodeExecutionRequest(
+CodeInputType.Inline,
+ExecutionType.Synchronous,
+NetworkStatus.EgressEnabled,
+MultiArrayStatus.MultiArrayEnabled,
+"",
+1234L);
+Response response = await client.ExecuteCodeAsync("", codeExecutionRequest);
+]]>
+This sample shows how to call ExecuteCodeAsync with all parameters.
+");
+TokenCredential credential = new DefaultAzureCredential();
+AppClient client = new AppClient(endpoint, credential);
+
+SessionCodeExecutionRequest codeExecutionRequest = new SessionCodeExecutionRequest(
+CodeInputType.Inline,
+ExecutionType.Synchronous,
+NetworkStatus.EgressEnabled,
+MultiArrayStatus.MultiArrayEnabled,
+"",
+1234L);
+Response response = await client.ExecuteCodeAsync("", codeExecutionRequest);
+]]>
+
+
+
+This sample shows how to call ExecuteCode.
+");
+TokenCredential credential = new DefaultAzureCredential();
+AppClient client = new AppClient(endpoint, credential);
+
+SessionCodeExecutionRequest codeExecutionRequest = new SessionCodeExecutionRequest(
+CodeInputType.Inline,
+ExecutionType.Synchronous,
+NetworkStatus.EgressEnabled,
+MultiArrayStatus.MultiArrayEnabled,
+"",
+1234L);
+Response response = client.ExecuteCode("", codeExecutionRequest);
+]]>
+This sample shows how to call ExecuteCode with all parameters.
+");
+TokenCredential credential = new DefaultAzureCredential();
+AppClient client = new AppClient(endpoint, credential);
+
+SessionCodeExecutionRequest codeExecutionRequest = new SessionCodeExecutionRequest(
+CodeInputType.Inline,
+ExecutionType.Synchronous,
+NetworkStatus.EgressEnabled,
+MultiArrayStatus.MultiArrayEnabled,
+"",
+1234L);
+Response response = client.ExecuteCode("", codeExecutionRequest);
+]]>
+
+
+
+This sample shows how to call ExecuteCodeAsync and parse the result.
+");
+TokenCredential credential = new DefaultAzureCredential();
+AppClient client = new AppClient(endpoint, credential);
+
+using RequestContent content = RequestContent.Create(new
+{
+ codeInputType = "Inline",
+ executionType = "Synchronous",
+ networkStatus = "EgressEnabled",
+ multiArrayStatus = "MultiArrayEnabled",
+ code = "",
+ timeoutInSeconds = 1234L,
+});
+Response response = await client.ExecuteCodeAsync("", content);
+
+JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
+Console.WriteLine(result.GetProperty("codeInputType").ToString());
+Console.WriteLine(result.GetProperty("executionType").ToString());
+Console.WriteLine(result.GetProperty("networkStatus").ToString());
+Console.WriteLine(result.GetProperty("multiArrayStatus").ToString());
+Console.WriteLine(result.GetProperty("code").ToString());
+Console.WriteLine(result.GetProperty("timeoutInSeconds").ToString());
+Console.WriteLine(result.GetProperty("id").ToString());
+Console.WriteLine(result.GetProperty("status").ToString());
+Console.WriteLine(result.GetProperty("stdout").ToString());
+Console.WriteLine(result.GetProperty("stderr").ToString());
+Console.WriteLine(result.GetProperty("result").ToString());
+Console.WriteLine(result.GetProperty("executionTimeInMilliseconds").ToString());
+]]>
+This sample shows how to call ExecuteCodeAsync with all parameters and request content and parse the result.
+");
+TokenCredential credential = new DefaultAzureCredential();
+AppClient client = new AppClient(endpoint, credential);
+
+using RequestContent content = RequestContent.Create(new
+{
+ codeInputType = "Inline",
+ executionType = "Synchronous",
+ networkStatus = "EgressEnabled",
+ multiArrayStatus = "MultiArrayEnabled",
+ code = "",
+ timeoutInSeconds = 1234L,
+});
+Response response = await client.ExecuteCodeAsync("", content);
+
+JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
+Console.WriteLine(result.GetProperty("codeInputType").ToString());
+Console.WriteLine(result.GetProperty("executionType").ToString());
+Console.WriteLine(result.GetProperty("networkStatus").ToString());
+Console.WriteLine(result.GetProperty("multiArrayStatus").ToString());
+Console.WriteLine(result.GetProperty("code").ToString());
+Console.WriteLine(result.GetProperty("timeoutInSeconds").ToString());
+Console.WriteLine(result.GetProperty("id").ToString());
+Console.WriteLine(result.GetProperty("status").ToString());
+Console.WriteLine(result.GetProperty("stdout").ToString());
+Console.WriteLine(result.GetProperty("stderr").ToString());
+Console.WriteLine(result.GetProperty("result").ToString());
+Console.WriteLine(result.GetProperty("executionTimeInMilliseconds").ToString());
+]]>
+
+
+
+This sample shows how to call ExecuteCode and parse the result.
+");
+TokenCredential credential = new DefaultAzureCredential();
+AppClient client = new AppClient(endpoint, credential);
+
+using RequestContent content = RequestContent.Create(new
+{
+ codeInputType = "Inline",
+ executionType = "Synchronous",
+ networkStatus = "EgressEnabled",
+ multiArrayStatus = "MultiArrayEnabled",
+ code = "",
+ timeoutInSeconds = 1234L,
+});
+Response response = client.ExecuteCode("", content);
+
+JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
+Console.WriteLine(result.GetProperty("codeInputType").ToString());
+Console.WriteLine(result.GetProperty("executionType").ToString());
+Console.WriteLine(result.GetProperty("networkStatus").ToString());
+Console.WriteLine(result.GetProperty("multiArrayStatus").ToString());
+Console.WriteLine(result.GetProperty("code").ToString());
+Console.WriteLine(result.GetProperty("timeoutInSeconds").ToString());
+Console.WriteLine(result.GetProperty("id").ToString());
+Console.WriteLine(result.GetProperty("status").ToString());
+Console.WriteLine(result.GetProperty("stdout").ToString());
+Console.WriteLine(result.GetProperty("stderr").ToString());
+Console.WriteLine(result.GetProperty("result").ToString());
+Console.WriteLine(result.GetProperty("executionTimeInMilliseconds").ToString());
+]]>
+This sample shows how to call ExecuteCode with all parameters and request content and parse the result.
+");
+TokenCredential credential = new DefaultAzureCredential();
+AppClient client = new AppClient(endpoint, credential);
+
+using RequestContent content = RequestContent.Create(new
+{
+ codeInputType = "Inline",
+ executionType = "Synchronous",
+ networkStatus = "EgressEnabled",
+ multiArrayStatus = "MultiArrayEnabled",
+ code = "",
+ timeoutInSeconds = 1234L,
+});
+Response response = client.ExecuteCode("", content);
+
+JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
+Console.WriteLine(result.GetProperty("codeInputType").ToString());
+Console.WriteLine(result.GetProperty("executionType").ToString());
+Console.WriteLine(result.GetProperty("networkStatus").ToString());
+Console.WriteLine(result.GetProperty("multiArrayStatus").ToString());
+Console.WriteLine(result.GetProperty("code").ToString());
+Console.WriteLine(result.GetProperty("timeoutInSeconds").ToString());
+Console.WriteLine(result.GetProperty("id").ToString());
+Console.WriteLine(result.GetProperty("status").ToString());
+Console.WriteLine(result.GetProperty("stdout").ToString());
+Console.WriteLine(result.GetProperty("stderr").ToString());
+Console.WriteLine(result.GetProperty("result").ToString());
+Console.WriteLine(result.GetProperty("executionTimeInMilliseconds").ToString());
+]]>
+
+
+
+This sample shows how to call GetCodeExecutionResultAsync.
+");
+TokenCredential credential = new DefaultAzureCredential();
+AppClient client = new AppClient(endpoint, credential);
+
+Response response = await client.GetCodeExecutionResultAsync("", "");
+]]>
+This sample shows how to call GetCodeExecutionResultAsync with all parameters.
+");
+TokenCredential credential = new DefaultAzureCredential();
+AppClient client = new AppClient(endpoint, credential);
+
+Response response = await client.GetCodeExecutionResultAsync("", "");
+]]>
+
+
+
+This sample shows how to call GetCodeExecutionResult.
+");
+TokenCredential credential = new DefaultAzureCredential();
+AppClient client = new AppClient(endpoint, credential);
+
+Response response = client.GetCodeExecutionResult("", "");
+]]>
+This sample shows how to call GetCodeExecutionResult with all parameters.
+");
+TokenCredential credential = new DefaultAzureCredential();
+AppClient client = new AppClient(endpoint, credential);
+
+Response response = client.GetCodeExecutionResult("", "");
+]]>
+
+
+
+This sample shows how to call GetCodeExecutionResultAsync and parse the result.
+");
+TokenCredential credential = new DefaultAzureCredential();
+AppClient client = new AppClient(endpoint, credential);
+
+Response response = await client.GetCodeExecutionResultAsync("", "", null);
+
+JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
+Console.WriteLine(result.GetProperty("codeInputType").ToString());
+Console.WriteLine(result.GetProperty("executionType").ToString());
+Console.WriteLine(result.GetProperty("networkStatus").ToString());
+Console.WriteLine(result.GetProperty("multiArrayStatus").ToString());
+Console.WriteLine(result.GetProperty("code").ToString());
+Console.WriteLine(result.GetProperty("timeoutInSeconds").ToString());
+Console.WriteLine(result.GetProperty("id").ToString());
+Console.WriteLine(result.GetProperty("status").ToString());
+Console.WriteLine(result.GetProperty("stdout").ToString());
+Console.WriteLine(result.GetProperty("stderr").ToString());
+Console.WriteLine(result.GetProperty("result").ToString());
+Console.WriteLine(result.GetProperty("executionTimeInMilliseconds").ToString());
+]]>
+This sample shows how to call GetCodeExecutionResultAsync with all parameters and parse the result.
+");
+TokenCredential credential = new DefaultAzureCredential();
+AppClient client = new AppClient(endpoint, credential);
+
+Response response = await client.GetCodeExecutionResultAsync("", "", null);
+
+JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
+Console.WriteLine(result.GetProperty("codeInputType").ToString());
+Console.WriteLine(result.GetProperty("executionType").ToString());
+Console.WriteLine(result.GetProperty("networkStatus").ToString());
+Console.WriteLine(result.GetProperty("multiArrayStatus").ToString());
+Console.WriteLine(result.GetProperty("code").ToString());
+Console.WriteLine(result.GetProperty("timeoutInSeconds").ToString());
+Console.WriteLine(result.GetProperty("id").ToString());
+Console.WriteLine(result.GetProperty("status").ToString());
+Console.WriteLine(result.GetProperty("stdout").ToString());
+Console.WriteLine(result.GetProperty("stderr").ToString());
+Console.WriteLine(result.GetProperty("result").ToString());
+Console.WriteLine(result.GetProperty("executionTimeInMilliseconds").ToString());
+]]>
+
+
+
+This sample shows how to call GetCodeExecutionResult and parse the result.
+");
+TokenCredential credential = new DefaultAzureCredential();
+AppClient client = new AppClient(endpoint, credential);
+
+Response response = client.GetCodeExecutionResult("", "", null);
+
+JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
+Console.WriteLine(result.GetProperty("codeInputType").ToString());
+Console.WriteLine(result.GetProperty("executionType").ToString());
+Console.WriteLine(result.GetProperty("networkStatus").ToString());
+Console.WriteLine(result.GetProperty("multiArrayStatus").ToString());
+Console.WriteLine(result.GetProperty("code").ToString());
+Console.WriteLine(result.GetProperty("timeoutInSeconds").ToString());
+Console.WriteLine(result.GetProperty("id").ToString());
+Console.WriteLine(result.GetProperty("status").ToString());
+Console.WriteLine(result.GetProperty("stdout").ToString());
+Console.WriteLine(result.GetProperty("stderr").ToString());
+Console.WriteLine(result.GetProperty("result").ToString());
+Console.WriteLine(result.GetProperty("executionTimeInMilliseconds").ToString());
+]]>
+This sample shows how to call GetCodeExecutionResult with all parameters and parse the result.
+");
+TokenCredential credential = new DefaultAzureCredential();
+AppClient client = new AppClient(endpoint, credential);
+
+Response response = client.GetCodeExecutionResult("", "", null);
+
+JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
+Console.WriteLine(result.GetProperty("codeInputType").ToString());
+Console.WriteLine(result.GetProperty("executionType").ToString());
+Console.WriteLine(result.GetProperty("networkStatus").ToString());
+Console.WriteLine(result.GetProperty("multiArrayStatus").ToString());
+Console.WriteLine(result.GetProperty("code").ToString());
+Console.WriteLine(result.GetProperty("timeoutInSeconds").ToString());
+Console.WriteLine(result.GetProperty("id").ToString());
+Console.WriteLine(result.GetProperty("status").ToString());
+Console.WriteLine(result.GetProperty("stdout").ToString());
+Console.WriteLine(result.GetProperty("stderr").ToString());
+Console.WriteLine(result.GetProperty("result").ToString());
+Console.WriteLine(result.GetProperty("executionTimeInMilliseconds").ToString());
+]]>
+
+
+
\ No newline at end of file
diff --git a/sdk/microsoft.app/Microsoft.App/src/Generated/Docs/SessionResourceFiles.xml b/sdk/microsoft.app/Microsoft.App/src/Generated/Docs/SessionResourceFiles.xml
new file mode 100644
index 000000000000..689f0e2acc70
--- /dev/null
+++ b/sdk/microsoft.app/Microsoft.App/src/Generated/Docs/SessionResourceFiles.xml
@@ -0,0 +1,467 @@
+
+
+
+
+
+This sample shows how to call GetFileMetadataAsync.
+");
+TokenCredential credential = new DefaultAzureCredential();
+SessionResourceFiles client = new AppClient(endpoint, credential).GetSessionResourceFilesClient();
+
+Response response = await client.GetFileMetadataAsync("", "");
+]]>
+This sample shows how to call GetFileMetadataAsync with all parameters.
+");
+TokenCredential credential = new DefaultAzureCredential();
+SessionResourceFiles client = new AppClient(endpoint, credential).GetSessionResourceFilesClient();
+
+Response response = await client.GetFileMetadataAsync("", "");
+]]>
+
+
+
+This sample shows how to call GetFileMetadata.
+");
+TokenCredential credential = new DefaultAzureCredential();
+SessionResourceFiles client = new AppClient(endpoint, credential).GetSessionResourceFilesClient();
+
+Response response = client.GetFileMetadata("", "");
+]]>
+This sample shows how to call GetFileMetadata with all parameters.
+");
+TokenCredential credential = new DefaultAzureCredential();
+SessionResourceFiles client = new AppClient(endpoint, credential).GetSessionResourceFilesClient();
+
+Response response = client.GetFileMetadata("", "");
+]]>
+
+
+
+This sample shows how to call GetFileMetadataAsync and parse the result.
+");
+TokenCredential credential = new DefaultAzureCredential();
+SessionResourceFiles client = new AppClient(endpoint, credential).GetSessionResourceFilesClient();
+
+Response response = await client.GetFileMetadataAsync("", "", null);
+
+JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
+Console.WriteLine(result.GetProperty("fileName").ToString());
+Console.WriteLine(result.GetProperty("sizeInBytes").ToString());
+Console.WriteLine(result.GetProperty("createdAt").ToString());
+Console.WriteLine(result.GetProperty("lastModifiedAt").ToString());
+]]>
+This sample shows how to call GetFileMetadataAsync with all parameters and parse the result.
+");
+TokenCredential credential = new DefaultAzureCredential();
+SessionResourceFiles client = new AppClient(endpoint, credential).GetSessionResourceFilesClient();
+
+Response response = await client.GetFileMetadataAsync("", "", null);
+
+JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
+Console.WriteLine(result.GetProperty("fileName").ToString());
+Console.WriteLine(result.GetProperty("sizeInBytes").ToString());
+Console.WriteLine(result.GetProperty("createdAt").ToString());
+Console.WriteLine(result.GetProperty("lastModifiedAt").ToString());
+]]>
+
+
+
+This sample shows how to call GetFileMetadata and parse the result.
+");
+TokenCredential credential = new DefaultAzureCredential();
+SessionResourceFiles client = new AppClient(endpoint, credential).GetSessionResourceFilesClient();
+
+Response response = client.GetFileMetadata("", "", null);
+
+JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
+Console.WriteLine(result.GetProperty("fileName").ToString());
+Console.WriteLine(result.GetProperty("sizeInBytes").ToString());
+Console.WriteLine(result.GetProperty("createdAt").ToString());
+Console.WriteLine(result.GetProperty("lastModifiedAt").ToString());
+]]>
+This sample shows how to call GetFileMetadata with all parameters and parse the result.
+");
+TokenCredential credential = new DefaultAzureCredential();
+SessionResourceFiles client = new AppClient(endpoint, credential).GetSessionResourceFilesClient();
+
+Response response = client.GetFileMetadata("", "", null);
+
+JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
+Console.WriteLine(result.GetProperty("fileName").ToString());
+Console.WriteLine(result.GetProperty("sizeInBytes").ToString());
+Console.WriteLine(result.GetProperty("createdAt").ToString());
+Console.WriteLine(result.GetProperty("lastModifiedAt").ToString());
+]]>
+
+
+
+This sample shows how to call DeleteFileAsync.
+");
+TokenCredential credential = new DefaultAzureCredential();
+SessionResourceFiles client = new AppClient(endpoint, credential).GetSessionResourceFilesClient();
+
+Response response = await client.DeleteFileAsync("", "");
+
+Console.WriteLine(response.Status);
+]]>
+This sample shows how to call DeleteFileAsync with all parameters.
+");
+TokenCredential credential = new DefaultAzureCredential();
+SessionResourceFiles client = new AppClient(endpoint, credential).GetSessionResourceFilesClient();
+
+Response response = await client.DeleteFileAsync("", "");
+
+Console.WriteLine(response.Status);
+]]>
+
+
+
+This sample shows how to call DeleteFile.
+");
+TokenCredential credential = new DefaultAzureCredential();
+SessionResourceFiles client = new AppClient(endpoint, credential).GetSessionResourceFilesClient();
+
+Response response = client.DeleteFile("", "");
+
+Console.WriteLine(response.Status);
+]]>
+This sample shows how to call DeleteFile with all parameters.
+");
+TokenCredential credential = new DefaultAzureCredential();
+SessionResourceFiles client = new AppClient(endpoint, credential).GetSessionResourceFilesClient();
+
+Response response = client.DeleteFile("", "");
+
+Console.WriteLine(response.Status);
+]]>
+
+
+
+This sample shows how to call DownloadFileAsync.
+");
+TokenCredential credential = new DefaultAzureCredential();
+SessionResourceFiles client = new AppClient(endpoint, credential).GetSessionResourceFilesClient();
+
+Response response = await client.DownloadFileAsync("", "");
+]]>
+This sample shows how to call DownloadFileAsync with all parameters.
+");
+TokenCredential credential = new DefaultAzureCredential();
+SessionResourceFiles client = new AppClient(endpoint, credential).GetSessionResourceFilesClient();
+
+Response response = await client.DownloadFileAsync("", "");
+]]>
+
+
+
+This sample shows how to call DownloadFile.
+");
+TokenCredential credential = new DefaultAzureCredential();
+SessionResourceFiles client = new AppClient(endpoint, credential).GetSessionResourceFilesClient();
+
+Response response = client.DownloadFile("", "");
+]]>
+This sample shows how to call DownloadFile with all parameters.
+");
+TokenCredential credential = new DefaultAzureCredential();
+SessionResourceFiles client = new AppClient(endpoint, credential).GetSessionResourceFilesClient();
+
+Response response = client.DownloadFile("", "");
+]]>
+
+
+
+This sample shows how to call DownloadFileAsync and parse the result.
+");
+TokenCredential credential = new DefaultAzureCredential();
+SessionResourceFiles client = new AppClient(endpoint, credential).GetSessionResourceFilesClient();
+
+Response response = await client.DownloadFileAsync("", "", null);
+
+JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
+Console.WriteLine(result.ToString());
+]]>
+This sample shows how to call DownloadFileAsync with all parameters and parse the result.
+");
+TokenCredential credential = new DefaultAzureCredential();
+SessionResourceFiles client = new AppClient(endpoint, credential).GetSessionResourceFilesClient();
+
+Response response = await client.DownloadFileAsync("", "", null);
+
+JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
+Console.WriteLine(result.ToString());
+]]>
+
+
+
+This sample shows how to call DownloadFile and parse the result.
+");
+TokenCredential credential = new DefaultAzureCredential();
+SessionResourceFiles client = new AppClient(endpoint, credential).GetSessionResourceFilesClient();
+
+Response response = client.DownloadFile("", "", null);
+
+JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
+Console.WriteLine(result.ToString());
+]]>
+This sample shows how to call DownloadFile with all parameters and parse the result.
+");
+TokenCredential credential = new DefaultAzureCredential();
+SessionResourceFiles client = new AppClient(endpoint, credential).GetSessionResourceFilesClient();
+
+Response response = client.DownloadFile("", "", null);
+
+JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
+Console.WriteLine(result.ToString());
+]]>
+
+
+
+This sample shows how to call UploadFileAsync.
+");
+TokenCredential credential = new DefaultAzureCredential();
+SessionResourceFiles client = new AppClient(endpoint, credential).GetSessionResourceFilesClient();
+
+Response response = await client.UploadFileAsync("", "", null);
+]]>
+This sample shows how to call UploadFileAsync with all parameters.
+");
+TokenCredential credential = new DefaultAzureCredential();
+SessionResourceFiles client = new AppClient(endpoint, credential).GetSessionResourceFilesClient();
+
+Response response = await client.UploadFileAsync("", "", null);
+]]>
+
+
+
+This sample shows how to call UploadFile.
+");
+TokenCredential credential = new DefaultAzureCredential();
+SessionResourceFiles client = new AppClient(endpoint, credential).GetSessionResourceFilesClient();
+
+Response response = client.UploadFile("", "", null);
+]]>
+This sample shows how to call UploadFile with all parameters.
+");
+TokenCredential credential = new DefaultAzureCredential();
+SessionResourceFiles client = new AppClient(endpoint, credential).GetSessionResourceFilesClient();
+
+Response response = client.UploadFile("", "", null);
+]]>
+
+
+
+This sample shows how to call UploadFileAsync and parse the result.
+");
+TokenCredential credential = new DefaultAzureCredential();
+SessionResourceFiles client = new AppClient(endpoint, credential).GetSessionResourceFilesClient();
+
+using RequestContent content = RequestContent.Create(new
+{
+ file = File.OpenRead(""),
+});
+Response response = await client.UploadFileAsync("", "", content, "multipart/form-data");
+
+JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
+Console.WriteLine(result.GetProperty("fileName").ToString());
+Console.WriteLine(result.GetProperty("sizeInBytes").ToString());
+Console.WriteLine(result.GetProperty("createdAt").ToString());
+Console.WriteLine(result.GetProperty("lastModifiedAt").ToString());
+]]>
+This sample shows how to call UploadFileAsync with all parameters and request content and parse the result.
+");
+TokenCredential credential = new DefaultAzureCredential();
+SessionResourceFiles client = new AppClient(endpoint, credential).GetSessionResourceFilesClient();
+
+using RequestContent content = RequestContent.Create(new
+{
+ file = File.OpenRead(""),
+});
+Response response = await client.UploadFileAsync("", "", content, "multipart/form-data");
+
+JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
+Console.WriteLine(result.GetProperty("fileName").ToString());
+Console.WriteLine(result.GetProperty("sizeInBytes").ToString());
+Console.WriteLine(result.GetProperty("createdAt").ToString());
+Console.WriteLine(result.GetProperty("lastModifiedAt").ToString());
+]]>
+
+
+
+This sample shows how to call UploadFile and parse the result.
+");
+TokenCredential credential = new DefaultAzureCredential();
+SessionResourceFiles client = new AppClient(endpoint, credential).GetSessionResourceFilesClient();
+
+using RequestContent content = RequestContent.Create(new
+{
+ file = File.OpenRead(""),
+});
+Response response = client.UploadFile("", "", content, "multipart/form-data");
+
+JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
+Console.WriteLine(result.GetProperty("fileName").ToString());
+Console.WriteLine(result.GetProperty("sizeInBytes").ToString());
+Console.WriteLine(result.GetProperty("createdAt").ToString());
+Console.WriteLine(result.GetProperty("lastModifiedAt").ToString());
+]]>
+This sample shows how to call UploadFile with all parameters and request content and parse the result.
+");
+TokenCredential credential = new DefaultAzureCredential();
+SessionResourceFiles client = new AppClient(endpoint, credential).GetSessionResourceFilesClient();
+
+using RequestContent content = RequestContent.Create(new
+{
+ file = File.OpenRead(""),
+});
+Response response = client.UploadFile("", "", content, "multipart/form-data");
+
+JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
+Console.WriteLine(result.GetProperty("fileName").ToString());
+Console.WriteLine(result.GetProperty("sizeInBytes").ToString());
+Console.WriteLine(result.GetProperty("createdAt").ToString());
+Console.WriteLine(result.GetProperty("lastModifiedAt").ToString());
+]]>
+
+
+
+This sample shows how to call GetAllFilesMetadataAsync.
+");
+TokenCredential credential = new DefaultAzureCredential();
+SessionResourceFiles client = new AppClient(endpoint, credential).GetSessionResourceFilesClient();
+
+await foreach (SessionResourceFile item in client.GetAllFilesMetadataAsync(""))
+{
+}
+]]>
+This sample shows how to call GetAllFilesMetadataAsync with all parameters.
+");
+TokenCredential credential = new DefaultAzureCredential();
+SessionResourceFiles client = new AppClient(endpoint, credential).GetSessionResourceFilesClient();
+
+await foreach (SessionResourceFile item in client.GetAllFilesMetadataAsync(""))
+{
+}
+]]>
+
+
+
+This sample shows how to call GetAllFilesMetadata.
+");
+TokenCredential credential = new DefaultAzureCredential();
+SessionResourceFiles client = new AppClient(endpoint, credential).GetSessionResourceFilesClient();
+
+foreach (SessionResourceFile item in client.GetAllFilesMetadata(""))
+{
+}
+]]>
+This sample shows how to call GetAllFilesMetadata with all parameters.
+");
+TokenCredential credential = new DefaultAzureCredential();
+SessionResourceFiles client = new AppClient(endpoint, credential).GetSessionResourceFilesClient();
+
+foreach (SessionResourceFile item in client.GetAllFilesMetadata(""))
+{
+}
+]]>
+
+
+
+This sample shows how to call GetAllFilesMetadataAsync and parse the result.
+");
+TokenCredential credential = new DefaultAzureCredential();
+SessionResourceFiles client = new AppClient(endpoint, credential).GetSessionResourceFilesClient();
+
+await foreach (BinaryData item in client.GetAllFilesMetadataAsync("", null))
+{
+ JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement;
+ Console.WriteLine(result.GetProperty("fileName").ToString());
+ Console.WriteLine(result.GetProperty("sizeInBytes").ToString());
+ Console.WriteLine(result.GetProperty("createdAt").ToString());
+ Console.WriteLine(result.GetProperty("lastModifiedAt").ToString());
+}
+]]>
+This sample shows how to call GetAllFilesMetadataAsync with all parameters and parse the result.
+");
+TokenCredential credential = new DefaultAzureCredential();
+SessionResourceFiles client = new AppClient(endpoint, credential).GetSessionResourceFilesClient();
+
+await foreach (BinaryData item in client.GetAllFilesMetadataAsync("", null))
+{
+ JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement;
+ Console.WriteLine(result.GetProperty("fileName").ToString());
+ Console.WriteLine(result.GetProperty("sizeInBytes").ToString());
+ Console.WriteLine(result.GetProperty("createdAt").ToString());
+ Console.WriteLine(result.GetProperty("lastModifiedAt").ToString());
+}
+]]>
+
+
+
+This sample shows how to call GetAllFilesMetadata and parse the result.
+");
+TokenCredential credential = new DefaultAzureCredential();
+SessionResourceFiles client = new AppClient(endpoint, credential).GetSessionResourceFilesClient();
+
+foreach (BinaryData item in client.GetAllFilesMetadata("", null))
+{
+ JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement;
+ Console.WriteLine(result.GetProperty("fileName").ToString());
+ Console.WriteLine(result.GetProperty("sizeInBytes").ToString());
+ Console.WriteLine(result.GetProperty("createdAt").ToString());
+ Console.WriteLine(result.GetProperty("lastModifiedAt").ToString());
+}
+]]>
+This sample shows how to call GetAllFilesMetadata with all parameters and parse the result.
+");
+TokenCredential credential = new DefaultAzureCredential();
+SessionResourceFiles client = new AppClient(endpoint, credential).GetSessionResourceFilesClient();
+
+foreach (BinaryData item in client.GetAllFilesMetadata("", null))
+{
+ JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement;
+ Console.WriteLine(result.GetProperty("fileName").ToString());
+ Console.WriteLine(result.GetProperty("sizeInBytes").ToString());
+ Console.WriteLine(result.GetProperty("createdAt").ToString());
+ Console.WriteLine(result.GetProperty("lastModifiedAt").ToString());
+}
+]]>
+
+
+
\ No newline at end of file
diff --git a/sdk/microsoft.app/Microsoft.App/src/Generated/ExecutionType.cs b/sdk/microsoft.app/Microsoft.App/src/Generated/ExecutionType.cs
new file mode 100644
index 000000000000..64a3892da907
--- /dev/null
+++ b/sdk/microsoft.app/Microsoft.App/src/Generated/ExecutionType.cs
@@ -0,0 +1,51 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.ComponentModel;
+
+namespace Microsoft.App
+{
+ /// Execution Type.
+ public readonly partial struct ExecutionType : IEquatable
+ {
+ private readonly string _value;
+
+ /// Initializes a new instance of .
+ /// is null.
+ public ExecutionType(string value)
+ {
+ _value = value ?? throw new ArgumentNullException(nameof(value));
+ }
+
+ private const string SynchronousValue = "Synchronous";
+ private const string AsynchronousValue = "Asynchronous";
+
+ /// Synchronous.
+ public static ExecutionType Synchronous { get; } = new ExecutionType(SynchronousValue);
+ /// Asynchronous.
+ public static ExecutionType Asynchronous { get; } = new ExecutionType(AsynchronousValue);
+ /// Determines if two values are the same.
+ public static bool operator ==(ExecutionType left, ExecutionType right) => left.Equals(right);
+ /// Determines if two values are not the same.
+ public static bool operator !=(ExecutionType left, ExecutionType right) => !left.Equals(right);
+ /// Converts a string to a .
+ public static implicit operator ExecutionType(string value) => new ExecutionType(value);
+
+ ///
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public override bool Equals(object obj) => obj is ExecutionType other && Equals(other);
+ ///
+ public bool Equals(ExecutionType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase);
+
+ ///
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0;
+ ///
+ public override string ToString() => _value;
+ }
+}
diff --git a/sdk/microsoft.app/Microsoft.App/src/Generated/Internal/Argument.cs b/sdk/microsoft.app/Microsoft.App/src/Generated/Internal/Argument.cs
new file mode 100644
index 000000000000..cd32373dd5c0
--- /dev/null
+++ b/sdk/microsoft.app/Microsoft.App/src/Generated/Internal/Argument.cs
@@ -0,0 +1,129 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Collections;
+using System.Collections.Generic;
+
+namespace Microsoft.App
+{
+ 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/microsoft.app/Microsoft.App/src/Generated/Internal/ModelSerializationExtensions.cs b/sdk/microsoft.app/Microsoft.App/src/Generated/Internal/ModelSerializationExtensions.cs
new file mode 100644
index 000000000000..d1d64bca7cd8
--- /dev/null
+++ b/sdk/microsoft.app/Microsoft.App/src/Generated/Internal/ModelSerializationExtensions.cs
@@ -0,0 +1,398 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.ClientModel.Primitives;
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.Globalization;
+using System.Text.Json;
+using System.Xml;
+using Azure.Core;
+
+namespace Microsoft.App
+{
+ internal static class ModelSerializationExtensions
+ {
+ internal static readonly ModelReaderWriterOptions WireOptions = new ModelReaderWriterOptions("W");
+
+ public static object GetObject(this JsonElement element)
+ {
+ switch (element.ValueKind)
+ {
+ case JsonValueKind.String:
+ return element.GetString();
+ case JsonValueKind.Number:
+ if (element.TryGetInt32(out int intValue))
+ {
+ return intValue;
+ }
+ if (element.TryGetInt64(out long longValue))
+ {
+ return longValue;
+ }
+ return element.GetDouble();
+ case JsonValueKind.True:
+ return true;
+ case JsonValueKind.False:
+ return false;
+ case JsonValueKind.Undefined:
+ case JsonValueKind.Null:
+ return null;
+ case JsonValueKind.Object:
+ var dictionary = new Dictionary();
+ foreach (var jsonProperty in element.EnumerateObject())
+ {
+ dictionary.Add(jsonProperty.Name, jsonProperty.Value.GetObject());
+ }
+ return dictionary;
+ case JsonValueKind.Array:
+ var list = new List