2024-04-18 18:54:43 +00:00
|
|
|
using Newtonsoft.Json;
|
|
|
|
|
using JsonIgnoreAttribute = System.Text.Json.Serialization.JsonIgnoreAttribute;
|
|
|
|
|
|
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")]
|
2024-04-18 18:54:43 +00:00
|
|
|
[JsonProperty("is_primary")]
|
2024-04-02 19:09:42 +00:00
|
|
|
public bool IsPrimary { get; set; }
|
|
|
|
|
|
|
|
|
|
[JsonPropertyName("is_secondary")]
|
2024-04-18 18:54:43 +00:00
|
|
|
[JsonProperty("is_secondary")]
|
2024-04-02 19:09:42 +00:00
|
|
|
public bool IsSecondary { get; set; }
|
2024-04-12 16:37:38 +00:00
|
|
|
|
|
|
|
|
[JsonPropertyName("post_action_disclaimer")]
|
2024-04-18 18:54:43 +00:00
|
|
|
[JsonProperty("post_action_disclaimer")]
|
2024-04-12 16:37:38 +00:00
|
|
|
public string? PostActionDisclaimer { get; set; }
|
2023-11-24 23:26:33 +00:00
|
|
|
}
|