windmill-api 1.842.0

No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
Documentation
/*
 * Windmill API
 *
 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
 *
 * The version of the OpenAPI document: 1.842.0
 * Contact: contact@windmill.dev
 * Generated by: https://openapi-generator.tech
 */

use crate::models;
use serde::{Deserialize, Serialize};

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct GetAgentSlackChannels200Response {
    /// the connected Slack workspace; absent when Slack is not connected
    #[serde(rename = "slack_team_name", skip_serializing_if = "Option::is_none")]
    pub slack_team_name: Option<String>,
    /// agents answer in Slack only when the server has the Slack app's signing secret (SLACK_SIGNING_SECRET)
    #[serde(rename = "signing_secret_set")]
    pub signing_secret_set: bool,
    /// the bot's Slack handle; absent when Slack can't be reached
    #[serde(rename = "bot_name", skip_serializing_if = "Option::is_none")]
    pub bot_name: Option<String>,
    /// agent scopes the workspace's Slack connection lacks, so it must be reconnected with AI agents enabled
    #[serde(rename = "missing_scopes")]
    pub missing_scopes: Vec<String>,
    /// who the agent runs as (its on_behalf_of); absent unless it runs on behalf of someone
    #[serde(rename = "runs_as", skip_serializing_if = "Option::is_none")]
    pub runs_as: Option<String>,
    /// whether anyone in its channels can ask it (its slack_anyone, kept only while it runs on behalf of someone), rather than workspace members only
    #[serde(rename = "anyone")]
    pub anyone: bool,
    /// whether the caller can change the agent's channels, as anyone who can edit it can
    #[serde(rename = "can_share")]
    pub can_share: bool,
    #[serde(rename = "channels")]
    pub channels: Vec<models::SlackAgentChannel>,
}

impl GetAgentSlackChannels200Response {
    pub fn new(signing_secret_set: bool, missing_scopes: Vec<String>, anyone: bool, can_share: bool, channels: Vec<models::SlackAgentChannel>) -> GetAgentSlackChannels200Response {
        GetAgentSlackChannels200Response {
            slack_team_name: None,
            signing_secret_set,
            bot_name: None,
            missing_scopes,
            runs_as: None,
            anyone,
            can_share,
            channels,
        }
    }
}