/*
 * Orvanta API
 *
 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
 *
 * The version of the OpenAPI document: 1.0.2
 * Contact: contact@orvanta.cloud
 * Generated by: https://openapi-generator.tech
 */

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

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct Policy {
    #[serde(rename = "triggerables", skip_serializing_if = "Option::is_none")]
    pub triggerables: Option<std::collections::HashMap<String, serde_json::Value>>,
    #[serde(rename = "triggerables_v2", skip_serializing_if = "Option::is_none")]
    pub triggerables_v2: Option<std::collections::HashMap<String, serde_json::Value>>,
    #[serde(rename = "s3_inputs", skip_serializing_if = "Option::is_none")]
    pub s3_inputs: Option<Vec<serde_json::Value>>,
    #[serde(rename = "allowed_s3_keys", skip_serializing_if = "Option::is_none")]
    pub allowed_s3_keys: Option<Vec<models::PolicyAllowedS3KeysInner>>,
    #[serde(rename = "execution_mode", skip_serializing_if = "Option::is_none")]
    pub execution_mode: Option<ExecutionMode>,
    #[serde(rename = "on_behalf_of", skip_serializing_if = "Option::is_none")]
    pub on_behalf_of: Option<String>,
    #[serde(rename = "on_behalf_of_email", skip_serializing_if = "Option::is_none")]
    pub on_behalf_of_email: Option<String>,
}

impl Policy {
    pub fn new() -> Policy {
        Policy {
            triggerables: None,
            triggerables_v2: None,
            s3_inputs: None,
            allowed_s3_keys: None,
            execution_mode: None,
            on_behalf_of: None,
            on_behalf_of_email: None,
        }
    }
}
/// 
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum ExecutionMode {
    #[serde(rename = "viewer")]
    Viewer,
    #[serde(rename = "publisher")]
    Publisher,
    #[serde(rename = "anonymous")]
    Anonymous,
}

impl Default for ExecutionMode {
    fn default() -> ExecutionMode {
        Self::Viewer
    }
}

