From 476a07a1bb985609a53f347c63e5830d4e6d4d3a Mon Sep 17 00:00:00 2001
From: nick863 <30440255+nick863@users.noreply.github.com>
Date: Fri, 31 Oct 2025 22:34:41 -0700
Subject: [PATCH 01/58] Fix unittests and the AOT compatibility.
---
eng/Packages.Data.props | 6 +--
.../Internal/AdditionalPropertyHelpers.cs | 54 -------------------
.../Custom/Internal/PipelinePolicyHelpers.cs | 7 ++-
.../src/Custom/OpenAIFileExtensions.cs | 18 +++++--
.../ResponseCreationOptionsExtensions.cs | 13 ++---
.../tests/Azure.AI.Agents.Tests.csproj | 2 +-
6 files changed, 29 insertions(+), 71 deletions(-)
delete mode 100644 sdk/ai/Azure.AI.Agents/src/Custom/Internal/AdditionalPropertyHelpers.cs
diff --git a/eng/Packages.Data.props b/eng/Packages.Data.props
index e4d1ed942d12..96454eb507bb 100644
--- a/eng/Packages.Data.props
+++ b/eng/Packages.Data.props
@@ -204,15 +204,15 @@
-
+
-
+
-
+
diff --git a/sdk/ai/Azure.AI.Agents/src/Custom/Internal/AdditionalPropertyHelpers.cs b/sdk/ai/Azure.AI.Agents/src/Custom/Internal/AdditionalPropertyHelpers.cs
deleted file mode 100644
index b5cfa6827e4c..000000000000
--- a/sdk/ai/Azure.AI.Agents/src/Custom/Internal/AdditionalPropertyHelpers.cs
+++ /dev/null
@@ -1,54 +0,0 @@
-// 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.Reflection;
-
-#pragma warning disable OPENAI001
-
-namespace Azure.AI.Agents;
-
-internal static partial class AdditionalPropertyHelpers
-{
- internal static void SetAdditionalProperty(this T instance, string key, U value)
- where T : IJsonModel
- {
- PropertyInfo additionalDataProperty = instance.GetType().GetProperty("SerializedAdditionalRawData", BindingFlags.Instance | BindingFlags.NonPublic);
- object existingSerializedAdditionalRawData = additionalDataProperty.GetValue(instance);
-
- IDictionary additionalData = (IDictionary)existingSerializedAdditionalRawData ?? new Dictionary();
- BinaryData writtenBinaryData = value switch
- {
- BinaryData binaryDataObject => binaryDataObject,
- string stringObject => BinaryData.FromString(stringObject),
- _ => ModelReaderWriter.Write(value, ModelSerializationExtensions.WireOptions, AzureAIAgentsContext.Default),
- };
- additionalData[key] = writtenBinaryData;
- additionalDataProperty.SetValue(instance, additionalData);
- }
-
- internal static U GetAdditionalProperty(this T instance, string key)
- {
- PropertyInfo additionalDataProperty = instance.GetType().GetProperty("SerializedAdditionalRawData", BindingFlags.Instance | BindingFlags.NonPublic);
- object existingSerializedAdditionalRawData = additionalDataProperty.GetValue(instance);
-
- IDictionary additionalData = (IDictionary)existingSerializedAdditionalRawData;
- if (additionalData?.TryGetValue(key, out BinaryData valueBytes) != true)
- {
- return default(U);
- }
-
- if (typeof(U) == typeof(string))
- {
- return (U)(object)valueBytes.ToString();
- }
- else
- {
- throw new NotImplementedException();
- }
- }
-}
diff --git a/sdk/ai/Azure.AI.Agents/src/Custom/Internal/PipelinePolicyHelpers.cs b/sdk/ai/Azure.AI.Agents/src/Custom/Internal/PipelinePolicyHelpers.cs
index 5eff3909d8e1..4ac4d20d381c 100644
--- a/sdk/ai/Azure.AI.Agents/src/Custom/Internal/PipelinePolicyHelpers.cs
+++ b/sdk/ai/Azure.AI.Agents/src/Custom/Internal/PipelinePolicyHelpers.cs
@@ -199,9 +199,12 @@ public static void AddAzureFinetuningParityPolicy(OpenAIClientOptions options)
"Content-Disposition: form-data; name=file; filename=([^;]*);.*") is Match fileContentDispositionMatch
&& fileContentDispositionMatch.Success)
{
- newRequestWriter.WriteLine("Content-Type: application/octet-stream");
+ // We are explicitly set the line ending as
+ // WriteLine will add only \n symbol on Unix systems,
+ // Which will result in error 400 on te service side.
+ newRequestWriter.Write("Content-Type: application/octet-stream\r\n");
}
- newRequestWriter.WriteLine(line);
+ newRequestWriter.Write($"{line}\r\n");
previousLine = line;
}
diff --git a/sdk/ai/Azure.AI.Agents/src/Custom/OpenAIFileExtensions.cs b/sdk/ai/Azure.AI.Agents/src/Custom/OpenAIFileExtensions.cs
index 553a5e058f1e..af3cb32de24a 100644
--- a/sdk/ai/Azure.AI.Agents/src/Custom/OpenAIFileExtensions.cs
+++ b/sdk/ai/Azure.AI.Agents/src/Custom/OpenAIFileExtensions.cs
@@ -2,7 +2,11 @@
// Licensed under the MIT License.
using System;
+using System.ClientModel;
using System.Collections.Generic;
+using System.IO;
+using System.Text;
+using System.Text.Json;
using OpenAI.Files;
#pragma warning disable CS0618
@@ -13,10 +17,18 @@ public static partial class OpenAIFileExtensions
{
public static string GetAzureFileStatus(this OpenAIFile file)
{
- if (AdditionalPropertyHelpers.GetAdditionalProperty(file, "_sdk_status") is string extraStatusValue
- && extraStatusValue.Length > 2)
+ using BinaryContent contentBytes = BinaryContent.Create(file, ModelSerializationExtensions.WireOptions);
+ using var stream = new MemoryStream();
+ contentBytes.WriteTo(stream);
+ string json = Encoding.UTF8.GetString(stream.ToArray());
+ JsonDocument doc = JsonDocument.Parse(json);
+ if (doc.RootElement.TryGetProperty("_sdk_status", out JsonElement extraStatusElement))
{
- return extraStatusValue.Substring(1, extraStatusValue.Length - 2);
+ string extraStatusValue = extraStatusElement.GetString();
+ if (!string.IsNullOrEmpty(extraStatusValue))
+ {
+ return extraStatusValue;
+ }
}
return null;
}
diff --git a/sdk/ai/Azure.AI.Agents/src/Custom/ResponseCreationOptionsExtensions.cs b/sdk/ai/Azure.AI.Agents/src/Custom/ResponseCreationOptionsExtensions.cs
index 19a50e93f5f0..84137f660bc6 100644
--- a/sdk/ai/Azure.AI.Agents/src/Custom/ResponseCreationOptionsExtensions.cs
+++ b/sdk/ai/Azure.AI.Agents/src/Custom/ResponseCreationOptionsExtensions.cs
@@ -5,11 +5,10 @@
using System;
using System.ClientModel.Primitives;
-using System.Collections.Generic;
-using System.Reflection;
using OpenAI.Responses;
#pragma warning disable OPENAI001
+#pragma warning disable SCME0001
namespace Azure.AI.Agents;
@@ -22,9 +21,9 @@ public static partial class ResponseCreationOptionsExtensions
///
public static void SetAgentReference(this ResponseCreationOptions responseCreationOptions, AgentReference agentReference)
{
- AdditionalPropertyHelpers.SetAdditionalProperty(responseCreationOptions, "agent", agentReference);
- // Agent specification is mutually exclusive with model specification; see internal issue 4770700
- AdditionalPropertyHelpers.SetAdditionalProperty(responseCreationOptions, "model", BinaryData.FromBytes("\"__EMPTY__\""u8.ToArray()));
+ BinaryData agentReferenceBin = ModelReaderWriter.Write(agentReference, ModelSerializationExtensions.WireOptions, AzureAIAgentsContext.Default);
+ responseCreationOptions.Patch.Set("$.agent"u8, agentReferenceBin);
+ responseCreationOptions.Patch.Remove("$.model"u8);
}
///
@@ -60,9 +59,7 @@ public static void SetAgentReference(this ResponseCreationOptions responseCreati
///
public static void SetConversationReference(this ResponseCreationOptions responseCreationOptions, string conversationId)
{
- responseCreationOptions.SetAdditionalProperty(
- "conversation",
- BinaryData.FromString($"\"{conversationId}\""));
+ responseCreationOptions.Patch.Set("$.conversation"u8, $"{conversationId}");
}
///
diff --git a/sdk/ai/Azure.AI.Agents/tests/Azure.AI.Agents.Tests.csproj b/sdk/ai/Azure.AI.Agents/tests/Azure.AI.Agents.Tests.csproj
index 9a3abb8d9303..7e594863210b 100644
--- a/sdk/ai/Azure.AI.Agents/tests/Azure.AI.Agents.Tests.csproj
+++ b/sdk/ai/Azure.AI.Agents/tests/Azure.AI.Agents.Tests.csproj
@@ -22,7 +22,7 @@
-
+
From 145c5b20559908e4a6ab64141b2c49fedd4e971c Mon Sep 17 00:00:00 2001
From: Pratibha Shrivastav
<164305667+PratibhaShrivastav18@users.noreply.github.com>
Date: Mon, 3 Nov 2025 22:13:59 +0530
Subject: [PATCH 02/58] Add upload file method to tests/ minor change to fix
download file content method (#53637)
* add upload file
* add assertions
---
.../Custom/Internal/PipelinePolicyHelpers.cs | 8 +-
.../samples/Sample15_Files.md | 14 +-
.../tests/Samples/FineTuning/Sample_Files.cs | 125 +++++++-----------
3 files changed, 65 insertions(+), 82 deletions(-)
diff --git a/sdk/ai/Azure.AI.Agents/src/Custom/Internal/PipelinePolicyHelpers.cs b/sdk/ai/Azure.AI.Agents/src/Custom/Internal/PipelinePolicyHelpers.cs
index 4ac4d20d381c..0eae489b61ff 100644
--- a/sdk/ai/Azure.AI.Agents/src/Custom/Internal/PipelinePolicyHelpers.cs
+++ b/sdk/ai/Azure.AI.Agents/src/Custom/Internal/PipelinePolicyHelpers.cs
@@ -219,7 +219,13 @@ public static void AddAzureFinetuningParityPolicy(OpenAIClientOptions options)
if (message?.Response is not null)
{
message?.Response.BufferContent();
- if (JsonNode.Parse(message?.Response?.ContentStream) is JsonObject responseObject
+
+ // Only parse as JSON if the response Content-Type indicates JSON
+ string contentType = message?.Response?.Headers?.TryGetValue("Content-Type", out string ct) == true ? ct : string.Empty;
+ bool isJsonResponse = contentType.IndexOf("application/json", StringComparison.OrdinalIgnoreCase) >= 0;
+
+ if (isJsonResponse
+ && JsonNode.Parse(message?.Response?.ContentStream) is JsonObject responseObject
&& responseObject.TryGetPropertyValue("status", out JsonNode statusNode)
&& statusNode is JsonValue statusValue
&& !Enum.TryParse(statusValue.ToString(), out FileStatus _))
diff --git a/sdk/ai/Azure.AI.Projects/samples/Sample15_Files.md b/sdk/ai/Azure.AI.Projects/samples/Sample15_Files.md
index a5498c8df3f0..55e86eef0ea5 100644
--- a/sdk/ai/Azure.AI.Projects/samples/Sample15_Files.md
+++ b/sdk/ai/Azure.AI.Projects/samples/Sample15_Files.md
@@ -9,10 +9,6 @@ This sample demonstrates how to use file operations with OpenAI Files API throug
- Set the following environment variables:
- `PROJECT_ENDPOINT`: The Azure AI Project endpoint, as found in the overview page of your Azure AI Foundry project.
-## Important Note
-
-File upload via OpenAIClient from AgentsClient.GetOpenAIClient() is not currently supported because it doesn't set the required Content-Type header for individual multipart form parts. The sample demonstrates other file operations using pre-existing file IDs.
-
## Asynchronous Sample
```C# Snippet:AI_Projects_FileOperationsAsync
@@ -22,7 +18,15 @@ AgentsClient agentClient = projectClient.GetAgentsClient();
OpenAIClient oaiClient = agentClient.GetOpenAIClient();
OpenAIFileClient fileClient = oaiClient.GetOpenAIFileClient();
-string fileId = "file-abc123"; // Replace with an actual file ID from your project
+// Upload a file
+using FileStream fileStream = File.OpenRead("path/to/your/file.jsonl");
+OpenAIFile uploadedFile = await fileClient.UploadFileAsync(
+ fileStream,
+ "training_data.jsonl",
+ FileUploadPurpose.FineTune);
+Console.WriteLine($"File uploaded: {uploadedFile.Id}");
+
+string fileId = uploadedFile.Id;
// Retrieve file metadata
OpenAIFile retrievedFile = await fileClient.GetFileAsync(fileId);
diff --git a/sdk/ai/Azure.AI.Projects/tests/Samples/FineTuning/Sample_Files.cs b/sdk/ai/Azure.AI.Projects/tests/Samples/FineTuning/Sample_Files.cs
index 27ba6b9da4c3..0b9cb84778ba 100644
--- a/sdk/ai/Azure.AI.Projects/tests/Samples/FineTuning/Sample_Files.cs
+++ b/sdk/ai/Azure.AI.Projects/tests/Samples/FineTuning/Sample_Files.cs
@@ -39,93 +39,52 @@ private Task GetFileClientAsync(string endpoint)
[Test]
[AsyncOnly]
- public async Task FileOperationsCRUDAsync()
+ public async Task FileOperationsAsync()
{
- #region Snippet:AI_Projects_FileOperationsAsync
-#if SNIPPET
- var endpoint = System.Environment.GetEnvironmentVariable("PROJECT_ENDPOINT");
-#else
var endpoint = TestEnvironment.PROJECTENDPOINT;
-#endif
- AIProjectClient projectClient = new AIProjectClient(new Uri(endpoint), new DefaultAzureCredential());
- AgentsClient agentClient = projectClient.GetAgentsClient();
- OpenAIClient oaiClient = agentClient.GetOpenAIClient();
- OpenAIFileClient fileClient = oaiClient.GetOpenAIFileClient();
-
- string fileId = "file-abc123"; // Replace with an actual file ID from your project
+ var dataDirectory = GetDataDirectory();
+ var testFilePath = Path.Combine(dataDirectory, "training_set.jsonl");
- // Retrieve file metadata
- OpenAIFile retrievedFile = await fileClient.GetFileAsync(fileId);
- Console.WriteLine($"File ID: {retrievedFile.Id}, Filename: {retrievedFile.Filename}");
+ OpenAIFileClient fileClient = await GetFileClientAsync(endpoint);
- // Download file content
- BinaryData fileContent = await fileClient.DownloadFileAsync(fileId);
- Console.WriteLine($"Content size: {fileContent.ToMemory().Length} bytes");
+ // Step 1: Upload a file
+ Console.WriteLine("\n=== Step 1: Uploading File ===");
+ Console.WriteLine($"Uploading file from: {testFilePath}");
- // List all files
- ClientResult filesResult = await fileClient.GetFilesAsync();
- foreach (OpenAIFile file in filesResult.Value)
+ // Verify file exists and is not empty
+ if (!File.Exists(testFilePath))
{
- Console.WriteLine($"File: {file.Filename} (ID: {file.Id})");
+ throw new FileNotFoundException($"Test file not found: {testFilePath}");
}
- // Delete file
- ClientResult deleteResult = await fileClient.DeleteFileAsync(fileId);
- Console.WriteLine($"File deleted: {deleteResult.Value.Deleted}");
- #endregion
- }
+ FileInfo fileInfo = new FileInfo(testFilePath);
+ Console.WriteLine($"File size on disk: {fileInfo.Length} bytes");
- [Test]
- [AsyncOnly]
- public async Task FileOperationsAsync()
- {
- var endpoint = TestEnvironment.PROJECTENDPOINT;
- var dataDirectory = GetDataDirectory();
- // var testFilePath = Path.Combine(dataDirectory, "training_set.jsonl");
+ if (fileInfo.Length == 0)
+ {
+ throw new InvalidOperationException($"Test file is empty: {testFilePath}");
+ }
- OpenAIFileClient fileClient = await GetFileClientAsync(endpoint);
+ OpenAIFile uploadedFile;
+ using (FileStream fileStream = File.OpenRead(testFilePath))
+ {
+ Console.WriteLine($"FileStream length: {fileStream.Length} bytes");
+ Console.WriteLine($"FileStream can read: {fileStream.CanRead}");
- // Step 1: Upload a file
- // Note: File upload via OpenAIClient from AgentsClient.GetOpenAIClient() is not currently supported
- // because it doesn't set the required Content-Type header for individual multipart form parts.
- // Using a pre-uploaded file ID for testing other file operations.
- // Console.WriteLine("\n=== Step 1: Uploading File ===");
- // Console.WriteLine($"Uploading file from: {testFilePath}");
- //
- // // Verify file exists and is not empty
- // if (!File.Exists(testFilePath))
- // {
- // throw new FileNotFoundException($"Test file not found: {testFilePath}");
- // }
- //
- // FileInfo fileInfo = new FileInfo(testFilePath);
- // Console.WriteLine($"File size on disk: {fileInfo.Length} bytes");
- //
- // if (fileInfo.Length == 0)
- // {
- // throw new InvalidOperationException($"Test file is empty: {testFilePath}");
- // }
- //
- // OpenAIFile uploadedFile;
- // using (FileStream fileStream = File.OpenRead(testFilePath))
- // {
- // Console.WriteLine($"FileStream length: {fileStream.Length} bytes");
- // Console.WriteLine($"FileStream can read: {fileStream.CanRead}");
- //
- // uploadedFile = await fileClient.UploadFileAsync(
- // fileStream,
- // "training_set.jsonl",
- // FileUploadPurpose.FineTune);
- // }
- // Console.WriteLine($"✅ File uploaded successfully!");
- // Console.WriteLine($" File ID: {uploadedFile.Id}");
- // Console.WriteLine($" Filename: {uploadedFile.Filename}");
- // Console.WriteLine($" Purpose: {uploadedFile.Purpose}");
- // Console.WriteLine($" Size: {uploadedFile.SizeInBytes} bytes");
- // Console.WriteLine($" Created At: {uploadedFile.CreatedAt}");
-
- // Use a pre-existing file ID from the fine-tuning sample
- string fileId = "file-6d833125cca94ed4a8798289534d8e38"; // Hardcoded for now, to be replaced by uploadedFile.Id
+ uploadedFile = await fileClient.UploadFileAsync(
+ fileStream,
+ "training_set.jsonl",
+ FileUploadPurpose.FineTune);
+ }
+ Console.WriteLine($"✅ File uploaded successfully!");
+ Console.WriteLine($" File ID: {uploadedFile.Id}");
+ Console.WriteLine($" Filename: {uploadedFile.Filename}");
+ Console.WriteLine($" Purpose: {uploadedFile.Purpose}");
+ Console.WriteLine($" Size: {uploadedFile.SizeInBytes} bytes");
+ Console.WriteLine($" Created At: {uploadedFile.CreatedAt}");
+
+ // Use the uploaded file ID
+ string fileId = uploadedFile.Id;
// Step 2: Retrieve file metadata by ID
Console.WriteLine("\n=== Step 2: Retrieving File Metadata ===");
@@ -144,6 +103,10 @@ public async Task FileOperationsAsync()
Console.WriteLine($"✅ File content retrieved successfully!");
Console.WriteLine($" Content size: {fileContent.ToMemory().Length} bytes");
+ // Assert downloaded content matches expected size
+ Assert.IsNotNull(fileContent, "Downloaded file content should not be null");
+ Assert.IsTrue(fileContent.ToMemory().Length > 0, "Downloaded content should not be empty");
+
// Display first few lines of content
string contentStr = fileContent.ToString();
string[] lines = contentStr.Split('\n');
@@ -183,11 +146,18 @@ public async Task FileOperationsAsync()
}
}
Console.WriteLine($"✅ Listed {fileCount} file(s)");
+
+ // Assert that we listed at least one file
+ Assert.IsTrue(fileCount > 0, "Should have listed at least one file");
+
if (foundUploadedFile)
{
Console.WriteLine($"✅ Confirmed our uploaded file is in the list");
}
+ // Assert that our uploaded file is in the list
+ Assert.IsTrue(foundUploadedFile, "Uploaded file should appear in the list of files");
+
// Step 5: Delete the file
Console.WriteLine("\n=== Step 5: Deleting File ===");
Console.WriteLine($"Deleting file with ID: {fileId}");
@@ -225,6 +195,9 @@ public async Task FileOperationsAsync()
Console.WriteLine($"✅ Confirmed: File no longer appears in the list");
}
+ // Assert file no longer exists in the list
+ Assert.IsFalse(fileStillExists, "Deleted file should not appear in the list of files");
+
Console.WriteLine("\n=== File Operations Completed Successfully! ===");
}
}
From 3ee43d36dff6966389eb69891d03129d8c6b5b0e Mon Sep 17 00:00:00 2001
From: nick863 <30440255+nick863@users.noreply.github.com>
Date: Mon, 3 Nov 2025 13:41:43 -0800
Subject: [PATCH 03/58] Fix
---
eng/Packages.Data.props | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/eng/Packages.Data.props b/eng/Packages.Data.props
index 96454eb507bb..b0f35bb405eb 100644
--- a/eng/Packages.Data.props
+++ b/eng/Packages.Data.props
@@ -102,7 +102,7 @@
-
+
From 27f514614e52be6bd9b6588af1e2a04d8b5f733a Mon Sep 17 00:00:00 2001
From: nick863 <30440255+nick863@users.noreply.github.com>
Date: Mon, 3 Nov 2025 15:44:56 -0800
Subject: [PATCH 04/58] Fix Azure.AI.OpenAI to work with the latest OpenAI
package.
---
.../src/Custom/Chat/AzureChatClient.cs | 83 ++++----
.../src/Custom/Chat/AzureChatExtensions.cs | 140 ++++++++------
.../Common/AdditionalPropertyHelpers.cs | 21 +-
.../VectorStoreCollectionPageToken.cs | 149 +++++++++++++++
.../Internal/VectorStoreCollectionResult.cs | 99 ++++++++++
.../VectorStoreFileCollectionPageToken.cs | 179 ++++++++++++++++++
.../AzureResponsesClient.Protocol.cs | 4 +-
.../AzureVectorStoreClient.Protocol.cs | 1 -
sdk/openai/Azure.AI.OpenAI/tests/ChatTests.cs | 29 ++-
.../Azure.AI.OpenAI/tests/ResponsesTests.cs | 65 ++++---
.../tests/Utils/AoaiTestBase.cs | 10 +-
.../tests/Azure.ResourceManager.Tests.csproj | 2 +-
12 files changed, 641 insertions(+), 141 deletions(-)
create mode 100644 sdk/openai/Azure.AI.OpenAI/src/Custom/Internal/VectorStoreCollectionPageToken.cs
create mode 100644 sdk/openai/Azure.AI.OpenAI/src/Custom/Internal/VectorStoreCollectionResult.cs
create mode 100644 sdk/openai/Azure.AI.OpenAI/src/Custom/Internal/VectorStoreFileCollectionPageToken.cs
diff --git a/sdk/openai/Azure.AI.OpenAI/src/Custom/Chat/AzureChatClient.cs b/sdk/openai/Azure.AI.OpenAI/src/Custom/Chat/AzureChatClient.cs
index b4c4576f9c7b..d968802f8fc9 100644
--- a/sdk/openai/Azure.AI.OpenAI/src/Custom/Chat/AzureChatClient.cs
+++ b/sdk/openai/Azure.AI.OpenAI/src/Custom/Chat/AzureChatClient.cs
@@ -8,6 +8,7 @@
#pragma warning disable AOAI001
#pragma warning disable AZC0112
+#pragma warning disable SCME0001
namespace Azure.AI.OpenAI.Chat;
@@ -42,15 +43,27 @@ protected AzureChatClient()
///
public override Task> CompleteChatAsync(IEnumerable messages, ChatCompletionOptions options = null, CancellationToken cancellationToken = default)
{
+ bool maxTokenMasked = options == null ? false : AdditionalPropertyHelpers.GetIsEmptySentinelValue(options.Patch, "$.max_tokens"u8);
PostfixSwapMaxTokens(ref options);
- return base.CompleteChatAsync(messages, options, cancellationToken);
+ Task> result = base.CompleteChatAsync(messages, options, cancellationToken);
+ if (maxTokenMasked)
+ {
+ AdditionalPropertyHelpers.SetEmptySentinelValue(ref options.Patch, "$.max_tokens"u8);
+ }
+ return result;
}
///
public override ClientResult CompleteChat(IEnumerable messages, ChatCompletionOptions options = null, CancellationToken cancellationToken = default)
{
+ bool maxTokenMasked = options == null ? false : AdditionalPropertyHelpers.GetIsEmptySentinelValue(options.Patch, "$.max_tokens"u8);
PostfixSwapMaxTokens(ref options);
- return base.CompleteChat(messages, options, cancellationToken);
+ ClientResult result = base.CompleteChat(messages, options, cancellationToken);
+ if (maxTokenMasked)
+ {
+ AdditionalPropertyHelpers.SetEmptySentinelValue(ref options.Patch, "$.max_tokens"u8);
+ }
+ return result;
}
///
@@ -65,16 +78,28 @@ public override CollectionResult CompleteChatStre
public override AsyncCollectionResult CompleteChatStreamingAsync(IEnumerable messages, ChatCompletionOptions options = null, CancellationToken cancellationToken = default)
{
PostfixClearStreamOptions(messages, ref options);
+ bool maxTokenMasked = options == null ? false : AdditionalPropertyHelpers.GetIsEmptySentinelValue(options.Patch, "$.max_tokens"u8);
PostfixSwapMaxTokens(ref options);
- return base.CompleteChatStreamingAsync(messages, options, cancellationToken);
+ AsyncCollectionResult < StreamingChatCompletionUpdate > result = base.CompleteChatStreamingAsync(messages, options, cancellationToken);
+ if (maxTokenMasked)
+ {
+ AdditionalPropertyHelpers.SetEmptySentinelValue(ref options.Patch, "$.max_tokens"u8);
+ }
+ return result;
}
///
public override CollectionResult CompleteChatStreaming(IEnumerable messages, ChatCompletionOptions options = null, CancellationToken cancellationToken = default)
{
PostfixClearStreamOptions(messages, ref options);
+ bool maxTokenMasked = options == null ? false : AdditionalPropertyHelpers.GetIsEmptySentinelValue(options.Patch, "$.max_tokens"u8);
PostfixSwapMaxTokens(ref options);
- return base.CompleteChatStreaming(messages, options, cancellationToken);
+ CollectionResult < StreamingChatCompletionUpdate > result = base.CompleteChatStreaming(messages, options, cancellationToken);
+ if (maxTokenMasked)
+ {
+ AdditionalPropertyHelpers.SetEmptySentinelValue(ref options.Patch, "$.max_tokens"u8);
+ }
+ return result;
}
/**
@@ -86,19 +111,19 @@ public override CollectionResult CompleteChatStre
*/
private static void PostfixClearStreamOptions(IEnumerable messages, ref ChatCompletionOptions options)
{
- if (AdditionalPropertyHelpers
- .GetAdditionalPropertyAsListOfChatDataSource(options?.SerializedAdditionalRawData, "data_sources")?.Count > 0
+ if (options?.GetDataSources()?.Count > 0
|| messages?.Any(
message => message?.Content?.Any(
contentPart => contentPart?.Kind == ChatMessageContentPartKind.Image) == true)
== true)
{
options ??= new();
- options.SerializedAdditionalRawData ??= new Dictionary();
- AdditionalPropertyHelpers.SetEmptySentinelValue(options.SerializedAdditionalRawData, "stream_options");
+ options.Patch.Remove("$.stream_options"u8);
}
}
+ private static bool HasValue(JsonPatch patch, ReadOnlySpan path) => patch.Contains(path) && !patch.IsRemoved(path);
+
/**
* As of 2024-09-01-preview, Azure OpenAI conditionally supports the use of the new max_completion_tokens property:
* - The o1-mini and o1-preview models accept max_completion_tokens and reject max_tokens
@@ -113,52 +138,30 @@ private static void PostfixClearStreamOptions(IEnumerable messages,
private static void PostfixSwapMaxTokens(ref ChatCompletionOptions options)
{
options ??= new();
- bool valueIsSet = options.MaxOutputTokenCount is not null;
- bool oldPropertyBlocked = AdditionalPropertyHelpers.GetIsEmptySentinelValue(options.SerializedAdditionalRawData, "max_tokens");
+ bool oldPropertyBlocked = AdditionalPropertyHelpers.GetIsEmptySentinelValue(options.Patch, "$.max_tokens"u8);
- if (valueIsSet)
+ if (options.MaxOutputTokenCount.HasValue)
{
if (!oldPropertyBlocked)
{
- options.SerializedAdditionalRawData ??= new ChangeTrackingDictionary();
- AdditionalPropertyHelpers.SetEmptySentinelValue(options.SerializedAdditionalRawData, "max_completion_tokens");
-
- using MemoryStream stream = new();
- using Utf8JsonWriter writer = new(stream);
-
- if (options.MaxOutputTokenCount != null)
- {
- writer.WriteNumberValue(options.MaxOutputTokenCount.Value);
- }
- else
- {
- writer.WriteNullValue();
- }
-
- writer.Flush();
-
- options.SerializedAdditionalRawData["max_tokens"] = BinaryData.FromBytes(stream.ToArray());
+ options.Patch.Remove("$.max_completion_tokens"u8);
+ options.Patch.Set("$.max_tokens"u8, options.MaxOutputTokenCount.Value);
}
else
{
- // Allow standard serialization to the new property to occur; remove overrides
- if (options.SerializedAdditionalRawData.ContainsKey("max_completion_tokens"))
- {
- options.SerializedAdditionalRawData.Remove("max_completion_tokens");
- }
+ options.Patch.Remove("$.max_tokens"u8);
+ options.Patch.Set("$.max_completion_tokens"u8, options.MaxOutputTokenCount.Value);
}
}
else
{
- if (!AdditionalPropertyHelpers.GetIsEmptySentinelValue(options.SerializedAdditionalRawData, "max_tokens")
- && options.SerializedAdditionalRawData?.ContainsKey("max_tokens") == true)
+ if (HasValue(options.Patch, "$.max_tokens"u8))
{
- options.SerializedAdditionalRawData.Remove("max_tokens");
+ options.Patch.Remove("$.max_tokens"u8);
}
- if (!AdditionalPropertyHelpers.GetIsEmptySentinelValue(options.SerializedAdditionalRawData, "max_completion_tokens")
- && options.SerializedAdditionalRawData?.ContainsKey("max_completion_tokens") == true)
+ if (HasValue(options.Patch, "$.max_completion_tokens"u8))
{
- options.SerializedAdditionalRawData.Remove("max_completion_tokens");
+ options.Patch.Remove("$.max_completion_tokens"u8);
}
}
}
diff --git a/sdk/openai/Azure.AI.OpenAI/src/Custom/Chat/AzureChatExtensions.cs b/sdk/openai/Azure.AI.OpenAI/src/Custom/Chat/AzureChatExtensions.cs
index 5218994e901e..9956da431718 100644
--- a/sdk/openai/Azure.AI.OpenAI/src/Custom/Chat/AzureChatExtensions.cs
+++ b/sdk/openai/Azure.AI.OpenAI/src/Custom/Chat/AzureChatExtensions.cs
@@ -1,8 +1,13 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-using Azure.AI.OpenAI.Internal;
+using System.ClientModel;
+using System.ClientModel.Primitives;
using System.Diagnostics.CodeAnalysis;
+using System.Text;
+using System.Text.Json;
+using System.Text.Json.Nodes;
+using Azure.AI.OpenAI.Internal;
#pragma warning disable AZC0112
@@ -14,26 +19,40 @@ public static partial class AzureChatExtensions
[Experimental("AOAI001")]
public static void AddDataSource(this ChatCompletionOptions options, ChatDataSource dataSource)
{
- options.SerializedAdditionalRawData ??= new Dictionary();
-
- IList existingSources =
- AdditionalPropertyHelpers.GetAdditionalPropertyAsListOfChatDataSource(
- options.SerializedAdditionalRawData,
- "data_sources")
- ?? new ChangeTrackingList();
- existingSources.Add(dataSource);
- AdditionalPropertyHelpers.SetAdditionalProperty(
- options.SerializedAdditionalRawData,
- "data_sources",
- existingSources);
+ JsonArray doc;
+ if (options.Patch.Contains("$.data_sources"u8) && options.Patch.TryGetJson("$.data_sources"u8, out ReadOnlyMemory jsonBytes))
+ {
+ using var stream = new MemoryStream();
+ stream.Write(jsonBytes.ToArray(), 0, jsonBytes.Length);
+ string json = Encoding.UTF8.GetString(stream.ToArray());
+ doc = JsonObject.Parse(json).AsArray();
+ }
+ else
+ {
+ doc = new();
+ }
+ using var objectStream = new MemoryStream();
+ using BinaryContent contentBytes = BinaryContent.Create(dataSource, ModelSerializationExtensions.WireOptions);
+ contentBytes.WriteTo(objectStream);
+ string newJson = Encoding.UTF8.GetString(objectStream.ToArray());
+ doc.Add(JsonObject.Parse(newJson));
+ options.Patch.Set("$.data_sources"u8, BinaryData.FromString(doc.ToJsonString()));
}
[Experimental("AOAI001")]
public static IReadOnlyList GetDataSources(this ChatCompletionOptions options)
{
- return AdditionalPropertyHelpers.GetAdditionalPropertyAsListOfChatDataSource(
- options.SerializedAdditionalRawData,
- "data_sources") as IReadOnlyList;
+ if (options.Patch.Contains("$.data_sources"u8) && options.Patch.TryGetJson("$.data_sources"u8, out ReadOnlyMemory mem))
+ {
+ using JsonDocument doc = JsonDocument.Parse(mem);
+ List chats = [];
+ foreach (JsonElement dataSource in doc.RootElement.EnumerateArray())
+ {
+ chats.Add(ChatDataSource.DeserializeChatDataSource(dataSource, ModelSerializationExtensions.WireOptions));
+ }
+ return chats;
+ }
+ return null;
}
[Experimental("AOAI001")]
@@ -42,16 +61,13 @@ public static void SetNewMaxCompletionTokensPropertyEnabled(this ChatCompletionO
if (newPropertyEnabled)
{
// Blocking serialization of max_tokens via dictionary acts as a signal to skip pre-serialization fixup
- options.SerializedAdditionalRawData ??= new Dictionary();
- AdditionalPropertyHelpers.SetEmptySentinelValue(options.SerializedAdditionalRawData, "max_tokens");
+ AdditionalPropertyHelpers.SetEmptySentinelValue(patch: ref options.Patch, path: "$.max_tokens"u8);
}
else
{
- // In the absence of a dictionary serialization block to max_tokens, the newer property name will
- // automatically be blocked and the older property name will be used via dictionary override
- if (options?.SerializedAdditionalRawData?.ContainsKey("max_tokens") == true)
+ if (options.Patch.Contains("$.max_tokens"u8) && !options.Patch.IsRemoved("$.max_tokens"u8))
{
- options?.SerializedAdditionalRawData?.Remove("max_tokens");
+ options.Patch.Remove("$.max_tokens"u8);
}
}
}
@@ -59,35 +75,45 @@ public static void SetNewMaxCompletionTokensPropertyEnabled(this ChatCompletionO
[Experimental("AOAI001")]
public static RequestContentFilterResult GetRequestContentFilterResult(this ChatCompletion chatCompletion)
{
- return AdditionalPropertyHelpers.GetAdditionalPropertyAsListOfRequestContentFilterResult(
- chatCompletion.SerializedAdditionalRawData,
- "prompt_filter_results")?[0];
+ if (chatCompletion.Patch.Contains("$.prompt_filter_results"u8) && chatCompletion.Patch.TryGetJson("$.prompt_filter_results"u8, out ReadOnlyMemory mem))
+ {
+ using JsonDocument doc = JsonDocument.Parse(mem);
+ return RequestContentFilterResult.DeserializeRequestContentFilterResult(doc.RootElement.EnumerateArray().First(), ModelSerializationExtensions.WireOptions);
+ }
+ return null;
}
[Experimental("AOAI001")]
public static ResponseContentFilterResult GetResponseContentFilterResult(this ChatCompletion chatCompletion)
{
- return AdditionalPropertyHelpers.GetAdditionalPropertyAsResponseContentFilterResult(
- chatCompletion.Choices?[0]?.SerializedAdditionalRawData,
- "content_filter_results");
+ if ((chatCompletion.Choices?[0]?.Patch.Contains("$.content_filter_results"u8) ?? false) &&
+ (chatCompletion.Choices?[0]?.Patch.TryGetJson("$.content_filter_results"u8, out ReadOnlyMemory mem) ?? false))
+ {
+ using JsonDocument doc = JsonDocument.Parse(mem);
+ return ResponseContentFilterResult.DeserializeResponseContentFilterResult(doc.RootElement, ModelSerializationExtensions.WireOptions);
+ }
+ return null;
}
[Experimental("AOAI001")]
public static ChatMessageContext GetMessageContext(this ChatCompletion chatCompletion)
{
- return AdditionalPropertyHelpers.GetAdditionalPropertyAsChatMessageContext(
- chatCompletion.Choices?[0]?.Message?.SerializedAdditionalRawData,
- "context");
+ if ((chatCompletion.Choices?[0]?.Message?.Patch.Contains("$.context"u8) ?? false) &&
+ (chatCompletion.Choices?[0]?.Message?.Patch.TryGetJson("$.context"u8, out ReadOnlyMemory mem) ?? false))
+ {
+ using JsonDocument doc = JsonDocument.Parse(mem);
+ return ChatMessageContext.DeserializeChatMessageContext(doc.RootElement, ModelSerializationExtensions.WireOptions);
+ }
+ return null;
}
[Experimental("AOAI001")]
public static ChatMessageContext GetMessageContext(this StreamingChatCompletionUpdate chatUpdate)
{
- if (chatUpdate.Choices?.Count > 0)
+ if (chatUpdate.Choices?.Count > 0 && chatUpdate.Choices[0].Delta.Patch.Contains("$.context"u8) && chatUpdate.Choices[0].Delta.Patch.TryGetJson("$.context"u8, out ReadOnlyMemory mem))
{
- return AdditionalPropertyHelpers.GetAdditionalPropertyAsChatMessageContext(
- chatUpdate.Choices[0].Delta?.SerializedAdditionalRawData,
- "context");
+ using JsonDocument doc = JsonDocument.Parse(mem);
+ return ChatMessageContext.DeserializeChatMessageContext(doc.RootElement, ModelSerializationExtensions.WireOptions);
}
return null;
}
@@ -95,46 +121,54 @@ public static ChatMessageContext GetMessageContext(this StreamingChatCompletionU
[Experimental("AOAI001")]
public static RequestContentFilterResult GetRequestContentFilterResult(this StreamingChatCompletionUpdate chatUpdate)
{
- return AdditionalPropertyHelpers.GetAdditionalPropertyAsListOfRequestContentFilterResult(
- chatUpdate.SerializedAdditionalRawData,
- "prompt_filter_results")?[0];
+ if (chatUpdate.Patch.Contains("$.prompt_filter_results"u8) && chatUpdate.Patch.TryGetJson("$.prompt_filter_results"u8, out ReadOnlyMemory mem))
+ {
+ using JsonDocument doc = JsonDocument.Parse(mem);
+ return RequestContentFilterResult.DeserializeRequestContentFilterResult(doc.RootElement.EnumerateArray().First(), ModelSerializationExtensions.WireOptions);
+ }
+ return null;
}
[Experimental("AOAI001")]
public static ResponseContentFilterResult GetResponseContentFilterResult(this StreamingChatCompletionUpdate chatUpdate)
{
- return AdditionalPropertyHelpers.GetAdditionalPropertyAsResponseContentFilterResult(
- chatUpdate?.Choices?.ElementAtOrDefault(0)?.SerializedAdditionalRawData,
- "content_filter_results");
+ if ((chatUpdate?.Choices?.ElementAtOrDefault(0)?.Patch.Contains("$.content_filter_results"u8) ?? false) && (chatUpdate?.Choices?.ElementAtOrDefault(0)?.Patch.TryGetJson("$.content_filter_results"u8, out ReadOnlyMemory mem) ?? false))
+ {
+ using JsonDocument doc = JsonDocument.Parse(mem);
+ return ResponseContentFilterResult.DeserializeResponseContentFilterResult(doc.RootElement, ModelSerializationExtensions.WireOptions);
+ }
+ return null;
}
[Experimental("AOAI001")]
public static void SetUserSecurityContext(this ChatCompletionOptions options, UserSecurityContext userSecurityContext)
{
- options.SerializedAdditionalRawData ??= new Dictionary();
-
- AdditionalPropertyHelpers.SetAdditionalProperty(
- options.SerializedAdditionalRawData,
- "user_security_context",
- userSecurityContext);
+ using BinaryContent contentBytes = BinaryContent.Create(userSecurityContext, ModelSerializationExtensions.WireOptions);
+ using var stream = new MemoryStream();
+ contentBytes.WriteTo(stream);
+ BinaryData bin = new(stream.ToArray());
+ options.Patch.Set("$.user_security_context"u8, bin);
}
[Experimental("AOAI001")]
public static UserSecurityContext GetUserSecurityContext(this ChatCompletionOptions options)
{
- return AdditionalPropertyHelpers.GetAdditionalPropertyAsUserSecurityContext(
- options.SerializedAdditionalRawData,
- "user_security_context");
+ if (options.Patch.Contains("$.user_security_context"u8) && options.Patch.TryGetJson("$.user_security_context"u8, out ReadOnlyMemory mem))
+ {
+ using JsonDocument doc = JsonDocument.Parse(mem);
+ return UserSecurityContext.DeserializeUserSecurityContext(doc.RootElement, ModelSerializationExtensions.WireOptions);
+ }
+ return null;
}
[Experimental("AOAI001")]
public static string GetMessageReasoningContent(this ChatCompletion chatCompletion)
{
- if (chatCompletion?.Choices?.FirstOrDefault()?.Message?.SerializedAdditionalRawData?.TryGetValue("reasoning_content", out BinaryData reasoningContentData) == true
- && reasoningContentData?.ToString() is string retrievedReasoningContent)
+ if ((chatCompletion?.Choices?.FirstOrDefault()?.Message?.Patch.Contains("$.reasoning_content"u8) ?? false) &&
+ (chatCompletion?.Choices?.FirstOrDefault()?.Message?.Patch.TryGetValue("$.reasoning_content"u8, out string retrievedReasoningContent) ?? false))
{
return retrievedReasoningContent;
}
return null;
}
-}
\ No newline at end of file
+}
diff --git a/sdk/openai/Azure.AI.OpenAI/src/Custom/Common/AdditionalPropertyHelpers.cs b/sdk/openai/Azure.AI.OpenAI/src/Custom/Common/AdditionalPropertyHelpers.cs
index b724d26f2a84..19a1cce2a20d 100644
--- a/sdk/openai/Azure.AI.OpenAI/src/Custom/Common/AdditionalPropertyHelpers.cs
+++ b/sdk/openai/Azure.AI.OpenAI/src/Custom/Common/AdditionalPropertyHelpers.cs
@@ -1,13 +1,16 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-using Azure.AI.OpenAI.Chat;
+using System;
using System.ClientModel.Primitives;
using System.Text.Json;
+using Azure.AI.OpenAI.Chat;
namespace Azure.AI.OpenAI.Internal;
#pragma warning disable AOAI001
+#pragma warning disable SCME0001
+
internal static class AdditionalPropertyHelpers
{
private static string SARD_EMPTY_SENTINEL = "__EMPTY__";
@@ -101,6 +104,20 @@ internal static void SetEmptySentinelValue(IDictionary addit
additionalProperties[key] = BinaryData.FromBytes(stream.ToArray());
}
+ internal static void SetEmptySentinelValue(ref JsonPatch patch, ReadOnlySpan path)
+ {
+ patch.Set(path, SARD_EMPTY_SENTINEL);
+ }
+
+ internal static bool GetIsEmptySentinelValue(JsonPatch patch, ReadOnlySpan path)
+ {
+ if (patch.Contains(path) && patch.TryGetValue(path, out string val))
+ {
+ return string.Equals(val, SARD_EMPTY_SENTINEL);
+ }
+ return false;
+ }
+
internal static bool GetIsEmptySentinelValue(IDictionary additionalProperties, string key)
{
return additionalProperties is not null
@@ -108,4 +125,4 @@ internal static bool GetIsEmptySentinelValue(IDictionary add
&& StringComparer.OrdinalIgnoreCase.Equals(existingValue.ToString(), $@"""{SARD_EMPTY_SENTINEL}""");
}
}
-#pragma warning restore AOAI001
\ No newline at end of file
+#pragma warning restore AOAI001
diff --git a/sdk/openai/Azure.AI.OpenAI/src/Custom/Internal/VectorStoreCollectionPageToken.cs b/sdk/openai/Azure.AI.OpenAI/src/Custom/Internal/VectorStoreCollectionPageToken.cs
new file mode 100644
index 000000000000..ffa8ba0e1213
--- /dev/null
+++ b/sdk/openai/Azure.AI.OpenAI/src/Custom/Internal/VectorStoreCollectionPageToken.cs
@@ -0,0 +1,149 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+using System.ClientModel;
+using System.ClientModel.Primitives;
+using System.Diagnostics;
+using System.Text.Json;
+
+#nullable enable
+
+namespace Azure.AI.OpenAI.VectorStores;
+
+internal class VectorStoreCollectionPageToken : ContinuationToken
+{
+ protected VectorStoreCollectionPageToken(int? limit, string? order, string? after, string? before)
+ {
+ Limit = limit;
+ Order = order;
+ After = after;
+ Before = before;
+ }
+
+ public int? Limit { get; }
+
+ public string? Order { get; }
+
+ public string? After { get; }
+
+ public string? Before { get; }
+
+ public override BinaryData ToBytes()
+ {
+ using MemoryStream stream = new();
+ using Utf8JsonWriter writer = new(stream);
+
+ writer.WriteStartObject();
+
+ if (Limit.HasValue)
+ {
+ writer.WriteNumber("limit", Limit.Value);
+ }
+
+ if (Order is not null)
+ {
+ writer.WriteString("order", Order);
+ }
+
+ if (After is not null)
+ {
+ writer.WriteString("after", After);
+ }
+
+ if (Before is not null)
+ {
+ writer.WriteString("before", Before);
+ }
+
+ writer.WriteEndObject();
+
+ writer.Flush();
+ stream.Position = 0;
+
+ return BinaryData.FromStream(stream);
+ }
+
+ public static VectorStoreCollectionPageToken FromToken(ContinuationToken pageToken)
+ {
+ if (pageToken is VectorStoreCollectionPageToken token)
+ {
+ return token;
+ }
+
+ BinaryData data = pageToken.ToBytes();
+
+ if (data.ToMemory().Length == 0)
+ {
+ throw new ArgumentException("Failed to create VectorStoresPageToken from provided pageToken.", nameof(pageToken));
+ }
+
+ Utf8JsonReader reader = new(data);
+
+ int? limit = null;
+ string? order = null;
+ string? after = null;
+ string? before = null;
+
+ reader.Read();
+
+ Debug.Assert(reader.TokenType == JsonTokenType.StartObject);
+
+ while (reader.Read())
+ {
+ if (reader.TokenType == JsonTokenType.EndObject)
+ {
+ break;
+ }
+
+ Debug.Assert(reader.TokenType == JsonTokenType.PropertyName);
+
+ string propertyName = reader.GetString()!;
+
+ switch (propertyName)
+ {
+ case "limit":
+ reader.Read();
+ Debug.Assert(reader.TokenType == JsonTokenType.Number);
+ limit = reader.GetInt32();
+ break;
+ case "order":
+ reader.Read();
+ Debug.Assert(reader.TokenType == JsonTokenType.String);
+ order = reader.GetString();
+ break;
+ case "after":
+ reader.Read();
+ Debug.Assert(reader.TokenType == JsonTokenType.String);
+ after = reader.GetString();
+ break;
+ case "before":
+ reader.Read();
+ Debug.Assert(reader.TokenType == JsonTokenType.String);
+ before = reader.GetString();
+ break;
+ default:
+ throw new JsonException($"Unrecognized property '{propertyName}'.");
+ }
+ }
+
+ return new(limit, order, after, before);
+ }
+
+ public static VectorStoreCollectionPageToken FromOptions(int? limit, string? order, string? after, string? before)
+ => new(limit, order, after, before);
+
+ public static VectorStoreCollectionPageToken? FromResponse(ClientResult result, int? limit, string? order, string? before)
+ {
+ PipelineResponse response = result.GetRawResponse();
+ using JsonDocument doc = JsonDocument.Parse(response.Content);
+ string lastId = doc.RootElement.GetProperty("last_id"u8).GetString()!;
+ bool hasMore = doc.RootElement.GetProperty("has_more"u8).GetBoolean();
+
+ if (!hasMore || lastId is null)
+ {
+ return null;
+ }
+
+ return new(limit, order, lastId, before);
+ }
+}
diff --git a/sdk/openai/Azure.AI.OpenAI/src/Custom/Internal/VectorStoreCollectionResult.cs b/sdk/openai/Azure.AI.OpenAI/src/Custom/Internal/VectorStoreCollectionResult.cs
new file mode 100644
index 000000000000..9b99510954e0
--- /dev/null
+++ b/sdk/openai/Azure.AI.OpenAI/src/Custom/Internal/VectorStoreCollectionResult.cs
@@ -0,0 +1,99 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+using System.ClientModel;
+using System.ClientModel.Primitives;
+using System.Collections.Generic;
+using System.Text.Json;
+
+#nullable enable
+
+namespace Azure.AI.OpenAI.VectorStores;
+
+internal class VectorStoreCollectionResult : CollectionResult
+{
+ private readonly VectorStoreClient _vectorStoreClient;
+ private readonly ClientPipeline _pipeline;
+ private readonly RequestOptions? _options;
+
+ // Initial values
+ private readonly int? _limit;
+ private readonly string? _order;
+ private readonly string? _after;
+ private readonly string? _before;
+
+ public VectorStoreCollectionResult(VectorStoreClient vectorStoreClient,
+ ClientPipeline pipeline, RequestOptions? options,
+ int? limit, string? order, string? after, string? before)
+ {
+ _vectorStoreClient = vectorStoreClient;
+ _pipeline = pipeline;
+ _options = options;
+
+ _limit = limit;
+ _order = order;
+ _after = after;
+ _before = before;
+ }
+
+ public override IEnumerable GetRawPages()
+ {
+ ClientResult page = GetFirstPage();
+ yield return page;
+
+ while (HasNextPage(page))
+ {
+ page = GetNextPage(page);
+ yield return page;
+ }
+ }
+
+ protected override IEnumerable GetValuesFromPage(ClientResult page)
+ {
+ Argument.AssertNotNull(page, nameof(page));
+
+ PipelineResponse response = page.GetRawResponse();
+ InternalListVectorStoresResponse list = ModelReaderWriter.Read(response.Content, ModelReaderWriterOptions.Json, OpenAIContext.Default)!;
+ return list.Data;
+ }
+
+ public override ContinuationToken? GetContinuationToken(ClientResult page)
+ {
+ Argument.AssertNotNull(page, nameof(page));
+
+ return VectorStoreCollectionPageToken.FromResponse(page, _limit, _order, _before);
+ }
+
+ public ClientResult GetFirstPage()
+ => GetVectorStores(_limit, _order, _after, _before, _options);
+
+ public ClientResult GetNextPage(ClientResult result)
+ {
+ Argument.AssertNotNull(result, nameof(result));
+
+ PipelineResponse response = result.GetRawResponse();
+
+ using JsonDocument doc = JsonDocument.Parse(response.Content);
+ string lastId = doc.RootElement.GetProperty("last_id"u8).GetString()!;
+
+ return GetVectorStores(_limit, _order, lastId, _before, _options);
+ }
+
+ public static bool HasNextPage(ClientResult result)
+ {
+ Argument.AssertNotNull(result, nameof(result));
+
+ PipelineResponse response = result.GetRawResponse();
+
+ using JsonDocument doc = JsonDocument.Parse(response.Content);
+ bool hasMore = doc.RootElement.GetProperty("has_more"u8).GetBoolean();
+
+ return hasMore;
+ }
+
+ internal virtual ClientResult GetVectorStores(int? limit, string? order, string? after, string? before, RequestOptions? options)
+ {
+ using PipelineMessage message = _vectorStoreClient.CreateGetVectorStoresRequest(limit, order, after, before, options);
+ return ClientResult.FromResponse(_pipeline.ProcessMessage(message, options));
+ }
+}
diff --git a/sdk/openai/Azure.AI.OpenAI/src/Custom/Internal/VectorStoreFileCollectionPageToken.cs b/sdk/openai/Azure.AI.OpenAI/src/Custom/Internal/VectorStoreFileCollectionPageToken.cs
new file mode 100644
index 000000000000..8a92c1a135b5
--- /dev/null
+++ b/sdk/openai/Azure.AI.OpenAI/src/Custom/Internal/VectorStoreFileCollectionPageToken.cs
@@ -0,0 +1,179 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+using System.ClientModel;
+using System.ClientModel.Primitives;
+using System.Diagnostics;
+using System.Text.Json;
+
+#nullable enable
+
+namespace Azure.AI.OpenAI.VectorStores;
+
+internal class VectorStoreFileCollectionPageToken : ContinuationToken
+{
+ protected VectorStoreFileCollectionPageToken(string vectorStoreId, int? limit, string? order, string? after, string? before, string? filter)
+ {
+ VectorStoreId = vectorStoreId;
+
+ Limit = limit;
+ Order = order;
+ After = after;
+ Before = before;
+ Filter = filter;
+ }
+
+ public string VectorStoreId { get; }
+
+ public int? Limit { get; }
+
+ public string? Order { get; }
+
+ public string? After { get; }
+
+ public string? Before { get; }
+
+ public string? Filter { get; }
+
+ public override BinaryData ToBytes()
+ {
+ using MemoryStream stream = new();
+ using Utf8JsonWriter writer = new(stream);
+
+ writer.WriteStartObject();
+ writer.WriteString("vectorStoreId", VectorStoreId);
+
+ if (Limit.HasValue)
+ {
+ writer.WriteNumber("limit", Limit.Value);
+ }
+
+ if (Order is not null)
+ {
+ writer.WriteString("order", Order);
+ }
+
+ if (After is not null)
+ {
+ writer.WriteString("after", After);
+ }
+
+ if (Before is not null)
+ {
+ writer.WriteString("before", Before);
+ }
+
+ if (Filter is not null)
+ {
+ writer.WriteString("filter", Filter);
+ }
+
+ writer.WriteEndObject();
+
+ writer.Flush();
+ stream.Position = 0;
+
+ return BinaryData.FromStream(stream);
+ }
+
+ public static VectorStoreFileCollectionPageToken FromToken(ContinuationToken pageToken)
+ {
+ if (pageToken is VectorStoreFileCollectionPageToken token)
+ {
+ return token;
+ }
+
+ BinaryData data = pageToken.ToBytes();
+
+ if (data.ToMemory().Length == 0)
+ {
+ throw new ArgumentException("Failed to create VectorStoreFilesPageToken from provided pageToken.", nameof(pageToken));
+ }
+
+ Utf8JsonReader reader = new(data);
+
+ string vectorStoreId = null!;
+ int? limit = null;
+ string? order = null;
+ string? after = null;
+ string? before = null;
+ string? filter = null;
+
+ reader.Read();
+
+ Debug.Assert(reader.TokenType == JsonTokenType.StartObject);
+
+ while (reader.Read())
+ {
+ if (reader.TokenType == JsonTokenType.EndObject)
+ {
+ break;
+ }
+
+ Debug.Assert(reader.TokenType == JsonTokenType.PropertyName);
+
+ string propertyName = reader.GetString()!;
+
+ switch (propertyName)
+ {
+ case "vectorStoreId":
+ reader.Read();
+ Debug.Assert(reader.TokenType == JsonTokenType.String);
+ vectorStoreId = reader.GetString()!;
+ break;
+ case "limit":
+ reader.Read();
+ Debug.Assert(reader.TokenType == JsonTokenType.Number);
+ limit = reader.GetInt32();
+ break;
+ case "order":
+ reader.Read();
+ Debug.Assert(reader.TokenType == JsonTokenType.String);
+ order = reader.GetString();
+ break;
+ case "after":
+ reader.Read();
+ Debug.Assert(reader.TokenType == JsonTokenType.String);
+ after = reader.GetString();
+ break;
+ case "before":
+ reader.Read();
+ Debug.Assert(reader.TokenType == JsonTokenType.String);
+ before = reader.GetString();
+ break;
+ case "filter":
+ reader.Read();
+ Debug.Assert(reader.TokenType == JsonTokenType.String);
+ filter = reader.GetString();
+ break;
+ default:
+ throw new JsonException($"Unrecognized property '{propertyName}'.");
+ }
+ }
+
+ if (vectorStoreId is null)
+ {
+ throw new ArgumentException("Failed to create VectorStoreFilesPageToken from provided pageToken.", nameof(pageToken));
+ }
+
+ return new(vectorStoreId, limit, order, after, before, filter);
+ }
+
+ public static VectorStoreFileCollectionPageToken FromOptions(string vectorStoreId, int? limit, string? order, string? after, string? before, string? filter)
+ => new(vectorStoreId, limit, order, after, before, filter);
+
+ public static VectorStoreFileCollectionPageToken? FromResponse(ClientResult result, string vectorStoreId, int? limit, string? order, string? before, string? filter)
+ {
+ PipelineResponse response = result.GetRawResponse();
+ using JsonDocument doc = JsonDocument.Parse(response.Content);
+ string lastId = doc.RootElement.GetProperty("last_id"u8).GetString()!;
+ bool hasMore = doc.RootElement.GetProperty("has_more"u8).GetBoolean();
+
+ if (!hasMore || lastId is null)
+ {
+ return null;
+ }
+
+ return new(vectorStoreId, limit, order, lastId, before, filter);
+ }
+}
diff --git a/sdk/openai/Azure.AI.OpenAI/src/Custom/Responses/AzureResponsesClient.Protocol.cs b/sdk/openai/Azure.AI.OpenAI/src/Custom/Responses/AzureResponsesClient.Protocol.cs
index 2dbab7685fb1..6a81525d4393 100644
--- a/sdk/openai/Azure.AI.OpenAI/src/Custom/Responses/AzureResponsesClient.Protocol.cs
+++ b/sdk/openai/Azure.AI.OpenAI/src/Custom/Responses/AzureResponsesClient.Protocol.cs
@@ -41,7 +41,7 @@ internal override PipelineMessage CreateGetResponseRequest(string responseId, IE
.WithOptions(options)
.Build();
- internal override PipelineMessage CreateGetInputItemsRequest(string responseId, int? limit, string order, string after, string before, RequestOptions options)
+ internal PipelineMessage CreateGetInputItemsRequest(string responseId, int? limit, string order, string after, string before, RequestOptions options)
=> new AzureOpenAIPipelineMessageBuilder(Pipeline, _aoaiEndpoint, _apiVersion, string.Empty)
.WithPath("responses", responseId, "input_items")
.WithMethod("GET")
@@ -74,4 +74,4 @@ private static string GetIncludeQueryStringValue(IEnumerable
}
}
-#endif
\ No newline at end of file
+#endif
diff --git a/sdk/openai/Azure.AI.OpenAI/src/Custom/VectorStores/AzureVectorStoreClient.Protocol.cs b/sdk/openai/Azure.AI.OpenAI/src/Custom/VectorStores/AzureVectorStoreClient.Protocol.cs
index a881aef45ce6..bdee746839af 100644
--- a/sdk/openai/Azure.AI.OpenAI/src/Custom/VectorStores/AzureVectorStoreClient.Protocol.cs
+++ b/sdk/openai/Azure.AI.OpenAI/src/Custom/VectorStores/AzureVectorStoreClient.Protocol.cs
@@ -5,7 +5,6 @@
using System.ClientModel;
using System.ClientModel.Primitives;
-using System.Threading;
using Azure.AI.OpenAI.Utility;
namespace Azure.AI.OpenAI.VectorStores;
diff --git a/sdk/openai/Azure.AI.OpenAI/tests/ChatTests.cs b/sdk/openai/Azure.AI.OpenAI/tests/ChatTests.cs
index 721f46e23aa2..ac509b627d5d 100644
--- a/sdk/openai/Azure.AI.OpenAI/tests/ChatTests.cs
+++ b/sdk/openai/Azure.AI.OpenAI/tests/ChatTests.cs
@@ -20,7 +20,8 @@
using OpenAI.TestFramework.Utils;
namespace Azure.AI.OpenAI.Tests;
-
+#pragma warning disable AOAI001
+#pragma warning disable SCME0001
public partial class ChatTests : AoaiTestBase
{
public ChatTests(bool isAsync) : base(isAsync)
@@ -168,10 +169,18 @@ bool GetSerializedOptionsContains(string value)
BinaryData serialized = ModelReaderWriter.Write(options);
return serialized.ToString().Contains(value);
}
- async Task AssertExpectedSerializationAsync(bool hasOldMaxTokens, bool hasNewMaxCompletionTokens)
+ async Task AssertExpectedSerializationAsync(bool hasOldMaxTokens, bool hasNewMaxCompletionTokens, bool isSentilel=false)
{
_ = await client.CompleteChatAsync(["Just mocking, no call here"], options);
- Assert.That(GetSerializedOptionsContains("max_tokens"), Is.EqualTo(hasOldMaxTokens));
+ if (isSentilel)
+ {
+ Assert.True(GetSerializedOptionsContains("max_tokens"));
+ Assert.True(GetSerializedOptionsContains("__EMPTY__"));
+ }
+ else
+ {
+ Assert.That(GetSerializedOptionsContains("max_tokens"), Is.EqualTo(hasOldMaxTokens));
+ }
Assert.That(GetSerializedOptionsContains("max_completion_tokens"), Is.EqualTo(hasNewMaxCompletionTokens));
}
@@ -187,12 +196,12 @@ async Task AssertExpectedSerializationAsync(bool hasOldMaxTokens, bool hasNewMax
await AssertExpectedSerializationAsync(true, false);
options.SetNewMaxCompletionTokensPropertyEnabled();
- await AssertExpectedSerializationAsync(false, true);
- await AssertExpectedSerializationAsync(false, true);
+ await AssertExpectedSerializationAsync(false, true, true);
+ await AssertExpectedSerializationAsync(false, true, true);
options.MaxOutputTokenCount = null;
- await AssertExpectedSerializationAsync(false, false);
+ await AssertExpectedSerializationAsync(false, false, true);
options.MaxOutputTokenCount = 42;
- await AssertExpectedSerializationAsync(false, true);
+ await AssertExpectedSerializationAsync(false, true, true);
options.SetNewMaxCompletionTokensPropertyEnabled(false);
await AssertExpectedSerializationAsync(true, false);
@@ -560,7 +569,6 @@ public async Task MaxOutputTokensWorksAcrossModels(string testConfigName, bool u
{
options.SetNewMaxCompletionTokensPropertyEnabled();
}
-
ChatCompletion completion = await client.CompleteChatAsync(
["Hello, world! Please write a funny haiku to greet me."],
options);
@@ -568,15 +576,16 @@ public async Task MaxOutputTokensWorksAcrossModels(string testConfigName, bool u
string serializedOptionsAfterUse = ModelReaderWriter.Write(options).ToString();
+ Assert.That(serializedOptionsAfterUse, Does.Contain("max_tokens"));
if (useNewProperty)
{
Assert.That(serializedOptionsAfterUse, Does.Contain("max_completion_tokens"));
- Assert.That(serializedOptionsAfterUse, Does.Not.Contain("max_tokens"));
+ Assert.That(serializedOptionsAfterUse, Does.Contain("__EMPTY__"));
}
else
{
Assert.That(serializedOptionsAfterUse, Does.Not.Contain("max_completion_tokens"));
- Assert.That(serializedOptionsAfterUse, Does.Contain("max_tokens"));
+ Assert.That(serializedOptionsAfterUse, Does.Not.Contain("__EMPTY__"));
}
}
#endregion
diff --git a/sdk/openai/Azure.AI.OpenAI/tests/ResponsesTests.cs b/sdk/openai/Azure.AI.OpenAI/tests/ResponsesTests.cs
index dd63f92235e9..b516defed193 100644
--- a/sdk/openai/Azure.AI.OpenAI/tests/ResponsesTests.cs
+++ b/sdk/openai/Azure.AI.OpenAI/tests/ResponsesTests.cs
@@ -83,10 +83,12 @@ public async Task FileSearch(string deploymentName)
Assert.That(citationAnnotation?.FileId, Is.EqualTo(testFile.Id));
Assert.That(citationAnnotation?.Index, Is.GreaterThan(0));
- await foreach (ResponseItem inputItem in client.GetResponseInputItemsAsync(response?.Id))
- {
- Console.WriteLine(ModelReaderWriter.Write(inputItem).ToString());
- }
+ // The AzureOpenAI endpoint does not serve the path for
+ // https://{Azure OpenAI endpoint}/responses/{response.Id}/input_items
+ //await foreach (ResponseItem inputItem in client.GetResponseInputItemsAsync(response?.Id))
+ //{
+ // Console.WriteLine(ModelReaderWriter.Write(inputItem).ToString());
+ //}
}
[RecordedTest]
@@ -516,32 +518,33 @@ public async Task AllInstructionMethodsWork(ResponsesTestInstructionMethod instr
{
Assert.That(retrievedResponse?.Instructions, Is.EqualTo(instructions));
}
-
- List listedItems = [];
- await foreach (ResponseItem item in client.GetResponseInputItemsAsync(response?.Id))
- {
- listedItems.Add(item);
- }
-
- if (instructionMethod == ResponsesTestInstructionMethod.InstructionsProperty)
- {
- Assert.That(listedItems, Has.Count.EqualTo(1));
- Assert.That((listedItems[0] as MessageResponseItem)?.Content?.FirstOrDefault()?.Text, Is.EqualTo(userMessage));
- }
- else
- {
- Assert.That(listedItems, Has.Count.EqualTo(2));
- MessageResponseItem? systemOrDeveloperMessage = listedItems?[1] as MessageResponseItem;
- Assert.That(systemOrDeveloperMessage, Is.Not.Null);
- Assert.That(systemOrDeveloperMessage?.Role, Is.EqualTo(instructionMethod switch
- {
- ResponsesTestInstructionMethod.DeveloperMessage => MessageRole.Developer,
- ResponsesTestInstructionMethod.SystemMessage => MessageRole.System,
- _ => throw new ArgumentException()
- }));
- Assert.That(systemOrDeveloperMessage?.Content?.FirstOrDefault()?.Text, Is.EqualTo(instructions));
- Assert.That((listedItems?[0] as MessageResponseItem)?.Content?.FirstOrDefault()?.Text, Is.EqualTo(userMessage));
- }
+ // The AzureOpenAI endpoint does not serve the path for
+ // https://{Azure OpenAI endpoint}/responses/{response.Id}/input_items
+ //List listedItems = [];
+ //await foreach (ResponseItem item in client.GetResponseInputItemsAsync(response?.Id))
+ //{
+ // listedItems.Add(item);
+ //}
+
+ //if (instructionMethod == ResponsesTestInstructionMethod.InstructionsProperty)
+ //{
+ // Assert.That(listedItems, Has.Count.EqualTo(1));
+ // Assert.That((listedItems[0] as MessageResponseItem)?.Content?.FirstOrDefault()?.Text, Is.EqualTo(userMessage));
+ //}
+ //else
+ //{
+ // Assert.That(listedItems, Has.Count.EqualTo(2));
+ // MessageResponseItem? systemOrDeveloperMessage = listedItems?[1] as MessageResponseItem;
+ // Assert.That(systemOrDeveloperMessage, Is.Not.Null);
+ // Assert.That(systemOrDeveloperMessage?.Role, Is.EqualTo(instructionMethod switch
+ // {
+ // ResponsesTestInstructionMethod.DeveloperMessage => MessageRole.Developer,
+ // ResponsesTestInstructionMethod.SystemMessage => MessageRole.System,
+ // _ => throw new ArgumentException()
+ // }));
+ // Assert.That(systemOrDeveloperMessage?.Content?.FirstOrDefault()?.Text, Is.EqualTo(instructions));
+ // Assert.That((listedItems?[0] as MessageResponseItem)?.Content?.FirstOrDefault()?.Text, Is.EqualTo(userMessage));
+ //}
}
[RecordedTest]
@@ -783,7 +786,7 @@ public void ItemSerialization()
}
AssertSerializationRoundTrip(
- @"{""type"":""message"",""potato_details"":{""cultivar"":""russet""},""role"":""potato""}",
+ @"{""type"":""message"",""role"":""potato"",""potato_details"":{""cultivar"":""russet""}}",
potatoMessage =>
{
Assert.That(potatoMessage.Role, Is.EqualTo(MessageRole.Unknown));
diff --git a/sdk/openai/Azure.AI.OpenAI/tests/Utils/AoaiTestBase.cs b/sdk/openai/Azure.AI.OpenAI/tests/Utils/AoaiTestBase.cs
index 6a31103f41bf..304b5fc54a6d 100644
--- a/sdk/openai/Azure.AI.OpenAI/tests/Utils/AoaiTestBase.cs
+++ b/sdk/openai/Azure.AI.OpenAI/tests/Utils/AoaiTestBase.cs
@@ -53,7 +53,15 @@ public class AoaiTestBase : RecordedClientTestBase where TClient : clas
public AzureTestEnvironment TestEnvironment { get; }
- protected AoaiTestBase(bool isAsync) : this(isAsync, null, null)
+ private static RecordedTestMode? GetRecordedTestMode() => Environment.GetEnvironmentVariable("AZURE_TEST_MODE") switch
+ {
+ "Playback" => RecordedTestMode.Playback,
+ "Live" => RecordedTestMode.Live,
+ "Record" => RecordedTestMode.Record,
+ _ => null
+ };
+
+ protected AoaiTestBase(bool isAsync) : this(isAsync: isAsync, mode: GetRecordedTestMode(), automaticRecord: null)
{ }
protected AoaiTestBase(bool isAsync, RecordedTestMode? mode = null, bool? automaticRecord = null)
diff --git a/sdk/resourcemanager/Azure.ResourceManager/tests/Azure.ResourceManager.Tests.csproj b/sdk/resourcemanager/Azure.ResourceManager/tests/Azure.ResourceManager.Tests.csproj
index 1f37b5a2cff5..3f2a2fa30a62 100644
--- a/sdk/resourcemanager/Azure.ResourceManager/tests/Azure.ResourceManager.Tests.csproj
+++ b/sdk/resourcemanager/Azure.ResourceManager/tests/Azure.ResourceManager.Tests.csproj
@@ -12,7 +12,7 @@
-
+
From 22603b7aa21de08a9d6c4dcfacd48843890fdfe2 Mon Sep 17 00:00:00 2001
From: Travis Wilson <35748617+trrwilson@users.noreply.github.com>
Date: Tue, 4 Nov 2025 11:36:35 -0800
Subject: [PATCH 05/58] apply fixes for AzureAISearch tool (#53656)
---
.../api/Azure.AI.Agents.net8.0.cs | 71 ++++++++++---------
.../api/Azure.AI.Agents.netstandard2.0.cs | 71 ++++++++++---------
.../Azure.AI.Agents/src/Custom/AgentTool.cs | 3 +-
.../src/Custom/AzureAISearchAgentTool.cs | 33 +++++++++
.../src/Custom/AzureAISearchIndex.cs | 13 ++++
.../src/Custom/AzureAISearchToolOptions.cs | 21 ++++++
.../Generated/AzureAIAgentsModelFactory.cs | 20 +++---
.../Generated/Models/AzureAIAgentsContext.cs | 4 +-
.../AzureAISearchAgentTool.Serialization.cs | 13 ++--
.../Models/AzureAISearchAgentTool.cs | 19 +----
...cs => AzureAISearchIndex.Serialization.cs} | 44 ++++++------
...IndexResource.cs => AzureAISearchIndex.cs} | 10 +--
...AzureAISearchToolOptions.Serialization.cs} | 48 ++++++-------
...esource.cs => AzureAISearchToolOptions.cs} | 18 ++---
.../Azure.AI.Agents/tests/AgentsSmokeTests.cs | 16 +++--
15 files changed, 228 insertions(+), 176 deletions(-)
create mode 100644 sdk/ai/Azure.AI.Agents/src/Custom/AzureAISearchAgentTool.cs
create mode 100644 sdk/ai/Azure.AI.Agents/src/Custom/AzureAISearchIndex.cs
create mode 100644 sdk/ai/Azure.AI.Agents/src/Custom/AzureAISearchToolOptions.cs
rename sdk/ai/Azure.AI.Agents/src/Generated/Models/{AISearchIndexResource.Serialization.cs => AzureAISearchIndex.Serialization.cs} (75%)
rename sdk/ai/Azure.AI.Agents/src/Generated/Models/{AISearchIndexResource.cs => AzureAISearchIndex.cs} (87%)
rename sdk/ai/Azure.AI.Agents/src/Generated/Models/{AzureAISearchToolResource.Serialization.cs => AzureAISearchToolOptions.Serialization.cs} (66%)
rename sdk/ai/Azure.AI.Agents/src/Generated/Models/{AzureAISearchToolResource.cs => AzureAISearchToolOptions.cs} (61%)
diff --git a/sdk/ai/Azure.AI.Agents/api/Azure.AI.Agents.net8.0.cs b/sdk/ai/Azure.AI.Agents/api/Azure.AI.Agents.net8.0.cs
index a4ddc15334ed..f9a39e19b78b 100644
--- a/sdk/ai/Azure.AI.Agents/api/Azure.AI.Agents.net8.0.cs
+++ b/sdk/ai/Azure.AI.Agents/api/Azure.AI.Agents.net8.0.cs
@@ -533,7 +533,7 @@ public abstract partial class AgentTool : System.ClientModel.Primitives.IJsonMod
{
internal AgentTool() { }
public static OpenAI.Responses.ResponseTool CreateA2ATool(System.Uri baseUrl, string agentCardPath = null) { throw null; }
- public static Azure.AI.Agents.AzureAISearchAgentTool CreateAzureAISearchTool() { throw null; }
+ public static Azure.AI.Agents.AzureAISearchAgentTool CreateAzureAISearchTool(Azure.AI.Agents.AzureAISearchToolOptions options = null) { throw null; }
public static Azure.AI.Agents.BingCustomSearchAgentTool CreateBingCustomSearchTool(Azure.AI.Agents.BingCustomSearchToolParameters parameters) { throw null; }
public static Azure.AI.Agents.BingGroundingAgentTool CreateBingGroundingTool(Azure.AI.Agents.BingGroundingSearchToolParameters parameters) { throw null; }
public static Azure.AI.Agents.BrowserAutomationAgentTool CreateBrowserAutomationTool(Azure.AI.Agents.BrowserAutomationToolParameters parameters) { throw null; }
@@ -645,25 +645,6 @@ protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter write
public static bool operator !=(Azure.AI.Agents.AgentWorkflowActionStatus left, Azure.AI.Agents.AgentWorkflowActionStatus right) { throw null; }
public override string ToString() { throw null; }
}
- public partial class AISearchIndexResource : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel
- {
- public AISearchIndexResource(string projectConnectionId) { }
- public string Filter { get { throw null; } set { } }
- public string IndexAssetId { get { throw null; } set { } }
- public string IndexName { get { throw null; } set { } }
- public string ProjectConnectionId { get { throw null; } set { } }
- public Azure.AI.Agents.AzureAISearchQueryType? QueryType { get { throw null; } set { } }
- public int? TopK { get { throw null; } set { } }
- protected virtual Azure.AI.Agents.AISearchIndexResource JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
- protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
- protected virtual Azure.AI.Agents.AISearchIndexResource PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
- protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
- Azure.AI.Agents.AISearchIndexResource System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
- void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
- Azure.AI.Agents.AISearchIndexResource System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
- string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
- System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
- }
public partial class ApiInnerError : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel
{
internal ApiInnerError() { }
@@ -710,10 +691,10 @@ public static partial class AzureAIAgentsModelFactory
public static Azure.AI.Agents.AgentVersion AgentVersion(System.Collections.Generic.IDictionary metadata = null, string id = null, string name = null, string version = null, string description = null, System.DateTimeOffset createdAt = default(System.DateTimeOffset), Azure.AI.Agents.AgentDefinition definition = null) { throw null; }
public static Azure.AI.Agents.AgentVersionCreationOptions AgentVersionCreationOptions(System.Collections.Generic.IDictionary metadata = null, string description = null, Azure.AI.Agents.AgentDefinition definition = null) { throw null; }
public static Azure.AI.Agents.AgentWorkflowActionResponseItem AgentWorkflowActionResponseItem(string id = null, Azure.AI.Agents.CreatedBy createdBy = null, string actionId = null, string parentActionId = null, string previousActionId = null, Azure.AI.Agents.AgentWorkflowActionStatus? status = default(Azure.AI.Agents.AgentWorkflowActionStatus?)) { throw null; }
- public static Azure.AI.Agents.AISearchIndexResource AISearchIndexResource(string projectConnectionId = null, string indexName = null, Azure.AI.Agents.AzureAISearchQueryType? queryType = default(Azure.AI.Agents.AzureAISearchQueryType?), int? topK = default(int?), string filter = null, string indexAssetId = null) { throw null; }
public static Azure.AI.Agents.ApiInnerError ApiInnerError(string code = null, Azure.AI.Agents.ApiInnerError innererror = null) { throw null; }
- public static Azure.AI.Agents.AzureAISearchAgentTool AzureAISearchAgentTool(Azure.AI.Agents.AzureAISearchToolResource azureAiSearch = null) { throw null; }
- public static Azure.AI.Agents.AzureAISearchToolResource AzureAISearchToolResource(System.Collections.Generic.IEnumerable indexes = null) { throw null; }
+ public static Azure.AI.Agents.AzureAISearchAgentTool AzureAISearchAgentTool(Azure.AI.Agents.AzureAISearchToolOptions options = null) { throw null; }
+ public static Azure.AI.Agents.AzureAISearchIndex AzureAISearchIndex(string projectConnectionId = null, string indexName = null, Azure.AI.Agents.AzureAISearchQueryType? queryType = default(Azure.AI.Agents.AzureAISearchQueryType?), int? topK = default(int?), string filter = null, string indexAssetId = null) { throw null; }
+ public static Azure.AI.Agents.AzureAISearchToolOptions AzureAISearchToolOptions(System.Collections.Generic.IEnumerable indexes = null) { throw null; }
public static Azure.AI.Agents.AzureFunctionAgentTool AzureFunctionAgentTool(Azure.AI.Agents.AzureFunctionDefinition azureFunction = null) { throw null; }
public static Azure.AI.Agents.AzureFunctionBinding AzureFunctionBinding(Azure.AI.Agents.AzureFunctionStorageQueue storageQueue = null) { throw null; }
public static Azure.AI.Agents.AzureFunctionDefinition AzureFunctionDefinition(Azure.AI.Agents.AzureFunctionDefinitionFunction function = null, Azure.AI.Agents.AzureFunctionBinding inputBinding = null, Azure.AI.Agents.AzureFunctionBinding outputBinding = null) { throw null; }
@@ -778,8 +759,9 @@ public static partial class AzureAIAgentsModelFactory
}
public partial class AzureAISearchAgentTool : Azure.AI.Agents.AgentTool, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel
{
- public AzureAISearchAgentTool(Azure.AI.Agents.AzureAISearchToolResource azureAiSearch) { }
- public Azure.AI.Agents.AzureAISearchToolResource AzureAiSearch { get { throw null; } set { } }
+ public AzureAISearchAgentTool() { }
+ public AzureAISearchAgentTool(Azure.AI.Agents.AzureAISearchToolOptions options) { }
+ public Azure.AI.Agents.AzureAISearchToolOptions Options { get { throw null; } set { } }
protected override Azure.AI.Agents.AgentTool JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
protected override Azure.AI.Agents.AgentTool PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
@@ -790,6 +772,25 @@ protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter write
string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
}
+ public partial class AzureAISearchIndex : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel
+ {
+ public AzureAISearchIndex(string projectConnectionId) { }
+ public string Filter { get { throw null; } set { } }
+ public string IndexAssetId { get { throw null; } set { } }
+ public string IndexName { get { throw null; } set { } }
+ public string ProjectConnectionId { get { throw null; } set { } }
+ public Azure.AI.Agents.AzureAISearchQueryType? QueryType { get { throw null; } set { } }
+ public int? TopK { get { throw null; } set { } }
+ protected virtual Azure.AI.Agents.AzureAISearchIndex JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
+ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
+ protected virtual Azure.AI.Agents.AzureAISearchIndex PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
+ protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
+ Azure.AI.Agents.AzureAISearchIndex System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
+ void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
+ Azure.AI.Agents.AzureAISearchIndex System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
+ string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
+ System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
+ }
[System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)]
public readonly partial struct AzureAISearchQueryType : System.IEquatable
{
@@ -812,19 +813,19 @@ protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter write
public static bool operator !=(Azure.AI.Agents.AzureAISearchQueryType left, Azure.AI.Agents.AzureAISearchQueryType right) { throw null; }
public override string ToString() { throw null; }
}
- public partial class AzureAISearchToolResource : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel
+ public partial class AzureAISearchToolOptions : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel
{
- public AzureAISearchToolResource() { }
- public System.Collections.Generic.IList Indexes { get { throw null; } }
- protected virtual Azure.AI.Agents.AzureAISearchToolResource JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
+ public AzureAISearchToolOptions() { }
+ public System.Collections.Generic.IList Indexes { get { throw null; } }
+ protected virtual Azure.AI.Agents.AzureAISearchToolOptions JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
- protected virtual Azure.AI.Agents.AzureAISearchToolResource PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
+ protected virtual Azure.AI.Agents.AzureAISearchToolOptions PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
- Azure.AI.Agents.AzureAISearchToolResource System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
- void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
- Azure.AI.Agents.AzureAISearchToolResource System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
- string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
- System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
+ Azure.AI.Agents.AzureAISearchToolOptions System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
+ void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
+ Azure.AI.Agents.AzureAISearchToolOptions System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
+ string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
+ System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
}
public partial class AzureFunctionAgentTool : Azure.AI.Agents.AgentTool, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel
{
diff --git a/sdk/ai/Azure.AI.Agents/api/Azure.AI.Agents.netstandard2.0.cs b/sdk/ai/Azure.AI.Agents/api/Azure.AI.Agents.netstandard2.0.cs
index a4ddc15334ed..f9a39e19b78b 100644
--- a/sdk/ai/Azure.AI.Agents/api/Azure.AI.Agents.netstandard2.0.cs
+++ b/sdk/ai/Azure.AI.Agents/api/Azure.AI.Agents.netstandard2.0.cs
@@ -533,7 +533,7 @@ public abstract partial class AgentTool : System.ClientModel.Primitives.IJsonMod
{
internal AgentTool() { }
public static OpenAI.Responses.ResponseTool CreateA2ATool(System.Uri baseUrl, string agentCardPath = null) { throw null; }
- public static Azure.AI.Agents.AzureAISearchAgentTool CreateAzureAISearchTool() { throw null; }
+ public static Azure.AI.Agents.AzureAISearchAgentTool CreateAzureAISearchTool(Azure.AI.Agents.AzureAISearchToolOptions options = null) { throw null; }
public static Azure.AI.Agents.BingCustomSearchAgentTool CreateBingCustomSearchTool(Azure.AI.Agents.BingCustomSearchToolParameters parameters) { throw null; }
public static Azure.AI.Agents.BingGroundingAgentTool CreateBingGroundingTool(Azure.AI.Agents.BingGroundingSearchToolParameters parameters) { throw null; }
public static Azure.AI.Agents.BrowserAutomationAgentTool CreateBrowserAutomationTool(Azure.AI.Agents.BrowserAutomationToolParameters parameters) { throw null; }
@@ -645,25 +645,6 @@ protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter write
public static bool operator !=(Azure.AI.Agents.AgentWorkflowActionStatus left, Azure.AI.Agents.AgentWorkflowActionStatus right) { throw null; }
public override string ToString() { throw null; }
}
- public partial class AISearchIndexResource : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel
- {
- public AISearchIndexResource(string projectConnectionId) { }
- public string Filter { get { throw null; } set { } }
- public string IndexAssetId { get { throw null; } set { } }
- public string IndexName { get { throw null; } set { } }
- public string ProjectConnectionId { get { throw null; } set { } }
- public Azure.AI.Agents.AzureAISearchQueryType? QueryType { get { throw null; } set { } }
- public int? TopK { get { throw null; } set { } }
- protected virtual Azure.AI.Agents.AISearchIndexResource JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
- protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
- protected virtual Azure.AI.Agents.AISearchIndexResource PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
- protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
- Azure.AI.Agents.AISearchIndexResource System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
- void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
- Azure.AI.Agents.AISearchIndexResource System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
- string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
- System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
- }
public partial class ApiInnerError : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel
{
internal ApiInnerError() { }
@@ -710,10 +691,10 @@ public static partial class AzureAIAgentsModelFactory
public static Azure.AI.Agents.AgentVersion AgentVersion(System.Collections.Generic.IDictionary metadata = null, string id = null, string name = null, string version = null, string description = null, System.DateTimeOffset createdAt = default(System.DateTimeOffset), Azure.AI.Agents.AgentDefinition definition = null) { throw null; }
public static Azure.AI.Agents.AgentVersionCreationOptions AgentVersionCreationOptions(System.Collections.Generic.IDictionary metadata = null, string description = null, Azure.AI.Agents.AgentDefinition definition = null) { throw null; }
public static Azure.AI.Agents.AgentWorkflowActionResponseItem AgentWorkflowActionResponseItem(string id = null, Azure.AI.Agents.CreatedBy createdBy = null, string actionId = null, string parentActionId = null, string previousActionId = null, Azure.AI.Agents.AgentWorkflowActionStatus? status = default(Azure.AI.Agents.AgentWorkflowActionStatus?)) { throw null; }
- public static Azure.AI.Agents.AISearchIndexResource AISearchIndexResource(string projectConnectionId = null, string indexName = null, Azure.AI.Agents.AzureAISearchQueryType? queryType = default(Azure.AI.Agents.AzureAISearchQueryType?), int? topK = default(int?), string filter = null, string indexAssetId = null) { throw null; }
public static Azure.AI.Agents.ApiInnerError ApiInnerError(string code = null, Azure.AI.Agents.ApiInnerError innererror = null) { throw null; }
- public static Azure.AI.Agents.AzureAISearchAgentTool AzureAISearchAgentTool(Azure.AI.Agents.AzureAISearchToolResource azureAiSearch = null) { throw null; }
- public static Azure.AI.Agents.AzureAISearchToolResource AzureAISearchToolResource(System.Collections.Generic.IEnumerable indexes = null) { throw null; }
+ public static Azure.AI.Agents.AzureAISearchAgentTool AzureAISearchAgentTool(Azure.AI.Agents.AzureAISearchToolOptions options = null) { throw null; }
+ public static Azure.AI.Agents.AzureAISearchIndex AzureAISearchIndex(string projectConnectionId = null, string indexName = null, Azure.AI.Agents.AzureAISearchQueryType? queryType = default(Azure.AI.Agents.AzureAISearchQueryType?), int? topK = default(int?), string filter = null, string indexAssetId = null) { throw null; }
+ public static Azure.AI.Agents.AzureAISearchToolOptions AzureAISearchToolOptions(System.Collections.Generic.IEnumerable indexes = null) { throw null; }
public static Azure.AI.Agents.AzureFunctionAgentTool AzureFunctionAgentTool(Azure.AI.Agents.AzureFunctionDefinition azureFunction = null) { throw null; }
public static Azure.AI.Agents.AzureFunctionBinding AzureFunctionBinding(Azure.AI.Agents.AzureFunctionStorageQueue storageQueue = null) { throw null; }
public static Azure.AI.Agents.AzureFunctionDefinition AzureFunctionDefinition(Azure.AI.Agents.AzureFunctionDefinitionFunction function = null, Azure.AI.Agents.AzureFunctionBinding inputBinding = null, Azure.AI.Agents.AzureFunctionBinding outputBinding = null) { throw null; }
@@ -778,8 +759,9 @@ public static partial class AzureAIAgentsModelFactory
}
public partial class AzureAISearchAgentTool : Azure.AI.Agents.AgentTool, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel
{
- public AzureAISearchAgentTool(Azure.AI.Agents.AzureAISearchToolResource azureAiSearch) { }
- public Azure.AI.Agents.AzureAISearchToolResource AzureAiSearch { get { throw null; } set { } }
+ public AzureAISearchAgentTool() { }
+ public AzureAISearchAgentTool(Azure.AI.Agents.AzureAISearchToolOptions options) { }
+ public Azure.AI.Agents.AzureAISearchToolOptions Options { get { throw null; } set { } }
protected override Azure.AI.Agents.AgentTool JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
protected override Azure.AI.Agents.AgentTool PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
@@ -790,6 +772,25 @@ protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter write
string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
}
+ public partial class AzureAISearchIndex : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel
+ {
+ public AzureAISearchIndex(string projectConnectionId) { }
+ public string Filter { get { throw null; } set { } }
+ public string IndexAssetId { get { throw null; } set { } }
+ public string IndexName { get { throw null; } set { } }
+ public string ProjectConnectionId { get { throw null; } set { } }
+ public Azure.AI.Agents.AzureAISearchQueryType? QueryType { get { throw null; } set { } }
+ public int? TopK { get { throw null; } set { } }
+ protected virtual Azure.AI.Agents.AzureAISearchIndex JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
+ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
+ protected virtual Azure.AI.Agents.AzureAISearchIndex PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
+ protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
+ Azure.AI.Agents.AzureAISearchIndex System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
+ void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
+ Azure.AI.Agents.AzureAISearchIndex System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
+ string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
+ System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
+ }
[System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)]
public readonly partial struct AzureAISearchQueryType : System.IEquatable
{
@@ -812,19 +813,19 @@ protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter write
public static bool operator !=(Azure.AI.Agents.AzureAISearchQueryType left, Azure.AI.Agents.AzureAISearchQueryType right) { throw null; }
public override string ToString() { throw null; }
}
- public partial class AzureAISearchToolResource : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel
+ public partial class AzureAISearchToolOptions : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel
{
- public AzureAISearchToolResource() { }
- public System.Collections.Generic.IList Indexes { get { throw null; } }
- protected virtual Azure.AI.Agents.AzureAISearchToolResource JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
+ public AzureAISearchToolOptions() { }
+ public System.Collections.Generic.IList Indexes { get { throw null; } }
+ protected virtual Azure.AI.Agents.AzureAISearchToolOptions JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
- protected virtual Azure.AI.Agents.AzureAISearchToolResource PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
+ protected virtual Azure.AI.Agents.AzureAISearchToolOptions PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
- Azure.AI.Agents.AzureAISearchToolResource System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
- void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
- Azure.AI.Agents.AzureAISearchToolResource System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
- string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
- System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
+ Azure.AI.Agents.AzureAISearchToolOptions System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
+ void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
+ Azure.AI.Agents.AzureAISearchToolOptions System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
+ string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
+ System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
}
public partial class AzureFunctionAgentTool : Azure.AI.Agents.AgentTool, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel
{
diff --git a/sdk/ai/Azure.AI.Agents/src/Custom/AgentTool.cs b/sdk/ai/Azure.AI.Agents/src/Custom/AgentTool.cs
index 06708a273ab7..8340abc18da4 100644
--- a/sdk/ai/Azure.AI.Agents/src/Custom/AgentTool.cs
+++ b/sdk/ai/Azure.AI.Agents/src/Custom/AgentTool.cs
@@ -5,7 +5,6 @@
using System;
using System.ClientModel.Primitives;
-using System.Collections.Generic;
using OpenAI;
using OpenAI.Responses;
@@ -19,7 +18,7 @@ public abstract partial class AgentTool
public static BingGroundingAgentTool CreateBingGroundingTool(BingGroundingSearchToolParameters parameters) => new BingGroundingAgentTool(parameters);
public static MicrosoftFabricAgentTool CreateMicrosoftFabricTool(FabricDataAgentToolParameters parameters) => new MicrosoftFabricAgentTool(parameters);
public static SharepointAgentTool CreateSharepointTool(SharepointGroundingToolParameters parameters) => new SharepointAgentTool(parameters);
- public static AzureAISearchAgentTool CreateAzureAISearchTool() => new AzureAISearchAgentTool();
+ public static AzureAISearchAgentTool CreateAzureAISearchTool(AzureAISearchToolOptions options = null) => new AzureAISearchAgentTool(options ?? new());
public static OpenApiAgentTool CreateOpenApiTool(OpenApiFunctionDefinition definition) => new OpenApiAgentTool(definition);
public static BingCustomSearchAgentTool CreateBingCustomSearchTool(BingCustomSearchToolParameters parameters) => new BingCustomSearchAgentTool(parameters);
public static BrowserAutomationAgentTool CreateBrowserAutomationTool(BrowserAutomationToolParameters parameters) => new BrowserAutomationAgentTool(parameters);
diff --git a/sdk/ai/Azure.AI.Agents/src/Custom/AzureAISearchAgentTool.cs b/sdk/ai/Azure.AI.Agents/src/Custom/AzureAISearchAgentTool.cs
new file mode 100644
index 000000000000..e5b43958e8ca
--- /dev/null
+++ b/sdk/ai/Azure.AI.Agents/src/Custom/AzureAISearchAgentTool.cs
@@ -0,0 +1,33 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+#nullable disable
+
+#pragma warning disable OPENAI001
+
+using System;
+using OpenAI;
+
+namespace Azure.AI.Agents;
+
+[CodeGenType("AzureAISearchAgentTool")]
+public partial class AzureAISearchAgentTool
+{
+ /// Options applied to the instance.
+ [CodeGenMember("AzureAiSearch")]
+ public AzureAISearchToolOptions Options { get; set; }
+
+ /// Initializes a new instance of .
+ public AzureAISearchAgentTool() : this(options: new())
+ {
+ }
+
+ /// The azure ai search index resource.
+ /// is null.
+ public AzureAISearchAgentTool(AzureAISearchToolOptions options) : base(ToolType.AzureAiSearch)
+ {
+ Argument.AssertNotNull(options, nameof(options));
+
+ Options = options;
+ }
+}
diff --git a/sdk/ai/Azure.AI.Agents/src/Custom/AzureAISearchIndex.cs b/sdk/ai/Azure.AI.Agents/src/Custom/AzureAISearchIndex.cs
new file mode 100644
index 000000000000..018a2e1572e4
--- /dev/null
+++ b/sdk/ai/Azure.AI.Agents/src/Custom/AzureAISearchIndex.cs
@@ -0,0 +1,13 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+#nullable disable
+
+#pragma warning disable OPENAI001
+
+namespace Azure.AI.Agents;
+
+[CodeGenType("AISearchIndexResource")]
+public partial class AzureAISearchIndex
+{
+}
diff --git a/sdk/ai/Azure.AI.Agents/src/Custom/AzureAISearchToolOptions.cs b/sdk/ai/Azure.AI.Agents/src/Custom/AzureAISearchToolOptions.cs
new file mode 100644
index 000000000000..d2d469a2eaf3
--- /dev/null
+++ b/sdk/ai/Azure.AI.Agents/src/Custom/AzureAISearchToolOptions.cs
@@ -0,0 +1,21 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+#nullable disable
+
+using System.Collections.Generic;
+
+#pragma warning disable OPENAI001
+
+namespace Azure.AI.Agents;
+
+[CodeGenType("AzureAISearchToolResource")]
+public partial class AzureAISearchToolOptions
+{
+ ///
+ /// The indices attached to this agent. There can be a maximum of 1 index
+ /// resource attached to the agent.
+ ///
+ [CodeGenMember("IndexList")]
+ public IList Indexes { get; }
+}
diff --git a/sdk/ai/Azure.AI.Agents/src/Generated/AzureAIAgentsModelFactory.cs b/sdk/ai/Azure.AI.Agents/src/Generated/AzureAIAgentsModelFactory.cs
index daf94e7bbc19..bd0605d1416b 100644
--- a/sdk/ai/Azure.AI.Agents/src/Generated/AzureAIAgentsModelFactory.cs
+++ b/sdk/ai/Azure.AI.Agents/src/Generated/AzureAIAgentsModelFactory.cs
@@ -220,11 +220,11 @@ public static SharepointGroundingToolParameters SharepointGroundingToolParameter
}
/// The input definition information for an Azure AI search tool as used to configure an agent.
- /// The azure ai search index resource.
+ /// The azure ai search index resource.
/// A new instance for mocking.
- public static AzureAISearchAgentTool AzureAISearchAgentTool(AzureAISearchToolResource azureAiSearch = default)
+ public static AzureAISearchAgentTool AzureAISearchAgentTool(AzureAISearchToolOptions options = default)
{
- return new AzureAISearchAgentTool(ToolType.AzureAiSearch, additionalBinaryDataProperties: null, azureAiSearch);
+ return new AzureAISearchAgentTool(ToolType.AzureAiSearch, additionalBinaryDataProperties: null, options);
}
/// A set of index resources used by the `azure_ai_search` tool.
@@ -232,12 +232,12 @@ public static AzureAISearchAgentTool AzureAISearchAgentTool(AzureAISearchToolRes
/// The indices attached to this agent. There can be a maximum of 1 index
/// resource attached to the agent.
///
- /// A new instance for mocking.
- public static AzureAISearchToolResource AzureAISearchToolResource(IEnumerable indexes = default)
+ /// A new instance for mocking.
+ public static AzureAISearchToolOptions AzureAISearchToolOptions(IEnumerable indexes = default)
{
- indexes ??= new ChangeTrackingList();
+ indexes ??= new ChangeTrackingList();
- return new AzureAISearchToolResource(indexes.ToList(), additionalBinaryDataProperties: null);
+ return new AzureAISearchToolOptions(indexes.ToList(), additionalBinaryDataProperties: null);
}
/// A AI Search Index resource.
@@ -247,10 +247,10 @@ public static AzureAISearchToolResource AzureAISearchToolResource(IEnumerable Number of documents to retrieve from search and present to the model.
/// filter string for search resource. [Learn more here](https://learn.microsoft.com/azure/search/search-filters).
/// Index asset id for search resource.
- /// A new instance for mocking.
- public static AISearchIndexResource AISearchIndexResource(string projectConnectionId = default, string indexName = default, AzureAISearchQueryType? queryType = default, int? topK = default, string filter = default, string indexAssetId = default)
+ /// A new instance for mocking.
+ public static AzureAISearchIndex AzureAISearchIndex(string projectConnectionId = default, string indexName = default, AzureAISearchQueryType? queryType = default, int? topK = default, string filter = default, string indexAssetId = default)
{
- return new AISearchIndexResource(
+ return new AzureAISearchIndex(
projectConnectionId,
indexName,
queryType,
diff --git a/sdk/ai/Azure.AI.Agents/src/Generated/Models/AzureAIAgentsContext.cs b/sdk/ai/Azure.AI.Agents/src/Generated/Models/AzureAIAgentsContext.cs
index b7b83c10b23f..94132e87f187 100644
--- a/sdk/ai/Azure.AI.Agents/src/Generated/Models/AzureAIAgentsContext.cs
+++ b/sdk/ai/Azure.AI.Agents/src/Generated/Models/AzureAIAgentsContext.cs
@@ -35,10 +35,10 @@ namespace Azure.AI.Agents
[ModelReaderWriterBuildable(typeof(AgentVersion))]
[ModelReaderWriterBuildable(typeof(AgentVersionCreationOptions))]
[ModelReaderWriterBuildable(typeof(AgentWorkflowActionResponseItem))]
- [ModelReaderWriterBuildable(typeof(AISearchIndexResource))]
[ModelReaderWriterBuildable(typeof(ApiInnerError))]
[ModelReaderWriterBuildable(typeof(AzureAISearchAgentTool))]
- [ModelReaderWriterBuildable(typeof(AzureAISearchToolResource))]
+ [ModelReaderWriterBuildable(typeof(AzureAISearchIndex))]
+ [ModelReaderWriterBuildable(typeof(AzureAISearchToolOptions))]
[ModelReaderWriterBuildable(typeof(AzureFunctionAgentTool))]
[ModelReaderWriterBuildable(typeof(AzureFunctionBinding))]
[ModelReaderWriterBuildable(typeof(AzureFunctionDefinition))]
diff --git a/sdk/ai/Azure.AI.Agents/src/Generated/Models/AzureAISearchAgentTool.Serialization.cs b/sdk/ai/Azure.AI.Agents/src/Generated/Models/AzureAISearchAgentTool.Serialization.cs
index 8800d28e5e2b..bc8f66d6d37b 100644
--- a/sdk/ai/Azure.AI.Agents/src/Generated/Models/AzureAISearchAgentTool.Serialization.cs
+++ b/sdk/ai/Azure.AI.Agents/src/Generated/Models/AzureAISearchAgentTool.Serialization.cs
@@ -13,11 +13,6 @@ namespace Azure.AI.Agents
/// The input definition information for an Azure AI search tool as used to configure an agent.
public partial class AzureAISearchAgentTool : AgentTool, IJsonModel
{
- /// Initializes a new instance of for deserialization.
- internal AzureAISearchAgentTool()
- {
- }
-
/// The JSON writer.
/// The client options for reading and writing models.
void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
@@ -38,7 +33,7 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri
}
base.JsonModelWriteCore(writer, options);
writer.WritePropertyName("azure_ai_search"u8);
- writer.WriteObjectValue(AzureAiSearch, options);
+ writer.WriteObjectValue(Options, options);
}
/// The JSON reader.
@@ -68,7 +63,7 @@ internal static AzureAISearchAgentTool DeserializeAzureAISearchAgentTool(JsonEle
}
ToolType @type = default;
IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary();
- AzureAISearchToolResource azureAiSearch = default;
+ AzureAISearchToolOptions options0 = default;
foreach (var prop in element.EnumerateObject())
{
if (prop.NameEquals("type"u8))
@@ -78,7 +73,7 @@ internal static AzureAISearchAgentTool DeserializeAzureAISearchAgentTool(JsonEle
}
if (prop.NameEquals("azure_ai_search"u8))
{
- azureAiSearch = AzureAISearchToolResource.DeserializeAzureAISearchToolResource(prop.Value, options);
+ options0 = AzureAISearchToolOptions.DeserializeAzureAISearchToolOptions(prop.Value, options);
continue;
}
if (options.Format != "W")
@@ -86,7 +81,7 @@ internal static AzureAISearchAgentTool DeserializeAzureAISearchAgentTool(JsonEle
additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText()));
}
}
- return new AzureAISearchAgentTool(@type, additionalBinaryDataProperties, azureAiSearch);
+ return new AzureAISearchAgentTool(@type, additionalBinaryDataProperties, options0);
}
/// The client options for reading and writing models.
diff --git a/sdk/ai/Azure.AI.Agents/src/Generated/Models/AzureAISearchAgentTool.cs b/sdk/ai/Azure.AI.Agents/src/Generated/Models/AzureAISearchAgentTool.cs
index 1c7660627703..f3390c700dad 100644
--- a/sdk/ai/Azure.AI.Agents/src/Generated/Models/AzureAISearchAgentTool.cs
+++ b/sdk/ai/Azure.AI.Agents/src/Generated/Models/AzureAISearchAgentTool.cs
@@ -11,26 +11,13 @@ namespace Azure.AI.Agents
/// The input definition information for an Azure AI search tool as used to configure an agent.
public partial class AzureAISearchAgentTool : AgentTool
{
- /// Initializes a new instance of .
- /// The azure ai search index resource.
- /// is null.
- public AzureAISearchAgentTool(AzureAISearchToolResource azureAiSearch) : base(ToolType.AzureAiSearch)
- {
- Argument.AssertNotNull(azureAiSearch, nameof(azureAiSearch));
-
- AzureAiSearch = azureAiSearch;
- }
-
/// Initializes a new instance of .
///
/// Keeps track of any properties unknown to the library.
- /// The azure ai search index resource.
- internal AzureAISearchAgentTool(ToolType @type, IDictionary additionalBinaryDataProperties, AzureAISearchToolResource azureAiSearch) : base(@type, additionalBinaryDataProperties)
+ /// The azure ai search index resource.
+ internal AzureAISearchAgentTool(ToolType @type, IDictionary additionalBinaryDataProperties, AzureAISearchToolOptions options) : base(@type, additionalBinaryDataProperties)
{
- AzureAiSearch = azureAiSearch;
+ Options = options;
}
-
- /// The azure ai search index resource.
- public AzureAISearchToolResource AzureAiSearch { get; set; }
}
}
diff --git a/sdk/ai/Azure.AI.Agents/src/Generated/Models/AISearchIndexResource.Serialization.cs b/sdk/ai/Azure.AI.Agents/src/Generated/Models/AzureAISearchIndex.Serialization.cs
similarity index 75%
rename from sdk/ai/Azure.AI.Agents/src/Generated/Models/AISearchIndexResource.Serialization.cs
rename to sdk/ai/Azure.AI.Agents/src/Generated/Models/AzureAISearchIndex.Serialization.cs
index 10b10ce1b459..e87513d63bee 100644
--- a/sdk/ai/Azure.AI.Agents/src/Generated/Models/AISearchIndexResource.Serialization.cs
+++ b/sdk/ai/Azure.AI.Agents/src/Generated/Models/AzureAISearchIndex.Serialization.cs
@@ -10,16 +10,16 @@
namespace Azure.AI.Agents
{
/// A AI Search Index resource.
- public partial class AISearchIndexResource : IJsonModel
+ public partial class AzureAISearchIndex : IJsonModel
{
- /// Initializes a new instance of for deserialization.
- internal AISearchIndexResource()
+ /// Initializes a new instance of for deserialization.
+ internal AzureAISearchIndex()
{
}
/// The JSON writer.
/// The client options for reading and writing models.
- void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
+ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
{
writer.WriteStartObject();
JsonModelWriteCore(writer, options);
@@ -30,10 +30,10 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW
/// The client options for reading and writing models.
protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
{
- string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+ string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
if (format != "J")
{
- throw new FormatException($"The model {nameof(AISearchIndexResource)} does not support writing '{format}' format.");
+ throw new FormatException($"The model {nameof(AzureAISearchIndex)} does not support writing '{format}' format.");
}
writer.WritePropertyName("project_connection_id"u8);
writer.WriteStringValue(ProjectConnectionId);
@@ -81,24 +81,24 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit
/// The JSON reader.
/// The client options for reading and writing models.
- AISearchIndexResource IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options);
+ AzureAISearchIndex IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options);
/// The JSON reader.
/// The client options for reading and writing models.
- protected virtual AISearchIndexResource JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
+ protected virtual AzureAISearchIndex JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
{
- string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+ string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
if (format != "J")
{
- throw new FormatException($"The model {nameof(AISearchIndexResource)} does not support reading '{format}' format.");
+ throw new FormatException($"The model {nameof(AzureAISearchIndex)} does not support reading '{format}' format.");
}
using JsonDocument document = JsonDocument.ParseValue(ref reader);
- return DeserializeAISearchIndexResource(document.RootElement, options);
+ return DeserializeAzureAISearchIndex(document.RootElement, options);
}
/// The JSON element to deserialize.
/// The client options for reading and writing models.
- internal static AISearchIndexResource DeserializeAISearchIndexResource(JsonElement element, ModelReaderWriterOptions options)
+ internal static AzureAISearchIndex DeserializeAzureAISearchIndex(JsonElement element, ModelReaderWriterOptions options)
{
if (element.ValueKind == JsonValueKind.Null)
{
@@ -156,7 +156,7 @@ internal static AISearchIndexResource DeserializeAISearchIndexResource(JsonEleme
additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText()));
}
}
- return new AISearchIndexResource(
+ return new AzureAISearchIndex(
projectConnectionId,
indexName,
queryType,
@@ -167,43 +167,43 @@ internal static AISearchIndexResource DeserializeAISearchIndexResource(JsonEleme
}
/// The client options for reading and writing models.
- BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options);
+ BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options);
/// The client options for reading and writing models.
protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options)
{
- string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+ string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
switch (format)
{
case "J":
return ModelReaderWriter.Write(this, options, AzureAIAgentsContext.Default);
default:
- throw new FormatException($"The model {nameof(AISearchIndexResource)} does not support writing '{options.Format}' format.");
+ throw new FormatException($"The model {nameof(AzureAISearchIndex)} does not support writing '{options.Format}' format.");
}
}
/// The data to parse.
/// The client options for reading and writing models.
- AISearchIndexResource IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options);
+ AzureAISearchIndex IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options);
/// The data to parse.
/// The client options for reading and writing models.
- protected virtual AISearchIndexResource PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options)
+ protected virtual AzureAISearchIndex PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options)
{
- string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+ string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
switch (format)
{
case "J":
using (JsonDocument document = JsonDocument.Parse(data))
{
- return DeserializeAISearchIndexResource(document.RootElement, options);
+ return DeserializeAzureAISearchIndex(document.RootElement, options);
}
default:
- throw new FormatException($"The model {nameof(AISearchIndexResource)} does not support reading '{options.Format}' format.");
+ throw new FormatException($"The model {nameof(AzureAISearchIndex)} does not support reading '{options.Format}' format.");
}
}
/// The client options for reading and writing models.
- string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J";
+ string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J";
}
}
diff --git a/sdk/ai/Azure.AI.Agents/src/Generated/Models/AISearchIndexResource.cs b/sdk/ai/Azure.AI.Agents/src/Generated/Models/AzureAISearchIndex.cs
similarity index 87%
rename from sdk/ai/Azure.AI.Agents/src/Generated/Models/AISearchIndexResource.cs
rename to sdk/ai/Azure.AI.Agents/src/Generated/Models/AzureAISearchIndex.cs
index 6b1fb921e616..968801afdb29 100644
--- a/sdk/ai/Azure.AI.Agents/src/Generated/Models/AISearchIndexResource.cs
+++ b/sdk/ai/Azure.AI.Agents/src/Generated/Models/AzureAISearchIndex.cs
@@ -8,22 +8,22 @@
namespace Azure.AI.Agents
{
/// A AI Search Index resource.
- public partial class AISearchIndexResource
+ public partial class AzureAISearchIndex
{
/// Keeps track of any properties unknown to the library.
private protected readonly IDictionary _additionalBinaryDataProperties;
- /// Initializes a new instance of .
+ /// Initializes a new instance of .
/// An index connection ID in an IndexResource attached to this agent.
/// is null.
- public AISearchIndexResource(string projectConnectionId)
+ public AzureAISearchIndex(string projectConnectionId)
{
Argument.AssertNotNull(projectConnectionId, nameof(projectConnectionId));
ProjectConnectionId = projectConnectionId;
}
- /// Initializes a new instance of .
+ /// Initializes a new instance of .
/// An index connection ID in an IndexResource attached to this agent.
/// The name of an index in an IndexResource attached to this agent.
/// Type of query in an AIIndexResource attached to this agent.
@@ -31,7 +31,7 @@ public AISearchIndexResource(string projectConnectionId)
/// filter string for search resource. [Learn more here](https://learn.microsoft.com/azure/search/search-filters).
/// Index asset id for search resource.
/// Keeps track of any properties unknown to the library.
- internal AISearchIndexResource(string projectConnectionId, string indexName, AzureAISearchQueryType? queryType, int? topK, string filter, string indexAssetId, IDictionary additionalBinaryDataProperties)
+ internal AzureAISearchIndex(string projectConnectionId, string indexName, AzureAISearchQueryType? queryType, int? topK, string filter, string indexAssetId, IDictionary additionalBinaryDataProperties)
{
ProjectConnectionId = projectConnectionId;
IndexName = indexName;
diff --git a/sdk/ai/Azure.AI.Agents/src/Generated/Models/AzureAISearchToolResource.Serialization.cs b/sdk/ai/Azure.AI.Agents/src/Generated/Models/AzureAISearchToolOptions.Serialization.cs
similarity index 66%
rename from sdk/ai/Azure.AI.Agents/src/Generated/Models/AzureAISearchToolResource.Serialization.cs
rename to sdk/ai/Azure.AI.Agents/src/Generated/Models/AzureAISearchToolOptions.Serialization.cs
index 80cc4aa79d8f..faf6ba6017ea 100644
--- a/sdk/ai/Azure.AI.Agents/src/Generated/Models/AzureAISearchToolResource.Serialization.cs
+++ b/sdk/ai/Azure.AI.Agents/src/Generated/Models/AzureAISearchToolOptions.Serialization.cs
@@ -10,11 +10,11 @@
namespace Azure.AI.Agents
{
/// A set of index resources used by the `azure_ai_search` tool.
- public partial class AzureAISearchToolResource : IJsonModel
+ public partial class AzureAISearchToolOptions : IJsonModel
{
/// The JSON writer.
/// The client options for reading and writing models.
- void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
+ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
{
writer.WriteStartObject();
JsonModelWriteCore(writer, options);
@@ -25,16 +25,16 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea
/// The client options for reading and writing models.
protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
{
- string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+ string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
if (format != "J")
{
- throw new FormatException($"The model {nameof(AzureAISearchToolResource)} does not support writing '{format}' format.");
+ throw new FormatException($"The model {nameof(AzureAISearchToolOptions)} does not support writing '{format}' format.");
}
if (Optional.IsCollectionDefined(Indexes))
{
writer.WritePropertyName("indexes"u8);
writer.WriteStartArray();
- foreach (AISearchIndexResource item in Indexes)
+ foreach (AzureAISearchIndex item in Indexes)
{
writer.WriteObjectValue(item, options);
}
@@ -59,30 +59,30 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit
/// The JSON reader.
/// The client options for reading and writing models.
- AzureAISearchToolResource IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options);
+ AzureAISearchToolOptions IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options);
/// The JSON reader.
/// The client options for reading and writing models.
- protected virtual AzureAISearchToolResource JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
+ protected virtual AzureAISearchToolOptions JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
{
- string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+ string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
if (format != "J")
{
- throw new FormatException($"The model {nameof(AzureAISearchToolResource)} does not support reading '{format}' format.");
+ throw new FormatException($"The model {nameof(AzureAISearchToolOptions)} does not support reading '{format}' format.");
}
using JsonDocument document = JsonDocument.ParseValue(ref reader);
- return DeserializeAzureAISearchToolResource(document.RootElement, options);
+ return DeserializeAzureAISearchToolOptions(document.RootElement, options);
}
/// The JSON element to deserialize.
/// The client options for reading and writing models.
- internal static AzureAISearchToolResource DeserializeAzureAISearchToolResource(JsonElement element, ModelReaderWriterOptions options)
+ internal static AzureAISearchToolOptions DeserializeAzureAISearchToolOptions(JsonElement element, ModelReaderWriterOptions options)
{
if (element.ValueKind == JsonValueKind.Null)
{
return null;
}
- IList indexes = default;
+ IList indexes = default;
IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary();
foreach (var prop in element.EnumerateObject())
{
@@ -92,10 +92,10 @@ internal static AzureAISearchToolResource DeserializeAzureAISearchToolResource(J
{
continue;
}
- List array = new List();
+ List array = new List();
foreach (var item in prop.Value.EnumerateArray())
{
- array.Add(AISearchIndexResource.DeserializeAISearchIndexResource(item, options));
+ array.Add(AzureAISearchIndex.DeserializeAzureAISearchIndex(item, options));
}
indexes = array;
continue;
@@ -105,47 +105,47 @@ internal static AzureAISearchToolResource DeserializeAzureAISearchToolResource(J
additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText()));
}
}
- return new AzureAISearchToolResource(indexes ?? new ChangeTrackingList(), additionalBinaryDataProperties);
+ return new AzureAISearchToolOptions(indexes ?? new ChangeTrackingList(), additionalBinaryDataProperties);
}
/// The client options for reading and writing models.
- BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options);
+ BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options);
/// The client options for reading and writing models.
protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options)
{
- string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+ string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
switch (format)
{
case "J":
return ModelReaderWriter.Write(this, options, AzureAIAgentsContext.Default);
default:
- throw new FormatException($"The model {nameof(AzureAISearchToolResource)} does not support writing '{options.Format}' format.");
+ throw new FormatException($"The model {nameof(AzureAISearchToolOptions)} does not support writing '{options.Format}' format.");
}
}
/// The data to parse.
/// The client options for reading and writing models.
- AzureAISearchToolResource IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options);
+ AzureAISearchToolOptions IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options);
/// The data to parse.
/// The client options for reading and writing models.
- protected virtual AzureAISearchToolResource PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options)
+ protected virtual AzureAISearchToolOptions PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options)
{
- string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+ string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
switch (format)
{
case "J":
using (JsonDocument document = JsonDocument.Parse(data))
{
- return DeserializeAzureAISearchToolResource(document.RootElement, options);
+ return DeserializeAzureAISearchToolOptions(document.RootElement, options);
}
default:
- throw new FormatException($"The model {nameof(AzureAISearchToolResource)} does not support reading '{options.Format}' format.");
+ throw new FormatException($"The model {nameof(AzureAISearchToolOptions)} does not support reading '{options.Format}' format.");
}
}
/// The client options for reading and writing models.
- string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J";
+ string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J";
}
}
diff --git a/sdk/ai/Azure.AI.Agents/src/Generated/Models/AzureAISearchToolResource.cs b/sdk/ai/Azure.AI.Agents/src/Generated/Models/AzureAISearchToolOptions.cs
similarity index 61%
rename from sdk/ai/Azure.AI.Agents/src/Generated/Models/AzureAISearchToolResource.cs
rename to sdk/ai/Azure.AI.Agents/src/Generated/Models/AzureAISearchToolOptions.cs
index 13429464a90d..9bd6a1995ac3 100644
--- a/sdk/ai/Azure.AI.Agents/src/Generated/Models/AzureAISearchToolResource.cs
+++ b/sdk/ai/Azure.AI.Agents/src/Generated/Models/AzureAISearchToolOptions.cs
@@ -8,33 +8,27 @@
namespace Azure.AI.Agents
{
/// A set of index resources used by the `azure_ai_search` tool.
- public partial class AzureAISearchToolResource
+ public partial class AzureAISearchToolOptions
{
/// Keeps track of any properties unknown to the library.
private protected readonly IDictionary _additionalBinaryDataProperties;
- /// Initializes a new instance of .
- public AzureAISearchToolResource()
+ /// Initializes a new instance of .
+ public AzureAISearchToolOptions()
{
- Indexes = new ChangeTrackingList();
+ Indexes = new ChangeTrackingList();
}
- /// Initializes a new instance of .
+ /// Initializes a new instance of .
///
/// The indices attached to this agent. There can be a maximum of 1 index
/// resource attached to the agent.
///
/// Keeps track of any properties unknown to the library.
- internal AzureAISearchToolResource(IList indexes, IDictionary additionalBinaryDataProperties)
+ internal AzureAISearchToolOptions(IList indexes, IDictionary additionalBinaryDataProperties)
{
Indexes = indexes;
_additionalBinaryDataProperties = additionalBinaryDataProperties;
}
-
- ///
- /// The indices attached to this agent. There can be a maximum of 1 index
- /// resource attached to the agent.
- ///
- public IList Indexes { get; }
}
}
diff --git a/sdk/ai/Azure.AI.Agents/tests/AgentsSmokeTests.cs b/sdk/ai/Azure.AI.Agents/tests/AgentsSmokeTests.cs
index c3778d2e7b0f..e21b0f3868e0 100644
--- a/sdk/ai/Azure.AI.Agents/tests/AgentsSmokeTests.cs
+++ b/sdk/ai/Azure.AI.Agents/tests/AgentsSmokeTests.cs
@@ -11,6 +11,7 @@
namespace Azure.AI.Agents.Tests;
[Category("Smoke")]
+[SyncOnly]
public class AgentsSmokeTests : AgentsTestBase
{
public AgentsSmokeTests(bool isAsync) : base(isAsync, RecordedTestMode.Live)
@@ -59,14 +60,21 @@ public void TestUseAnAgentTool()
{
ResponseTool.CreateWebSearchTool(),
AgentTool.CreateA2ATool(new Uri("https://test-uri.microsoft.com")),
+ new A2ATool(new Uri("https://test-uri.microsoft.com")),
+ AgentTool.CreateAzureAISearchTool(),
+ new AzureAISearchAgentTool(),
+ AgentTool.CreateAzureAISearchTool(new AzureAISearchToolOptions()
+ {
+ Indexes = { new AzureAISearchIndex(projectConnectionId: "project-foo") { TopK = 42 } }
+ }),
}
};
- Assert.That(responseOptions.Tools, Has.Count.EqualTo(2));
+ Assert.That(responseOptions.Tools, Has.Count.EqualTo(6));
- Assert.That(
- ModelReaderWriter.Write(responseOptions).ToString(),
- Does.Contain("base_url"));
+ string serializedOptions = ModelReaderWriter.Write(responseOptions).ToString();
+ Assert.That(serializedOptions, Does.Contain("base_url"));
+ Assert.That(serializedOptions, Does.Contain("topK"));
OpenAIResponse mockResponse = ModelReaderWriter.Read(BinaryData.FromString("""
{
From cd1a1c1160f034b189f3d2240d821dfee1a21459 Mon Sep 17 00:00:00 2001
From: Travis Wilson <35748617+trrwilson@users.noreply.github.com>
Date: Tue, 4 Nov 2025 13:13:28 -0800
Subject: [PATCH 06/58] Agents v2 (branch-to-branch): basic e2e support for
structured inputs; restored workflow (now yaml) support (#53625)
* workflow and structured inputs support
* export-api update
---
.../api/Azure.AI.Agents.net8.0.cs | 7 +-
.../api/Azure.AI.Agents.netstandard2.0.cs | 7 +-
sdk/ai/Azure.AI.Agents/assets.json | 2 +-
.../Internal/AdditionalPropertyHelpers.cs | 104 ++++++++
.../ResponseCreationOptionsExtensions.cs | 17 ++
.../src/Custom/WorkflowAgentDefinition.cs | 16 +-
.../Generated/AzureAIAgentsModelFactory.cs | 6 +-
.../WorkflowAgentDefinition.Serialization.cs | 10 +-
.../Models/WorkflowAgentDefinition.cs | 9 +-
sdk/ai/Azure.AI.Agents/tests/AgentsTests.cs | 229 +++++++-----------
10 files changed, 235 insertions(+), 172 deletions(-)
create mode 100644 sdk/ai/Azure.AI.Agents/src/Custom/Internal/AdditionalPropertyHelpers.cs
diff --git a/sdk/ai/Azure.AI.Agents/api/Azure.AI.Agents.net8.0.cs b/sdk/ai/Azure.AI.Agents/api/Azure.AI.Agents.net8.0.cs
index f9a39e19b78b..38167ba641ae 100644
--- a/sdk/ai/Azure.AI.Agents/api/Azure.AI.Agents.net8.0.cs
+++ b/sdk/ai/Azure.AI.Agents/api/Azure.AI.Agents.net8.0.cs
@@ -755,7 +755,7 @@ public static partial class AzureAIAgentsModelFactory
public static Azure.AI.Agents.ToolArgumentBinding ToolArgumentBinding(string toolName = null, string argumentName = null) { throw null; }
public static Azure.AI.Agents.ToolProjectConnection ToolProjectConnection(string projectConnectionId = null) { throw null; }
public static Azure.AI.Agents.UserProfileMemoryItem UserProfileMemoryItem(string memoryId = null, System.DateTimeOffset updatedAt = default(System.DateTimeOffset), string scope = null, string content = null) { throw null; }
- public static Azure.AI.Agents.WorkflowAgentDefinition WorkflowAgentDefinition(Azure.AI.Agents.RaiConfig raiConfig = null, string workflow = null) { throw null; }
+ public static Azure.AI.Agents.WorkflowAgentDefinition WorkflowAgentDefinition(Azure.AI.Agents.RaiConfig raiConfig = null, string workflowYaml = null) { throw null; }
}
public partial class AzureAISearchAgentTool : Azure.AI.Agents.AgentTool, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel
{
@@ -1798,12 +1798,14 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer
}
public static partial class ResponseCreationOptionsExtensions
{
+ public static void AddStructuredInput(this OpenAI.Responses.ResponseCreationOptions options, string key, string value) { }
public static void SetAgentReference(this OpenAI.Responses.ResponseCreationOptions responseCreationOptions, Azure.AI.Agents.AgentRecord agentObject, string version = null) { }
public static void SetAgentReference(this OpenAI.Responses.ResponseCreationOptions responseCreationOptions, Azure.AI.Agents.AgentReference agentReference) { }
public static void SetAgentReference(this OpenAI.Responses.ResponseCreationOptions responseCreationOptions, Azure.AI.Agents.AgentVersion agentVersion) { }
public static void SetAgentReference(this OpenAI.Responses.ResponseCreationOptions responseCreationOptions, string agentName, string version = null) { }
public static void SetConversationReference(this OpenAI.Responses.ResponseCreationOptions responseCreationOptions, Azure.AI.Agents.AgentConversation conversation) { }
public static void SetConversationReference(this OpenAI.Responses.ResponseCreationOptions responseCreationOptions, string conversationId) { }
+ public static void SetStructuredInputs(this OpenAI.Responses.ResponseCreationOptions options, System.BinaryData structuredInputsBytes) { }
}
public static partial class ResponseItemExtensions
{
@@ -1921,8 +1923,7 @@ protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter write
public partial class WorkflowAgentDefinition : Azure.AI.Agents.AgentDefinition, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel
{
public WorkflowAgentDefinition() { }
- public System.BinaryData TriggerBytes { get { throw null; } set { } }
- public string Workflow { get { throw null; } set { } }
+ public static Azure.AI.Agents.WorkflowAgentDefinition FromYaml(string workflowYamlDocument) { throw null; }
protected override Azure.AI.Agents.AgentDefinition JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
protected override Azure.AI.Agents.AgentDefinition PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
diff --git a/sdk/ai/Azure.AI.Agents/api/Azure.AI.Agents.netstandard2.0.cs b/sdk/ai/Azure.AI.Agents/api/Azure.AI.Agents.netstandard2.0.cs
index f9a39e19b78b..38167ba641ae 100644
--- a/sdk/ai/Azure.AI.Agents/api/Azure.AI.Agents.netstandard2.0.cs
+++ b/sdk/ai/Azure.AI.Agents/api/Azure.AI.Agents.netstandard2.0.cs
@@ -755,7 +755,7 @@ public static partial class AzureAIAgentsModelFactory
public static Azure.AI.Agents.ToolArgumentBinding ToolArgumentBinding(string toolName = null, string argumentName = null) { throw null; }
public static Azure.AI.Agents.ToolProjectConnection ToolProjectConnection(string projectConnectionId = null) { throw null; }
public static Azure.AI.Agents.UserProfileMemoryItem UserProfileMemoryItem(string memoryId = null, System.DateTimeOffset updatedAt = default(System.DateTimeOffset), string scope = null, string content = null) { throw null; }
- public static Azure.AI.Agents.WorkflowAgentDefinition WorkflowAgentDefinition(Azure.AI.Agents.RaiConfig raiConfig = null, string workflow = null) { throw null; }
+ public static Azure.AI.Agents.WorkflowAgentDefinition WorkflowAgentDefinition(Azure.AI.Agents.RaiConfig raiConfig = null, string workflowYaml = null) { throw null; }
}
public partial class AzureAISearchAgentTool : Azure.AI.Agents.AgentTool, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel
{
@@ -1798,12 +1798,14 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer
}
public static partial class ResponseCreationOptionsExtensions
{
+ public static void AddStructuredInput(this OpenAI.Responses.ResponseCreationOptions options, string key, string value) { }
public static void SetAgentReference(this OpenAI.Responses.ResponseCreationOptions responseCreationOptions, Azure.AI.Agents.AgentRecord agentObject, string version = null) { }
public static void SetAgentReference(this OpenAI.Responses.ResponseCreationOptions responseCreationOptions, Azure.AI.Agents.AgentReference agentReference) { }
public static void SetAgentReference(this OpenAI.Responses.ResponseCreationOptions responseCreationOptions, Azure.AI.Agents.AgentVersion agentVersion) { }
public static void SetAgentReference(this OpenAI.Responses.ResponseCreationOptions responseCreationOptions, string agentName, string version = null) { }
public static void SetConversationReference(this OpenAI.Responses.ResponseCreationOptions responseCreationOptions, Azure.AI.Agents.AgentConversation conversation) { }
public static void SetConversationReference(this OpenAI.Responses.ResponseCreationOptions responseCreationOptions, string conversationId) { }
+ public static void SetStructuredInputs(this OpenAI.Responses.ResponseCreationOptions options, System.BinaryData structuredInputsBytes) { }
}
public static partial class ResponseItemExtensions
{
@@ -1921,8 +1923,7 @@ protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter write
public partial class WorkflowAgentDefinition : Azure.AI.Agents.AgentDefinition, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel
{
public WorkflowAgentDefinition() { }
- public System.BinaryData TriggerBytes { get { throw null; } set { } }
- public string Workflow { get { throw null; } set { } }
+ public static Azure.AI.Agents.WorkflowAgentDefinition FromYaml(string workflowYamlDocument) { throw null; }
protected override Azure.AI.Agents.AgentDefinition JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
protected override Azure.AI.Agents.AgentDefinition PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
diff --git a/sdk/ai/Azure.AI.Agents/assets.json b/sdk/ai/Azure.AI.Agents/assets.json
index 20a5b6937fb9..3683ca3e75bd 100644
--- a/sdk/ai/Azure.AI.Agents/assets.json
+++ b/sdk/ai/Azure.AI.Agents/assets.json
@@ -2,5 +2,5 @@
"AssetsRepo": "Azure/azure-sdk-assets",
"AssetsRepoPrefixPath": "net",
"TagPrefix": "net/ai/Azure.AI.Agents",
- "Tag": "net/ai/Azure.AI.Agents_34436e25a0"
+ "Tag": "net/ai/Azure.AI.Agents_adfa1fb8cc"
}
diff --git a/sdk/ai/Azure.AI.Agents/src/Custom/Internal/AdditionalPropertyHelpers.cs b/sdk/ai/Azure.AI.Agents/src/Custom/Internal/AdditionalPropertyHelpers.cs
new file mode 100644
index 000000000000..e58e4e09e54f
--- /dev/null
+++ b/sdk/ai/Azure.AI.Agents/src/Custom/Internal/AdditionalPropertyHelpers.cs
@@ -0,0 +1,104 @@
+// 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.Reflection;
+using System.Text.Json.Nodes;
+
+#pragma warning disable OPENAI001
+
+namespace Azure.AI.Agents;
+
+internal static partial class AdditionalPropertyHelpers
+{
+ internal static void SetAdditionalProperty(this T instance, string key, U value)
+ where T : IJsonModel
+ {
+ PropertyInfo additionalDataProperty = instance.GetType().GetProperty("SerializedAdditionalRawData", BindingFlags.Instance | BindingFlags.NonPublic);
+ object existingSerializedAdditionalRawData = additionalDataProperty.GetValue(instance);
+
+ IDictionary additionalData = (IDictionary)existingSerializedAdditionalRawData ?? new Dictionary();
+ additionalData[key] = GetBinaryData(value);
+ additionalDataProperty.SetValue(instance, additionalData);
+ }
+
+ internal static bool TryGetAdditionalProperty(this T instance, string key, out U value)
+ where T : IJsonModel
+ {
+ PropertyInfo additionalDataProperty = instance.GetType().GetProperty("SerializedAdditionalRawData", BindingFlags.Instance | BindingFlags.NonPublic);
+ object existingSerializedAdditionalRawData = additionalDataProperty.GetValue(instance);
+
+ if (instance.GetAdditionalProperty(key) is BinaryData valueBytes)
+ {
+ if (typeof(U) == typeof(string))
+ {
+ value = (U)(object)valueBytes.ToString();
+ return true;
+ }
+ else if (typeof(U) == typeof(IDictionary)
+ && JsonNode.Parse(valueBytes.ToString()) is JsonObject dictionaryValueObject)
+ {
+ IDictionary valueDictionary = new ChangeTrackingDictionary();
+ foreach (KeyValuePair dictionaryPair in dictionaryValueObject)
+ {
+ valueDictionary.Add(dictionaryPair.Key, BinaryData.FromString(dictionaryPair.Value.ToString()));
+ }
+ value = (U)(object)valueDictionary;
+ return true;
+ }
+ }
+ value = default;
+ return false;
+ }
+
+ private static BinaryData GetBinaryData(T input)
+ {
+ if (input is BinaryData passthroughBinaryData)
+ {
+ return passthroughBinaryData;
+ }
+ else if (input is string stringData)
+ {
+ return BinaryData.FromString(stringData);
+ }
+ else if (input is IPersistableModel)
+ {
+ return ModelReaderWriter.Write(input, ModelSerializationExtensions.WireOptions, AzureAIAgentsContext.Default);
+ }
+ else if (input is IDictionary binaryDataDictionary)
+ {
+ JsonObject dictionaryObject = new();
+ foreach (KeyValuePair dictionaryPair in binaryDataDictionary)
+ {
+ dictionaryObject[dictionaryPair.Key] = JsonNode.Parse(dictionaryPair.Value.ToString());
+ }
+ return BinaryData.FromString(dictionaryObject.ToString());
+ }
+ return null;
+ }
+
+ private static IDictionary GetAdditionalProperties(this T instance)
+ where T : IJsonModel
+ {
+ PropertyInfo additionalDataProperty = instance
+ .GetType()
+ .GetProperty(
+ "SerializedAdditionalRawData",
+ BindingFlags.Instance | BindingFlags.NonPublic);
+ return additionalDataProperty.GetValue(instance) as IDictionary;
+ }
+
+ private static BinaryData GetAdditionalProperty(this T instance, string key)
+ where T : IJsonModel
+ {
+ if (instance.GetAdditionalProperties()?.TryGetValue(key, out BinaryData value) == true)
+ {
+ return value;
+ }
+ return null;
+ }
+}
diff --git a/sdk/ai/Azure.AI.Agents/src/Custom/ResponseCreationOptionsExtensions.cs b/sdk/ai/Azure.AI.Agents/src/Custom/ResponseCreationOptionsExtensions.cs
index 84137f660bc6..c4f2faf614b2 100644
--- a/sdk/ai/Azure.AI.Agents/src/Custom/ResponseCreationOptionsExtensions.cs
+++ b/sdk/ai/Azure.AI.Agents/src/Custom/ResponseCreationOptionsExtensions.cs
@@ -5,6 +5,8 @@
using System;
using System.ClientModel.Primitives;
+using System.Collections.Generic;
+using System.Text.Json.Nodes;
using OpenAI.Responses;
#pragma warning disable OPENAI001
@@ -69,4 +71,19 @@ public static void SetConversationReference(this ResponseCreationOptions respons
///
public static void SetConversationReference(this ResponseCreationOptions responseCreationOptions, AgentConversation conversation)
=> SetConversationReference(responseCreationOptions, conversation.Id);
+
+ public static void AddStructuredInput(this ResponseCreationOptions options, string key, string value)
+ {
+ IDictionary structuredInputs
+ = options.TryGetAdditionalProperty("structured_inputs", out IDictionary existingDictionary)
+ ? existingDictionary
+ : new ChangeTrackingDictionary();
+ structuredInputs[key] = BinaryData.FromString(JsonValue.Create(value).ToJsonString());
+ options.SetAdditionalProperty("structured_inputs", structuredInputs);
+ }
+
+ public static void SetStructuredInputs(this ResponseCreationOptions options, BinaryData structuredInputsBytes)
+ {
+ options.SetAdditionalProperty("structured_inputs", structuredInputsBytes);
+ }
}
diff --git a/sdk/ai/Azure.AI.Agents/src/Custom/WorkflowAgentDefinition.cs b/sdk/ai/Azure.AI.Agents/src/Custom/WorkflowAgentDefinition.cs
index 9900cd69d1c0..57b030dc25aa 100644
--- a/sdk/ai/Azure.AI.Agents/src/Custom/WorkflowAgentDefinition.cs
+++ b/sdk/ai/Azure.AI.Agents/src/Custom/WorkflowAgentDefinition.cs
@@ -3,15 +3,19 @@
#nullable disable
-using System;
-using System.Collections.Generic;
-using System.Text.Json;
-
namespace Azure.AI.Agents;
[CodeGenType("WorkflowDefinition")]
public partial class WorkflowAgentDefinition
{
- [CodeGenMember("Trigger")]
- public BinaryData TriggerBytes { get; set; }
+ public static WorkflowAgentDefinition FromYaml(string workflowYamlDocument)
+ {
+ return new()
+ {
+ WorkflowYaml = workflowYamlDocument,
+ };
+ }
+
+ [CodeGenMember("Workflow")]
+ private string WorkflowYaml { get; set; }
}
diff --git a/sdk/ai/Azure.AI.Agents/src/Generated/AzureAIAgentsModelFactory.cs b/sdk/ai/Azure.AI.Agents/src/Generated/AzureAIAgentsModelFactory.cs
index bd0605d1416b..5419fe6df22a 100644
--- a/sdk/ai/Azure.AI.Agents/src/Generated/AzureAIAgentsModelFactory.cs
+++ b/sdk/ai/Azure.AI.Agents/src/Generated/AzureAIAgentsModelFactory.cs
@@ -84,11 +84,11 @@ public static RaiConfig RaiConfig(string raiPolicyName = default)
/// The workflow specification in CSDL format.
/// Configuration for Responsible AI (RAI) content filtering and safety features.
- /// The CSDL YAML definition of the workflow.
+ /// The CSDL YAML definition of the workflow.
/// A new instance for mocking.
- public static WorkflowAgentDefinition WorkflowAgentDefinition(RaiConfig raiConfig = default, string workflow = default)
+ public static WorkflowAgentDefinition WorkflowAgentDefinition(RaiConfig raiConfig = default, string workflowYaml = default)
{
- return new WorkflowAgentDefinition(AgentKind.Workflow, raiConfig, additionalBinaryDataProperties: null, workflow);
+ return new WorkflowAgentDefinition(AgentKind.Workflow, raiConfig, additionalBinaryDataProperties: null, workflowYaml);
}
/// The hosted agent definition.
diff --git a/sdk/ai/Azure.AI.Agents/src/Generated/Models/WorkflowAgentDefinition.Serialization.cs b/sdk/ai/Azure.AI.Agents/src/Generated/Models/WorkflowAgentDefinition.Serialization.cs
index d5da6579c83c..2f54c89059fc 100644
--- a/sdk/ai/Azure.AI.Agents/src/Generated/Models/WorkflowAgentDefinition.Serialization.cs
+++ b/sdk/ai/Azure.AI.Agents/src/Generated/Models/WorkflowAgentDefinition.Serialization.cs
@@ -31,10 +31,10 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri
throw new FormatException($"The model {nameof(WorkflowAgentDefinition)} does not support writing '{format}' format.");
}
base.JsonModelWriteCore(writer, options);
- if (Optional.IsDefined(Workflow))
+ if (Optional.IsDefined(WorkflowYaml))
{
writer.WritePropertyName("workflow"u8);
- writer.WriteStringValue(Workflow);
+ writer.WriteStringValue(WorkflowYaml);
}
}
@@ -66,7 +66,7 @@ internal static WorkflowAgentDefinition DeserializeWorkflowAgentDefinition(JsonE
AgentKind kind = default;
RaiConfig raiConfig = default;
IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary();
- string workflow = default;
+ string workflowYaml = default;
foreach (var prop in element.EnumerateObject())
{
if (prop.NameEquals("kind"u8))
@@ -85,7 +85,7 @@ internal static WorkflowAgentDefinition DeserializeWorkflowAgentDefinition(JsonE
}
if (prop.NameEquals("workflow"u8))
{
- workflow = prop.Value.GetString();
+ workflowYaml = prop.Value.GetString();
continue;
}
if (options.Format != "W")
@@ -93,7 +93,7 @@ internal static WorkflowAgentDefinition DeserializeWorkflowAgentDefinition(JsonE
additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText()));
}
}
- return new WorkflowAgentDefinition(kind, raiConfig, additionalBinaryDataProperties, workflow);
+ return new WorkflowAgentDefinition(kind, raiConfig, additionalBinaryDataProperties, workflowYaml);
}
/// The client options for reading and writing models.
diff --git a/sdk/ai/Azure.AI.Agents/src/Generated/Models/WorkflowAgentDefinition.cs b/sdk/ai/Azure.AI.Agents/src/Generated/Models/WorkflowAgentDefinition.cs
index 577a4939bd90..2dbfa9919b7b 100644
--- a/sdk/ai/Azure.AI.Agents/src/Generated/Models/WorkflowAgentDefinition.cs
+++ b/sdk/ai/Azure.AI.Agents/src/Generated/Models/WorkflowAgentDefinition.cs
@@ -19,13 +19,10 @@ public WorkflowAgentDefinition() : base(AgentKind.Workflow)
///
/// Configuration for Responsible AI (RAI) content filtering and safety features.
/// Keeps track of any properties unknown to the library.
- /// The CSDL YAML definition of the workflow.
- internal WorkflowAgentDefinition(AgentKind kind, RaiConfig raiConfig, IDictionary additionalBinaryDataProperties, string workflow) : base(kind, raiConfig, additionalBinaryDataProperties)
+ /// The CSDL YAML definition of the workflow.
+ internal WorkflowAgentDefinition(AgentKind kind, RaiConfig raiConfig, IDictionary additionalBinaryDataProperties, string workflowYaml) : base(kind, raiConfig, additionalBinaryDataProperties)
{
- Workflow = workflow;
+ WorkflowYaml = workflowYaml;
}
-
- /// The CSDL YAML definition of the workflow.
- public string Workflow { get; set; }
}
}
diff --git a/sdk/ai/Azure.AI.Agents/tests/AgentsTests.cs b/sdk/ai/Azure.AI.Agents/tests/AgentsTests.cs
index 25cc75e39f15..ecc875f316c0 100644
--- a/sdk/ai/Azure.AI.Agents/tests/AgentsTests.cs
+++ b/sdk/ai/Azure.AI.Agents/tests/AgentsTests.cs
@@ -6,6 +6,7 @@
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
+using System.Text.Json.Nodes;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.ClientModel.TestFramework;
@@ -356,7 +357,6 @@ public async Task SimplePromptAgentWithoutConversation()
}
[RecordedTest]
- [Ignore("4771165")]
public async Task ErrorsGiveGoodExceptionMessages()
{
AgentsClient client = GetTestClient();
@@ -375,40 +375,76 @@ public async Task ErrorsGiveGoodExceptionMessages()
}
[Test]
- [Ignore("Bug 4755051")]
+ public async Task StructuredInputsWork()
+ {
+ AgentsClient agentsClient = GetTestClient();
+ OpenAIClient openAIClient = agentsClient.GetOpenAIClient(TestOpenAIClientOptions);
+ OpenAIResponseClient responseClient = openAIClient.GetOpenAIResponseClient(TestEnvironment.MODELDEPLOYMENTNAME);
+
+ AgentVersion agent = await agentsClient.CreateAgentVersionAsync(
+ "TestPromptAgentFromDotnetTests2343",
+ new PromptAgentDefinition(TestEnvironment.MODELDEPLOYMENTNAME)
+ {
+ Instructions = "You are a friendly agent. The name of the user talking to you is {{user_name}}.",
+ StructuredInputs =
+ {
+ ["user_name"] = new StructuredInputDefinition()
+ {
+ DefaultValue = BinaryData.FromObjectAsJson(JsonValue.Create("Ishmael")),
+ }
+ }
+ },
+ new AgentVersionCreationOptions()
+ {
+ Metadata =
+ {
+ ["test_delete_me"] = "true",
+ }
+ });
+
+ ResponseCreationOptions responseOptions = new();
+ responseOptions.SetAgentReference(agent);
+
+ ResponseItem item = ResponseItem.CreateUserMessageItem("What's my name?");
+
+ OpenAIResponse response = await responseClient.CreateResponseAsync([item], responseOptions);
+ Assert.That(response.GetOutputText(), Does.Contain("Ishmael"));
+
+ responseOptions.AddStructuredInput("user_name", "Mr. Jingles");
+ response = await responseClient.CreateResponseAsync([item], responseOptions);
+ Assert.That(response.GetOutputText(), Does.Contain("Mr. Jingles"));
+
+ responseOptions.SetStructuredInputs(BinaryData.FromString("""
+ {
+ "user_name": "Le Flufferkins"
+ }
+ """));
+ response = await responseClient.CreateResponseAsync([item], responseOptions);
+ Assert.That(response.GetOutputText(), Does.Contain("Le Flufferkins"));
+ }
+
+ [Test]
public async Task SimpleWorkflowAgent()
{
AgentsClient agentsClient = GetTestClient();
OpenAIClient openAIClient = agentsClient.GetOpenAIClient(TestOpenAIClientOptions);
OpenAIResponseClient responseClient = openAIClient.GetOpenAIResponseClient(TestEnvironment.MODELDEPLOYMENTNAME);
- AgentDefinition workflowAgentDefinition = new WorkflowAgentDefinition()
- {
- TriggerBytes = MATH_TUTOR_TRIGGER_BYTES,
- };
+ AgentDefinition workflowAgentDefinition = WorkflowAgentDefinition.FromYaml(s_HelloWorkflowYaml);
string agentName = null;
string agentVersion = null;
- AgentRecord existingAgent = await agentsClient.GetAgentAsync("TestWorkflowAgentFromDotnet");
- if (existingAgent is not null)
- {
- agentName = existingAgent.Name;
- agentVersion = existingAgent.Versions.Latest.Version;
- }
- else
- {
- AgentVersion newAgentVersion = await agentsClient.CreateAgentVersionAsync(
- "TestWorkflowAgentFromDotnet",
- workflowAgentDefinition,
- new AgentVersionCreationOptions()
- {
- Description = "A test agent created from the .NET SDK automation suite",
- Metadata = { ["freely_deleteable"] = "true" },
- });
- agentName = newAgentVersion.Name;
- agentVersion = newAgentVersion.Version;
- }
+ AgentVersion newAgentVersion = await agentsClient.CreateAgentVersionAsync(
+ "TestWorkflowAgentFromDotnet234",
+ workflowAgentDefinition,
+ new AgentVersionCreationOptions()
+ {
+ Description = "A test agent created from the .NET SDK automation suite",
+ Metadata = { ["freely_deleteable"] = "true" },
+ });
+ agentName = newAgentVersion.Name;
+ agentVersion = newAgentVersion.Version;
AgentConversation newConversation = await agentsClient.GetConversationClient().CreateConversationAsync();
@@ -430,42 +466,27 @@ public async Task SimpleWorkflowAgent()
}
[Test]
- [Ignore("Bug 4755051")]
public async Task SimpleWorkflowAgentStreaming()
{
- if (!IsAsync && Mode != RecordedTestMode.Live)
- Assert.Inconclusive(STREAMING_CONSTRAINT);
AgentsClient agentsClient = GetTestClient();
OpenAIClient openAIClient = agentsClient.GetOpenAIClient(TestOpenAIClientOptions);
OpenAIResponseClient responseClient = openAIClient.GetOpenAIResponseClient(TestEnvironment.MODELDEPLOYMENTNAME);
- AgentDefinition workflowAgentDefinition = new WorkflowAgentDefinition()
- {
- TriggerBytes = MATH_TUTOR_TRIGGER_BYTES,
- };
+ AgentDefinition workflowAgentDefinition = WorkflowAgentDefinition.FromYaml(s_HelloWorkflowYaml);
string agentName = null;
string agentVersion = null;
- AgentRecord existingAgent = await agentsClient.GetAgentAsync("TestWorkflowAgentFromDotnet");
- if (existingAgent is not null)
- {
- agentName = existingAgent.Name;
- agentVersion = existingAgent.Versions.Latest.Version;
- }
- else
- {
- AgentVersion newAgentVersion = await agentsClient.CreateAgentVersionAsync(
- "TestWorkflowAgentFromDotnet",
- workflowAgentDefinition,
- new AgentVersionCreationOptions()
- {
- Description = "A test agent created from the .NET SDK automation suite",
- Metadata = { ["freely_deleteable"] = "true" },
- });
- agentName = newAgentVersion.Name;
- agentVersion = newAgentVersion.Version;
- }
+ AgentVersion newAgentVersion = await agentsClient.CreateAgentVersionAsync(
+ "TestWorkflowAgentFromDotnet234",
+ workflowAgentDefinition,
+ new AgentVersionCreationOptions()
+ {
+ Description = "A test agent created from the .NET SDK automation suite",
+ Metadata = { ["freely_deleteable"] = "true" },
+ });
+ agentName = newAgentVersion.Name;
+ agentVersion = newAgentVersion.Version;
AgentConversation newConversation = await agentsClient.GetConversationClient().CreateConversationAsync();
@@ -799,98 +820,16 @@ public async Task TestFunctionToolMultiturnWithPersistence(TestItemPersistenceMo
Assert.That(response.GetOutputText().ToLower(), Does.Contain(replyToFunctionCall.ToLower()));
}
- private static BinaryData MATH_TUTOR_TRIGGER_BYTES = BinaryData.FromString("""
- {
- "kind": "OnConversationStart",
- "id": "my_workflow",
- "actions": [
- {
- "kind": "SetVariable",
- "id": "set_variable_input_task",
- "variable": "Local.LatestMessage",
- "value": "=UserMessage(System.LastMessageText)"
- },
- {
- "kind": "CreateConversation",
- "id": "create_student_conversation",
- "conversationId": "Local.StudentConversationId"
- },
- {
- "kind": "CreateConversation",
- "id": "create_teacher_conversation",
- "conversationId": "Local.TeacherConversationId"
- },
- {
- "kind": "InvokeAzureAgent",
- "id": "student_agent",
- "description": "The student node",
- "conversationId": "=Local.StudentConversationId",
- "agent": {
- "name": "StudentAgent_123"
- },
- "input": {
- "messages": "=Local.LatestMessage"
- },
- "output": {
- "messages": "Local.LatestMessage"
- }
- },
- {
- "kind": "InvokeAzureAgent",
- "id": "teacher_agent",
- "description": "The teacher node",
- "conversationId": "=Local.TeacherConversationId",
- "agent": {
- "name": "TeacherAgent_123"
- },
- "input": {
- "messages": "=Local.LatestMessage"
- },
- "output": {
- "messages": "Local.LatestMessage"
- }
- },
- {
- "kind": "SetVariable",
- "id": "set_variable_turncount",
- "variable": "Local.TurnCount",
- "value": "=Local.TurnCount + 1"
- },
- {
- "kind": "ConditionGroup",
- "id": "completion_check",
- "conditions": [
- {
- "condition": "=!IsBlank(Find(\"[COMPLETE]\", Upper(Last(Local.LatestMessage).Text)))",
- "id": "check_done",
- "actions": [
- {
- "kind": "EndConversation",
- "id": "end_workflow"
- }
- ]
- },
- {
- "condition": "=Local.TurnCount >= 4",
- "id": "check_turn_count_exceeded",
- "actions": [
- {
- "kind": "SendActivity",
- "id": "send_activity_tired",
- "activity": "Let's try again later...I am tired."
- }
- ]
- }
- ],
- "elseActions": [
- {
- "kind": "GotoAction",
- "id": "goto_student_agent",
- "actionId": "student_agent"
- }
- ]
- }
- ]
- }
- """);
+ private static readonly string s_HelloWorkflowYaml = """
+ kind: workflow
+ trigger:
+ kind: OnConversationStart
+ id: my_workflow
+ actions:
+ - kind: SendActivity
+ id: sendActivity_welcome
+ activity: hello world
+ - kind: EndConversation
+ id: end_conversation
+ """;
}
From 3ea4c2c2bf10564092ff17fb203dbbd9e5029e52 Mon Sep 17 00:00:00 2001
From: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com>
Date: Thu, 30 Oct 2025 14:49:02 -0700
Subject: [PATCH 07/58] Update UnbrandedGeneratorVersion to
1.0.0-alpha.20251030.1 (#53589)
Co-authored-by: Ubuntu
---
eng/Packages.Data.props | 2 +-
eng/http-client-csharp-emitter-package-lock.json | 16 ++++++++--------
eng/http-client-csharp-emitter-package.json | 2 +-
.../http-client-csharp/package-lock.json | 8 ++++----
eng/packages/http-client-csharp/package.json | 2 +-
5 files changed, 15 insertions(+), 15 deletions(-)
diff --git a/eng/Packages.Data.props b/eng/Packages.Data.props
index b0f35bb405eb..5ea4e3c6e2d4 100644
--- a/eng/Packages.Data.props
+++ b/eng/Packages.Data.props
@@ -477,7 +477,7 @@
1.0.0-dev.20250930.1
- 1.0.0-alpha.20251029.3
+ 1.0.0-alpha.20251030.1
1.0.0-alpha.20251022.3
\ No newline at end of file
diff --git a/eng/http-client-csharp-emitter-package-lock.json b/eng/http-client-csharp-emitter-package-lock.json
index b9c72cc9885c..1fb4cb8e7956 100644
--- a/eng/http-client-csharp-emitter-package-lock.json
+++ b/eng/http-client-csharp-emitter-package-lock.json
@@ -5,7 +5,7 @@
"packages": {
"": {
"dependencies": {
- "@typespec/http-client-csharp": "1.0.0-alpha.20251029.3",
+ "@typespec/http-client-csharp": "1.0.0-alpha.20251030.1",
"client-plugin": "file:../../../../eng/packages/plugins/client"
},
"devDependencies": {
@@ -607,9 +607,9 @@
}
},
"node_modules/@typespec/http-client-csharp": {
- "version": "1.0.0-alpha.20251029.3",
- "resolved": "https://registry.npmjs.org/@typespec/http-client-csharp/-/http-client-csharp-1.0.0-alpha.20251029.3.tgz",
- "integrity": "sha512-MfbuD67sfkPf14vtulmtn57z3tmKRnSXeBYEV7lbs+AFkGHggBOuV1wloFdwqPSYudZVjIJk/flkNiXbZXKrVA==",
+ "version": "1.0.0-alpha.20251030.1",
+ "resolved": "https://registry.npmjs.org/@typespec/http-client-csharp/-/http-client-csharp-1.0.0-alpha.20251030.1.tgz",
+ "integrity": "sha512-WxNNPIvQWGg9wRWSZVKX6PyDFyClt5UyyE8+a4wRYJtvuzdADl2nbjZZlmEnaX7ngBQWWh8a7tWMW4fW+8Pi2w==",
"license": "MIT",
"peerDependencies": {
"@azure-tools/typespec-client-generator-core": ">=0.61.0 < 0.62.0 || ~0.62.0-0",
@@ -1370,10 +1370,10 @@
}
},
"node_modules/tar": {
- "version": "7.5.1",
- "resolved": "https://registry.npmjs.org/tar/-/tar-7.5.1.tgz",
- "integrity": "sha512-nlGpxf+hv0v7GkWBK2V9spgactGOp0qvfWRxUMjqHyzrt3SgwE48DIv/FhqPHJYLHpgW1opq3nERbz5Anq7n1g==",
- "license": "ISC",
+ "version": "7.5.2",
+ "resolved": "https://registry.npmjs.org/tar/-/tar-7.5.2.tgz",
+ "integrity": "sha512-7NyxrTE4Anh8km8iEy7o0QYPs+0JKBTj5ZaqHg6B39erLg0qYXN3BijtShwbsNSvQ+LN75+KV+C4QR/f6Gwnpg==",
+ "license": "BlueOak-1.0.0",
"dependencies": {
"@isaacs/fs-minipass": "^4.0.0",
"chownr": "^3.0.0",
diff --git a/eng/http-client-csharp-emitter-package.json b/eng/http-client-csharp-emitter-package.json
index 90bacbf5bcdb..8d0636c57300 100644
--- a/eng/http-client-csharp-emitter-package.json
+++ b/eng/http-client-csharp-emitter-package.json
@@ -2,7 +2,7 @@
"main": "dist/src/index.js",
"dependencies": {
"client-plugin": "file:../../../../eng/packages/plugins/client",
- "@typespec/http-client-csharp": "1.0.0-alpha.20251029.3"
+ "@typespec/http-client-csharp": "1.0.0-alpha.20251030.1"
},
"devDependencies": {
"@azure-tools/typespec-client-generator-core": "0.61.0",
diff --git a/eng/packages/http-client-csharp/package-lock.json b/eng/packages/http-client-csharp/package-lock.json
index 85ce2e52c776..10091c72c7c7 100644
--- a/eng/packages/http-client-csharp/package-lock.json
+++ b/eng/packages/http-client-csharp/package-lock.json
@@ -9,7 +9,7 @@
"version": "1.0.0",
"license": "MIT",
"dependencies": {
- "@typespec/http-client-csharp": "1.0.0-alpha.20251029.3"
+ "@typespec/http-client-csharp": "1.0.0-alpha.20251030.1"
},
"devDependencies": {
"@azure-tools/azure-http-specs": "0.1.0-alpha.30",
@@ -2791,9 +2791,9 @@
}
},
"node_modules/@typespec/http-client-csharp": {
- "version": "1.0.0-alpha.20251029.3",
- "resolved": "https://registry.npmjs.org/@typespec/http-client-csharp/-/http-client-csharp-1.0.0-alpha.20251029.3.tgz",
- "integrity": "sha512-MfbuD67sfkPf14vtulmtn57z3tmKRnSXeBYEV7lbs+AFkGHggBOuV1wloFdwqPSYudZVjIJk/flkNiXbZXKrVA==",
+ "version": "1.0.0-alpha.20251030.1",
+ "resolved": "https://registry.npmjs.org/@typespec/http-client-csharp/-/http-client-csharp-1.0.0-alpha.20251030.1.tgz",
+ "integrity": "sha512-WxNNPIvQWGg9wRWSZVKX6PyDFyClt5UyyE8+a4wRYJtvuzdADl2nbjZZlmEnaX7ngBQWWh8a7tWMW4fW+8Pi2w==",
"license": "MIT",
"peerDependencies": {
"@azure-tools/typespec-client-generator-core": ">=0.61.0 < 0.62.0 || ~0.62.0-0",
diff --git a/eng/packages/http-client-csharp/package.json b/eng/packages/http-client-csharp/package.json
index 7b3cf2a72b52..9247d76a8fcc 100644
--- a/eng/packages/http-client-csharp/package.json
+++ b/eng/packages/http-client-csharp/package.json
@@ -38,7 +38,7 @@
"dist/generator/**"
],
"dependencies": {
- "@typespec/http-client-csharp": "1.0.0-alpha.20251029.3"
+ "@typespec/http-client-csharp": "1.0.0-alpha.20251030.1"
},
"devDependencies": {
"@azure-tools/azure-http-specs": "0.1.0-alpha.30",
From d75586def2275e68618626a0079839793167bd65 Mon Sep 17 00:00:00 2001
From: JoshLove-msft <54595583+JoshLove-msft@users.noreply.github.com>
Date: Thu, 30 Oct 2025 16:11:46 -0700
Subject: [PATCH 08/58] Clean up unused file and namespaces (#53591)
---
.../Extensions/ClientProviderExtensions.cs | 2 +-
.../src/Extensions/ConfigurationExtensions.cs | 2 +-
.../AzureClientResponseProvider.cs | 1 -
.../AzureCollectionResultDefinition.cs | 1 +
.../ClientBuilderExtensionsDefinition.cs | 2 +-
.../Utilities/TypeNameUtilities.cs | 2 +-
.../src/Visitors/DistributedTracingVisitor.cs | 1 +
.../Extensions/ConfigurationExtensions.cs | 22 -------------------
.../src/Visitors/LroVisitor.cs | 1 +
.../Visitors/ModelFactoryRenamerVisitor.cs | 2 +-
.../src/Visitors/NamespaceVisitor.cs | 2 +-
.../test/ConfigurationExtensionsTests.cs | 2 +-
12 files changed, 10 insertions(+), 30 deletions(-)
rename eng/packages/http-client-csharp/generator/Azure.Generator/src/{Visitors => }/Utilities/TypeNameUtilities.cs (96%)
delete mode 100644 eng/packages/http-client-csharp/generator/Azure.Generator/src/Visitors/Extensions/ConfigurationExtensions.cs
diff --git a/eng/packages/http-client-csharp/generator/Azure.Generator/src/Extensions/ClientProviderExtensions.cs b/eng/packages/http-client-csharp/generator/Azure.Generator/src/Extensions/ClientProviderExtensions.cs
index 0e31d36b8f97..d2fadfb3ef31 100644
--- a/eng/packages/http-client-csharp/generator/Azure.Generator/src/Extensions/ClientProviderExtensions.cs
+++ b/eng/packages/http-client-csharp/generator/Azure.Generator/src/Extensions/ClientProviderExtensions.cs
@@ -8,7 +8,7 @@
using Microsoft.TypeSpec.Generator.Input.Extensions;
using Microsoft.TypeSpec.Generator.Providers;
-namespace Azure.Generator
+namespace Azure.Generator.Extensions
{
internal static class ClientProviderExtensions
{
diff --git a/eng/packages/http-client-csharp/generator/Azure.Generator/src/Extensions/ConfigurationExtensions.cs b/eng/packages/http-client-csharp/generator/Azure.Generator/src/Extensions/ConfigurationExtensions.cs
index b079c8ae7569..dbe573e38518 100644
--- a/eng/packages/http-client-csharp/generator/Azure.Generator/src/Extensions/ConfigurationExtensions.cs
+++ b/eng/packages/http-client-csharp/generator/Azure.Generator/src/Extensions/ConfigurationExtensions.cs
@@ -5,7 +5,7 @@
using System.Collections.Generic;
using Microsoft.TypeSpec.Generator;
-namespace Azure.Generator
+namespace Azure.Generator.Extensions
{
internal static class ConfigurationExtensions
{
diff --git a/eng/packages/http-client-csharp/generator/Azure.Generator/src/Providers/Abstraction/AzureClientResponseProvider.cs b/eng/packages/http-client-csharp/generator/Azure.Generator/src/Providers/Abstraction/AzureClientResponseProvider.cs
index dce31f8220ac..565c92f78354 100644
--- a/eng/packages/http-client-csharp/generator/Azure.Generator/src/Providers/Abstraction/AzureClientResponseProvider.cs
+++ b/eng/packages/http-client-csharp/generator/Azure.Generator/src/Providers/Abstraction/AzureClientResponseProvider.cs
@@ -7,7 +7,6 @@
using Microsoft.TypeSpec.Generator.Input;
using Microsoft.TypeSpec.Generator.Primitives;
using Microsoft.TypeSpec.Generator.Providers;
-using Microsoft.TypeSpec.Generator.Snippets;
using static Microsoft.TypeSpec.Generator.Snippets.Snippet;
namespace Azure.Generator.Providers
diff --git a/eng/packages/http-client-csharp/generator/Azure.Generator/src/Providers/AzureCollectionResultDefinition.cs b/eng/packages/http-client-csharp/generator/Azure.Generator/src/Providers/AzureCollectionResultDefinition.cs
index f957c25a0e25..cd18c578cfc6 100644
--- a/eng/packages/http-client-csharp/generator/Azure.Generator/src/Providers/AzureCollectionResultDefinition.cs
+++ b/eng/packages/http-client-csharp/generator/Azure.Generator/src/Providers/AzureCollectionResultDefinition.cs
@@ -8,6 +8,7 @@
using System.Threading.Tasks;
using Azure.Core;
using Azure.Core.Pipeline;
+using Azure.Generator.Extensions;
using Microsoft.TypeSpec.Generator.ClientModel.Providers;
using Microsoft.TypeSpec.Generator.Expressions;
using Microsoft.TypeSpec.Generator.Input;
diff --git a/eng/packages/http-client-csharp/generator/Azure.Generator/src/Providers/ClientBuilderExtensionsDefinition.cs b/eng/packages/http-client-csharp/generator/Azure.Generator/src/Providers/ClientBuilderExtensionsDefinition.cs
index a89f64c67973..42690e8202bc 100644
--- a/eng/packages/http-client-csharp/generator/Azure.Generator/src/Providers/ClientBuilderExtensionsDefinition.cs
+++ b/eng/packages/http-client-csharp/generator/Azure.Generator/src/Providers/ClientBuilderExtensionsDefinition.cs
@@ -8,12 +8,12 @@
using System.Linq;
using Azure.Core;
using Azure.Core.Extensions;
+using Azure.Generator.Utilities;
using Microsoft.TypeSpec.Generator.ClientModel.Providers;
using Microsoft.TypeSpec.Generator.Expressions;
using Microsoft.TypeSpec.Generator.Primitives;
using Microsoft.TypeSpec.Generator.Providers;
using Microsoft.TypeSpec.Generator.Statements;
-using Azure.Generator.Visitors.Utilities;
using static Microsoft.TypeSpec.Generator.Snippets.Snippet;
namespace Azure.Generator.Providers
diff --git a/eng/packages/http-client-csharp/generator/Azure.Generator/src/Visitors/Utilities/TypeNameUtilities.cs b/eng/packages/http-client-csharp/generator/Azure.Generator/src/Utilities/TypeNameUtilities.cs
similarity index 96%
rename from eng/packages/http-client-csharp/generator/Azure.Generator/src/Visitors/Utilities/TypeNameUtilities.cs
rename to eng/packages/http-client-csharp/generator/Azure.Generator/src/Utilities/TypeNameUtilities.cs
index 6da4bcb74a42..36035aad8121 100644
--- a/eng/packages/http-client-csharp/generator/Azure.Generator/src/Visitors/Utilities/TypeNameUtilities.cs
+++ b/eng/packages/http-client-csharp/generator/Azure.Generator/src/Utilities/TypeNameUtilities.cs
@@ -4,7 +4,7 @@
using Microsoft.TypeSpec.Generator;
using System.Linq;
-namespace Azure.Generator.Visitors.Utilities
+namespace Azure.Generator.Utilities
{
internal static class TypeNameUtilities
{
diff --git a/eng/packages/http-client-csharp/generator/Azure.Generator/src/Visitors/DistributedTracingVisitor.cs b/eng/packages/http-client-csharp/generator/Azure.Generator/src/Visitors/DistributedTracingVisitor.cs
index 41fbeb9fb192..6626ac6bcfa7 100644
--- a/eng/packages/http-client-csharp/generator/Azure.Generator/src/Visitors/DistributedTracingVisitor.cs
+++ b/eng/packages/http-client-csharp/generator/Azure.Generator/src/Visitors/DistributedTracingVisitor.cs
@@ -14,6 +14,7 @@
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using System.Linq;
+using Azure.Generator.Extensions;
using static Microsoft.TypeSpec.Generator.Snippets.Snippet;
namespace Azure.Generator.Visitors
diff --git a/eng/packages/http-client-csharp/generator/Azure.Generator/src/Visitors/Extensions/ConfigurationExtensions.cs b/eng/packages/http-client-csharp/generator/Azure.Generator/src/Visitors/Extensions/ConfigurationExtensions.cs
deleted file mode 100644
index 629006ec4908..000000000000
--- a/eng/packages/http-client-csharp/generator/Azure.Generator/src/Visitors/Extensions/ConfigurationExtensions.cs
+++ /dev/null
@@ -1,22 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-
-using System;
-using System.Collections.Generic;
-using Microsoft.TypeSpec.Generator;
-
-namespace Azure.Generator.Visitors.Extensions
-{
- internal static class ConfigurationExtensions
- {
- public static bool UseModelNamespace(this Configuration config) =>
- UseModelNamespace(config.AdditionalConfigurationOptions);
-
- internal static bool UseModelNamespace(IReadOnlyDictionary options)
- {
- return options.TryGetValue("model-namespace", out var value) &&
- bool.TryParse(value.ToString(), out var parsed) &&
- parsed;
- }
- }
-}
\ No newline at end of file
diff --git a/eng/packages/http-client-csharp/generator/Azure.Generator/src/Visitors/LroVisitor.cs b/eng/packages/http-client-csharp/generator/Azure.Generator/src/Visitors/LroVisitor.cs
index 8b5faa6e592b..54c5ac36994b 100644
--- a/eng/packages/http-client-csharp/generator/Azure.Generator/src/Visitors/LroVisitor.cs
+++ b/eng/packages/http-client-csharp/generator/Azure.Generator/src/Visitors/LroVisitor.cs
@@ -8,6 +8,7 @@
using System.Text.Json;
using System.Threading.Tasks;
using Azure.Core;
+using Azure.Generator.Extensions;
using Azure.Generator.Providers;
using Microsoft.TypeSpec.Generator.ClientModel;
using Microsoft.TypeSpec.Generator.ClientModel.Providers;
diff --git a/eng/packages/http-client-csharp/generator/Azure.Generator/src/Visitors/ModelFactoryRenamerVisitor.cs b/eng/packages/http-client-csharp/generator/Azure.Generator/src/Visitors/ModelFactoryRenamerVisitor.cs
index 2a66ac752c5c..20660e9c1e34 100644
--- a/eng/packages/http-client-csharp/generator/Azure.Generator/src/Visitors/ModelFactoryRenamerVisitor.cs
+++ b/eng/packages/http-client-csharp/generator/Azure.Generator/src/Visitors/ModelFactoryRenamerVisitor.cs
@@ -1,9 +1,9 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
+using Azure.Generator.Utilities;
using Microsoft.TypeSpec.Generator.ClientModel;
using Microsoft.TypeSpec.Generator.Providers;
-using Azure.Generator.Visitors.Utilities;
namespace Azure.Generator.Visitors
{
diff --git a/eng/packages/http-client-csharp/generator/Azure.Generator/src/Visitors/NamespaceVisitor.cs b/eng/packages/http-client-csharp/generator/Azure.Generator/src/Visitors/NamespaceVisitor.cs
index fa12dcd06ffa..c5b87135a5f9 100644
--- a/eng/packages/http-client-csharp/generator/Azure.Generator/src/Visitors/NamespaceVisitor.cs
+++ b/eng/packages/http-client-csharp/generator/Azure.Generator/src/Visitors/NamespaceVisitor.cs
@@ -2,12 +2,12 @@
// Licensed under the MIT License.
using System.IO;
+using Azure.Generator.Extensions;
using Microsoft.TypeSpec.Generator;
using Microsoft.TypeSpec.Generator.ClientModel;
using Microsoft.TypeSpec.Generator.ClientModel.Providers;
using Microsoft.TypeSpec.Generator.Input;
using Microsoft.TypeSpec.Generator.Providers;
-using Azure.Generator.Visitors.Extensions;
namespace Azure.Generator.Visitors
{
diff --git a/eng/packages/http-client-csharp/generator/Azure.Generator/test/ConfigurationExtensionsTests.cs b/eng/packages/http-client-csharp/generator/Azure.Generator/test/ConfigurationExtensionsTests.cs
index f2e6580a60d8..0ebc3497451c 100644
--- a/eng/packages/http-client-csharp/generator/Azure.Generator/test/ConfigurationExtensionsTests.cs
+++ b/eng/packages/http-client-csharp/generator/Azure.Generator/test/ConfigurationExtensionsTests.cs
@@ -4,7 +4,7 @@
using System;
using System.Collections.Generic;
using NUnit.Framework;
-using Azure.Generator.Visitors.Extensions;
+using Azure.Generator.Extensions;
namespace Azure.Generator.Tests
{
From 243c2b0203d3141b367294cc0351894a84b171b9 Mon Sep 17 00:00:00 2001
From: Wei Hu
Date: Fri, 31 Oct 2025 10:23:07 +0800
Subject: [PATCH 09/58] refine setter of flatten property and refine extensions
(#53561)
* Add setter for internal property and refine extensions
* if the internal property has no setter, the flattened property should not have setter either
---
.../src/Extensions/StringExtensions.cs | 25 -------------------
.../PageableOperationMethodProvider.cs | 1 -
.../ResourceOperationMethodProvider.cs | 1 -
.../src/Providers/ResourceClientProvider.cs | 1 -
.../ResourceCollectionClientProvider.cs | 1 -
.../BaseTagMethodProvider.cs | 1 -
.../ClientProviderExtensions.cs | 2 +-
.../src/Utilities/PropertyHelpers.cs | 1 -
.../src/Utilities/StringExtensions.cs | 15 +++++++++++
.../src/Visitors/FlattenPropertyVisitor.cs | 2 +-
10 files changed, 17 insertions(+), 33 deletions(-)
delete mode 100644 eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/src/Extensions/StringExtensions.cs
rename eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/src/{Extensions => Utilities}/ClientProviderExtensions.cs (94%)
diff --git a/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/src/Extensions/StringExtensions.cs b/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/src/Extensions/StringExtensions.cs
deleted file mode 100644
index 392ca7533fcc..000000000000
--- a/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/src/Extensions/StringExtensions.cs
+++ /dev/null
@@ -1,25 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-
-using Humanizer;
-using System.Collections.Generic;
-using System.Linq;
-
-namespace Azure.Generator.Management.Extensions
-{
- internal static class StringExtensions
- {
- public static IEnumerable SplitByCamelCase(this string camelCase)
- {
- return camelCase.Humanize().Split(' ').Select(w => w.FirstCharToUpperCase());
- }
-
- public static string FirstCharToUpperCase(this string str)
- {
- if (string.IsNullOrEmpty(str) || char.IsUpper(str[0]))
- return str;
-
- return char.ToUpper(str[0]) + str.Substring(1);
- }
- }
-}
diff --git a/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/src/Providers/OperationMethodProviders/PageableOperationMethodProvider.cs b/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/src/Providers/OperationMethodProviders/PageableOperationMethodProvider.cs
index fe35d7e737f3..85c9d0643943 100644
--- a/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/src/Providers/OperationMethodProviders/PageableOperationMethodProvider.cs
+++ b/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/src/Providers/OperationMethodProviders/PageableOperationMethodProvider.cs
@@ -1,7 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-using Azure.Generator.Management.Extensions;
using Azure.Generator.Management.Models;
using Azure.Generator.Management.Snippets;
using Azure.Generator.Management.Utilities;
diff --git a/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/src/Providers/OperationMethodProviders/ResourceOperationMethodProvider.cs b/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/src/Providers/OperationMethodProviders/ResourceOperationMethodProvider.cs
index d3a18a4224e1..7eeb2e7e8fb5 100644
--- a/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/src/Providers/OperationMethodProviders/ResourceOperationMethodProvider.cs
+++ b/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/src/Providers/OperationMethodProviders/ResourceOperationMethodProvider.cs
@@ -2,7 +2,6 @@
// Licensed under the MIT License.
using Azure.Core;
-using Azure.Generator.Management.Extensions;
using Azure.Generator.Management.Models;
using Azure.Generator.Management.Primitives;
using Azure.Generator.Management.Snippets;
diff --git a/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/src/Providers/ResourceClientProvider.cs b/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/src/Providers/ResourceClientProvider.cs
index d8c181800c4b..21888c3d93f7 100644
--- a/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/src/Providers/ResourceClientProvider.cs
+++ b/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/src/Providers/ResourceClientProvider.cs
@@ -3,7 +3,6 @@
using Azure.Core;
using Azure.Core.Pipeline;
-using Azure.Generator.Management.Extensions;
using Azure.Generator.Management.Models;
using Azure.Generator.Management.Providers.OperationMethodProviders;
using Azure.Generator.Management.Providers.TagMethodProviders;
diff --git a/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/src/Providers/ResourceCollectionClientProvider.cs b/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/src/Providers/ResourceCollectionClientProvider.cs
index ab099be124fe..970f345c3e8e 100644
--- a/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/src/Providers/ResourceCollectionClientProvider.cs
+++ b/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/src/Providers/ResourceCollectionClientProvider.cs
@@ -2,7 +2,6 @@
// Licensed under the MIT License.
using Azure.Core;
using Azure.Core.Pipeline;
-using Azure.Generator.Management.Extensions;
using Azure.Generator.Management.Models;
using Azure.Generator.Management.Primitives;
using Azure.Generator.Management.Providers.OperationMethodProviders;
diff --git a/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/src/Providers/TagMethodProviders/BaseTagMethodProvider.cs b/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/src/Providers/TagMethodProviders/BaseTagMethodProvider.cs
index c3ebd94d95a9..8d654627606d 100644
--- a/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/src/Providers/TagMethodProviders/BaseTagMethodProvider.cs
+++ b/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/src/Providers/TagMethodProviders/BaseTagMethodProvider.cs
@@ -1,7 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-using Azure.Generator.Management.Extensions;
using Azure.Generator.Management.Models;
using Azure.Generator.Management.Primitives;
using Azure.Generator.Management.Providers.OperationMethodProviders;
diff --git a/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/src/Extensions/ClientProviderExtensions.cs b/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/src/Utilities/ClientProviderExtensions.cs
similarity index 94%
rename from eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/src/Extensions/ClientProviderExtensions.cs
rename to eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/src/Utilities/ClientProviderExtensions.cs
index f6a9a209476b..146a8a07be07 100644
--- a/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/src/Extensions/ClientProviderExtensions.cs
+++ b/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/src/Utilities/ClientProviderExtensions.cs
@@ -5,7 +5,7 @@
using Microsoft.TypeSpec.Generator.Input;
using Microsoft.TypeSpec.Generator.Providers;
-namespace Azure.Generator.Management.Extensions
+namespace Azure.Generator.Management.Utilities
{
internal static class ClientProviderExtensions
{
diff --git a/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/src/Utilities/PropertyHelpers.cs b/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/src/Utilities/PropertyHelpers.cs
index 3aafc46e1a5e..b2d2c06b0c80 100644
--- a/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/src/Utilities/PropertyHelpers.cs
+++ b/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/src/Utilities/PropertyHelpers.cs
@@ -1,7 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-using Azure.Generator.Management.Extensions;
using Humanizer;
using Microsoft.TypeSpec.Generator.Expressions;
using Microsoft.TypeSpec.Generator.Primitives;
diff --git a/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/src/Utilities/StringExtensions.cs b/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/src/Utilities/StringExtensions.cs
index e2f5b3723720..bf9e46fbd5ec 100644
--- a/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/src/Utilities/StringExtensions.cs
+++ b/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/src/Utilities/StringExtensions.cs
@@ -1,7 +1,10 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
+using Humanizer;
using System;
+using System.Collections.Generic;
+using System.Linq;
namespace Azure.Generator.Management.Utilities
{
@@ -14,5 +17,17 @@ public static string FirstCharToLowerCase(this string str)
return string.Concat(char.ToLower(str[0]), str.AsSpan(1).ToString());
}
+ public static IEnumerable SplitByCamelCase(this string camelCase)
+ {
+ return camelCase.Humanize().Split(' ').Select(w => w.FirstCharToUpperCase());
+ }
+
+ public static string FirstCharToUpperCase(this string str)
+ {
+ if (string.IsNullOrEmpty(str) || char.IsUpper(str[0]))
+ return str;
+
+ return char.ToUpper(str[0]) + str.Substring(1);
+ }
}
}
diff --git a/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/src/Visitors/FlattenPropertyVisitor.cs b/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/src/Visitors/FlattenPropertyVisitor.cs
index 3496fa189ea3..4619fd1b5134 100644
--- a/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/src/Visitors/FlattenPropertyVisitor.cs
+++ b/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/src/Visitors/FlattenPropertyVisitor.cs
@@ -366,7 +366,7 @@ private bool PropertyFlatten(ModelProvider model, Dictionary
Date: Thu, 30 Oct 2025 19:26:03 -0700
Subject: [PATCH 10/58] Update azure-typespec/http-client-csharp-mgmt version
to prerelease 1.0.0-alpha.20251030.1 (#53580)
* Regenerate repository SDK with TypeSpec build 20251030.1
* Update SDK code mo_sc_3
* Update SDK code co_du_1
* Update SDK code se_wo_4
* Update SDK code ea_mo_2
* Update SDK code ag_co_0
* export API
---------
Co-authored-by: Wei Hu
---
...ient-csharp-mgmt-emitter-package-lock.json | 14 +-
...tp-client-csharp-mgmt-emitter-package.json | 2 +-
.../Generated/AgricultureServiceCollection.cs | 16 +-
.../Generated/AgricultureServiceResource.cs | 56 ++++++-
...griculturePlatformResourceGroupResource.cs | 36 ++++-
.../AgricultureServicePatch.Serialization.cs | 8 +-
...ObservabilityEvalOrganizationCollection.cs | 16 +-
...AIObservabilityEvalOrganizationResource.cs | 52 ++++++-
...IObservabilityEvalResourceGroupResource.cs | 36 ++++-
...lityEvalOrganizationPatch.Serialization.cs | 8 +-
...ourceManager.Compute.Recommender.net8.0.cs | 4 +-
...ager.Compute.Recommender.netstandard2.0.cs | 4 +-
.../ComputeRecommenderDiagnosticResource.cs | 28 ++--
...eComputeRecommenderSubscriptionResource.cs | 22 ++-
.../src/Generated/DellFileSystemCollection.cs | 16 +-
.../src/Generated/DellFileSystemResource.cs | 52 ++++++-
...ockableDellStorageResourceGroupResource.cs | 36 ++++-
.../DellFileSystemPatch.Serialization.cs | 8 +-
...e.ResourceManager.DeviceRegistry.net8.0.cs | 9 +-
...ceManager.DeviceRegistry.netstandard2.0.cs | 9 +-
.../ArmDeviceRegistryModelFactory.cs | 20 +--
.../DeviceRegistryAssetCollection.cs | 16 +-
...eRegistryAssetEndpointProfileCollection.cs | 16 +-
...iceRegistryAssetEndpointProfileResource.cs | 52 ++++++-
.../Generated/DeviceRegistryAssetResource.cs | 52 ++++++-
...eviceRegistryBillingContainerCollection.cs | 12 +-
.../DeviceRegistryBillingContainerResource.cs | 4 +-
.../DeviceRegistryNamespaceAssetCollection.cs | 16 +-
.../DeviceRegistryNamespaceAssetResource.cs | 52 ++++++-
.../DeviceRegistryNamespaceCollection.cs | 16 +-
...DeviceRegistryNamespaceDeviceCollection.cs | 16 +-
.../DeviceRegistryNamespaceDeviceResource.cs | 52 ++++++-
...istryNamespaceDiscoveredAssetCollection.cs | 16 +-
...egistryNamespaceDiscoveredAssetResource.cs | 52 ++++++-
...stryNamespaceDiscoveredDeviceCollection.cs | 16 +-
...gistryNamespaceDiscoveredDeviceResource.cs | 52 ++++++-
.../DeviceRegistryNamespaceResource.cs | 76 ++++++---
.../DeviceRegistrySchemaCollection.cs | 16 +-
.../DeviceRegistrySchemaRegistryCollection.cs | 16 +-
.../DeviceRegistrySchemaRegistryResource.cs | 52 ++++++-
.../Generated/DeviceRegistrySchemaResource.cs | 12 +-
.../DeviceRegistrySchemaVersionCollection.cs | 16 +-
.../DeviceRegistrySchemaVersionResource.cs | 12 +-
...ableDeviceRegistryResourceGroupResource.cs | 144 +++++++++++++++++-
...kableDeviceRegistrySubscriptionResource.cs | 36 ++++-
...AssetEndpointProfilePatch.Serialization.cs | 8 +-
.../DeviceRegistryAssetPatch.Serialization.cs | 8 +-
...gistryNamespaceAssetPatch.Serialization.cs | 8 +-
...istryNamespaceDevicePatch.Serialization.cs | 8 +-
...spaceDiscoveredAssetPatch.Serialization.cs | 8 +-
...paceDiscoveredDevicePatch.Serialization.cs | 8 +-
...iceRegistryNamespacePatch.Serialization.cs | 8 +-
...gistrySchemaRegistryPatch.Serialization.cs | 8 +-
.../src/Generated/DeidServiceCollection.cs | 16 +-
.../src/Generated/DeidServiceResource.cs | 52 ++++++-
...althDataAIServicesResourceGroupResource.cs | 36 ++++-
...rvicesPrivateEndpointConnectionResource.cs | 12 +-
...ateEndpointConnectionResourceCollection.cs | 16 +-
.../Models/DeidServicePatch.Serialization.cs | 8 +-
.../Generated/ConnectedClusterCollection.cs | 16 +-
.../src/Generated/ConnectedClusterResource.cs | 56 ++++++-
...MockableKubernetesResourceGroupResource.cs | 36 ++++-
.../ConnectedClusterPatch.Serialization.cs | 8 +-
...ticaDataManagementResourceGroupResource.cs | 36 ++++-
.../InformaticaOrganizationCollection.cs | 16 +-
.../InformaticaOrganizationResource.cs | 60 ++++++--
.../InformaticaServerlessRuntimeCollection.cs | 16 +-
.../InformaticaServerlessRuntimeResource.cs | 64 ++++++--
...ormaticaOrganizationPatch.Serialization.cs | 8 +-
...icaServerlessRuntimePatch.Serialization.cs | 8 +-
...daTestHyperExecuteResourceGroupResource.cs | 36 ++++-
...aTestHyperExecuteOrganizationCollection.cs | 16 +-
...bdaTestHyperExecuteOrganizationResource.cs | 52 ++++++-
...rExecuteOrganizationPatch.Serialization.cs | 8 +-
...lePineconeVectorDBResourceGroupResource.cs | 36 ++++-
...VectorDBOrganizationPatch.Serialization.cs | 8 +-
.../PineconeVectorDBOrganizationCollection.cs | 16 +-
.../PineconeVectorDBOrganizationResource.cs | 52 ++++++-
...ePlanetaryComputerResourceGroupResource.cs | 36 ++++-
...ryComputerGeoCatalogPatch.Serialization.cs | 8 +-
.../PlanetaryComputerGeoCatalogCollection.cs | 16 +-
.../PlanetaryComputerGeoCatalogResource.cs | 52 ++++++-
...MockablePlaywrightResourceGroupResource.cs | 36 ++++-
.../MockablePlaywrightSubscriptionResource.cs | 36 ++++-
.../PlaywrightWorkspacePatch.Serialization.cs | 8 +-
.../Generated/PlaywrightQuotaCollection.cs | 12 +-
.../src/Generated/PlaywrightQuotaResource.cs | 4 +-
.../PlaywrightWorkspaceCollection.cs | 16 +-
.../PlaywrightWorkspaceQuotaCollection.cs | 12 +-
.../PlaywrightWorkspaceQuotaResource.cs | 4 +-
.../Generated/PlaywrightWorkspaceResource.cs | 52 ++++++-
...ablePortalServicesCopilotTenantResource.cs | 22 ++-
...rvicesCopilotSettingPatch.Serialization.cs | 8 +-
.../PortalServicesCopilotSettingResource.cs | 56 ++++++-
...e.ResourceManager.StorageActions.net8.0.cs | 4 +-
...ceManager.StorageActions.netstandard2.0.cs | 4 +-
...ableStorageActionsResourceGroupResource.cs | 36 ++++-
.../Models/StorageTaskPatch.Serialization.cs | 8 +-
.../src/Generated/StorageTaskCollection.cs | 16 +-
.../src/Generated/StorageTaskResource.cs | 72 +++++++--
...leStorageDiscoveryResourceGroupResource.cs | 36 ++++-
...geDiscoveryWorkspacePatch.Serialization.cs | 8 +-
.../StorageDiscoveryWorkspaceCollection.cs | 16 +-
.../StorageDiscoveryWorkspaceResource.cs | 52 ++++++-
...ableTrustedSigningResourceGroupResource.cs | 36 ++++-
...rustedSigningAccountPatch.Serialization.cs | 8 +-
.../TrustedSigningAccountCollection.cs | 16 +-
.../TrustedSigningAccountResource.cs | 52 ++++++-
...stedSigningCertificateProfileCollection.cs | 16 +-
...rustedSigningCertificateProfileResource.cs | 16 +-
...leWeightsAndBiasesResourceGroupResource.cs | 36 ++++-
...htsAndBiasesInstancePatch.Serialization.cs | 8 +-
.../WeightsAndBiasesInstanceCollection.cs | 16 +-
.../WeightsAndBiasesInstanceResource.cs | 52 ++++++-
114 files changed, 2270 insertions(+), 640 deletions(-)
diff --git a/eng/azure-typespec-http-client-csharp-mgmt-emitter-package-lock.json b/eng/azure-typespec-http-client-csharp-mgmt-emitter-package-lock.json
index ddc2cfe8c44c..f5fc3826c441 100644
--- a/eng/azure-typespec-http-client-csharp-mgmt-emitter-package-lock.json
+++ b/eng/azure-typespec-http-client-csharp-mgmt-emitter-package-lock.json
@@ -5,7 +5,7 @@
"packages": {
"": {
"dependencies": {
- "@azure-typespec/http-client-csharp-mgmt": "1.0.0-alpha.20251026.2"
+ "@azure-typespec/http-client-csharp-mgmt": "1.0.0-alpha.20251030.1"
},
"devDependencies": {
"@azure-tools/typespec-autorest": "0.61.0",
@@ -142,9 +142,9 @@
}
},
"node_modules/@azure-typespec/http-client-csharp-mgmt": {
- "version": "1.0.0-alpha.20251026.2",
- "resolved": "https://registry.npmjs.org/@azure-typespec/http-client-csharp-mgmt/-/http-client-csharp-mgmt-1.0.0-alpha.20251026.2.tgz",
- "integrity": "sha512-d4xu8LlLBi7i7VO7gqrEVzEdFQTymYDntWYjwJtaFNehpkHg+2YZ5MBGrt8FTzUfQJlUDvnNJh2HwRHSuFGiyA==",
+ "version": "1.0.0-alpha.20251030.1",
+ "resolved": "https://registry.npmjs.org/@azure-typespec/http-client-csharp-mgmt/-/http-client-csharp-mgmt-1.0.0-alpha.20251030.1.tgz",
+ "integrity": "sha512-GS7LbTW7Sh38T3h1R1xeQWlHPyY61Yscd8k5NUnRozyq1EiRQntWplQMtC2HK7N9d23+VdQARwALsUSv0XHKjg==",
"license": "MIT",
"dependencies": {
"@azure-typespec/http-client-csharp": "1.0.0-alpha.20251022.3"
@@ -783,9 +783,9 @@
"license": "MIT"
},
"node_modules/chardet": {
- "version": "2.1.0",
- "resolved": "https://registry.npmjs.org/chardet/-/chardet-2.1.0.tgz",
- "integrity": "sha512-bNFETTG/pM5ryzQ9Ad0lJOTa6HWD/YsScAR3EnCPZRPlQh77JocYktSHOUHelyhm8IARL+o4c4F1bP5KVOjiRA==",
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/chardet/-/chardet-2.1.1.tgz",
+ "integrity": "sha512-PsezH1rqdV9VvyNhxxOW32/d75r01NY7TQCmOqomRo15ZSOKbpTFVsfjghxo6JloQUCGnH4k1LGu0R4yCLlWQQ==",
"license": "MIT"
},
"node_modules/chownr": {
diff --git a/eng/azure-typespec-http-client-csharp-mgmt-emitter-package.json b/eng/azure-typespec-http-client-csharp-mgmt-emitter-package.json
index b91a929c081a..5b6c05ae0a99 100644
--- a/eng/azure-typespec-http-client-csharp-mgmt-emitter-package.json
+++ b/eng/azure-typespec-http-client-csharp-mgmt-emitter-package.json
@@ -1,7 +1,7 @@
{
"main": "dist/src/index.js",
"dependencies": {
- "@azure-typespec/http-client-csharp-mgmt": "1.0.0-alpha.20251026.2"
+ "@azure-typespec/http-client-csharp-mgmt": "1.0.0-alpha.20251030.1"
},
"devDependencies": {
"@azure-tools/typespec-autorest": "0.61.0",
diff --git a/sdk/agricultureplatform/Azure.ResourceManager.AgriculturePlatform/src/Generated/AgricultureServiceCollection.cs b/sdk/agricultureplatform/Azure.ResourceManager.AgriculturePlatform/src/Generated/AgricultureServiceCollection.cs
index 0cd2f43c1f2a..9f94c80f51e3 100644
--- a/sdk/agricultureplatform/Azure.ResourceManager.AgriculturePlatform/src/Generated/AgricultureServiceCollection.cs
+++ b/sdk/agricultureplatform/Azure.ResourceManager.AgriculturePlatform/src/Generated/AgricultureServiceCollection.cs
@@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id)
///
/// -
/// Operation Id.
- /// CreateOrUpdate.
+ /// AgriService_CreateOrUpdate.
///
/// -
/// Default Api Version.
@@ -122,7 +122,7 @@ public virtual async Task> CreateOrUpda
///
/// -
/// Operation Id.
- /// CreateOrUpdate.
+ /// AgriService_CreateOrUpdate.
///
/// -
/// Default Api Version.
@@ -180,7 +180,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil
///
/// -
/// Operation Id.
- /// Get.
+ /// AgriService_Get.
///
/// -
/// Default Api Version.
@@ -229,7 +229,7 @@ public virtual async Task> GetAsync(string
///
/// -
/// Operation Id.
- /// Get.
+ /// AgriService_Get.
///
/// -
/// Default Api Version.
@@ -302,7 +302,7 @@ public virtual Pageable GetAll(CancellationToken can
///
/// -
/// Operation Id.
- /// Get.
+ /// AgriService_Get.
///
/// -
/// Default Api Version.
@@ -359,7 +359,7 @@ public virtual async Task> ExistsAsync(string agriServiceResource
///
/// -
/// Operation Id.
- /// Get.
+ /// AgriService_Get.
///
/// -
/// Default Api Version.
@@ -416,7 +416,7 @@ public virtual Response Exists(string agriServiceResourceName, Cancellatio
///
/// -
/// Operation Id.
- /// Get.
+ /// AgriService_Get.
///
/// -
/// Default Api Version.
@@ -477,7 +477,7 @@ public virtual async Task> GetIfExi
///
/// -
/// Operation Id.
- /// Get.
+ /// AgriService_Get.
///
/// -
/// Default Api Version.
diff --git a/sdk/agricultureplatform/Azure.ResourceManager.AgriculturePlatform/src/Generated/AgricultureServiceResource.cs b/sdk/agricultureplatform/Azure.ResourceManager.AgriculturePlatform/src/Generated/AgricultureServiceResource.cs
index e2c4f2ae4404..2d7df71bd1b5 100644
--- a/sdk/agricultureplatform/Azure.ResourceManager.AgriculturePlatform/src/Generated/AgricultureServiceResource.cs
+++ b/sdk/agricultureplatform/Azure.ResourceManager.AgriculturePlatform/src/Generated/AgricultureServiceResource.cs
@@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id)
///
/// -
/// Operation Id.
- /// Get.
+ /// AgriService_Get.
///
/// -
/// Default Api Version.
@@ -150,7 +150,7 @@ public virtual async Task> GetAsync(Cancell
///
/// -
/// Operation Id.
- /// Get.
+ /// AgriService_Get.
///
/// -
/// Default Api Version.
@@ -189,7 +189,27 @@ public virtual Response Get(CancellationToken cancel
}
}
- /// Update a AgriServiceResource.
+ ///
+ /// Update a AgriServiceResource
+ ///
+ /// -
+ /// Request Path.
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AgriculturePlatform/agriServices/{agriServiceResourceName}.
+ ///
+ /// -
+ /// Operation Id.
+ /// AgriService_Update.
+ ///
+ /// -
+ /// Default Api Version.
+ /// 2024-06-01-preview.
+ ///
+ /// -
+ /// Resource.
+ /// .
+ ///
+ ///
+ ///
/// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.
/// The resource properties to be updated.
/// The cancellation token to use.
@@ -228,7 +248,27 @@ public virtual async Task> UpdateAsync(
}
}
- /// Update a AgriServiceResource.
+ ///
+ /// Update a AgriServiceResource
+ ///
+ /// -
+ /// Request Path.
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AgriculturePlatform/agriServices/{agriServiceResourceName}.
+ ///
+ /// -
+ /// Operation Id.
+ /// AgriService_Update.
+ ///
+ /// -
+ /// Default Api Version.
+ /// 2024-06-01-preview.
+ ///
+ /// -
+ /// Resource.
+ /// .
+ ///
+ ///
+ ///
/// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.
/// The resource properties to be updated.
/// The cancellation token to use.
@@ -276,7 +316,7 @@ public virtual ArmOperation Update(WaitUntil waitUnt
///
/// -
/// Operation Id.
- /// Delete.
+ /// AgriService_Delete.
///
/// -
/// Default Api Version.
@@ -325,7 +365,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell
///
/// -
/// Operation Id.
- /// Delete.
+ /// AgriService_Delete.
///
/// -
/// Default Api Version.
@@ -374,7 +414,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel
///
/// -
/// Operation Id.
- /// GetAvailableSolutions.
+ /// AgriService_ListAvailableSolutions.
///
/// -
/// Default Api Version.
@@ -422,7 +462,7 @@ public virtual async Task> GetAvailabl
///
/// -
/// Operation Id.
- /// GetAvailableSolutions.
+ /// AgriService_ListAvailableSolutions.
///
/// -
/// Default Api Version.
diff --git a/sdk/agricultureplatform/Azure.ResourceManager.AgriculturePlatform/src/Generated/Extensions/MockableAgriculturePlatformResourceGroupResource.cs b/sdk/agricultureplatform/Azure.ResourceManager.AgriculturePlatform/src/Generated/Extensions/MockableAgriculturePlatformResourceGroupResource.cs
index c2d4bcd454ab..b740d8929961 100644
--- a/sdk/agricultureplatform/Azure.ResourceManager.AgriculturePlatform/src/Generated/Extensions/MockableAgriculturePlatformResourceGroupResource.cs
+++ b/sdk/agricultureplatform/Azure.ResourceManager.AgriculturePlatform/src/Generated/Extensions/MockableAgriculturePlatformResourceGroupResource.cs
@@ -38,7 +38,23 @@ public virtual AgricultureServiceCollection GetAgricultureServices()
return GetCachedClient(client => new AgricultureServiceCollection(client, Id));
}
- /// Get a AgriServiceResource.
+ ///
+ /// Get a AgriServiceResource
+ ///
+ /// -
+ /// Request Path.
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AgriculturePlatform/agriServices/{agriServiceResourceName}.
+ ///
+ /// -
+ /// Operation Id.
+ /// AgriService_Get.
+ ///
+ /// -
+ /// Default Api Version.
+ /// 2024-06-01-preview.
+ ///
+ ///
+ ///
/// The name of the AgriService resource.
/// The cancellation token to use.
/// is null.
@@ -51,7 +67,23 @@ public virtual async Task> GetAgricultureSe
return await GetAgricultureServices().GetAsync(agriServiceResourceName, cancellationToken).ConfigureAwait(false);
}
- /// Get a AgriServiceResource.
+ ///
+ /// Get a AgriServiceResource
+ ///
+ /// -
+ /// Request Path.
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AgriculturePlatform/agriServices/{agriServiceResourceName}.
+ ///
+ /// -
+ /// Operation Id.
+ /// AgriService_Get.
+ ///
+ /// -
+ /// Default Api Version.
+ /// 2024-06-01-preview.
+ ///
+ ///
+ ///
/// The name of the AgriService resource.
/// The cancellation token to use.
/// is null.
diff --git a/sdk/agricultureplatform/Azure.ResourceManager.AgriculturePlatform/src/Generated/Models/AgricultureServicePatch.Serialization.cs b/sdk/agricultureplatform/Azure.ResourceManager.AgriculturePlatform/src/Generated/Models/AgricultureServicePatch.Serialization.cs
index 976fc3af0692..6f958fb7dad7 100644
--- a/sdk/agricultureplatform/Azure.ResourceManager.AgriculturePlatform/src/Generated/Models/AgricultureServicePatch.Serialization.cs
+++ b/sdk/agricultureplatform/Azure.ResourceManager.AgriculturePlatform/src/Generated/Models/AgricultureServicePatch.Serialization.cs
@@ -213,15 +213,15 @@ protected virtual AgricultureServicePatch PersistableModelCreateCore(BinaryData
/// The client options for reading and writing models.
string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J";
- /// The to serialize into .
- internal static RequestContent ToRequestContent(AgricultureServicePatch patch)
+ /// The to serialize into .
+ internal static RequestContent ToRequestContent(AgricultureServicePatch agricultureServicePatch)
{
- if (patch == null)
+ if (agricultureServicePatch == null)
{
return null;
}
Utf8JsonRequestContent content = new Utf8JsonRequestContent();
- content.JsonWriter.WriteObjectValue(patch, ModelSerializationExtensions.WireOptions);
+ content.JsonWriter.WriteObjectValue(agricultureServicePatch, ModelSerializationExtensions.WireOptions);
return content;
}
}
diff --git a/sdk/arizeaiobservabilityeval/Azure.ResourceManager.ArizeAIObservabilityEval/src/Generated/ArizeAIObservabilityEvalOrganizationCollection.cs b/sdk/arizeaiobservabilityeval/Azure.ResourceManager.ArizeAIObservabilityEval/src/Generated/ArizeAIObservabilityEvalOrganizationCollection.cs
index 282370f2fd66..1e287452d03d 100644
--- a/sdk/arizeaiobservabilityeval/Azure.ResourceManager.ArizeAIObservabilityEval/src/Generated/ArizeAIObservabilityEvalOrganizationCollection.cs
+++ b/sdk/arizeaiobservabilityeval/Azure.ResourceManager.ArizeAIObservabilityEval/src/Generated/ArizeAIObservabilityEvalOrganizationCollection.cs
@@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id)
///
/// -
/// Operation Id.
- /// CreateOrUpdate.
+ /// Organizations_CreateOrUpdate.
///
/// -
/// Default Api Version.
@@ -122,7 +122,7 @@ public virtual async Task
///
-
/// Operation Id.
- /// CreateOrUpdate.
+ /// Organizations_CreateOrUpdate.
///
/// -
/// Default Api Version.
@@ -180,7 +180,7 @@ public virtual ArmOperation Create
///
/// -
/// Operation Id.
- /// Get.
+ /// Organizations_Get.
///
/// -
/// Default Api Version.
@@ -229,7 +229,7 @@ public virtual async Task
///
/// -
/// Operation Id.
- /// Get.
+ /// Organizations_Get.
///
/// -
/// Default Api Version.
@@ -302,7 +302,7 @@ public virtual Pageable GetAll(Can
///
/// -
/// Operation Id.
- /// Get.
+ /// Organizations_Get.
///
/// -
/// Default Api Version.
@@ -359,7 +359,7 @@ public virtual async Task> ExistsAsync(string organizationname, C
///
/// -
/// Operation Id.
- /// Get.
+ /// Organizations_Get.
///
/// -
/// Default Api Version.
@@ -416,7 +416,7 @@ public virtual Response Exists(string organizationname, CancellationToken
///
/// -
/// Operation Id.
- /// Get.
+ /// Organizations_Get.
///
/// -
/// Default Api Version.
@@ -477,7 +477,7 @@ public virtual async Task
///
-
/// Operation Id.
- /// Get.
+ /// Organizations_Get.
///
/// -
/// Default Api Version.
diff --git a/sdk/arizeaiobservabilityeval/Azure.ResourceManager.ArizeAIObservabilityEval/src/Generated/ArizeAIObservabilityEvalOrganizationResource.cs b/sdk/arizeaiobservabilityeval/Azure.ResourceManager.ArizeAIObservabilityEval/src/Generated/ArizeAIObservabilityEvalOrganizationResource.cs
index 469a83fe73db..7ad784ef01e0 100644
--- a/sdk/arizeaiobservabilityeval/Azure.ResourceManager.ArizeAIObservabilityEval/src/Generated/ArizeAIObservabilityEvalOrganizationResource.cs
+++ b/sdk/arizeaiobservabilityeval/Azure.ResourceManager.ArizeAIObservabilityEval/src/Generated/ArizeAIObservabilityEvalOrganizationResource.cs
@@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id)
///
/// -
/// Operation Id.
- /// Get.
+ /// Organizations_Get.
///
/// -
/// Default Api Version.
@@ -150,7 +150,7 @@ public virtual async Task
///
/// -
/// Operation Id.
- /// Get.
+ /// Organizations_Get.
///
/// -
/// Default Api Version.
@@ -189,7 +189,27 @@ public virtual Response Get(Cancel
}
}
- /// Update a OrganizationResource.
+ ///
+ /// Update a OrganizationResource
+ ///
+ /// -
+ /// Request Path.
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/ArizeAi.ObservabilityEval/organizations/{organizationname}.
+ ///
+ /// -
+ /// Operation Id.
+ /// Organizations_Update.
+ ///
+ /// -
+ /// Default Api Version.
+ /// 2024-10-01.
+ ///
+ /// -
+ /// Resource.
+ /// .
+ ///
+ ///
+ ///
/// The resource properties to be updated.
/// The cancellation token to use.
/// is null.
@@ -221,7 +241,27 @@ public virtual async Task
}
}
- /// Update a OrganizationResource.
+ ///
+ /// Update a OrganizationResource
+ ///
+ /// -
+ /// Request Path.
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/ArizeAi.ObservabilityEval/organizations/{organizationname}.
+ ///
+ /// -
+ /// Operation Id.
+ /// Organizations_Update.
+ ///
+ /// -
+ /// Default Api Version.
+ /// 2024-10-01.
+ ///
+ /// -
+ /// Resource.
+ /// .
+ ///
+ ///
+ ///
/// The resource properties to be updated.
/// The cancellation token to use.
/// is null.
@@ -262,7 +302,7 @@ public virtual Response Update(Ari
///
/// -
/// Operation Id.
- /// Delete.
+ /// Organizations_Delete.
///
/// -
/// Default Api Version.
@@ -311,7 +351,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell
///
/// -
/// Operation Id.
- /// Delete.
+ /// Organizations_Delete.
///
/// -
/// Default Api Version.
diff --git a/sdk/arizeaiobservabilityeval/Azure.ResourceManager.ArizeAIObservabilityEval/src/Generated/Extensions/MockableArizeAIObservabilityEvalResourceGroupResource.cs b/sdk/arizeaiobservabilityeval/Azure.ResourceManager.ArizeAIObservabilityEval/src/Generated/Extensions/MockableArizeAIObservabilityEvalResourceGroupResource.cs
index bea197200590..df611c24a4b5 100644
--- a/sdk/arizeaiobservabilityeval/Azure.ResourceManager.ArizeAIObservabilityEval/src/Generated/Extensions/MockableArizeAIObservabilityEvalResourceGroupResource.cs
+++ b/sdk/arizeaiobservabilityeval/Azure.ResourceManager.ArizeAIObservabilityEval/src/Generated/Extensions/MockableArizeAIObservabilityEvalResourceGroupResource.cs
@@ -38,7 +38,23 @@ public virtual ArizeAIObservabilityEvalOrganizationCollection GetArizeAIObservab
return GetCachedClient(client => new ArizeAIObservabilityEvalOrganizationCollection(client, Id));
}
- /// Get a OrganizationResource.
+ ///
+ /// Get a OrganizationResource
+ ///
+ /// -
+ /// Request Path.
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/ArizeAi.ObservabilityEval/organizations/{organizationname}.
+ ///
+ /// -
+ /// Operation Id.
+ /// Organizations_Get.
+ ///
+ /// -
+ /// Default Api Version.
+ /// 2024-10-01.
+ ///
+ ///
+ ///
/// Name of the Organization resource.
/// The cancellation token to use.
/// is null.
@@ -51,7 +67,23 @@ public virtual async Task
return await GetArizeAIObservabilityEvalOrganizations().GetAsync(organizationname, cancellationToken).ConfigureAwait(false);
}
- /// Get a OrganizationResource.
+ ///
+ /// Get a OrganizationResource
+ ///
+ /// -
+ /// Request Path.
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/ArizeAi.ObservabilityEval/organizations/{organizationname}.
+ ///
+ /// -
+ /// Operation Id.
+ /// Organizations_Get.
+ ///
+ /// -
+ /// Default Api Version.
+ /// 2024-10-01.
+ ///
+ ///
+ ///
/// Name of the Organization resource.
/// The cancellation token to use.
/// is null.
diff --git a/sdk/arizeaiobservabilityeval/Azure.ResourceManager.ArizeAIObservabilityEval/src/Generated/Models/ArizeAIObservabilityEvalOrganizationPatch.Serialization.cs b/sdk/arizeaiobservabilityeval/Azure.ResourceManager.ArizeAIObservabilityEval/src/Generated/Models/ArizeAIObservabilityEvalOrganizationPatch.Serialization.cs
index 4149db893152..87a0e03ab270 100644
--- a/sdk/arizeaiobservabilityeval/Azure.ResourceManager.ArizeAIObservabilityEval/src/Generated/Models/ArizeAIObservabilityEvalOrganizationPatch.Serialization.cs
+++ b/sdk/arizeaiobservabilityeval/Azure.ResourceManager.ArizeAIObservabilityEval/src/Generated/Models/ArizeAIObservabilityEvalOrganizationPatch.Serialization.cs
@@ -183,15 +183,15 @@ protected virtual ArizeAIObservabilityEvalOrganizationPatch PersistableModelCrea
/// The client options for reading and writing models.
string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J";
- /// The to serialize into .
- internal static RequestContent ToRequestContent(ArizeAIObservabilityEvalOrganizationPatch patch)
+ /// The to serialize into .
+ internal static RequestContent ToRequestContent(ArizeAIObservabilityEvalOrganizationPatch arizeAIObservabilityEvalOrganizationPatch)
{
- if (patch == null)
+ if (arizeAIObservabilityEvalOrganizationPatch == null)
{
return null;
}
Utf8JsonRequestContent content = new Utf8JsonRequestContent();
- content.JsonWriter.WriteObjectValue(patch, ModelSerializationExtensions.WireOptions);
+ content.JsonWriter.WriteObjectValue(arizeAIObservabilityEvalOrganizationPatch, ModelSerializationExtensions.WireOptions);
return content;
}
}
diff --git a/sdk/computerecommender/Azure.ResourceManager.Compute.Recommender/api/Azure.ResourceManager.Compute.Recommender.net8.0.cs b/sdk/computerecommender/Azure.ResourceManager.Compute.Recommender/api/Azure.ResourceManager.Compute.Recommender.net8.0.cs
index f18534c6bc52..0988db689ec6 100644
--- a/sdk/computerecommender/Azure.ResourceManager.Compute.Recommender/api/Azure.ResourceManager.Compute.Recommender.net8.0.cs
+++ b/sdk/computerecommender/Azure.ResourceManager.Compute.Recommender/api/Azure.ResourceManager.Compute.Recommender.net8.0.cs
@@ -27,8 +27,8 @@ protected ComputeRecommenderDiagnosticResource() { }
public virtual Azure.ResourceManager.Compute.Recommender.ComputeRecommenderDiagnosticData Data { get { throw null; } }
public virtual bool HasData { get { throw null; } }
public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, Azure.Core.AzureLocation location) { throw null; }
- public virtual Azure.Response Generate(Azure.ResourceManager.Compute.Recommender.Models.ComputeRecommenderGenerateContent spotPlacementScoresInput, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
- public virtual System.Threading.Tasks.Task> GenerateAsync(Azure.ResourceManager.Compute.Recommender.Models.ComputeRecommenderGenerateContent spotPlacementScoresInput, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual Azure.Response Generate(Azure.ResourceManager.Compute.Recommender.Models.ComputeRecommenderGenerateContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual System.Threading.Tasks.Task> GenerateAsync(Azure.ResourceManager.Compute.Recommender.Models.ComputeRecommenderGenerateContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
Azure.ResourceManager.Compute.Recommender.ComputeRecommenderDiagnosticData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
diff --git a/sdk/computerecommender/Azure.ResourceManager.Compute.Recommender/api/Azure.ResourceManager.Compute.Recommender.netstandard2.0.cs b/sdk/computerecommender/Azure.ResourceManager.Compute.Recommender/api/Azure.ResourceManager.Compute.Recommender.netstandard2.0.cs
index f18534c6bc52..0988db689ec6 100644
--- a/sdk/computerecommender/Azure.ResourceManager.Compute.Recommender/api/Azure.ResourceManager.Compute.Recommender.netstandard2.0.cs
+++ b/sdk/computerecommender/Azure.ResourceManager.Compute.Recommender/api/Azure.ResourceManager.Compute.Recommender.netstandard2.0.cs
@@ -27,8 +27,8 @@ protected ComputeRecommenderDiagnosticResource() { }
public virtual Azure.ResourceManager.Compute.Recommender.ComputeRecommenderDiagnosticData Data { get { throw null; } }
public virtual bool HasData { get { throw null; } }
public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, Azure.Core.AzureLocation location) { throw null; }
- public virtual Azure.Response Generate(Azure.ResourceManager.Compute.Recommender.Models.ComputeRecommenderGenerateContent spotPlacementScoresInput, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
- public virtual System.Threading.Tasks.Task> GenerateAsync(Azure.ResourceManager.Compute.Recommender.Models.ComputeRecommenderGenerateContent spotPlacementScoresInput, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual Azure.Response Generate(Azure.ResourceManager.Compute.Recommender.Models.ComputeRecommenderGenerateContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual System.Threading.Tasks.Task> GenerateAsync(Azure.ResourceManager.Compute.Recommender.Models.ComputeRecommenderGenerateContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
Azure.ResourceManager.Compute.Recommender.ComputeRecommenderDiagnosticData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
diff --git a/sdk/computerecommender/Azure.ResourceManager.Compute.Recommender/src/Generated/ComputeRecommenderDiagnosticResource.cs b/sdk/computerecommender/Azure.ResourceManager.Compute.Recommender/src/Generated/ComputeRecommenderDiagnosticResource.cs
index 9ec98186d213..4163acd2ee9b 100644
--- a/sdk/computerecommender/Azure.ResourceManager.Compute.Recommender/src/Generated/ComputeRecommenderDiagnosticResource.cs
+++ b/sdk/computerecommender/Azure.ResourceManager.Compute.Recommender/src/Generated/ComputeRecommenderDiagnosticResource.cs
@@ -100,7 +100,7 @@ internal static void ValidateResourceId(ResourceIdentifier id)
///
/// -
/// Operation Id.
- /// Get.
+ /// ComputeDiagnosticBases_Get.
///
/// -
/// Default Api Version.
@@ -148,7 +148,7 @@ public virtual async Task> GetAsy
///
/// -
/// Operation Id.
- /// Get.
+ /// ComputeDiagnosticBases_Get.
///
/// -
/// Default Api Version.
@@ -196,7 +196,7 @@ public virtual Response Get(CancellationTo
///
/// -
/// Operation Id.
- /// Generate.
+ /// ComputeDiagnosticBases_Post.
///
/// -
/// Default Api Version.
@@ -208,12 +208,12 @@ public virtual Response Get(CancellationTo
///
///
///
- /// SpotPlacementScores object supplied in the body of the Post spot placement scores operation.
+ /// SpotPlacementScores object supplied in the body of the Post spot placement scores operation.
/// The cancellation token to use.
- /// is null.
- public virtual async Task> GenerateAsync(ComputeRecommenderGenerateContent spotPlacementScoresInput, CancellationToken cancellationToken = default)
+ /// is null.
+ public virtual async Task> GenerateAsync(ComputeRecommenderGenerateContent content, CancellationToken cancellationToken = default)
{
- Argument.AssertNotNull(spotPlacementScoresInput, nameof(spotPlacementScoresInput));
+ Argument.AssertNotNull(content, nameof(content));
using DiagnosticScope scope = _spotPlacementScoresClientDiagnostics.CreateScope("ComputeRecommenderDiagnosticResource.Generate");
scope.Start();
@@ -223,7 +223,7 @@ public virtual async Task> GenerateAs
{
CancellationToken = cancellationToken
};
- HttpMessage message = _spotPlacementScoresRestClient.CreateGenerateRequest(Guid.Parse(Id.SubscriptionId), Id.Name, ComputeRecommenderGenerateContent.ToRequestContent(spotPlacementScoresInput), context);
+ HttpMessage message = _spotPlacementScoresRestClient.CreateGenerateRequest(Guid.Parse(Id.SubscriptionId), Id.Name, ComputeRecommenderGenerateContent.ToRequestContent(content), context);
Response result = await Pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false);
Response response = Response.FromValue(ComputeRecommenderGenerateResult.FromResponse(result), result);
if (response.Value == null)
@@ -248,7 +248,7 @@ public virtual async Task> GenerateAs
///
/// -
/// Operation Id.
- /// Generate.
+ /// ComputeDiagnosticBases_Post.
///
/// -
/// Default Api Version.
@@ -260,12 +260,12 @@ public virtual async Task> GenerateAs
///
///
///
- /// SpotPlacementScores object supplied in the body of the Post spot placement scores operation.
+ /// SpotPlacementScores object supplied in the body of the Post spot placement scores operation.
/// The cancellation token to use.
- /// is null.
- public virtual Response Generate(ComputeRecommenderGenerateContent spotPlacementScoresInput, CancellationToken cancellationToken = default)
+ /// is null.
+ public virtual Response Generate(ComputeRecommenderGenerateContent content, CancellationToken cancellationToken = default)
{
- Argument.AssertNotNull(spotPlacementScoresInput, nameof(spotPlacementScoresInput));
+ Argument.AssertNotNull(content, nameof(content));
using DiagnosticScope scope = _spotPlacementScoresClientDiagnostics.CreateScope("ComputeRecommenderDiagnosticResource.Generate");
scope.Start();
@@ -275,7 +275,7 @@ public virtual Response Generate(ComputeRecomm
{
CancellationToken = cancellationToken
};
- HttpMessage message = _spotPlacementScoresRestClient.CreateGenerateRequest(Guid.Parse(Id.SubscriptionId), Id.Name, ComputeRecommenderGenerateContent.ToRequestContent(spotPlacementScoresInput), context);
+ HttpMessage message = _spotPlacementScoresRestClient.CreateGenerateRequest(Guid.Parse(Id.SubscriptionId), Id.Name, ComputeRecommenderGenerateContent.ToRequestContent(content), context);
Response result = Pipeline.ProcessMessage(message, context);
Response response = Response.FromValue(ComputeRecommenderGenerateResult.FromResponse(result), result);
if (response.Value == null)
diff --git a/sdk/computerecommender/Azure.ResourceManager.Compute.Recommender/src/Generated/Extensions/MockableComputeRecommenderSubscriptionResource.cs b/sdk/computerecommender/Azure.ResourceManager.Compute.Recommender/src/Generated/Extensions/MockableComputeRecommenderSubscriptionResource.cs
index 110484d982e1..d5a3f8aeb26d 100644
--- a/sdk/computerecommender/Azure.ResourceManager.Compute.Recommender/src/Generated/Extensions/MockableComputeRecommenderSubscriptionResource.cs
+++ b/sdk/computerecommender/Azure.ResourceManager.Compute.Recommender/src/Generated/Extensions/MockableComputeRecommenderSubscriptionResource.cs
@@ -27,7 +27,27 @@ internal MockableComputeRecommenderSubscriptionResource(ArmClient client, Resour
{
}
- /// Gets an object representing a along with the instance operations that can be performed on it in the .
+ ///
+ /// Gets Spot Placement Scores metadata.
+ ///
+ /// -
+ /// Request Path.
+ /// /subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/placementScores/spot.
+ ///
+ /// -
+ /// Operation Id.
+ /// ComputeDiagnosticBases_Get.
+ ///
+ /// -
+ /// Default Api Version.
+ /// 2025-06-05.
+ ///
+ /// -
+ /// Resource.
+ /// .
+ ///
+ ///
+ ///
/// Returns a object.
public virtual ComputeRecommenderDiagnosticResource GetComputeRecommenderDiagnostic()
{
diff --git a/sdk/dellstorage/Azure.ResourceManager.Dell.Storage/src/Generated/DellFileSystemCollection.cs b/sdk/dellstorage/Azure.ResourceManager.Dell.Storage/src/Generated/DellFileSystemCollection.cs
index 25fba307d8be..a39d1f5aa000 100644
--- a/sdk/dellstorage/Azure.ResourceManager.Dell.Storage/src/Generated/DellFileSystemCollection.cs
+++ b/sdk/dellstorage/Azure.ResourceManager.Dell.Storage/src/Generated/DellFileSystemCollection.cs
@@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id)
///
/// -
/// Operation Id.
- /// CreateOrUpdate.
+ /// FileSystems_CreateOrUpdate.
///
/// -
/// Default Api Version.
@@ -122,7 +122,7 @@ public virtual async Task> CreateOrUpdateAs
///
/// -
/// Operation Id.
- /// CreateOrUpdate.
+ /// FileSystems_CreateOrUpdate.
///
/// -
/// Default Api Version.
@@ -180,7 +180,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil wai
///
/// -
/// Operation Id.
- /// Get.
+ /// FileSystems_Get.
///
/// -
/// Default Api Version.
@@ -229,7 +229,7 @@ public virtual async Task> GetAsync(string file
///
/// -
/// Operation Id.
- /// Get.
+ /// FileSystems_Get.
///
/// -
/// Default Api Version.
@@ -302,7 +302,7 @@ public virtual Pageable GetAll(CancellationToken cancell
///
/// -
/// Operation Id.
- /// Get.
+ /// FileSystems_Get.
///
/// -
/// Default Api Version.
@@ -359,7 +359,7 @@ public virtual async Task> ExistsAsync(string filesystemName, Can
///
/// -
/// Operation Id.
- /// Get.
+ /// FileSystems_Get.
///
/// -
/// Default Api Version.
@@ -416,7 +416,7 @@ public virtual Response Exists(string filesystemName, CancellationToken ca
///
/// -
/// Operation Id.
- /// Get.
+ /// FileSystems_Get.
///
/// -
/// Default Api Version.
@@ -477,7 +477,7 @@ public virtual async Task> GetIfExistsA
///
/// -
/// Operation Id.
- /// Get.
+ /// FileSystems_Get.
///
/// -
/// Default Api Version.
diff --git a/sdk/dellstorage/Azure.ResourceManager.Dell.Storage/src/Generated/DellFileSystemResource.cs b/sdk/dellstorage/Azure.ResourceManager.Dell.Storage/src/Generated/DellFileSystemResource.cs
index ed975ee12ef1..ef25fe9e0414 100644
--- a/sdk/dellstorage/Azure.ResourceManager.Dell.Storage/src/Generated/DellFileSystemResource.cs
+++ b/sdk/dellstorage/Azure.ResourceManager.Dell.Storage/src/Generated/DellFileSystemResource.cs
@@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id)
///
/// -
/// Operation Id.
- /// Get.
+ /// FileSystems_Get.
///
/// -
/// Default Api Version.
@@ -150,7 +150,7 @@ public virtual async Task> GetAsync(Cancellatio
///
/// -
/// Operation Id.
- /// Get.
+ /// FileSystems_Get.
///
/// -
/// Default Api Version.
@@ -189,7 +189,27 @@ public virtual Response Get(CancellationToken cancellati
}
}
- /// Update a FileSystemResource.
+ ///
+ /// Update a FileSystemResource
+ ///
+ /// -
+ /// Request Path.
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Dell.Storage/filesystems/{filesystemName}.
+ ///
+ /// -
+ /// Operation Id.
+ /// FileSystems_Update.
+ ///
+ /// -
+ /// Default Api Version.
+ /// 2025-03-21-preview.
+ ///
+ /// -
+ /// Resource.
+ /// .
+ ///
+ ///
+ ///
/// The resource properties to be updated.
/// The cancellation token to use.
/// is null.
@@ -221,7 +241,27 @@ public virtual async Task> UpdateAsync(DellFile
}
}
- /// Update a FileSystemResource.
+ ///
+ /// Update a FileSystemResource
+ ///
+ /// -
+ /// Request Path.
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Dell.Storage/filesystems/{filesystemName}.
+ ///
+ /// -
+ /// Operation Id.
+ /// FileSystems_Update.
+ ///
+ /// -
+ /// Default Api Version.
+ /// 2025-03-21-preview.
+ ///
+ /// -
+ /// Resource.
+ /// .
+ ///
+ ///
+ ///
/// The resource properties to be updated.
/// The cancellation token to use.
/// is null.
@@ -262,7 +302,7 @@ public virtual Response Update(DellFileSystemPatch patch
///
/// -
/// Operation Id.
- /// Delete.
+ /// FileSystems_Delete.
///
/// -
/// Default Api Version.
@@ -311,7 +351,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell
///
/// -
/// Operation Id.
- /// Delete.
+ /// FileSystems_Delete.
///
/// -
/// Default Api Version.
diff --git a/sdk/dellstorage/Azure.ResourceManager.Dell.Storage/src/Generated/Extensions/MockableDellStorageResourceGroupResource.cs b/sdk/dellstorage/Azure.ResourceManager.Dell.Storage/src/Generated/Extensions/MockableDellStorageResourceGroupResource.cs
index 3628bd012a50..e45677800e73 100644
--- a/sdk/dellstorage/Azure.ResourceManager.Dell.Storage/src/Generated/Extensions/MockableDellStorageResourceGroupResource.cs
+++ b/sdk/dellstorage/Azure.ResourceManager.Dell.Storage/src/Generated/Extensions/MockableDellStorageResourceGroupResource.cs
@@ -38,7 +38,23 @@ public virtual DellFileSystemCollection GetDellFileSystems()
return GetCachedClient(client => new DellFileSystemCollection(client, Id));
}
- /// Get a FileSystemResource.
+ ///
+ /// Get a FileSystemResource
+ ///
+ /// -
+ /// Request Path.
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Dell.Storage/filesystems/{filesystemName}.
+ ///
+ /// -
+ /// Operation Id.
+ /// FileSystems_Get.
+ ///
+ /// -
+ /// Default Api Version.
+ /// 2025-03-21-preview.
+ ///
+ ///
+ ///
/// Name of the filesystem resource.
/// The cancellation token to use.
/// is null.
@@ -51,7 +67,23 @@ public virtual async Task> GetDellFileSystemAsy
return await GetDellFileSystems().GetAsync(filesystemName, cancellationToken).ConfigureAwait(false);
}
- /// Get a FileSystemResource.
+ ///
+ /// Get a FileSystemResource
+ ///
+ /// -
+ /// Request Path.
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Dell.Storage/filesystems/{filesystemName}.
+ ///
+ /// -
+ /// Operation Id.
+ /// FileSystems_Get.
+ ///
+ /// -
+ /// Default Api Version.
+ /// 2025-03-21-preview.
+ ///
+ ///
+ ///
/// Name of the filesystem resource.
/// The cancellation token to use.
/// is null.
diff --git a/sdk/dellstorage/Azure.ResourceManager.Dell.Storage/src/Generated/Models/DellFileSystemPatch.Serialization.cs b/sdk/dellstorage/Azure.ResourceManager.Dell.Storage/src/Generated/Models/DellFileSystemPatch.Serialization.cs
index 8c1eabca306c..b6244984f6f8 100644
--- a/sdk/dellstorage/Azure.ResourceManager.Dell.Storage/src/Generated/Models/DellFileSystemPatch.Serialization.cs
+++ b/sdk/dellstorage/Azure.ResourceManager.Dell.Storage/src/Generated/Models/DellFileSystemPatch.Serialization.cs
@@ -198,15 +198,15 @@ protected virtual DellFileSystemPatch PersistableModelCreateCore(BinaryData data
/// The client options for reading and writing models.
string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J";
- /// The to serialize into .
- internal static RequestContent ToRequestContent(DellFileSystemPatch patch)
+ /// The to serialize into .
+ internal static RequestContent ToRequestContent(DellFileSystemPatch dellFileSystemPatch)
{
- if (patch == null)
+ if (dellFileSystemPatch == null)
{
return null;
}
Utf8JsonRequestContent content = new Utf8JsonRequestContent();
- content.JsonWriter.WriteObjectValue(patch, ModelSerializationExtensions.WireOptions);
+ content.JsonWriter.WriteObjectValue(dellFileSystemPatch, ModelSerializationExtensions.WireOptions);
return content;
}
}
diff --git a/sdk/deviceregistry/Azure.ResourceManager.DeviceRegistry/api/Azure.ResourceManager.DeviceRegistry.net8.0.cs b/sdk/deviceregistry/Azure.ResourceManager.DeviceRegistry/api/Azure.ResourceManager.DeviceRegistry.net8.0.cs
index ecbcfc5d5349..0040c537c0fb 100644
--- a/sdk/deviceregistry/Azure.ResourceManager.DeviceRegistry/api/Azure.ResourceManager.DeviceRegistry.net8.0.cs
+++ b/sdk/deviceregistry/Azure.ResourceManager.DeviceRegistry/api/Azure.ResourceManager.DeviceRegistry.net8.0.cs
@@ -488,8 +488,8 @@ protected DeviceRegistryNamespaceResource() { }
public virtual Azure.Response GetDeviceRegistryNamespaceDiscoveredDevice(string discoveredDeviceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
public virtual System.Threading.Tasks.Task> GetDeviceRegistryNamespaceDiscoveredDeviceAsync(string discoveredDeviceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
public virtual Azure.ResourceManager.DeviceRegistry.DeviceRegistryNamespaceDiscoveredDeviceCollection GetDeviceRegistryNamespaceDiscoveredDevices() { throw null; }
- public virtual Azure.ResourceManager.ArmOperation Migrate(Azure.WaitUntil waitUntil, Azure.ResourceManager.DeviceRegistry.Models.NamespaceMigrateContent body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
- public virtual System.Threading.Tasks.Task MigrateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.DeviceRegistry.Models.NamespaceMigrateContent body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual Azure.ResourceManager.ArmOperation Migrate(Azure.WaitUntil waitUntil, Azure.ResourceManager.DeviceRegistry.Models.NamespaceMigrateContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual System.Threading.Tasks.Task MigrateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.DeviceRegistry.Models.NamespaceMigrateContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
public virtual Azure.Response RemoveTag(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
public virtual System.Threading.Tasks.Task> RemoveTagAsync(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
public virtual Azure.Response SetTags(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
@@ -733,7 +733,7 @@ public static partial class ArmDeviceRegistryModelFactory
public static Azure.ResourceManager.DeviceRegistry.Models.DeviceRegistryAssetStatusDataset DeviceRegistryAssetStatusDataset(string name = null, Azure.ResourceManager.DeviceRegistry.Models.MessageSchemaReference messageSchemaReference = null) { throw null; }
public static Azure.ResourceManager.DeviceRegistry.Models.DeviceRegistryAssetStatusError DeviceRegistryAssetStatusError(int? code = default(int?), string message = null) { throw null; }
public static Azure.ResourceManager.DeviceRegistry.Models.DeviceRegistryAssetStatusEvent DeviceRegistryAssetStatusEvent(string name = null, Azure.ResourceManager.DeviceRegistry.Models.MessageSchemaReference messageSchemaReference = null) { throw null; }
- public static Azure.ResourceManager.DeviceRegistry.DeviceRegistryBillingContainerData DeviceRegistryBillingContainerData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.DeviceRegistry.Models.DeviceRegistryProvisioningState? billingContainerProvisioningState = default(Azure.ResourceManager.DeviceRegistry.Models.DeviceRegistryProvisioningState?), Azure.ETag? eTag = default(Azure.ETag?)) { throw null; }
+ public static Azure.ResourceManager.DeviceRegistry.DeviceRegistryBillingContainerData DeviceRegistryBillingContainerData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.DeviceRegistry.Models.DeviceRegistryProvisioningState? billingContainerProvisioningState = default(Azure.ResourceManager.DeviceRegistry.Models.DeviceRegistryProvisioningState?), Azure.ETag? etag = default(Azure.ETag?)) { throw null; }
public static Azure.ResourceManager.DeviceRegistry.Models.DeviceRegistryDataset DeviceRegistryDataset(string name = null, string datasetConfiguration = null, Azure.ResourceManager.DeviceRegistry.Models.DeviceRegistryTopic topic = null, System.Collections.Generic.IEnumerable dataPoints = null) { throw null; }
public static Azure.ResourceManager.DeviceRegistry.Models.DeviceRegistryErrorDetails DeviceRegistryErrorDetails(string code = null, string message = null, string info = null, string correlationId = null) { throw null; }
public static Azure.ResourceManager.DeviceRegistry.DeviceRegistryNamespaceAssetData DeviceRegistryNamespaceAssetData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.DeviceRegistry.Models.DeviceRegistryNamespaceAssetProperties properties = null, Azure.ResourceManager.DeviceRegistry.Models.DeviceRegistryExtendedLocation extendedLocation = null) { throw null; }
@@ -747,7 +747,7 @@ public static partial class ArmDeviceRegistryModelFactory
public static Azure.ResourceManager.DeviceRegistry.Models.DeviceRegistryNamespaceAssetStatusManagementGroup DeviceRegistryNamespaceAssetStatusManagementGroup(string name = null, System.Collections.Generic.IEnumerable actions = null) { throw null; }
public static Azure.ResourceManager.DeviceRegistry.Models.DeviceRegistryNamespaceAssetStatusStream DeviceRegistryNamespaceAssetStatusStream(string name = null, Azure.ResourceManager.DeviceRegistry.Models.DeviceRegistryNamespaceMessageSchemaReference messageSchemaReference = null, Azure.ResourceManager.DeviceRegistry.Models.DeviceRegistryStatusError error = null) { throw null; }
public static Azure.ResourceManager.DeviceRegistry.DeviceRegistryNamespaceData DeviceRegistryNamespaceData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.DeviceRegistry.Models.DeviceRegistryNamespaceProperties properties = null, Azure.ResourceManager.DeviceRegistry.Models.SystemAssignedServiceIdentity identity = null) { throw null; }
- public static Azure.ResourceManager.DeviceRegistry.DeviceRegistryNamespaceDeviceData DeviceRegistryNamespaceDeviceData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.DeviceRegistry.Models.DeviceRegistryNamespaceDeviceProperties properties = null, string eTag = null, Azure.ResourceManager.DeviceRegistry.Models.DeviceRegistryExtendedLocation extendedLocation = null) { throw null; }
+ public static Azure.ResourceManager.DeviceRegistry.DeviceRegistryNamespaceDeviceData DeviceRegistryNamespaceDeviceData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.DeviceRegistry.Models.DeviceRegistryNamespaceDeviceProperties properties = null, string etag = null, Azure.ResourceManager.DeviceRegistry.Models.DeviceRegistryExtendedLocation extendedLocation = null) { throw null; }
public static Azure.ResourceManager.DeviceRegistry.Models.DeviceRegistryNamespaceDevicePatch DeviceRegistryNamespaceDevicePatch(System.Collections.Generic.IDictionary tags = null, Azure.ResourceManager.DeviceRegistry.Models.NamespaceDeviceUpdateProperties properties = null) { throw null; }
public static Azure.ResourceManager.DeviceRegistry.Models.DeviceRegistryNamespaceDeviceProperties DeviceRegistryNamespaceDeviceProperties(string uuid = null, bool? enabled = default(bool?), string externalDeviceId = null, string discoveredDeviceRef = null, string manufacturer = null, string model = null, string operatingSystem = null, string operatingSystemVersion = null, Azure.ResourceManager.DeviceRegistry.Models.MessagingEndpoints endpoints = null, System.Collections.Generic.IDictionary attributes = null, Azure.ResourceManager.DeviceRegistry.Models.DeviceStatus status = null, long? version = default(long?), System.DateTimeOffset? lastTransitionOn = default(System.DateTimeOffset?), Azure.ResourceManager.DeviceRegistry.Models.DeviceRegistryProvisioningState? provisioningState = default(Azure.ResourceManager.DeviceRegistry.Models.DeviceRegistryProvisioningState?)) { throw null; }
public static Azure.ResourceManager.DeviceRegistry.DeviceRegistryNamespaceDiscoveredAssetData DeviceRegistryNamespaceDiscoveredAssetData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.DeviceRegistry.Models.DeviceRegistryNamespaceDiscoveredAssetProperties properties = null, Azure.ResourceManager.DeviceRegistry.Models.DeviceRegistryExtendedLocation extendedLocation = null) { throw null; }
@@ -789,7 +789,6 @@ public static partial class ArmDeviceRegistryModelFactory
public static Azure.ResourceManager.DeviceRegistry.Models.NamespaceEventGroup NamespaceEventGroup(string name = null, string dataSource = null, string eventGroupConfiguration = null, System.Collections.Generic.IEnumerable defaultDestinations = null, string typeRef = null, System.Collections.Generic.IEnumerable events = null) { throw null; }
public static Azure.ResourceManager.DeviceRegistry.Models.NamespaceMigrateContent NamespaceMigrateContent(Azure.ResourceManager.DeviceRegistry.Models.Scope? scope = default(Azure.ResourceManager.DeviceRegistry.Models.Scope?), System.Collections.Generic.IEnumerable resourceIds = null) { throw null; }
public static Azure.ResourceManager.DeviceRegistry.Models.NamespaceStream NamespaceStream(string name = null, string streamConfiguration = null, string typeRef = null, System.Collections.Generic.IEnumerable destinations = null) { throw null; }
- public static Azure.ResourceManager.DeviceRegistry.Models.NamespaceUpdateProperties NamespaceUpdateProperties(System.Collections.Generic.IDictionary messagingEndpoints = null) { throw null; }
public static Azure.ResourceManager.DeviceRegistry.Models.OutboundEndpoints OutboundEndpoints(System.Collections.Generic.IDictionary assigned = null, System.Collections.Generic.IDictionary unassigned = null) { throw null; }
public static Azure.ResourceManager.DeviceRegistry.Models.SystemAssignedServiceIdentity SystemAssignedServiceIdentity(System.Guid? principalId = default(System.Guid?), System.Guid? tenantId = default(System.Guid?), Azure.ResourceManager.DeviceRegistry.Models.SystemAssignedServiceIdentityType type = default(Azure.ResourceManager.DeviceRegistry.Models.SystemAssignedServiceIdentityType)) { throw null; }
}
diff --git a/sdk/deviceregistry/Azure.ResourceManager.DeviceRegistry/api/Azure.ResourceManager.DeviceRegistry.netstandard2.0.cs b/sdk/deviceregistry/Azure.ResourceManager.DeviceRegistry/api/Azure.ResourceManager.DeviceRegistry.netstandard2.0.cs
index ecbcfc5d5349..0040c537c0fb 100644
--- a/sdk/deviceregistry/Azure.ResourceManager.DeviceRegistry/api/Azure.ResourceManager.DeviceRegistry.netstandard2.0.cs
+++ b/sdk/deviceregistry/Azure.ResourceManager.DeviceRegistry/api/Azure.ResourceManager.DeviceRegistry.netstandard2.0.cs
@@ -488,8 +488,8 @@ protected DeviceRegistryNamespaceResource() { }
public virtual Azure.Response GetDeviceRegistryNamespaceDiscoveredDevice(string discoveredDeviceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
public virtual System.Threading.Tasks.Task> GetDeviceRegistryNamespaceDiscoveredDeviceAsync(string discoveredDeviceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
public virtual Azure.ResourceManager.DeviceRegistry.DeviceRegistryNamespaceDiscoveredDeviceCollection GetDeviceRegistryNamespaceDiscoveredDevices() { throw null; }
- public virtual Azure.ResourceManager.ArmOperation Migrate(Azure.WaitUntil waitUntil, Azure.ResourceManager.DeviceRegistry.Models.NamespaceMigrateContent body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
- public virtual System.Threading.Tasks.Task MigrateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.DeviceRegistry.Models.NamespaceMigrateContent body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual Azure.ResourceManager.ArmOperation Migrate(Azure.WaitUntil waitUntil, Azure.ResourceManager.DeviceRegistry.Models.NamespaceMigrateContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual System.Threading.Tasks.Task MigrateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.DeviceRegistry.Models.NamespaceMigrateContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
public virtual Azure.Response RemoveTag(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
public virtual System.Threading.Tasks.Task> RemoveTagAsync(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
public virtual Azure.Response SetTags(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
@@ -733,7 +733,7 @@ public static partial class ArmDeviceRegistryModelFactory
public static Azure.ResourceManager.DeviceRegistry.Models.DeviceRegistryAssetStatusDataset DeviceRegistryAssetStatusDataset(string name = null, Azure.ResourceManager.DeviceRegistry.Models.MessageSchemaReference messageSchemaReference = null) { throw null; }
public static Azure.ResourceManager.DeviceRegistry.Models.DeviceRegistryAssetStatusError DeviceRegistryAssetStatusError(int? code = default(int?), string message = null) { throw null; }
public static Azure.ResourceManager.DeviceRegistry.Models.DeviceRegistryAssetStatusEvent DeviceRegistryAssetStatusEvent(string name = null, Azure.ResourceManager.DeviceRegistry.Models.MessageSchemaReference messageSchemaReference = null) { throw null; }
- public static Azure.ResourceManager.DeviceRegistry.DeviceRegistryBillingContainerData DeviceRegistryBillingContainerData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.DeviceRegistry.Models.DeviceRegistryProvisioningState? billingContainerProvisioningState = default(Azure.ResourceManager.DeviceRegistry.Models.DeviceRegistryProvisioningState?), Azure.ETag? eTag = default(Azure.ETag?)) { throw null; }
+ public static Azure.ResourceManager.DeviceRegistry.DeviceRegistryBillingContainerData DeviceRegistryBillingContainerData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.DeviceRegistry.Models.DeviceRegistryProvisioningState? billingContainerProvisioningState = default(Azure.ResourceManager.DeviceRegistry.Models.DeviceRegistryProvisioningState?), Azure.ETag? etag = default(Azure.ETag?)) { throw null; }
public static Azure.ResourceManager.DeviceRegistry.Models.DeviceRegistryDataset DeviceRegistryDataset(string name = null, string datasetConfiguration = null, Azure.ResourceManager.DeviceRegistry.Models.DeviceRegistryTopic topic = null, System.Collections.Generic.IEnumerable dataPoints = null) { throw null; }
public static Azure.ResourceManager.DeviceRegistry.Models.DeviceRegistryErrorDetails DeviceRegistryErrorDetails(string code = null, string message = null, string info = null, string correlationId = null) { throw null; }
public static Azure.ResourceManager.DeviceRegistry.DeviceRegistryNamespaceAssetData DeviceRegistryNamespaceAssetData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.DeviceRegistry.Models.DeviceRegistryNamespaceAssetProperties properties = null, Azure.ResourceManager.DeviceRegistry.Models.DeviceRegistryExtendedLocation extendedLocation = null) { throw null; }
@@ -747,7 +747,7 @@ public static partial class ArmDeviceRegistryModelFactory
public static Azure.ResourceManager.DeviceRegistry.Models.DeviceRegistryNamespaceAssetStatusManagementGroup DeviceRegistryNamespaceAssetStatusManagementGroup(string name = null, System.Collections.Generic.IEnumerable actions = null) { throw null; }
public static Azure.ResourceManager.DeviceRegistry.Models.DeviceRegistryNamespaceAssetStatusStream DeviceRegistryNamespaceAssetStatusStream(string name = null, Azure.ResourceManager.DeviceRegistry.Models.DeviceRegistryNamespaceMessageSchemaReference messageSchemaReference = null, Azure.ResourceManager.DeviceRegistry.Models.DeviceRegistryStatusError error = null) { throw null; }
public static Azure.ResourceManager.DeviceRegistry.DeviceRegistryNamespaceData DeviceRegistryNamespaceData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.DeviceRegistry.Models.DeviceRegistryNamespaceProperties properties = null, Azure.ResourceManager.DeviceRegistry.Models.SystemAssignedServiceIdentity identity = null) { throw null; }
- public static Azure.ResourceManager.DeviceRegistry.DeviceRegistryNamespaceDeviceData DeviceRegistryNamespaceDeviceData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.DeviceRegistry.Models.DeviceRegistryNamespaceDeviceProperties properties = null, string eTag = null, Azure.ResourceManager.DeviceRegistry.Models.DeviceRegistryExtendedLocation extendedLocation = null) { throw null; }
+ public static Azure.ResourceManager.DeviceRegistry.DeviceRegistryNamespaceDeviceData DeviceRegistryNamespaceDeviceData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.DeviceRegistry.Models.DeviceRegistryNamespaceDeviceProperties properties = null, string etag = null, Azure.ResourceManager.DeviceRegistry.Models.DeviceRegistryExtendedLocation extendedLocation = null) { throw null; }
public static Azure.ResourceManager.DeviceRegistry.Models.DeviceRegistryNamespaceDevicePatch DeviceRegistryNamespaceDevicePatch(System.Collections.Generic.IDictionary tags = null, Azure.ResourceManager.DeviceRegistry.Models.NamespaceDeviceUpdateProperties properties = null) { throw null; }
public static Azure.ResourceManager.DeviceRegistry.Models.DeviceRegistryNamespaceDeviceProperties DeviceRegistryNamespaceDeviceProperties(string uuid = null, bool? enabled = default(bool?), string externalDeviceId = null, string discoveredDeviceRef = null, string manufacturer = null, string model = null, string operatingSystem = null, string operatingSystemVersion = null, Azure.ResourceManager.DeviceRegistry.Models.MessagingEndpoints endpoints = null, System.Collections.Generic.IDictionary attributes = null, Azure.ResourceManager.DeviceRegistry.Models.DeviceStatus status = null, long? version = default(long?), System.DateTimeOffset? lastTransitionOn = default(System.DateTimeOffset?), Azure.ResourceManager.DeviceRegistry.Models.DeviceRegistryProvisioningState? provisioningState = default(Azure.ResourceManager.DeviceRegistry.Models.DeviceRegistryProvisioningState?)) { throw null; }
public static Azure.ResourceManager.DeviceRegistry.DeviceRegistryNamespaceDiscoveredAssetData DeviceRegistryNamespaceDiscoveredAssetData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.DeviceRegistry.Models.DeviceRegistryNamespaceDiscoveredAssetProperties properties = null, Azure.ResourceManager.DeviceRegistry.Models.DeviceRegistryExtendedLocation extendedLocation = null) { throw null; }
@@ -789,7 +789,6 @@ public static partial class ArmDeviceRegistryModelFactory
public static Azure.ResourceManager.DeviceRegistry.Models.NamespaceEventGroup NamespaceEventGroup(string name = null, string dataSource = null, string eventGroupConfiguration = null, System.Collections.Generic.IEnumerable defaultDestinations = null, string typeRef = null, System.Collections.Generic.IEnumerable events = null) { throw null; }
public static Azure.ResourceManager.DeviceRegistry.Models.NamespaceMigrateContent NamespaceMigrateContent(Azure.ResourceManager.DeviceRegistry.Models.Scope? scope = default(Azure.ResourceManager.DeviceRegistry.Models.Scope?), System.Collections.Generic.IEnumerable resourceIds = null) { throw null; }
public static Azure.ResourceManager.DeviceRegistry.Models.NamespaceStream NamespaceStream(string name = null, string streamConfiguration = null, string typeRef = null, System.Collections.Generic.IEnumerable destinations = null) { throw null; }
- public static Azure.ResourceManager.DeviceRegistry.Models.NamespaceUpdateProperties NamespaceUpdateProperties(System.Collections.Generic.IDictionary messagingEndpoints = null) { throw null; }
public static Azure.ResourceManager.DeviceRegistry.Models.OutboundEndpoints OutboundEndpoints(System.Collections.Generic.IDictionary