openfga_sdk/models/
type_definition.rs

1/**
2 * rust SDK for OpenFGA
3 *
4 * API version: 0.1
5 * Website: https://openfga.dev
6 * Documentation: https://openfga.dev/docs
7 * Support: https://discord.gg/8naAwJfWN6
8 * License: [Apache-2.0](https://github.com/openfga/rust-sdk/blob/main/LICENSE)
9 *
10 * NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT.
11 */
12
13#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
14pub struct TypeDefinition {
15    #[serde(rename = "type")]
16    pub _type: String,
17    #[serde(rename = "relations", skip_serializing_if = "Option::is_none")]
18    pub relations: Option<::std::collections::HashMap<String, crate::models::Userset>>,
19    #[serde(rename = "metadata", skip_serializing_if = "Option::is_none")]
20    pub metadata: Option<Box<crate::models::Metadata>>,
21}
22
23impl TypeDefinition {
24    pub fn new(_type: String) -> TypeDefinition {
25        TypeDefinition {
26            _type,
27            relations: None,
28            metadata: None,
29        }
30    }
31}