openfga 1.0.2

Rust SDK for OpenFGA — the open-source authorization system
Documentation
/*
 * OpenFGA
 *
 * A high performance and flexible authorization/permission engine built for developers and inspired by Google Zanzibar.
 *
 * The version of the OpenAPI document: 1.x
 * Contact: community@openfga.dev
 * Generated by: https://openapi-generator.tech
 */

use serde::{Deserialize, Serialize};

/// EvaluationsSemantic : - execute_all: Execute all evaluations (default behavior)  - deny_on_first_deny: Stop on first deny decision  - permit_on_first_permit: Stop on first permit decision
/// - execute_all: Execute all evaluations (default behavior)  - deny_on_first_deny: Stop on first deny decision  - permit_on_first_permit: Stop on first permit decision
#[derive(
    Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize, Default,
)]
pub enum EvaluationsSemantic {
    #[serde(rename = "execute_all")]
    #[default]
    ExecuteAll,
    #[serde(rename = "deny_on_first_deny")]
    DenyOnFirstDeny,
    #[serde(rename = "permit_on_first_permit")]
    PermitOnFirstPermit,
}

impl std::fmt::Display for EvaluationsSemantic {
    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
        match self {
            Self::ExecuteAll => write!(f, "execute_all"),
            Self::DenyOnFirstDeny => write!(f, "deny_on_first_deny"),
            Self::PermitOnFirstPermit => write!(f, "permit_on_first_permit"),
        }
    }
}