openfga_sdk/models/
tuple_operation.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///
14#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
15pub enum TupleOperation {
16    #[serde(rename = "TUPLE_OPERATION_WRITE")]
17    WRITE,
18    #[serde(rename = "TUPLE_OPERATION_DELETE")]
19    DELETE,
20}
21
22impl ToString for TupleOperation {
23    fn to_string(&self) -> String {
24        match self {
25            Self::WRITE => String::from("TUPLE_OPERATION_WRITE"),
26            Self::DELETE => String::from("TUPLE_OPERATION_DELETE"),
27        }
28    }
29}
30
31impl Default for TupleOperation {
32    fn default() -> TupleOperation {
33        Self::WRITE
34    }
35}