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
/*
* 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};
/// RelationReference : RelationReference represents a relation of a particular object type (e.g. 'document#viewer').
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct RelationReference {
#[serde(rename = "type")]
pub r#type: String,
#[serde(rename = "relation", skip_serializing_if = "Option::is_none")]
pub relation: Option<String>,
#[serde(rename = "wildcard", skip_serializing_if = "Option::is_none")]
pub wildcard: Option<serde_json::Value>,
/// The name of a condition that is enforced over the allowed relation.
#[serde(rename = "condition", skip_serializing_if = "Option::is_none")]
pub condition: Option<String>,
}
impl RelationReference {
/// RelationReference represents a relation of a particular object type (e.g. 'document#viewer').
pub fn new(r#type: String) -> RelationReference {
RelationReference {
r#type,
relation: None,
wildcard: None,
condition: None,
}
}
}