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
38
39
40
41
/*
* 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 crate::models;
use serde::{Deserialize, Serialize};
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct WriteRequestDeletes {
#[serde(rename = "tuple_keys")]
pub tuple_keys: Vec<models::TupleKeyWithoutCondition>,
/// On 'error', the API returns an error when deleting a tuple that does not exist. On 'ignore', deletes of non-existent tuples are treated as no-ops.
#[serde(rename = "on_missing", skip_serializing_if = "Option::is_none")]
pub on_missing: Option<OnMissing>,
}
impl WriteRequestDeletes {
pub fn new(tuple_keys: Vec<models::TupleKeyWithoutCondition>) -> WriteRequestDeletes {
WriteRequestDeletes {
tuple_keys,
on_missing: None,
}
}
}
/// On 'error', the API returns an error when deleting a tuple that does not exist. On 'ignore', deletes of non-existent tuples are treated as no-ops.
#[derive(
Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize, Default,
)]
pub enum OnMissing {
#[serde(rename = "error")]
#[default]
Error,
#[serde(rename = "ignore")]
Ignore,
}