parse_sap_odata/sap_annotations/
navigation_property.rs

1use serde::{Deserialize, Serialize};
2
3use crate::sap_annotations::{de_str_to_bool, default_true};
4
5// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
6/// SAP Annotations applicable to `edm:NavigationProperty`
7///
8/// See https://sap.github.io/odata-vocabularies/docs/v2-annotations.html#element-edmnavigationproperty
9#[derive(Debug, Serialize, Deserialize)]
10#[serde(rename_all = "PascalCase")]
11pub struct SAPAnnotationsNavigationProperty {
12    #[serde(
13        rename = "@creatable",
14        deserialize_with = "de_str_to_bool",
15        default = "default_true"
16    )]
17    pub is_creatable: bool,
18    #[serde(rename = "@creatable-path")]
19    pub creatable_path: Option<String>,
20    #[serde(
21        rename = "@filterable",
22        deserialize_with = "de_str_to_bool",
23        default = "default_true"
24    )]
25    pub is_filterable: bool,
26}