openfga_sdk/models/
not_found_error_code.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 NotFoundErrorCode {
16    #[serde(rename = "no_not_found_error")]
17    NoNotFoundError,
18    #[serde(rename = "undefined_endpoint")]
19    UndefinedEndpoint,
20    #[serde(rename = "store_id_not_found")]
21    StoreIdNotFound,
22    #[serde(rename = "unimplemented")]
23    Unimplemented,
24}
25
26impl ToString for NotFoundErrorCode {
27    fn to_string(&self) -> String {
28        match self {
29            Self::NoNotFoundError => String::from("no_not_found_error"),
30            Self::UndefinedEndpoint => String::from("undefined_endpoint"),
31            Self::StoreIdNotFound => String::from("store_id_not_found"),
32            Self::Unimplemented => String::from("unimplemented"),
33        }
34    }
35}
36
37impl Default for NotFoundErrorCode {
38    fn default() -> NotFoundErrorCode {
39        Self::NoNotFoundError
40    }
41}