/*
 * Python SDK for Opsgenie REST API
 *
 * Python SDK for Opsgenie REST API
 *
 * The version of the OpenAPI document: 2.0.0
 * Contact: support@opsgenie.com
 * Generated by: https://openapi-generator.tech
 */




#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub struct CreateSavedSearchPayload {
    #[serde(rename = "name")]
    pub name: String,
    #[serde(rename = "description", skip_serializing_if = "Option::is_none")]
    pub description: Option<String>,
    #[serde(rename = "query")]
    pub query: String,
    #[serde(rename = "owner")]
    pub owner: crate::models::UserRecipient,
    /// Teams that the alert will be routed to send notifications
    #[serde(rename = "teams", skip_serializing_if = "Option::is_none")]
    pub teams: Option<Vec<crate::models::TeamRecipient>>,
}

impl CreateSavedSearchPayload {
    pub fn new(name: String, query: String, owner: crate::models::UserRecipient) -> CreateSavedSearchPayload {
        CreateSavedSearchPayload {
            name,
            description: None,
            query,
            owner,
            teams: None,
        }
    }
}


