// Copyright Epic Games, Inc. All Rights Reserved. using System.Collections.Generic; namespace EpicGames.Slack { /// /// A slack message object /// public class SlackMessage : ISlackBlockContainer { /// /// The formatted text of the message to be published. If blocks are included, this will become the fallback text used in notifications. /// public string? Text { get; set; } /// /// Disable Slack markup parsing by setting to false. Enabled by default. /// public bool? Markdown { get; set; } /// /// A JSON-based array of structured blocks, presented as a URL-encoded string. /// public List Blocks { get; } = new List(); /// /// Attachments for the message /// public List Attachments { get; } = new List(); /// /// Pass true to enable unfurling of primarily text-based content. /// public bool UnfurlLinks { get; set; } = true; /// /// Pass false to disable unfurling of media content. /// public bool UnfurlMedia { get; set; } = true; /// /// Implciit conversion operator from a Markdown string /// /// public static implicit operator SlackMessage(string text) { SlackMessage message = new SlackMessage(); message.Text = text; return message; } } }