diff --git a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/AIAgentsPersistentClientBuilderExtensions.cs b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/AIAgentsPersistentClientBuilderExtensions.cs
index d407d1ed5ffe..10b50d4b28de 100644
--- a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/AIAgentsPersistentClientBuilderExtensions.cs
+++ b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/AIAgentsPersistentClientBuilderExtensions.cs
@@ -11,25 +11,25 @@
namespace Microsoft.Extensions.Azure
{
- /// Extension methods to add to client builder.
+ /// Extension methods to add to client builder.
public static partial class AIAgentsPersistentClientBuilderExtensions
{
- /// Registers a instance.
+ /// Registers a instance.
/// The builder to register with.
/// Project endpoint in the form of: https://<aiservices-id>.services.ai.azure.com/api/projects/<project-name>.
- public static IAzureClientBuilder AddPersistentAgentsAdministrationClient(this TBuilder builder, Uri endpoint)
+ public static IAzureClientBuilder AddVectorStoresClient(this TBuilder builder, Uri endpoint)
where TBuilder : IAzureClientFactoryBuilderWithCredential
{
- return builder.RegisterClientFactory((options, cred) => new PersistentAgentsAdministrationClient(endpoint, cred, options));
+ return builder.RegisterClientFactory((options, cred) => new VectorStoresClient(endpoint, cred, options));
}
- /// Registers a instance.
+ /// Registers a instance.
/// The builder to register with.
/// The configuration values.
- public static IAzureClientBuilder AddPersistentAgentsAdministrationClient(this TBuilder builder, TConfiguration configuration)
+ public static IAzureClientBuilder AddVectorStoresClient(this TBuilder builder, TConfiguration configuration)
where TBuilder : IAzureClientFactoryBuilderWithConfiguration
{
- return builder.RegisterClientFactory(configuration);
+ return builder.RegisterClientFactory(configuration);
}
}
}
diff --git a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/AISearchIndexResource.cs b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/AISearchIndexResource.cs
index 4d504c2142ac..99d86f874224 100644
--- a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/AISearchIndexResource.cs
+++ b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/AISearchIndexResource.cs
@@ -49,7 +49,7 @@ public partial class AISearchIndexResource
/// An index connection id in an IndexResource attached to this agent.
/// The name of an index in an IndexResource attached to this agent.
/// or is null.
- public AISearchIndexResource(string indexConnectionId, string indexName)
+ internal AISearchIndexResource(string indexConnectionId, string indexName)
{
Argument.AssertNotNull(indexConnectionId, nameof(indexConnectionId));
Argument.AssertNotNull(indexName, nameof(indexName));
@@ -83,16 +83,16 @@ internal AISearchIndexResource()
}
/// An index connection id in an IndexResource attached to this agent.
- public string IndexConnectionId { get; set; }
+ public string IndexConnectionId { get; }
/// The name of an index in an IndexResource attached to this agent.
- public string IndexName { get; set; }
+ public string IndexName { get; }
/// Type of query in an AIIndexResource attached to this agent.
- public AzureAISearchQueryType? QueryType { get; set; }
+ public AzureAISearchQueryType? QueryType { get; }
/// Number of documents to retrieve from search and present to the model.
- public int? TopK { get; set; }
+ public int? TopK { get; }
/// filter string for search resource.
- public string Filter { get; set; }
+ public string Filter { get; }
/// Index asset id for search resource.
- public string IndexAssetId { get; set; }
+ public string IndexAssetId { get; }
}
}
diff --git a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/AzureAISearchResource.Serialization.cs b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/AzureAISearchResource.Serialization.cs
index ee236005887d..7e40fcea7c7f 100644
--- a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/AzureAISearchResource.Serialization.cs
+++ b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/AzureAISearchResource.Serialization.cs
@@ -81,7 +81,7 @@ internal static AzureAISearchResource DeserializeAzureAISearchResource(JsonEleme
{
return null;
}
- IList indexes = default;
+ IReadOnlyList indexes = default;
IDictionary serializedAdditionalRawData = default;
Dictionary rawDataDictionary = new Dictionary();
foreach (var property in element.EnumerateObject())
diff --git a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/AzureAISearchResource.cs b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/AzureAISearchResource.cs
index 1c8d009cbb4e..97bc66544490 100644
--- a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/AzureAISearchResource.cs
+++ b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/AzureAISearchResource.cs
@@ -46,7 +46,7 @@ public partial class AzureAISearchResource
private IDictionary _serializedAdditionalRawData;
/// Initializes a new instance of .
- public AzureAISearchResource()
+ internal AzureAISearchResource()
{
IndexList = new ChangeTrackingList();
}
@@ -57,7 +57,7 @@ public AzureAISearchResource()
/// resource attached to the agent.
///
/// Keeps track of any properties unknown to the library.
- internal AzureAISearchResource(IList indexList, IDictionary serializedAdditionalRawData)
+ internal AzureAISearchResource(IReadOnlyList indexList, IDictionary serializedAdditionalRawData)
{
IndexList = indexList;
_serializedAdditionalRawData = serializedAdditionalRawData;
@@ -67,6 +67,6 @@ internal AzureAISearchResource(IList indexList, IDictiona
/// The indices attached to this agent. There can be a maximum of 1 index
/// resource attached to the agent.
///
- public IList IndexList { get; }
+ public IReadOnlyList IndexList { get; }
}
}
diff --git a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/AzureAISearchToolDefinition.Serialization.cs b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/AzureAISearchToolDefinition.Serialization.cs
deleted file mode 100644
index 5da7c6661f83..000000000000
--- a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/AzureAISearchToolDefinition.Serialization.cs
+++ /dev/null
@@ -1,126 +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.Text.Json;
-using Azure.Core;
-
-namespace Azure.AI.Agents.Persistent
-{
- public partial class AzureAISearchToolDefinition : IUtf8JsonSerializable, IJsonModel
- {
- void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
-
- void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
- {
- writer.WriteStartObject();
- JsonModelWriteCore(writer, options);
- writer.WriteEndObject();
- }
-
- /// The JSON writer.
- /// The client options for reading and writing models.
- protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
- {
- var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
- if (format != "J")
- {
- throw new FormatException($"The model {nameof(AzureAISearchToolDefinition)} does not support writing '{format}' format.");
- }
-
- base.JsonModelWriteCore(writer, options);
- }
-
- AzureAISearchToolDefinition IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
- {
- var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
- if (format != "J")
- {
- throw new FormatException($"The model {nameof(AzureAISearchToolDefinition)} does not support reading '{format}' format.");
- }
-
- using JsonDocument document = JsonDocument.ParseValue(ref reader);
- return DeserializeAzureAISearchToolDefinition(document.RootElement, options);
- }
-
- internal static AzureAISearchToolDefinition DeserializeAzureAISearchToolDefinition(JsonElement element, ModelReaderWriterOptions options = null)
- {
- options ??= ModelSerializationExtensions.WireOptions;
-
- if (element.ValueKind == JsonValueKind.Null)
- {
- return null;
- }
- string type = default;
- IDictionary serializedAdditionalRawData = default;
- Dictionary rawDataDictionary = new Dictionary();
- foreach (var property in element.EnumerateObject())
- {
- if (property.NameEquals("type"u8))
- {
- type = property.Value.GetString();
- continue;
- }
- if (options.Format != "W")
- {
- rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText()));
- }
- }
- serializedAdditionalRawData = rawDataDictionary;
- return new AzureAISearchToolDefinition(type, serializedAdditionalRawData);
- }
-
- BinaryData IPersistableModel.Write(ModelReaderWriterOptions options)
- {
- var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
-
- switch (format)
- {
- case "J":
- return ModelReaderWriter.Write(this, options, AzureAIAgentsPersistentContext.Default);
- default:
- throw new FormatException($"The model {nameof(AzureAISearchToolDefinition)} does not support writing '{options.Format}' format.");
- }
- }
-
- AzureAISearchToolDefinition IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options)
- {
- var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
-
- switch (format)
- {
- case "J":
- {
- using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions);
- return DeserializeAzureAISearchToolDefinition(document.RootElement, options);
- }
- default:
- throw new FormatException($"The model {nameof(AzureAISearchToolDefinition)} does not support reading '{options.Format}' format.");
- }
- }
-
- string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J";
-
- /// Deserializes the model from a raw response.
- /// The response to deserialize the model from.
- internal static new AzureAISearchToolDefinition FromResponse(Response response)
- {
- using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions);
- return DeserializeAzureAISearchToolDefinition(document.RootElement);
- }
-
- /// Convert into a .
- internal override RequestContent ToRequestContent()
- {
- var content = new Utf8JsonRequestContent();
- content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions);
- return content;
- }
- }
-}
diff --git a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/AzureAISearchToolDefinition.cs b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/AzureAISearchToolDefinition.cs
deleted file mode 100644
index 4e3f44492aad..000000000000
--- a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/AzureAISearchToolDefinition.cs
+++ /dev/null
@@ -1,29 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-
-//
-
-#nullable disable
-
-using System;
-using System.Collections.Generic;
-
-namespace Azure.AI.Agents.Persistent
-{
- /// The input definition information for an Azure AI search tool as used to configure an agent.
- public partial class AzureAISearchToolDefinition : ToolDefinition
- {
- /// Initializes a new instance of .
- public AzureAISearchToolDefinition()
- {
- Type = "azure_ai_search";
- }
-
- /// Initializes a new instance of .
- /// The object type.
- /// Keeps track of any properties unknown to the library.
- internal AzureAISearchToolDefinition(string type, IDictionary serializedAdditionalRawData) : base(type, serializedAdditionalRawData)
- {
- }
- }
-}
diff --git a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/AzureFunctionBinding.Serialization.cs b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/AzureFunctionBinding.Serialization.cs
deleted file mode 100644
index 621a736875a1..000000000000
--- a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/AzureFunctionBinding.Serialization.cs
+++ /dev/null
@@ -1,150 +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.Text.Json;
-using Azure.Core;
-
-namespace Azure.AI.Agents.Persistent
-{
- public partial class AzureFunctionBinding : IUtf8JsonSerializable, IJsonModel
- {
- void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
-
- void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
- {
- writer.WriteStartObject();
- JsonModelWriteCore(writer, options);
- writer.WriteEndObject();
- }
-
- /// The JSON writer.
- /// The client options for reading and writing models.
- protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
- {
- var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
- if (format != "J")
- {
- throw new FormatException($"The model {nameof(AzureFunctionBinding)} does not support writing '{format}' format.");
- }
-
- writer.WritePropertyName("type"u8);
- writer.WriteStringValue(Type.ToString());
- writer.WritePropertyName("storage_queue"u8);
- writer.WriteObjectValue(StorageQueue, options);
- if (options.Format != "W" && _serializedAdditionalRawData != null)
- {
- foreach (var item in _serializedAdditionalRawData)
- {
- writer.WritePropertyName(item.Key);
-#if NET6_0_OR_GREATER
- writer.WriteRawValue(item.Value);
-#else
- using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions))
- {
- JsonSerializer.Serialize(writer, document.RootElement);
- }
-#endif
- }
- }
- }
-
- AzureFunctionBinding IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
- {
- var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
- if (format != "J")
- {
- throw new FormatException($"The model {nameof(AzureFunctionBinding)} does not support reading '{format}' format.");
- }
-
- using JsonDocument document = JsonDocument.ParseValue(ref reader);
- return DeserializeAzureFunctionBinding(document.RootElement, options);
- }
-
- internal static AzureFunctionBinding DeserializeAzureFunctionBinding(JsonElement element, ModelReaderWriterOptions options = null)
- {
- options ??= ModelSerializationExtensions.WireOptions;
-
- if (element.ValueKind == JsonValueKind.Null)
- {
- return null;
- }
- AzureFunctionBindingType type = default;
- AzureFunctionStorageQueue storageQueue = default;
- IDictionary serializedAdditionalRawData = default;
- Dictionary rawDataDictionary = new Dictionary();
- foreach (var property in element.EnumerateObject())
- {
- if (property.NameEquals("type"u8))
- {
- type = new AzureFunctionBindingType(property.Value.GetString());
- continue;
- }
- if (property.NameEquals("storage_queue"u8))
- {
- storageQueue = AzureFunctionStorageQueue.DeserializeAzureFunctionStorageQueue(property.Value, options);
- continue;
- }
- if (options.Format != "W")
- {
- rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText()));
- }
- }
- serializedAdditionalRawData = rawDataDictionary;
- return new AzureFunctionBinding(type, storageQueue, serializedAdditionalRawData);
- }
-
- BinaryData IPersistableModel.Write(ModelReaderWriterOptions options)
- {
- var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
-
- switch (format)
- {
- case "J":
- return ModelReaderWriter.Write(this, options, AzureAIAgentsPersistentContext.Default);
- default:
- throw new FormatException($"The model {nameof(AzureFunctionBinding)} does not support writing '{options.Format}' format.");
- }
- }
-
- AzureFunctionBinding IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options)
- {
- var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
-
- switch (format)
- {
- case "J":
- {
- using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions);
- return DeserializeAzureFunctionBinding(document.RootElement, options);
- }
- default:
- throw new FormatException($"The model {nameof(AzureFunctionBinding)} does not support reading '{options.Format}' format.");
- }
- }
-
- string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J";
-
- /// Deserializes the model from a raw response.
- /// The response to deserialize the model from.
- internal static AzureFunctionBinding FromResponse(Response response)
- {
- using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions);
- return DeserializeAzureFunctionBinding(document.RootElement);
- }
-
- /// Convert into a .
- internal virtual RequestContent ToRequestContent()
- {
- var content = new Utf8JsonRequestContent();
- content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions);
- return content;
- }
- }
-}
diff --git a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/AzureFunctionBinding.cs b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/AzureFunctionBinding.cs
deleted file mode 100644
index 7cc1a5a7cfd4..000000000000
--- a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/AzureFunctionBinding.cs
+++ /dev/null
@@ -1,80 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-
-//
-
-#nullable disable
-
-using System;
-using System.Collections.Generic;
-
-namespace Azure.AI.Agents.Persistent
-{
- /// The structure for keeping storage queue name and URI.
- public partial class AzureFunctionBinding
- {
- ///
- /// Keeps track of any properties unknown to the library.
- ///
- /// To assign an object to the value of this property use .
- ///
- ///
- /// To assign an already formatted json string to this property use .
- ///
- ///
- /// Examples:
- ///
- /// -
- /// BinaryData.FromObjectAsJson("foo")
- /// Creates a payload of "foo".
- ///
- /// -
- /// BinaryData.FromString("\"foo\"")
- /// Creates a payload of "foo".
- ///
- /// -
- /// BinaryData.FromObjectAsJson(new { key = "value" })
- /// Creates a payload of { "key": "value" }.
- ///
- /// -
- /// BinaryData.FromString("{\"key\": \"value\"}")
- /// Creates a payload of { "key": "value" }.
- ///
- ///
- ///
- ///
- private IDictionary _serializedAdditionalRawData;
-
- /// Initializes a new instance of .
- /// Storage queue.
- /// is null.
- public AzureFunctionBinding(AzureFunctionStorageQueue storageQueue)
- {
- Argument.AssertNotNull(storageQueue, nameof(storageQueue));
-
- StorageQueue = storageQueue;
- }
-
- /// Initializes a new instance of .
- /// The type of binding, which is always 'storage_queue'.
- /// Storage queue.
- /// Keeps track of any properties unknown to the library.
- internal AzureFunctionBinding(AzureFunctionBindingType type, AzureFunctionStorageQueue storageQueue, IDictionary serializedAdditionalRawData)
- {
- Type = type;
- StorageQueue = storageQueue;
- _serializedAdditionalRawData = serializedAdditionalRawData;
- }
-
- /// Initializes a new instance of for deserialization.
- internal AzureFunctionBinding()
- {
- }
-
- /// The type of binding, which is always 'storage_queue'.
- public AzureFunctionBindingType Type { get; } = AzureFunctionBindingType.StorageQueue;
-
- /// Storage queue.
- public AzureFunctionStorageQueue StorageQueue { get; set; }
- }
-}
diff --git a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/AzureFunctionBindingType.cs b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/AzureFunctionBindingType.cs
deleted file mode 100644
index 7c123058e5aa..000000000000
--- a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/AzureFunctionBindingType.cs
+++ /dev/null
@@ -1,48 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-
-//
-
-#nullable disable
-
-using System;
-using System.ComponentModel;
-
-namespace Azure.AI.Agents.Persistent
-{
- /// The AzureFunctionBinding_type.
- public readonly partial struct AzureFunctionBindingType : IEquatable
- {
- private readonly string _value;
-
- /// Initializes a new instance of .
- /// is null.
- public AzureFunctionBindingType(string value)
- {
- _value = value ?? throw new ArgumentNullException(nameof(value));
- }
-
- private const string StorageQueueValue = "storage_queue";
-
- /// storage_queue.
- public static AzureFunctionBindingType StorageQueue { get; } = new AzureFunctionBindingType(StorageQueueValue);
- /// Determines if two values are the same.
- public static bool operator ==(AzureFunctionBindingType left, AzureFunctionBindingType right) => left.Equals(right);
- /// Determines if two values are not the same.
- public static bool operator !=(AzureFunctionBindingType left, AzureFunctionBindingType right) => !left.Equals(right);
- /// Converts a to a .
- public static implicit operator AzureFunctionBindingType(string value) => new AzureFunctionBindingType(value);
-
- ///
- [EditorBrowsable(EditorBrowsableState.Never)]
- public override bool Equals(object obj) => obj is AzureFunctionBindingType other && Equals(other);
- ///
- public bool Equals(AzureFunctionBindingType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase);
-
- ///
- [EditorBrowsable(EditorBrowsableState.Never)]
- public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0;
- ///
- public override string ToString() => _value;
- }
-}
diff --git a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/AzureFunctionStorageQueue.Serialization.cs b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/AzureFunctionStorageQueue.Serialization.cs
deleted file mode 100644
index 95fba2e50899..000000000000
--- a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/AzureFunctionStorageQueue.Serialization.cs
+++ /dev/null
@@ -1,150 +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.Text.Json;
-using Azure.Core;
-
-namespace Azure.AI.Agents.Persistent
-{
- public partial class AzureFunctionStorageQueue : IUtf8JsonSerializable, IJsonModel
- {
- void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
-
- void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
- {
- writer.WriteStartObject();
- JsonModelWriteCore(writer, options);
- writer.WriteEndObject();
- }
-
- /// The JSON writer.
- /// The client options for reading and writing models.
- protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
- {
- var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
- if (format != "J")
- {
- throw new FormatException($"The model {nameof(AzureFunctionStorageQueue)} does not support writing '{format}' format.");
- }
-
- writer.WritePropertyName("queue_service_endpoint"u8);
- writer.WriteStringValue(StorageServiceEndpoint);
- writer.WritePropertyName("queue_name"u8);
- writer.WriteStringValue(QueueName);
- if (options.Format != "W" && _serializedAdditionalRawData != null)
- {
- foreach (var item in _serializedAdditionalRawData)
- {
- writer.WritePropertyName(item.Key);
-#if NET6_0_OR_GREATER
- writer.WriteRawValue(item.Value);
-#else
- using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions))
- {
- JsonSerializer.Serialize(writer, document.RootElement);
- }
-#endif
- }
- }
- }
-
- AzureFunctionStorageQueue IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
- {
- var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
- if (format != "J")
- {
- throw new FormatException($"The model {nameof(AzureFunctionStorageQueue)} does not support reading '{format}' format.");
- }
-
- using JsonDocument document = JsonDocument.ParseValue(ref reader);
- return DeserializeAzureFunctionStorageQueue(document.RootElement, options);
- }
-
- internal static AzureFunctionStorageQueue DeserializeAzureFunctionStorageQueue(JsonElement element, ModelReaderWriterOptions options = null)
- {
- options ??= ModelSerializationExtensions.WireOptions;
-
- if (element.ValueKind == JsonValueKind.Null)
- {
- return null;
- }
- string queueServiceEndpoint = default;
- string queueName = default;
- IDictionary serializedAdditionalRawData = default;
- Dictionary rawDataDictionary = new Dictionary();
- foreach (var property in element.EnumerateObject())
- {
- if (property.NameEquals("queue_service_endpoint"u8))
- {
- queueServiceEndpoint = property.Value.GetString();
- continue;
- }
- if (property.NameEquals("queue_name"u8))
- {
- queueName = property.Value.GetString();
- continue;
- }
- if (options.Format != "W")
- {
- rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText()));
- }
- }
- serializedAdditionalRawData = rawDataDictionary;
- return new AzureFunctionStorageQueue(queueServiceEndpoint, queueName, serializedAdditionalRawData);
- }
-
- BinaryData IPersistableModel.Write(ModelReaderWriterOptions options)
- {
- var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
-
- switch (format)
- {
- case "J":
- return ModelReaderWriter.Write(this, options, AzureAIAgentsPersistentContext.Default);
- default:
- throw new FormatException($"The model {nameof(AzureFunctionStorageQueue)} does not support writing '{options.Format}' format.");
- }
- }
-
- AzureFunctionStorageQueue IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options)
- {
- var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
-
- switch (format)
- {
- case "J":
- {
- using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions);
- return DeserializeAzureFunctionStorageQueue(document.RootElement, options);
- }
- default:
- throw new FormatException($"The model {nameof(AzureFunctionStorageQueue)} does not support reading '{options.Format}' format.");
- }
- }
-
- string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J";
-
- /// Deserializes the model from a raw response.
- /// The response to deserialize the model from.
- internal static AzureFunctionStorageQueue FromResponse(Response response)
- {
- using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions);
- return DeserializeAzureFunctionStorageQueue(document.RootElement);
- }
-
- /// Convert into a .
- internal virtual RequestContent ToRequestContent()
- {
- var content = new Utf8JsonRequestContent();
- content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions);
- return content;
- }
- }
-}
diff --git a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/AzureFunctionStorageQueue.cs b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/AzureFunctionStorageQueue.cs
deleted file mode 100644
index 6e0515c5d320..000000000000
--- a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/AzureFunctionStorageQueue.cs
+++ /dev/null
@@ -1,82 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-
-//
-
-#nullable disable
-
-using System;
-using System.Collections.Generic;
-
-namespace Azure.AI.Agents.Persistent
-{
- /// The structure for keeping storage queue name and URI.
- public partial class AzureFunctionStorageQueue
- {
- ///
- /// Keeps track of any properties unknown to the library.
- ///
- /// To assign an object to the value of this property use .
- ///
- ///
- /// To assign an already formatted json string to this property use .
- ///
- ///
- /// Examples:
- ///
- /// -
- /// BinaryData.FromObjectAsJson("foo")
- /// Creates a payload of "foo".
- ///
- /// -
- /// BinaryData.FromString("\"foo\"")
- /// Creates a payload of "foo".
- ///
- /// -
- /// BinaryData.FromObjectAsJson(new { key = "value" })
- /// Creates a payload of { "key": "value" }.
- ///
- /// -
- /// BinaryData.FromString("{\"key\": \"value\"}")
- /// Creates a payload of { "key": "value" }.
- ///
- ///
- ///
- ///
- private IDictionary _serializedAdditionalRawData;
-
- /// Initializes a new instance of .
- /// URI to the Azure Storage Queue service allowing you to manipulate a queue.
- /// The name of an Azure function storage queue.
- /// or is null.
- public AzureFunctionStorageQueue(string storageServiceEndpoint, string queueName)
- {
- Argument.AssertNotNull(storageServiceEndpoint, nameof(storageServiceEndpoint));
- Argument.AssertNotNull(queueName, nameof(queueName));
-
- StorageServiceEndpoint = storageServiceEndpoint;
- QueueName = queueName;
- }
-
- /// Initializes a new instance of .
- /// URI to the Azure Storage Queue service allowing you to manipulate a queue.
- /// The name of an Azure function storage queue.
- /// Keeps track of any properties unknown to the library.
- internal AzureFunctionStorageQueue(string storageServiceEndpoint, string queueName, IDictionary serializedAdditionalRawData)
- {
- StorageServiceEndpoint = storageServiceEndpoint;
- QueueName = queueName;
- _serializedAdditionalRawData = serializedAdditionalRawData;
- }
-
- /// Initializes a new instance of for deserialization.
- internal AzureFunctionStorageQueue()
- {
- }
-
- /// URI to the Azure Storage Queue service allowing you to manipulate a queue.
- public string StorageServiceEndpoint { get; set; }
- /// The name of an Azure function storage queue.
- public string QueueName { get; set; }
- }
-}
diff --git a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/AzureFunctionToolDefinition.Serialization.cs b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/AzureFunctionToolDefinition.Serialization.cs
deleted file mode 100644
index 4cb63e5da159..000000000000
--- a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/AzureFunctionToolDefinition.Serialization.cs
+++ /dev/null
@@ -1,134 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-
-//
-
-#nullable disable
-
-using System;
-using System.ClientModel.Primitives;
-using System.Collections.Generic;
-using System.Text.Json;
-using Azure.Core;
-
-namespace Azure.AI.Agents.Persistent
-{
- public partial class AzureFunctionToolDefinition : IUtf8JsonSerializable, IJsonModel
- {
- void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
-
- void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
- {
- writer.WriteStartObject();
- JsonModelWriteCore(writer, options);
- writer.WriteEndObject();
- }
-
- /// The JSON writer.
- /// The client options for reading and writing models.
- protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
- {
- var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
- if (format != "J")
- {
- throw new FormatException($"The model {nameof(AzureFunctionToolDefinition)} does not support writing '{format}' format.");
- }
-
- base.JsonModelWriteCore(writer, options);
- writer.WritePropertyName("azure_function"u8);
- writer.WriteObjectValue(InternalAzureFunction, options);
- }
-
- AzureFunctionToolDefinition IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
- {
- var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
- if (format != "J")
- {
- throw new FormatException($"The model {nameof(AzureFunctionToolDefinition)} does not support reading '{format}' format.");
- }
-
- using JsonDocument document = JsonDocument.ParseValue(ref reader);
- return DeserializeAzureFunctionToolDefinition(document.RootElement, options);
- }
-
- internal static AzureFunctionToolDefinition DeserializeAzureFunctionToolDefinition(JsonElement element, ModelReaderWriterOptions options = null)
- {
- options ??= ModelSerializationExtensions.WireOptions;
-
- if (element.ValueKind == JsonValueKind.Null)
- {
- return null;
- }
- InternalAzureFunctionDefinition azureFunction = default;
- string type = default;
- IDictionary serializedAdditionalRawData = default;
- Dictionary rawDataDictionary = new Dictionary();
- foreach (var property in element.EnumerateObject())
- {
- if (property.NameEquals("azure_function"u8))
- {
- azureFunction = InternalAzureFunctionDefinition.DeserializeInternalAzureFunctionDefinition(property.Value, options);
- continue;
- }
- if (property.NameEquals("type"u8))
- {
- type = property.Value.GetString();
- continue;
- }
- if (options.Format != "W")
- {
- rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText()));
- }
- }
- serializedAdditionalRawData = rawDataDictionary;
- return new AzureFunctionToolDefinition(type, serializedAdditionalRawData, azureFunction);
- }
-
- BinaryData IPersistableModel.Write(ModelReaderWriterOptions options)
- {
- var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
-
- switch (format)
- {
- case "J":
- return ModelReaderWriter.Write(this, options, AzureAIAgentsPersistentContext.Default);
- default:
- throw new FormatException($"The model {nameof(AzureFunctionToolDefinition)} does not support writing '{options.Format}' format.");
- }
- }
-
- AzureFunctionToolDefinition IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options)
- {
- var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
-
- switch (format)
- {
- case "J":
- {
- using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions);
- return DeserializeAzureFunctionToolDefinition(document.RootElement, options);
- }
- default:
- throw new FormatException($"The model {nameof(AzureFunctionToolDefinition)} does not support reading '{options.Format}' format.");
- }
- }
-
- string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J";
-
- /// Deserializes the model from a raw response.
- /// The response to deserialize the model from.
- internal static new AzureFunctionToolDefinition FromResponse(Response response)
- {
- using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions);
- return DeserializeAzureFunctionToolDefinition(document.RootElement);
- }
-
- /// Convert into a .
- internal override RequestContent ToRequestContent()
- {
- var content = new Utf8JsonRequestContent();
- content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions);
- return content;
- }
- }
-}
diff --git a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/AzureFunctionToolDefinition.cs b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/AzureFunctionToolDefinition.cs
deleted file mode 100644
index 3fa567120be9..000000000000
--- a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/AzureFunctionToolDefinition.cs
+++ /dev/null
@@ -1,30 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-
-//
-
-#nullable disable
-
-using System;
-using System.Collections.Generic;
-
-namespace Azure.AI.Agents.Persistent
-{
- /// The input definition information for a azure function tool as used to configure an agent.
- public partial class AzureFunctionToolDefinition : ToolDefinition
- {
- /// Initializes a new instance of .
- /// The object type.
- /// Keeps track of any properties unknown to the library.
- /// The definition of the concrete function that the function tool should call.
- internal AzureFunctionToolDefinition(string type, IDictionary serializedAdditionalRawData, InternalAzureFunctionDefinition internalAzureFunction) : base(type, serializedAdditionalRawData)
- {
- InternalAzureFunction = internalAzureFunction;
- }
-
- /// Initializes a new instance of for deserialization.
- internal AzureFunctionToolDefinition()
- {
- }
- }
-}
diff --git a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/BingCustomSearchConfiguration.Serialization.cs b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/BingCustomSearchConfiguration.Serialization.cs
deleted file mode 100644
index ac57ac91f74f..000000000000
--- a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/BingCustomSearchConfiguration.Serialization.cs
+++ /dev/null
@@ -1,205 +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.Text.Json;
-using Azure.Core;
-
-namespace Azure.AI.Agents.Persistent
-{
- public partial class BingCustomSearchConfiguration : IUtf8JsonSerializable, IJsonModel
- {
- void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
-
- void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
- {
- writer.WriteStartObject();
- JsonModelWriteCore(writer, options);
- writer.WriteEndObject();
- }
-
- /// The JSON writer.
- /// The client options for reading and writing models.
- protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
- {
- var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
- if (format != "J")
- {
- throw new FormatException($"The model {nameof(BingCustomSearchConfiguration)} does not support writing '{format}' format.");
- }
-
- writer.WritePropertyName("connection_id"u8);
- writer.WriteStringValue(ConnectionId);
- writer.WritePropertyName("instance_name"u8);
- writer.WriteStringValue(InstanceName);
- if (Optional.IsDefined(Market))
- {
- writer.WritePropertyName("market"u8);
- writer.WriteStringValue(Market);
- }
- if (Optional.IsDefined(SetLang))
- {
- writer.WritePropertyName("set_lang"u8);
- writer.WriteStringValue(SetLang);
- }
- if (Optional.IsDefined(Count))
- {
- writer.WritePropertyName("count"u8);
- writer.WriteNumberValue(Count.Value);
- }
- if (Optional.IsDefined(Freshness))
- {
- writer.WritePropertyName("freshness"u8);
- writer.WriteStringValue(Freshness);
- }
- if (options.Format != "W" && _serializedAdditionalRawData != null)
- {
- foreach (var item in _serializedAdditionalRawData)
- {
- writer.WritePropertyName(item.Key);
-#if NET6_0_OR_GREATER
- writer.WriteRawValue(item.Value);
-#else
- using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions))
- {
- JsonSerializer.Serialize(writer, document.RootElement);
- }
-#endif
- }
- }
- }
-
- BingCustomSearchConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
- {
- var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
- if (format != "J")
- {
- throw new FormatException($"The model {nameof(BingCustomSearchConfiguration)} does not support reading '{format}' format.");
- }
-
- using JsonDocument document = JsonDocument.ParseValue(ref reader);
- return DeserializeBingCustomSearchConfiguration(document.RootElement, options);
- }
-
- internal static BingCustomSearchConfiguration DeserializeBingCustomSearchConfiguration(JsonElement element, ModelReaderWriterOptions options = null)
- {
- options ??= ModelSerializationExtensions.WireOptions;
-
- if (element.ValueKind == JsonValueKind.Null)
- {
- return null;
- }
- string connectionId = default;
- string instanceName = default;
- string market = default;
- string setLang = default;
- long? count = default;
- string freshness = default;
- IDictionary serializedAdditionalRawData = default;
- Dictionary rawDataDictionary = new Dictionary();
- foreach (var property in element.EnumerateObject())
- {
- if (property.NameEquals("connection_id"u8))
- {
- connectionId = property.Value.GetString();
- continue;
- }
- if (property.NameEquals("instance_name"u8))
- {
- instanceName = property.Value.GetString();
- continue;
- }
- if (property.NameEquals("market"u8))
- {
- market = property.Value.GetString();
- continue;
- }
- if (property.NameEquals("set_lang"u8))
- {
- setLang = property.Value.GetString();
- continue;
- }
- if (property.NameEquals("count"u8))
- {
- if (property.Value.ValueKind == JsonValueKind.Null)
- {
- continue;
- }
- count = property.Value.GetInt64();
- continue;
- }
- if (property.NameEquals("freshness"u8))
- {
- freshness = property.Value.GetString();
- continue;
- }
- if (options.Format != "W")
- {
- rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText()));
- }
- }
- serializedAdditionalRawData = rawDataDictionary;
- return new BingCustomSearchConfiguration(
- connectionId,
- instanceName,
- market,
- setLang,
- count,
- freshness,
- serializedAdditionalRawData);
- }
-
- BinaryData IPersistableModel.Write(ModelReaderWriterOptions options)
- {
- var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
-
- switch (format)
- {
- case "J":
- return ModelReaderWriter.Write(this, options, AzureAIAgentsPersistentContext.Default);
- default:
- throw new FormatException($"The model {nameof(BingCustomSearchConfiguration)} does not support writing '{options.Format}' format.");
- }
- }
-
- BingCustomSearchConfiguration IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options)
- {
- var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
-
- switch (format)
- {
- case "J":
- {
- using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions);
- return DeserializeBingCustomSearchConfiguration(document.RootElement, options);
- }
- default:
- throw new FormatException($"The model {nameof(BingCustomSearchConfiguration)} does not support reading '{options.Format}' format.");
- }
- }
-
- string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J";
-
- /// Deserializes the model from a raw response.
- /// The response to deserialize the model from.
- internal static BingCustomSearchConfiguration FromResponse(Response response)
- {
- using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions);
- return DeserializeBingCustomSearchConfiguration(document.RootElement);
- }
-
- /// Convert into a .
- internal virtual RequestContent ToRequestContent()
- {
- var content = new Utf8JsonRequestContent();
- content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions);
- return content;
- }
- }
-}
diff --git a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/BingCustomSearchConfiguration.cs b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/BingCustomSearchConfiguration.cs
deleted file mode 100644
index a157244c40fb..000000000000
--- a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/BingCustomSearchConfiguration.cs
+++ /dev/null
@@ -1,98 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-
-//
-
-#nullable disable
-
-using System;
-using System.Collections.Generic;
-
-namespace Azure.AI.Agents.Persistent
-{
- /// A bing custom search configuration.
- public partial class BingCustomSearchConfiguration
- {
- ///
- /// Keeps track of any properties unknown to the library.
- ///
- /// To assign an object to the value of this property use .
- ///
- ///
- /// To assign an already formatted json string to this property use .
- ///
- ///
- /// Examples:
- ///
- /// -
- /// BinaryData.FromObjectAsJson("foo")
- /// Creates a payload of "foo".
- ///
- /// -
- /// BinaryData.FromString("\"foo\"")
- /// Creates a payload of "foo".
- ///
- /// -
- /// BinaryData.FromObjectAsJson(new { key = "value" })
- /// Creates a payload of { "key": "value" }.
- ///
- /// -
- /// BinaryData.FromString("{\"key\": \"value\"}")
- /// Creates a payload of { "key": "value" }.
- ///
- ///
- ///
- ///
- private IDictionary _serializedAdditionalRawData;
-
- /// Initializes a new instance of .
- /// Connection id for grounding with bing search.
- /// Name of the custom configuration instance given to config.
- /// or is null.
- public BingCustomSearchConfiguration(string connectionId, string instanceName)
- {
- Argument.AssertNotNull(connectionId, nameof(connectionId));
- Argument.AssertNotNull(instanceName, nameof(instanceName));
-
- ConnectionId = connectionId;
- InstanceName = instanceName;
- }
-
- /// Initializes a new instance of .
- /// Connection id for grounding with bing search.
- /// Name of the custom configuration instance given to config.
- /// The market where the results come from.
- /// The language to use for user interface strings when calling Bing API.
- /// The number of search results to return in the bing api response.
- /// Filter search results by a specific time range. Accepted values: https://learn.microsoft.com/bing/search-apis/bing-web-search/reference/query-parameters.
- /// Keeps track of any properties unknown to the library.
- internal BingCustomSearchConfiguration(string connectionId, string instanceName, string market, string setLang, long? count, string freshness, IDictionary serializedAdditionalRawData)
- {
- ConnectionId = connectionId;
- InstanceName = instanceName;
- Market = market;
- SetLang = setLang;
- Count = count;
- Freshness = freshness;
- _serializedAdditionalRawData = serializedAdditionalRawData;
- }
-
- /// Initializes a new instance of for deserialization.
- internal BingCustomSearchConfiguration()
- {
- }
-
- /// Connection id for grounding with bing search.
- public string ConnectionId { get; set; }
- /// Name of the custom configuration instance given to config.
- public string InstanceName { get; set; }
- /// The market where the results come from.
- public string Market { get; set; }
- /// The language to use for user interface strings when calling Bing API.
- public string SetLang { get; set; }
- /// The number of search results to return in the bing api response.
- public long? Count { get; set; }
- /// Filter search results by a specific time range. Accepted values: https://learn.microsoft.com/bing/search-apis/bing-web-search/reference/query-parameters.
- public string Freshness { get; set; }
- }
-}
diff --git a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/BingCustomSearchConfigurationList.Serialization.cs b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/BingCustomSearchConfigurationList.Serialization.cs
deleted file mode 100644
index 1f16b0532430..000000000000
--- a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/BingCustomSearchConfigurationList.Serialization.cs
+++ /dev/null
@@ -1,152 +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.Text.Json;
-using Azure.Core;
-
-namespace Azure.AI.Agents.Persistent
-{
- public partial class BingCustomSearchConfigurationList : IUtf8JsonSerializable, IJsonModel
- {
- void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
-
- void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
- {
- writer.WriteStartObject();
- JsonModelWriteCore(writer, options);
- writer.WriteEndObject();
- }
-
- /// The JSON writer.
- /// The client options for reading and writing models.
- protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
- {
- var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
- if (format != "J")
- {
- throw new FormatException($"The model {nameof(BingCustomSearchConfigurationList)} does not support writing '{format}' format.");
- }
-
- writer.WritePropertyName("search_configurations"u8);
- writer.WriteStartArray();
- foreach (var item in SearchConfigurations)
- {
- writer.WriteObjectValue(item, options);
- }
- writer.WriteEndArray();
- if (options.Format != "W" && _serializedAdditionalRawData != null)
- {
- foreach (var item in _serializedAdditionalRawData)
- {
- writer.WritePropertyName(item.Key);
-#if NET6_0_OR_GREATER
- writer.WriteRawValue(item.Value);
-#else
- using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions))
- {
- JsonSerializer.Serialize(writer, document.RootElement);
- }
-#endif
- }
- }
- }
-
- BingCustomSearchConfigurationList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
- {
- var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
- if (format != "J")
- {
- throw new FormatException($"The model {nameof(BingCustomSearchConfigurationList)} does not support reading '{format}' format.");
- }
-
- using JsonDocument document = JsonDocument.ParseValue(ref reader);
- return DeserializeBingCustomSearchConfigurationList(document.RootElement, options);
- }
-
- internal static BingCustomSearchConfigurationList DeserializeBingCustomSearchConfigurationList(JsonElement element, ModelReaderWriterOptions options = null)
- {
- options ??= ModelSerializationExtensions.WireOptions;
-
- if (element.ValueKind == JsonValueKind.Null)
- {
- return null;
- }
- IList searchConfigurations = default;
- IDictionary serializedAdditionalRawData = default;
- Dictionary rawDataDictionary = new Dictionary();
- foreach (var property in element.EnumerateObject())
- {
- if (property.NameEquals("search_configurations"u8))
- {
- List array = new List();
- foreach (var item in property.Value.EnumerateArray())
- {
- array.Add(BingCustomSearchConfiguration.DeserializeBingCustomSearchConfiguration(item, options));
- }
- searchConfigurations = array;
- continue;
- }
- if (options.Format != "W")
- {
- rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText()));
- }
- }
- serializedAdditionalRawData = rawDataDictionary;
- return new BingCustomSearchConfigurationList(searchConfigurations, serializedAdditionalRawData);
- }
-
- BinaryData IPersistableModel.Write(ModelReaderWriterOptions options)
- {
- var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
-
- switch (format)
- {
- case "J":
- return ModelReaderWriter.Write(this, options, AzureAIAgentsPersistentContext.Default);
- default:
- throw new FormatException($"The model {nameof(BingCustomSearchConfigurationList)} does not support writing '{options.Format}' format.");
- }
- }
-
- BingCustomSearchConfigurationList IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options)
- {
- var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
-
- switch (format)
- {
- case "J":
- {
- using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions);
- return DeserializeBingCustomSearchConfigurationList(document.RootElement, options);
- }
- default:
- throw new FormatException($"The model {nameof(BingCustomSearchConfigurationList)} does not support reading '{options.Format}' format.");
- }
- }
-
- string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J";
-
- /// Deserializes the model from a raw response.
- /// The response to deserialize the model from.
- internal static BingCustomSearchConfigurationList FromResponse(Response response)
- {
- using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions);
- return DeserializeBingCustomSearchConfigurationList(document.RootElement);
- }
-
- /// Convert into a .
- internal virtual RequestContent ToRequestContent()
- {
- var content = new Utf8JsonRequestContent();
- content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions);
- return content;
- }
- }
-}
diff --git a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/BingCustomSearchConfigurationList.cs b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/BingCustomSearchConfigurationList.cs
deleted file mode 100644
index ba154aacae2b..000000000000
--- a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/BingCustomSearchConfigurationList.cs
+++ /dev/null
@@ -1,85 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-
-//
-
-#nullable disable
-
-using System;
-using System.Collections.Generic;
-using System.Linq;
-
-namespace Azure.AI.Agents.Persistent
-{
- /// A list of search configurations currently used by the `bing_custom_search` tool.
- public partial class BingCustomSearchConfigurationList
- {
- ///
- /// Keeps track of any properties unknown to the library.
- ///
- /// To assign an object to the value of this property use .
- ///
- ///
- /// To assign an already formatted json string to this property use .
- ///
- ///
- /// Examples:
- ///
- /// -
- /// BinaryData.FromObjectAsJson("foo")
- /// Creates a payload of "foo".
- ///
- /// -
- /// BinaryData.FromString("\"foo\"")
- /// Creates a payload of "foo".
- ///
- /// -
- /// BinaryData.FromObjectAsJson(new { key = "value" })
- /// Creates a payload of { "key": "value" }.
- ///
- /// -
- /// BinaryData.FromString("{\"key\": \"value\"}")
- /// Creates a payload of { "key": "value" }.
- ///
- ///
- ///
- ///
- private IDictionary _serializedAdditionalRawData;
-
- /// Initializes a new instance of .
- ///
- /// The connections attached to this tool. There can be a maximum of 1 connection
- /// resource attached to the tool.
- ///
- /// is null.
- public BingCustomSearchConfigurationList(IEnumerable searchConfigurations)
- {
- Argument.AssertNotNull(searchConfigurations, nameof(searchConfigurations));
-
- SearchConfigurations = searchConfigurations.ToList();
- }
-
- /// Initializes a new instance of .
- ///
- /// The connections attached to this tool. There can be a maximum of 1 connection
- /// resource attached to the tool.
- ///
- /// Keeps track of any properties unknown to the library.
- internal BingCustomSearchConfigurationList(IList searchConfigurations, IDictionary serializedAdditionalRawData)
- {
- SearchConfigurations = searchConfigurations;
- _serializedAdditionalRawData = serializedAdditionalRawData;
- }
-
- /// Initializes a new instance of for deserialization.
- internal BingCustomSearchConfigurationList()
- {
- }
-
- ///
- /// The connections attached to this tool. There can be a maximum of 1 connection
- /// resource attached to the tool.
- ///
- public IList SearchConfigurations { get; }
- }
-}
diff --git a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/BingCustomSearchToolDefinition.Serialization.cs b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/BingCustomSearchToolDefinition.Serialization.cs
deleted file mode 100644
index 020abce9e0ea..000000000000
--- a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/BingCustomSearchToolDefinition.Serialization.cs
+++ /dev/null
@@ -1,134 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-
-//
-
-#nullable disable
-
-using System;
-using System.ClientModel.Primitives;
-using System.Collections.Generic;
-using System.Text.Json;
-using Azure.Core;
-
-namespace Azure.AI.Agents.Persistent
-{
- public partial class BingCustomSearchToolDefinition : IUtf8JsonSerializable, IJsonModel
- {
- void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
-
- void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
- {
- writer.WriteStartObject();
- JsonModelWriteCore(writer, options);
- writer.WriteEndObject();
- }
-
- /// The JSON writer.
- /// The client options for reading and writing models.
- protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
- {
- var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
- if (format != "J")
- {
- throw new FormatException($"The model {nameof(BingCustomSearchToolDefinition)} does not support writing '{format}' format.");
- }
-
- base.JsonModelWriteCore(writer, options);
- writer.WritePropertyName("bing_custom_search"u8);
- writer.WriteObjectValue(BingCustomSearch, options);
- }
-
- BingCustomSearchToolDefinition IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
- {
- var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
- if (format != "J")
- {
- throw new FormatException($"The model {nameof(BingCustomSearchToolDefinition)} does not support reading '{format}' format.");
- }
-
- using JsonDocument document = JsonDocument.ParseValue(ref reader);
- return DeserializeBingCustomSearchToolDefinition(document.RootElement, options);
- }
-
- internal static BingCustomSearchToolDefinition DeserializeBingCustomSearchToolDefinition(JsonElement element, ModelReaderWriterOptions options = null)
- {
- options ??= ModelSerializationExtensions.WireOptions;
-
- if (element.ValueKind == JsonValueKind.Null)
- {
- return null;
- }
- BingCustomSearchConfigurationList bingCustomSearch = default;
- string type = default;
- IDictionary serializedAdditionalRawData = default;
- Dictionary rawDataDictionary = new Dictionary();
- foreach (var property in element.EnumerateObject())
- {
- if (property.NameEquals("bing_custom_search"u8))
- {
- bingCustomSearch = BingCustomSearchConfigurationList.DeserializeBingCustomSearchConfigurationList(property.Value, options);
- continue;
- }
- if (property.NameEquals("type"u8))
- {
- type = property.Value.GetString();
- continue;
- }
- if (options.Format != "W")
- {
- rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText()));
- }
- }
- serializedAdditionalRawData = rawDataDictionary;
- return new BingCustomSearchToolDefinition(type, serializedAdditionalRawData, bingCustomSearch);
- }
-
- BinaryData IPersistableModel.Write(ModelReaderWriterOptions options)
- {
- var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
-
- switch (format)
- {
- case "J":
- return ModelReaderWriter.Write(this, options, AzureAIAgentsPersistentContext.Default);
- default:
- throw new FormatException($"The model {nameof(BingCustomSearchToolDefinition)} does not support writing '{options.Format}' format.");
- }
- }
-
- BingCustomSearchToolDefinition IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options)
- {
- var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
-
- switch (format)
- {
- case "J":
- {
- using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions);
- return DeserializeBingCustomSearchToolDefinition(document.RootElement, options);
- }
- default:
- throw new FormatException($"The model {nameof(BingCustomSearchToolDefinition)} does not support reading '{options.Format}' format.");
- }
- }
-
- string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J";
-
- /// Deserializes the model from a raw response.
- /// The response to deserialize the model from.
- internal static new BingCustomSearchToolDefinition FromResponse(Response response)
- {
- using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions);
- return DeserializeBingCustomSearchToolDefinition(document.RootElement);
- }
-
- /// Convert into a .
- internal override RequestContent ToRequestContent()
- {
- var content = new Utf8JsonRequestContent();
- content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions);
- return content;
- }
- }
-}
diff --git a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/BingCustomSearchToolDefinition.cs b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/BingCustomSearchToolDefinition.cs
deleted file mode 100644
index 3018f822f2a4..000000000000
--- a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/BingCustomSearchToolDefinition.cs
+++ /dev/null
@@ -1,44 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-
-//
-
-#nullable disable
-
-using System;
-using System.Collections.Generic;
-
-namespace Azure.AI.Agents.Persistent
-{
- /// The input definition information for a Bing custom search tool as used to configure an agent.
- public partial class BingCustomSearchToolDefinition : ToolDefinition
- {
- /// Initializes a new instance of .
- /// The list of search configurations used by the bing custom search tool.
- /// is null.
- public BingCustomSearchToolDefinition(BingCustomSearchConfigurationList bingCustomSearch)
- {
- Argument.AssertNotNull(bingCustomSearch, nameof(bingCustomSearch));
-
- Type = "bing_custom_search";
- BingCustomSearch = bingCustomSearch;
- }
-
- /// Initializes a new instance of .
- /// The object type.
- /// Keeps track of any properties unknown to the library.
- /// The list of search configurations used by the bing custom search tool.
- internal BingCustomSearchToolDefinition(string type, IDictionary serializedAdditionalRawData, BingCustomSearchConfigurationList bingCustomSearch) : base(type, serializedAdditionalRawData)
- {
- BingCustomSearch = bingCustomSearch;
- }
-
- /// Initializes a new instance of for deserialization.
- internal BingCustomSearchToolDefinition()
- {
- }
-
- /// The list of search configurations used by the bing custom search tool.
- public BingCustomSearchConfigurationList BingCustomSearch { get; set; }
- }
-}
diff --git a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/BingGroundingSearchConfiguration.Serialization.cs b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/BingGroundingSearchConfiguration.Serialization.cs
deleted file mode 100644
index 5e7f8302e757..000000000000
--- a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/BingGroundingSearchConfiguration.Serialization.cs
+++ /dev/null
@@ -1,196 +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.Text.Json;
-using Azure.Core;
-
-namespace Azure.AI.Agents.Persistent
-{
- public partial class BingGroundingSearchConfiguration : IUtf8JsonSerializable, IJsonModel
- {
- void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
-
- void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
- {
- writer.WriteStartObject();
- JsonModelWriteCore(writer, options);
- writer.WriteEndObject();
- }
-
- /// The JSON writer.
- /// The client options for reading and writing models.
- protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
- {
- var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
- if (format != "J")
- {
- throw new FormatException($"The model {nameof(BingGroundingSearchConfiguration)} does not support writing '{format}' format.");
- }
-
- writer.WritePropertyName("connection_id"u8);
- writer.WriteStringValue(ConnectionId);
- if (Optional.IsDefined(Market))
- {
- writer.WritePropertyName("market"u8);
- writer.WriteStringValue(Market);
- }
- if (Optional.IsDefined(SetLang))
- {
- writer.WritePropertyName("set_lang"u8);
- writer.WriteStringValue(SetLang);
- }
- if (Optional.IsDefined(Count))
- {
- writer.WritePropertyName("count"u8);
- writer.WriteNumberValue(Count.Value);
- }
- if (Optional.IsDefined(Freshness))
- {
- writer.WritePropertyName("freshness"u8);
- writer.WriteStringValue(Freshness);
- }
- if (options.Format != "W" && _serializedAdditionalRawData != null)
- {
- foreach (var item in _serializedAdditionalRawData)
- {
- writer.WritePropertyName(item.Key);
-#if NET6_0_OR_GREATER
- writer.WriteRawValue(item.Value);
-#else
- using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions))
- {
- JsonSerializer.Serialize(writer, document.RootElement);
- }
-#endif
- }
- }
- }
-
- BingGroundingSearchConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
- {
- var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
- if (format != "J")
- {
- throw new FormatException($"The model {nameof(BingGroundingSearchConfiguration)} does not support reading '{format}' format.");
- }
-
- using JsonDocument document = JsonDocument.ParseValue(ref reader);
- return DeserializeBingGroundingSearchConfiguration(document.RootElement, options);
- }
-
- internal static BingGroundingSearchConfiguration DeserializeBingGroundingSearchConfiguration(JsonElement element, ModelReaderWriterOptions options = null)
- {
- options ??= ModelSerializationExtensions.WireOptions;
-
- if (element.ValueKind == JsonValueKind.Null)
- {
- return null;
- }
- string connectionId = default;
- string market = default;
- string setLang = default;
- long? count = default;
- string freshness = default;
- IDictionary serializedAdditionalRawData = default;
- Dictionary rawDataDictionary = new Dictionary();
- foreach (var property in element.EnumerateObject())
- {
- if (property.NameEquals("connection_id"u8))
- {
- connectionId = property.Value.GetString();
- continue;
- }
- if (property.NameEquals("market"u8))
- {
- market = property.Value.GetString();
- continue;
- }
- if (property.NameEquals("set_lang"u8))
- {
- setLang = property.Value.GetString();
- continue;
- }
- if (property.NameEquals("count"u8))
- {
- if (property.Value.ValueKind == JsonValueKind.Null)
- {
- continue;
- }
- count = property.Value.GetInt64();
- continue;
- }
- if (property.NameEquals("freshness"u8))
- {
- freshness = property.Value.GetString();
- continue;
- }
- if (options.Format != "W")
- {
- rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText()));
- }
- }
- serializedAdditionalRawData = rawDataDictionary;
- return new BingGroundingSearchConfiguration(
- connectionId,
- market,
- setLang,
- count,
- freshness,
- serializedAdditionalRawData);
- }
-
- BinaryData IPersistableModel.Write(ModelReaderWriterOptions options)
- {
- var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
-
- switch (format)
- {
- case "J":
- return ModelReaderWriter.Write(this, options, AzureAIAgentsPersistentContext.Default);
- default:
- throw new FormatException($"The model {nameof(BingGroundingSearchConfiguration)} does not support writing '{options.Format}' format.");
- }
- }
-
- BingGroundingSearchConfiguration IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options)
- {
- var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
-
- switch (format)
- {
- case "J":
- {
- using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions);
- return DeserializeBingGroundingSearchConfiguration(document.RootElement, options);
- }
- default:
- throw new FormatException($"The model {nameof(BingGroundingSearchConfiguration)} does not support reading '{options.Format}' format.");
- }
- }
-
- string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J";
-
- /// Deserializes the model from a raw response.
- /// The response to deserialize the model from.
- internal static BingGroundingSearchConfiguration FromResponse(Response response)
- {
- using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions);
- return DeserializeBingGroundingSearchConfiguration(document.RootElement);
- }
-
- /// Convert into a .
- internal virtual RequestContent ToRequestContent()
- {
- var content = new Utf8JsonRequestContent();
- content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions);
- return content;
- }
- }
-}
diff --git a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/BingGroundingSearchConfiguration.cs b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/BingGroundingSearchConfiguration.cs
deleted file mode 100644
index 49aa44f4f225..000000000000
--- a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/BingGroundingSearchConfiguration.cs
+++ /dev/null
@@ -1,91 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-
-//
-
-#nullable disable
-
-using System;
-using System.Collections.Generic;
-
-namespace Azure.AI.Agents.Persistent
-{
- /// Search configuration for Bing Grounding.
- public partial class BingGroundingSearchConfiguration
- {
- ///
- /// Keeps track of any properties unknown to the library.
- ///
- /// To assign an object to the value of this property use .
- ///
- ///
- /// To assign an already formatted json string to this property use .
- ///
- ///
- /// Examples:
- ///
- /// -
- /// BinaryData.FromObjectAsJson("foo")
- /// Creates a payload of "foo".
- ///
- /// -
- /// BinaryData.FromString("\"foo\"")
- /// Creates a payload of "foo".
- ///
- /// -
- /// BinaryData.FromObjectAsJson(new { key = "value" })
- /// Creates a payload of { "key": "value" }.
- ///
- /// -
- /// BinaryData.FromString("{\"key\": \"value\"}")
- /// Creates a payload of { "key": "value" }.
- ///
- ///
- ///
- ///
- private IDictionary _serializedAdditionalRawData;
-
- /// Initializes a new instance of .
- /// Connection id for grounding with bing search.
- /// is null.
- public BingGroundingSearchConfiguration(string connectionId)
- {
- Argument.AssertNotNull(connectionId, nameof(connectionId));
-
- ConnectionId = connectionId;
- }
-
- /// Initializes a new instance of .
- /// Connection id for grounding with bing search.
- /// The market where the results come from.
- /// The language to use for user interface strings when calling Bing API.
- /// The number of search results to return in the bing api response.
- /// Filter search results by a specific time range. Accepted values: https://learn.microsoft.com/bing/search-apis/bing-web-search/reference/query-parameters.
- /// Keeps track of any properties unknown to the library.
- internal BingGroundingSearchConfiguration(string connectionId, string market, string setLang, long? count, string freshness, IDictionary serializedAdditionalRawData)
- {
- ConnectionId = connectionId;
- Market = market;
- SetLang = setLang;
- Count = count;
- Freshness = freshness;
- _serializedAdditionalRawData = serializedAdditionalRawData;
- }
-
- /// Initializes a new instance of for deserialization.
- internal BingGroundingSearchConfiguration()
- {
- }
-
- /// Connection id for grounding with bing search.
- public string ConnectionId { get; set; }
- /// The market where the results come from.
- public string Market { get; set; }
- /// The language to use for user interface strings when calling Bing API.
- public string SetLang { get; set; }
- /// The number of search results to return in the bing api response.
- public long? Count { get; set; }
- /// Filter search results by a specific time range. Accepted values: https://learn.microsoft.com/bing/search-apis/bing-web-search/reference/query-parameters.
- public string Freshness { get; set; }
- }
-}
diff --git a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/BingGroundingSearchConfigurationList.Serialization.cs b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/BingGroundingSearchConfigurationList.Serialization.cs
deleted file mode 100644
index d583341aa27b..000000000000
--- a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/BingGroundingSearchConfigurationList.Serialization.cs
+++ /dev/null
@@ -1,152 +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.Text.Json;
-using Azure.Core;
-
-namespace Azure.AI.Agents.Persistent
-{
- public partial class BingGroundingSearchConfigurationList : IUtf8JsonSerializable, IJsonModel
- {
- void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
-
- void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
- {
- writer.WriteStartObject();
- JsonModelWriteCore(writer, options);
- writer.WriteEndObject();
- }
-
- /// The JSON writer.
- /// The client options for reading and writing models.
- protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
- {
- var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
- if (format != "J")
- {
- throw new FormatException($"The model {nameof(BingGroundingSearchConfigurationList)} does not support writing '{format}' format.");
- }
-
- writer.WritePropertyName("search_configurations"u8);
- writer.WriteStartArray();
- foreach (var item in SearchConfigurations)
- {
- writer.WriteObjectValue(item, options);
- }
- writer.WriteEndArray();
- if (options.Format != "W" && _serializedAdditionalRawData != null)
- {
- foreach (var item in _serializedAdditionalRawData)
- {
- writer.WritePropertyName(item.Key);
-#if NET6_0_OR_GREATER
- writer.WriteRawValue(item.Value);
-#else
- using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions))
- {
- JsonSerializer.Serialize(writer, document.RootElement);
- }
-#endif
- }
- }
- }
-
- BingGroundingSearchConfigurationList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
- {
- var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
- if (format != "J")
- {
- throw new FormatException($"The model {nameof(BingGroundingSearchConfigurationList)} does not support reading '{format}' format.");
- }
-
- using JsonDocument document = JsonDocument.ParseValue(ref reader);
- return DeserializeBingGroundingSearchConfigurationList(document.RootElement, options);
- }
-
- internal static BingGroundingSearchConfigurationList DeserializeBingGroundingSearchConfigurationList(JsonElement element, ModelReaderWriterOptions options = null)
- {
- options ??= ModelSerializationExtensions.WireOptions;
-
- if (element.ValueKind == JsonValueKind.Null)
- {
- return null;
- }
- IList searchConfigurations = default;
- IDictionary serializedAdditionalRawData = default;
- Dictionary rawDataDictionary = new Dictionary();
- foreach (var property in element.EnumerateObject())
- {
- if (property.NameEquals("search_configurations"u8))
- {
- List array = new List();
- foreach (var item in property.Value.EnumerateArray())
- {
- array.Add(BingGroundingSearchConfiguration.DeserializeBingGroundingSearchConfiguration(item, options));
- }
- searchConfigurations = array;
- continue;
- }
- if (options.Format != "W")
- {
- rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText()));
- }
- }
- serializedAdditionalRawData = rawDataDictionary;
- return new BingGroundingSearchConfigurationList(searchConfigurations, serializedAdditionalRawData);
- }
-
- BinaryData IPersistableModel.Write(ModelReaderWriterOptions options)
- {
- var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
-
- switch (format)
- {
- case "J":
- return ModelReaderWriter.Write(this, options, AzureAIAgentsPersistentContext.Default);
- default:
- throw new FormatException($"The model {nameof(BingGroundingSearchConfigurationList)} does not support writing '{options.Format}' format.");
- }
- }
-
- BingGroundingSearchConfigurationList IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options)
- {
- var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
-
- switch (format)
- {
- case "J":
- {
- using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions);
- return DeserializeBingGroundingSearchConfigurationList(document.RootElement, options);
- }
- default:
- throw new FormatException($"The model {nameof(BingGroundingSearchConfigurationList)} does not support reading '{options.Format}' format.");
- }
- }
-
- string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J";
-
- /// Deserializes the model from a raw response.
- /// The response to deserialize the model from.
- internal static BingGroundingSearchConfigurationList FromResponse(Response response)
- {
- using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions);
- return DeserializeBingGroundingSearchConfigurationList(document.RootElement);
- }
-
- /// Convert into a .
- internal virtual RequestContent ToRequestContent()
- {
- var content = new Utf8JsonRequestContent();
- content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions);
- return content;
- }
- }
-}
diff --git a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/BingGroundingSearchConfigurationList.cs b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/BingGroundingSearchConfigurationList.cs
deleted file mode 100644
index 5b34ea34ef69..000000000000
--- a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/BingGroundingSearchConfigurationList.cs
+++ /dev/null
@@ -1,85 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-
-//
-
-#nullable disable
-
-using System;
-using System.Collections.Generic;
-using System.Linq;
-
-namespace Azure.AI.Agents.Persistent
-{
- /// A list of search configurations currently used by the `bing_grounding` tool.
- public partial class BingGroundingSearchConfigurationList
- {
- ///
- /// Keeps track of any properties unknown to the library.
- ///
- /// To assign an object to the value of this property use .
- ///
- ///
- /// To assign an already formatted json string to this property use .
- ///
- ///
- /// Examples:
- ///
- /// -
- /// BinaryData.FromObjectAsJson("foo")
- /// Creates a payload of "foo".
- ///
- /// -
- /// BinaryData.FromString("\"foo\"")
- /// Creates a payload of "foo".
- ///
- /// -
- /// BinaryData.FromObjectAsJson(new { key = "value" })
- /// Creates a payload of { "key": "value" }.
- ///
- /// -
- /// BinaryData.FromString("{\"key\": \"value\"}")
- /// Creates a payload of { "key": "value" }.
- ///
- ///
- ///
- ///
- private IDictionary _serializedAdditionalRawData;
-
- /// Initializes a new instance of .
- ///
- /// The search configurations attached to this tool. There can be a maximum of 1
- /// search configuration resource attached to the tool.
- ///
- /// is null.
- public BingGroundingSearchConfigurationList(IEnumerable searchConfigurations)
- {
- Argument.AssertNotNull(searchConfigurations, nameof(searchConfigurations));
-
- SearchConfigurations = searchConfigurations.ToList();
- }
-
- /// Initializes a new instance of .
- ///
- /// The search configurations attached to this tool. There can be a maximum of 1
- /// search configuration resource attached to the tool.
- ///
- /// Keeps track of any properties unknown to the library.
- internal BingGroundingSearchConfigurationList(IList searchConfigurations, IDictionary serializedAdditionalRawData)
- {
- SearchConfigurations = searchConfigurations;
- _serializedAdditionalRawData = serializedAdditionalRawData;
- }
-
- /// Initializes a new instance of for deserialization.
- internal BingGroundingSearchConfigurationList()
- {
- }
-
- ///
- /// The search configurations attached to this tool. There can be a maximum of 1
- /// search configuration resource attached to the tool.
- ///
- public IList SearchConfigurations { get; }
- }
-}
diff --git a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/BingGroundingToolDefinition.Serialization.cs b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/BingGroundingToolDefinition.Serialization.cs
deleted file mode 100644
index a20b3dbdda1c..000000000000
--- a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/BingGroundingToolDefinition.Serialization.cs
+++ /dev/null
@@ -1,134 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-
-//
-
-#nullable disable
-
-using System;
-using System.ClientModel.Primitives;
-using System.Collections.Generic;
-using System.Text.Json;
-using Azure.Core;
-
-namespace Azure.AI.Agents.Persistent
-{
- public partial class BingGroundingToolDefinition : IUtf8JsonSerializable, IJsonModel
- {
- void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
-
- void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
- {
- writer.WriteStartObject();
- JsonModelWriteCore(writer, options);
- writer.WriteEndObject();
- }
-
- /// The JSON writer.
- /// The client options for reading and writing models.
- protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
- {
- var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
- if (format != "J")
- {
- throw new FormatException($"The model {nameof(BingGroundingToolDefinition)} does not support writing '{format}' format.");
- }
-
- base.JsonModelWriteCore(writer, options);
- writer.WritePropertyName("bing_grounding"u8);
- writer.WriteObjectValue(BingGrounding, options);
- }
-
- BingGroundingToolDefinition IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
- {
- var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
- if (format != "J")
- {
- throw new FormatException($"The model {nameof(BingGroundingToolDefinition)} does not support reading '{format}' format.");
- }
-
- using JsonDocument document = JsonDocument.ParseValue(ref reader);
- return DeserializeBingGroundingToolDefinition(document.RootElement, options);
- }
-
- internal static BingGroundingToolDefinition DeserializeBingGroundingToolDefinition(JsonElement element, ModelReaderWriterOptions options = null)
- {
- options ??= ModelSerializationExtensions.WireOptions;
-
- if (element.ValueKind == JsonValueKind.Null)
- {
- return null;
- }
- BingGroundingSearchConfigurationList bingGrounding = default;
- string type = default;
- IDictionary serializedAdditionalRawData = default;
- Dictionary rawDataDictionary = new Dictionary();
- foreach (var property in element.EnumerateObject())
- {
- if (property.NameEquals("bing_grounding"u8))
- {
- bingGrounding = BingGroundingSearchConfigurationList.DeserializeBingGroundingSearchConfigurationList(property.Value, options);
- continue;
- }
- if (property.NameEquals("type"u8))
- {
- type = property.Value.GetString();
- continue;
- }
- if (options.Format != "W")
- {
- rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText()));
- }
- }
- serializedAdditionalRawData = rawDataDictionary;
- return new BingGroundingToolDefinition(type, serializedAdditionalRawData, bingGrounding);
- }
-
- BinaryData IPersistableModel.Write(ModelReaderWriterOptions options)
- {
- var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
-
- switch (format)
- {
- case "J":
- return ModelReaderWriter.Write(this, options, AzureAIAgentsPersistentContext.Default);
- default:
- throw new FormatException($"The model {nameof(BingGroundingToolDefinition)} does not support writing '{options.Format}' format.");
- }
- }
-
- BingGroundingToolDefinition IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options)
- {
- var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
-
- switch (format)
- {
- case "J":
- {
- using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions);
- return DeserializeBingGroundingToolDefinition(document.RootElement, options);
- }
- default:
- throw new FormatException($"The model {nameof(BingGroundingToolDefinition)} does not support reading '{options.Format}' format.");
- }
- }
-
- string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J";
-
- /// Deserializes the model from a raw response.
- /// The response to deserialize the model from.
- internal static new BingGroundingToolDefinition FromResponse(Response response)
- {
- using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions);
- return DeserializeBingGroundingToolDefinition(document.RootElement);
- }
-
- /// Convert into a .
- internal override RequestContent ToRequestContent()
- {
- var content = new Utf8JsonRequestContent();
- content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions);
- return content;
- }
- }
-}
diff --git a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/BingGroundingToolDefinition.cs b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/BingGroundingToolDefinition.cs
deleted file mode 100644
index d08e6c8b98a9..000000000000
--- a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/BingGroundingToolDefinition.cs
+++ /dev/null
@@ -1,44 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-
-//
-
-#nullable disable
-
-using System;
-using System.Collections.Generic;
-
-namespace Azure.AI.Agents.Persistent
-{
- /// The input definition information for a bing grounding search tool as used to configure an agent.
- public partial class BingGroundingToolDefinition : ToolDefinition
- {
- /// Initializes a new instance of .
- /// The list of search configurations used by the bing grounding tool.
- /// is null.
- public BingGroundingToolDefinition(BingGroundingSearchConfigurationList bingGrounding)
- {
- Argument.AssertNotNull(bingGrounding, nameof(bingGrounding));
-
- Type = "bing_grounding";
- BingGrounding = bingGrounding;
- }
-
- /// Initializes a new instance of .
- /// The object type.
- /// Keeps track of any properties unknown to the library.
- /// The list of search configurations used by the bing grounding tool.
- internal BingGroundingToolDefinition(string type, IDictionary serializedAdditionalRawData, BingGroundingSearchConfigurationList bingGrounding) : base(type, serializedAdditionalRawData)
- {
- BingGrounding = bingGrounding;
- }
-
- /// Initializes a new instance of for deserialization.
- internal BingGroundingToolDefinition()
- {
- }
-
- /// The list of search configurations used by the bing grounding tool.
- public BingGroundingSearchConfigurationList BingGrounding { get; set; }
- }
-}
diff --git a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/CodeInterpreterToolDefinition.Serialization.cs b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/CodeInterpreterToolDefinition.Serialization.cs
deleted file mode 100644
index a0b41f11b338..000000000000
--- a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/CodeInterpreterToolDefinition.Serialization.cs
+++ /dev/null
@@ -1,126 +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.Text.Json;
-using Azure.Core;
-
-namespace Azure.AI.Agents.Persistent
-{
- public partial class CodeInterpreterToolDefinition : IUtf8JsonSerializable, IJsonModel
- {
- void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
-
- void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
- {
- writer.WriteStartObject();
- JsonModelWriteCore(writer, options);
- writer.WriteEndObject();
- }
-
- /// The JSON writer.
- /// The client options for reading and writing models.
- protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
- {
- var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
- if (format != "J")
- {
- throw new FormatException($"The model {nameof(CodeInterpreterToolDefinition)} does not support writing '{format}' format.");
- }
-
- base.JsonModelWriteCore(writer, options);
- }
-
- CodeInterpreterToolDefinition IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
- {
- var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
- if (format != "J")
- {
- throw new FormatException($"The model {nameof(CodeInterpreterToolDefinition)} does not support reading '{format}' format.");
- }
-
- using JsonDocument document = JsonDocument.ParseValue(ref reader);
- return DeserializeCodeInterpreterToolDefinition(document.RootElement, options);
- }
-
- internal static CodeInterpreterToolDefinition DeserializeCodeInterpreterToolDefinition(JsonElement element, ModelReaderWriterOptions options = null)
- {
- options ??= ModelSerializationExtensions.WireOptions;
-
- if (element.ValueKind == JsonValueKind.Null)
- {
- return null;
- }
- string type = default;
- IDictionary serializedAdditionalRawData = default;
- Dictionary rawDataDictionary = new Dictionary();
- foreach (var property in element.EnumerateObject())
- {
- if (property.NameEquals("type"u8))
- {
- type = property.Value.GetString();
- continue;
- }
- if (options.Format != "W")
- {
- rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText()));
- }
- }
- serializedAdditionalRawData = rawDataDictionary;
- return new CodeInterpreterToolDefinition(type, serializedAdditionalRawData);
- }
-
- BinaryData IPersistableModel.Write(ModelReaderWriterOptions options)
- {
- var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
-
- switch (format)
- {
- case "J":
- return ModelReaderWriter.Write(this, options, AzureAIAgentsPersistentContext.Default);
- default:
- throw new FormatException($"The model {nameof(CodeInterpreterToolDefinition)} does not support writing '{options.Format}' format.");
- }
- }
-
- CodeInterpreterToolDefinition IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options)
- {
- var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
-
- switch (format)
- {
- case "J":
- {
- using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions);
- return DeserializeCodeInterpreterToolDefinition(document.RootElement, options);
- }
- default:
- throw new FormatException($"The model {nameof(CodeInterpreterToolDefinition)} does not support reading '{options.Format}' format.");
- }
- }
-
- string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J";
-
- /// Deserializes the model from a raw response.
- /// The response to deserialize the model from.
- internal static new CodeInterpreterToolDefinition FromResponse(Response response)
- {
- using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions);
- return DeserializeCodeInterpreterToolDefinition(document.RootElement);
- }
-
- /// Convert into a .
- internal override RequestContent ToRequestContent()
- {
- var content = new Utf8JsonRequestContent();
- content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions);
- return content;
- }
- }
-}
diff --git a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/CodeInterpreterToolDefinition.cs b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/CodeInterpreterToolDefinition.cs
deleted file mode 100644
index 1bb115a36f9c..000000000000
--- a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/CodeInterpreterToolDefinition.cs
+++ /dev/null
@@ -1,29 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-
-//
-
-#nullable disable
-
-using System;
-using System.Collections.Generic;
-
-namespace Azure.AI.Agents.Persistent
-{
- /// The input definition information for a code interpreter tool as used to configure an agent.
- public partial class CodeInterpreterToolDefinition : ToolDefinition
- {
- /// Initializes a new instance of .
- public CodeInterpreterToolDefinition()
- {
- Type = "code_interpreter";
- }
-
- /// Initializes a new instance of .
- /// The object type.
- /// Keeps track of any properties unknown to the library.
- internal CodeInterpreterToolDefinition(string type, IDictionary serializedAdditionalRawData) : base(type, serializedAdditionalRawData)
- {
- }
- }
-}
diff --git a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/CodeInterpreterToolResource.Serialization.cs b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/CodeInterpreterToolResource.Serialization.cs
index 6d18f38700f7..fb927eb6359f 100644
--- a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/CodeInterpreterToolResource.Serialization.cs
+++ b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/CodeInterpreterToolResource.Serialization.cs
@@ -91,8 +91,8 @@ internal static CodeInterpreterToolResource DeserializeCodeInterpreterToolResour
{
return null;
}
- IList fileIds = default;
- IList dataSources = default;
+ IReadOnlyList fileIds = default;
+ IReadOnlyList dataSources = default;
IDictionary serializedAdditionalRawData = default;
Dictionary rawDataDictionary = new Dictionary();
foreach (var property in element.EnumerateObject())
diff --git a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/CodeInterpreterToolResource.cs b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/CodeInterpreterToolResource.cs
index faaba7dc05ec..25ac28ca0d8a 100644
--- a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/CodeInterpreterToolResource.cs
+++ b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/CodeInterpreterToolResource.cs
@@ -46,7 +46,7 @@ public partial class CodeInterpreterToolResource
private IDictionary _serializedAdditionalRawData;
/// Initializes a new instance of .
- public CodeInterpreterToolResource()
+ internal CodeInterpreterToolResource()
{
FileIds = new ChangeTrackingList();
DataSources = new ChangeTrackingList();
@@ -59,7 +59,7 @@ public CodeInterpreterToolResource()
///
/// The data sources to be used. This option is mutually exclusive with the `fileIds` property.
/// Keeps track of any properties unknown to the library.
- internal CodeInterpreterToolResource(IList fileIds, IList dataSources, IDictionary serializedAdditionalRawData)
+ internal CodeInterpreterToolResource(IReadOnlyList fileIds, IReadOnlyList dataSources, IDictionary serializedAdditionalRawData)
{
FileIds = fileIds;
DataSources = dataSources;
@@ -70,8 +70,8 @@ internal CodeInterpreterToolResource(IList fileIds, IList
- public IList FileIds { get; }
+ public IReadOnlyList FileIds { get; }
/// The data sources to be used. This option is mutually exclusive with the `fileIds` property.
- public IList DataSources { get; }
+ public IReadOnlyList DataSources { get; }
}
}
diff --git a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/ConnectedAgentDetails.Serialization.cs b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/ConnectedAgentDetails.Serialization.cs
deleted file mode 100644
index 1af0ca5a9c4f..000000000000
--- a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/ConnectedAgentDetails.Serialization.cs
+++ /dev/null
@@ -1,158 +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.Text.Json;
-using Azure.Core;
-
-namespace Azure.AI.Agents.Persistent
-{
- public partial class ConnectedAgentDetails : IUtf8JsonSerializable, IJsonModel
- {
- void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
-
- void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
- {
- writer.WriteStartObject();
- JsonModelWriteCore(writer, options);
- writer.WriteEndObject();
- }
-
- /// The JSON writer.
- /// The client options for reading and writing models.
- protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
- {
- var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
- if (format != "J")
- {
- throw new FormatException($"The model {nameof(ConnectedAgentDetails)} does not support writing '{format}' format.");
- }
-
- writer.WritePropertyName("id"u8);
- writer.WriteStringValue(Id);
- writer.WritePropertyName("name"u8);
- writer.WriteStringValue(Name);
- writer.WritePropertyName("description"u8);
- writer.WriteStringValue(Description);
- if (options.Format != "W" && _serializedAdditionalRawData != null)
- {
- foreach (var item in _serializedAdditionalRawData)
- {
- writer.WritePropertyName(item.Key);
-#if NET6_0_OR_GREATER
- writer.WriteRawValue(item.Value);
-#else
- using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions))
- {
- JsonSerializer.Serialize(writer, document.RootElement);
- }
-#endif
- }
- }
- }
-
- ConnectedAgentDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
- {
- var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
- if (format != "J")
- {
- throw new FormatException($"The model {nameof(ConnectedAgentDetails)} does not support reading '{format}' format.");
- }
-
- using JsonDocument document = JsonDocument.ParseValue(ref reader);
- return DeserializeConnectedAgentDetails(document.RootElement, options);
- }
-
- internal static ConnectedAgentDetails DeserializeConnectedAgentDetails(JsonElement element, ModelReaderWriterOptions options = null)
- {
- options ??= ModelSerializationExtensions.WireOptions;
-
- if (element.ValueKind == JsonValueKind.Null)
- {
- return null;
- }
- string id = default;
- string name = default;
- string description = default;
- IDictionary serializedAdditionalRawData = default;
- Dictionary rawDataDictionary = new Dictionary();
- foreach (var property in element.EnumerateObject())
- {
- if (property.NameEquals("id"u8))
- {
- id = property.Value.GetString();
- continue;
- }
- if (property.NameEquals("name"u8))
- {
- name = property.Value.GetString();
- continue;
- }
- if (property.NameEquals("description"u8))
- {
- description = property.Value.GetString();
- continue;
- }
- if (options.Format != "W")
- {
- rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText()));
- }
- }
- serializedAdditionalRawData = rawDataDictionary;
- return new ConnectedAgentDetails(id, name, description, serializedAdditionalRawData);
- }
-
- BinaryData IPersistableModel.Write(ModelReaderWriterOptions options)
- {
- var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
-
- switch (format)
- {
- case "J":
- return ModelReaderWriter.Write(this, options, AzureAIAgentsPersistentContext.Default);
- default:
- throw new FormatException($"The model {nameof(ConnectedAgentDetails)} does not support writing '{options.Format}' format.");
- }
- }
-
- ConnectedAgentDetails IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options)
- {
- var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
-
- switch (format)
- {
- case "J":
- {
- using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions);
- return DeserializeConnectedAgentDetails(document.RootElement, options);
- }
- default:
- throw new FormatException($"The model {nameof(ConnectedAgentDetails)} does not support reading '{options.Format}' format.");
- }
- }
-
- string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J";
-
- /// Deserializes the model from a raw response.
- /// The response to deserialize the model from.
- internal static ConnectedAgentDetails FromResponse(Response response)
- {
- using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions);
- return DeserializeConnectedAgentDetails(document.RootElement);
- }
-
- /// Convert into a .
- internal virtual RequestContent ToRequestContent()
- {
- var content = new Utf8JsonRequestContent();
- content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions);
- return content;
- }
- }
-}
diff --git a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/ConnectedAgentDetails.cs b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/ConnectedAgentDetails.cs
deleted file mode 100644
index 857c3be16de9..000000000000
--- a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/ConnectedAgentDetails.cs
+++ /dev/null
@@ -1,89 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-
-//
-
-#nullable disable
-
-using System;
-using System.Collections.Generic;
-
-namespace Azure.AI.Agents.Persistent
-{
- /// Information for connecting one agent to another as a tool.
- public partial class ConnectedAgentDetails
- {
- ///
- /// Keeps track of any properties unknown to the library.
- ///
- /// To assign an object to the value of this property use .
- ///
- ///
- /// To assign an already formatted json string to this property use .
- ///
- ///
- /// Examples:
- ///
- /// -
- /// BinaryData.FromObjectAsJson("foo")
- /// Creates a payload of "foo".
- ///
- /// -
- /// BinaryData.FromString("\"foo\"")
- /// Creates a payload of "foo".
- ///
- /// -
- /// BinaryData.FromObjectAsJson(new { key = "value" })
- /// Creates a payload of { "key": "value" }.
- ///
- /// -
- /// BinaryData.FromString("{\"key\": \"value\"}")
- /// Creates a payload of { "key": "value" }.
- ///
- ///
- ///
- ///
- private IDictionary _serializedAdditionalRawData;
-
- /// Initializes a new instance of .
- /// The identifier of the child agent.
- /// The name of the agent to be called.
- /// A description of what the agent does, used by the model to choose when and how to call the agent.
- /// , or is null.
- public ConnectedAgentDetails(string id, string name, string description)
- {
- Argument.AssertNotNull(id, nameof(id));
- Argument.AssertNotNull(name, nameof(name));
- Argument.AssertNotNull(description, nameof(description));
-
- Id = id;
- Name = name;
- Description = description;
- }
-
- /// Initializes a new instance of .
- /// The identifier of the child agent.
- /// The name of the agent to be called.
- /// A description of what the agent does, used by the model to choose when and how to call the agent.
- /// Keeps track of any properties unknown to the library.
- internal ConnectedAgentDetails(string id, string name, string description, IDictionary serializedAdditionalRawData)
- {
- Id = id;
- Name = name;
- Description = description;
- _serializedAdditionalRawData = serializedAdditionalRawData;
- }
-
- /// Initializes a new instance of for deserialization.
- internal ConnectedAgentDetails()
- {
- }
-
- /// The identifier of the child agent.
- public string Id { get; set; }
- /// The name of the agent to be called.
- public string Name { get; set; }
- /// A description of what the agent does, used by the model to choose when and how to call the agent.
- public string Description { get; set; }
- }
-}
diff --git a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/ConnectedAgentToolDefinition.Serialization.cs b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/ConnectedAgentToolDefinition.Serialization.cs
deleted file mode 100644
index ca0a52eadb99..000000000000
--- a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/ConnectedAgentToolDefinition.Serialization.cs
+++ /dev/null
@@ -1,134 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-
-//
-
-#nullable disable
-
-using System;
-using System.ClientModel.Primitives;
-using System.Collections.Generic;
-using System.Text.Json;
-using Azure.Core;
-
-namespace Azure.AI.Agents.Persistent
-{
- public partial class ConnectedAgentToolDefinition : IUtf8JsonSerializable, IJsonModel
- {
- void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
-
- void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
- {
- writer.WriteStartObject();
- JsonModelWriteCore(writer, options);
- writer.WriteEndObject();
- }
-
- /// The JSON writer.
- /// The client options for reading and writing models.
- protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
- {
- var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
- if (format != "J")
- {
- throw new FormatException($"The model {nameof(ConnectedAgentToolDefinition)} does not support writing '{format}' format.");
- }
-
- base.JsonModelWriteCore(writer, options);
- writer.WritePropertyName("connected_agent"u8);
- writer.WriteObjectValue(ConnectedAgent, options);
- }
-
- ConnectedAgentToolDefinition IJsonModel