// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
using System.Text.Json.Serialization;
namespace Microsoft.Teams.Apps.Handlers.MessageExtension;
///
/// Messaging extension query payload.
///
public class MessageExtensionQuery
{
///
/// Id of the command assigned by the bot.
///
[JsonPropertyName("commandId")]
public required string CommandId { get; set; }
///
/// Parameters for the query.
///
[JsonPropertyName("parameters")]
public required IList Parameters { get; set; }
///
/// Query options for pagination.
///
[JsonPropertyName("queryOptions")]
public QueryOptions? QueryOptions { get; set; }
//TODO : check how to use this ? auth ?
/*
///
/// State parameter passed back to the bot after authentication/configuration flow.
///
[JsonPropertyName("state")]
public string? State { get; set; }
*/
}
///
/// Query parameter.
///
public class QueryParameter
{
///
/// Name of the parameter.
///
[JsonPropertyName("name")]
public required string Name { get; set; }
///
/// Value of the parameter.
///
[JsonPropertyName("value")]
public required string Value { get; set; }
}
///
/// Query options for pagination.
///
public class QueryOptions
{
///
/// Number of entities to skip.
///
[JsonPropertyName("skip")]
public int? Skip { get; set; }
///
/// Number of entities to fetch.
///
[JsonPropertyName("count")]
public int? Count { get; set; }
}