// Copyright (c) Microsoft. All rights reserved.
using System.Diagnostics.CodeAnalysis;
namespace Microsoft.Extensions.AI.Agents.Runtime;
///
/// Defines a subscription that matches topics and maps them to agents.
///
public interface ISubscriptionDefinition
{
///
/// Gets the unique identifier of the subscription.
///
string Id { get; }
///
/// Determines whether the specified object is equal to the current subscription.
///
/// The object to compare with the current instance.
/// true if the specified object is equal to this instance; otherwise, false.
bool Equals([NotNullWhen(true)] object? obj);
///
/// Determines whether the specified subscription is equal to the current subscription.
///
/// The subscription to compare.
/// true if the subscriptions are equal; otherwise, false.
bool Equals(ISubscriptionDefinition? other);
///
/// Returns a hash code for this subscription.
///
/// A hash code for the subscription.
int GetHashCode();
///
/// Checks if a given matches the subscription.
///
/// The topic to check.
/// true if the topic matches the subscription; otherwise, false.
bool Matches(TopicId topic);
///
/// Maps a to an .
/// Should only be called if returns true.
///
/// The topic to map.
/// The that should handle the topic.
AgentId MapToAgent(TopicId topic);
}