parse_sap_odata/sap_annotations/function_import/
parameter.rs

1use crate::sap_annotations::{de_str_to_bool, default_false};
2use serde::{Deserialize, Serialize};
3
4// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
5/// SAP Annotations applicable to `edm:FunctionImport`
6///
7/// See https://sap.github.io/odata-vocabularies/docs/v2-annotations.html#element-edmfunctionimport
8#[derive(Debug, Serialize, Deserialize)]
9#[serde(rename_all = "PascalCase")]
10pub struct SAPAnnotationsFunctionImportParameter {
11    #[serde(rename = "@label")]
12    pub label: Option<String>,
13    #[serde(
14        rename = "@variable-scale",
15        deserialize_with = "de_str_to_bool",
16        default = "default_false"
17    )]
18    pub has_variable_scale: bool,
19}