2025-01-05 20:39:09 +00:00
|
|
|
using ERI_Client.V1;
|
|
|
|
|
|
|
|
// ReSharper disable InconsistentNaming
|
2025-01-05 15:27:54 +00:00
|
|
|
namespace AIStudio.Settings.DataModel;
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// An external data source, accessed via an ERI server, cf. https://github.com/MindWorkAI/ERI.
|
|
|
|
/// </summary>
|
2025-01-06 19:44:52 +00:00
|
|
|
public readonly record struct DataSourceERI_V1 : IERIDataSource
|
2025-01-05 15:27:54 +00:00
|
|
|
{
|
2025-01-05 20:39:09 +00:00
|
|
|
public DataSourceERI_V1()
|
2025-01-05 15:27:54 +00:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
/// <inheritdoc />
|
|
|
|
public uint Num { get; init; }
|
|
|
|
|
|
|
|
/// <inheritdoc />
|
|
|
|
public string Id { get; init; } = Guid.Empty.ToString();
|
|
|
|
|
|
|
|
/// <inheritdoc />
|
|
|
|
public string Name { get; init; } = string.Empty;
|
|
|
|
|
|
|
|
/// <inheritdoc />
|
|
|
|
public DataSourceType Type { get; init; } = DataSourceType.NONE;
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// The hostname of the ERI server.
|
|
|
|
/// </summary>
|
|
|
|
public string Hostname { get; init; } = string.Empty;
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// The port of the ERI server.
|
|
|
|
/// </summary>
|
|
|
|
public int Port { get; init; }
|
2025-01-05 20:39:09 +00:00
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// The authentication method to use.
|
|
|
|
/// </summary>
|
|
|
|
public AuthMethod AuthMethod { get; init; } = AuthMethod.NONE;
|
2025-01-13 16:11:46 +00:00
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// The username to use for authentication, when the auth. method is USERNAME_PASSWORD.
|
|
|
|
/// </summary>
|
|
|
|
public string Username { get; init; } = string.Empty;
|
2025-01-05 15:27:54 +00:00
|
|
|
}
|