BotSharp/src/Infrastructure/BotSharp.Abstraction/Messaging/Models/RichContent/ElementButton.cs

27 lines
783 B
C#
Raw Normal View History

2023-11-24 23:26:33 +00:00
namespace BotSharp.Abstraction.Messaging.Models.RichContent;
/// <summary>
/// https://developers.facebook.com/docs/messenger-platform/send-messages/buttons
/// </summary>
public class ElementButton
{
2024-04-02 19:09:42 +00:00
public string Type { get; set; } = "web_url";
2023-11-24 23:26:33 +00:00
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public string Url { get; set; }
2024-04-02 19:09:42 +00:00
public string Title { get; set; } = string.Empty;
2023-11-24 23:26:33 +00:00
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public string Payload { get; set; }
2024-04-02 19:09:42 +00:00
[JsonPropertyName("is_primary")]
public bool IsPrimary { get; set; }
[JsonPropertyName("is_secondary")]
public bool IsSecondary { get; set; }
2024-04-12 16:37:38 +00:00
[JsonPropertyName("post_action_disclaimer")]
public string? PostActionDisclaimer { get; set; }
2023-11-24 23:26:33 +00:00
}