1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
/*
* 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,
}
}
}