windmill_api/models/
send_message_to_conversation_request.rs

1/*
2 * Windmill API
3 *
4 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5 *
6 * The version of the OpenAPI document: 1.505.0
7 * Contact: contact@windmill.dev
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct SendMessageToConversationRequest {
16    /// The ID of the Teams conversation/activity
17    #[serde(rename = "conversation_id")]
18    pub conversation_id: String,
19    /// Used for styling the card conditionally
20    #[serde(rename = "success", skip_serializing_if = "Option::is_none")]
21    pub success: Option<bool>,
22    /// The message text to be sent in the Teams card
23    #[serde(rename = "text")]
24    pub text: String,
25    /// The card block to be sent in the Teams card
26    #[serde(rename = "card_block", skip_serializing_if = "Option::is_none")]
27    pub card_block: Option<serde_json::Value>,
28}
29
30impl SendMessageToConversationRequest {
31    pub fn new(conversation_id: String, text: String) -> SendMessageToConversationRequest {
32        SendMessageToConversationRequest {
33            conversation_id,
34            success: None,
35            text,
36            card_block: None,
37        }
38    }
39}
40