antimatter_api 2.0.13

Interact with the Antimatter Cloud API
Documentation
/*
 * Antimatter Public API
 *
 * Interact with the Antimatter Cloud API
 *
 * The version of the OpenAPI document: 2.0.13
 * Contact: support@antimatter.io
 * Generated by: https://openapi-generator.tech
 */

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

/// Fact : A fact is a piece of auxiliary information that can be used as part of an authorization policy. They are usually expressed as a statement such as has_role(principal, role_name) 
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct Fact {
    /// An identifier for a fact
    #[serde(rename = "id")]
    pub id: String,
    /// An identifier for a fact type that might be imported from a peer domain. If it is, it will bear an imported resource prefix (either a domain identifier or an alias, followed by ::) 
    #[serde(rename = "name")]
    pub name: String,
    #[serde(rename = "arguments")]
    pub arguments: Vec<String>,
}

impl Fact {
    /// A fact is a piece of auxiliary information that can be used as part of an authorization policy. They are usually expressed as a statement such as has_role(principal, role_name) 
    pub fn new(id: String, name: String, arguments: Vec<String>) -> Fact {
        Fact {
            id,
            name,
            arguments,
        }
    }
}