forked from Azure/azure-sdk-for-net
-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CodeGen from PR 30424 in Azure/azure-rest-api-specs
Merge 3b3936931e04ec5879b34e19c961bbc064dc0c9b into c4f4021bea5eee306fa202df3c7e19271a9f1f96
- Loading branch information
SDKAuto
committed
Oct 8, 2024
1 parent
0598a8e
commit ef47274
Showing
35 changed files
with
4,769 additions
and
0 deletions.
There are no files selected for viewing
50 changes: 50 additions & 0 deletions
50
sdk/microsoft.app/Microsoft.App.DynamicSessions/Microsoft.App.DynamicSessions.sln
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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.DynamicSessions", "src\Microsoft.App.DynamicSessions.csproj", "{28FF4005-4467-4E36-92E7-DEA27DEB1519}" | ||
EndProject | ||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.App.DynamicSessions.Tests", "tests\Microsoft.App.DynamicSessions.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 |
346 changes: 346 additions & 0 deletions
346
sdk/microsoft.app/Microsoft.App.DynamicSessions/src/Generated/CodeExecution.cs
Large diffs are not rendered by default.
Oops, something went wrong.
54 changes: 54 additions & 0 deletions
54
sdk/microsoft.app/Microsoft.App.DynamicSessions/src/Generated/CodeInputType.cs
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
125 changes: 125 additions & 0 deletions
125
sdk/microsoft.app/Microsoft.App.DynamicSessions/src/Generated/Docs/CodeExecution.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,125 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<doc> | ||
<members> | ||
<member name="GetResultAsync(string,string,CancellationToken)"> | ||
<example> | ||
This sample shows how to call GetResultAsync. | ||
<code><![CDATA[ | ||
Uri endpoint = new Uri("<endpoint>"); | ||
TokenCredential credential = new DefaultAzureCredential(); | ||
CodeExecution client = new DynamicSessionsClient(endpoint, credential).GetCodeExecutionClient(apiVersion: "2024-10-02-preview"); | ||
Response<SessionCodeExecutionResponse> response = await client.GetResultAsync("testexecutionid", "testidentidier"); | ||
]]></code></example> | ||
</member> | ||
<member name="GetResult(string,string,CancellationToken)"> | ||
<example> | ||
This sample shows how to call GetResult. | ||
<code><![CDATA[ | ||
Uri endpoint = new Uri("<endpoint>"); | ||
TokenCredential credential = new DefaultAzureCredential(); | ||
CodeExecution client = new DynamicSessionsClient(endpoint, credential).GetCodeExecutionClient(apiVersion: "2024-10-02-preview"); | ||
Response<SessionCodeExecutionResponse> response = client.GetResult("testexecutionid", "testidentidier"); | ||
]]></code></example> | ||
</member> | ||
<member name="GetResultAsync(string,string,RequestContext)"> | ||
<example> | ||
This sample shows how to call GetResultAsync and parse the result. | ||
<code><![CDATA[ | ||
Uri endpoint = new Uri("<endpoint>"); | ||
TokenCredential credential = new DefaultAzureCredential(); | ||
CodeExecution client = new DynamicSessionsClient(endpoint, credential).GetCodeExecutionClient(apiVersion: "2024-10-02-preview"); | ||
Response response = await client.GetResultAsync("testexecutionid", "testidentidier", null); | ||
JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; | ||
Console.WriteLine(result.GetProperty("executionId").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()); | ||
]]></code></example> | ||
</member> | ||
<member name="GetResult(string,string,RequestContext)"> | ||
<example> | ||
This sample shows how to call GetResult and parse the result. | ||
<code><![CDATA[ | ||
Uri endpoint = new Uri("<endpoint>"); | ||
TokenCredential credential = new DefaultAzureCredential(); | ||
CodeExecution client = new DynamicSessionsClient(endpoint, credential).GetCodeExecutionClient(apiVersion: "2024-10-02-preview"); | ||
Response response = client.GetResult("testexecutionid", "testidentidier", null); | ||
JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; | ||
Console.WriteLine(result.GetProperty("executionId").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()); | ||
]]></code></example> | ||
</member> | ||
<member name="ExecuteCodeAsync(WaitUntil,string,SessionCodeExecutionRequest,string,CancellationToken)"> | ||
<example> | ||
This sample shows how to call ExecuteCodeAsync. | ||
<code><![CDATA[ | ||
Uri endpoint = new Uri("<endpoint>"); | ||
TokenCredential credential = new DefaultAzureCredential(); | ||
CodeExecution client = new DynamicSessionsClient(endpoint, credential).GetCodeExecutionClient(apiVersion: "2024-10-02-preview"); | ||
SessionCodeExecutionRequest codeExecutionRequest = new SessionCodeExecutionRequest(CodeInputType.Inline, ExecutionType.Synchronous, "print(7*9)", 60); | ||
Operation operation = await client.ExecuteCodeAsync(WaitUntil.Completed, "testidentidier", codeExecutionRequest); | ||
]]></code></example> | ||
</member> | ||
<member name="ExecuteCode(WaitUntil,string,SessionCodeExecutionRequest,string,CancellationToken)"> | ||
<example> | ||
This sample shows how to call ExecuteCode. | ||
<code><![CDATA[ | ||
Uri endpoint = new Uri("<endpoint>"); | ||
TokenCredential credential = new DefaultAzureCredential(); | ||
CodeExecution client = new DynamicSessionsClient(endpoint, credential).GetCodeExecutionClient(apiVersion: "2024-10-02-preview"); | ||
SessionCodeExecutionRequest codeExecutionRequest = new SessionCodeExecutionRequest(CodeInputType.Inline, ExecutionType.Synchronous, "print(7*9)", 60); | ||
Operation operation = client.ExecuteCode(WaitUntil.Completed, "testidentidier", codeExecutionRequest); | ||
]]></code></example> | ||
</member> | ||
<member name="ExecuteCodeAsync(WaitUntil,string,RequestContent,string,RequestContext)"> | ||
<example> | ||
This sample shows how to call ExecuteCodeAsync. | ||
<code><![CDATA[ | ||
Uri endpoint = new Uri("<endpoint>"); | ||
TokenCredential credential = new DefaultAzureCredential(); | ||
CodeExecution client = new DynamicSessionsClient(endpoint, credential).GetCodeExecutionClient(apiVersion: "2024-10-02-preview"); | ||
using RequestContent content = RequestContent.Create(new | ||
{ | ||
codeInputType = "Inline", | ||
executionType = "Synchronous", | ||
code = "print(7*9)", | ||
timeoutInSeconds = 60, | ||
}); | ||
Operation operation = await client.ExecuteCodeAsync(WaitUntil.Completed, "testidentidier", content); | ||
]]></code></example> | ||
</member> | ||
<member name="ExecuteCode(WaitUntil,string,RequestContent,string,RequestContext)"> | ||
<example> | ||
This sample shows how to call ExecuteCode. | ||
<code><![CDATA[ | ||
Uri endpoint = new Uri("<endpoint>"); | ||
TokenCredential credential = new DefaultAzureCredential(); | ||
CodeExecution client = new DynamicSessionsClient(endpoint, credential).GetCodeExecutionClient(apiVersion: "2024-10-02-preview"); | ||
using RequestContent content = RequestContent.Create(new | ||
{ | ||
codeInputType = "Inline", | ||
executionType = "Synchronous", | ||
code = "print(7*9)", | ||
timeoutInSeconds = 60, | ||
}); | ||
Operation operation = client.ExecuteCode(WaitUntil.Completed, "testidentidier", content); | ||
]]></code></example> | ||
</member> | ||
</members> | ||
</doc> |
Oops, something went wrong.