| File: RecordDefinition\VectorStoreKeyProperty.cs | |
| Project: ..\..\..\src\Libraries\Microsoft.Extensions.VectorData.Abstractions\Microsoft.Extensions.VectorData.Abstractions.csproj (Microsoft.Extensions.VectorData.Abstractions) |
// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. using System; namespace Microsoft.Extensions.VectorData; /// <summary> /// Defines a key property on a vector store record. /// </summary> /// <remarks> /// The characteristics defined here influence how the property is treated by the vector store. /// </remarks> public sealed class VectorStoreKeyProperty : VectorStoreProperty { /// <summary> /// Initializes a new instance of the <see cref="VectorStoreKeyProperty"/> class. /// </summary> /// <param name="name">The name of the property on the data model. If the record is mapped to a .NET type, this corresponds to the .NET property name on that type.</param> /// <param name="type">The type of the property. Required when using a record type of <c>Dictionary<string, object?></c> (dynamic mapping), but can be omitted when mapping any other .NET type.</param> public VectorStoreKeyProperty(string name, Type? type = null) : base(name, type) { } /// <summary> /// Gets or sets whether this key property's value is auto-generated or not. /// </summary> /// <remarks> /// The availability of auto-generated properties - as well as the .NET types supported for them - varies across provider implementations. /// </remarks> public bool? IsAutoGenerated { get; set; } }