parse_sap_odata/edmx/data_services/schema/entity_container/function_import/
mod.rs

1use serde::{Deserialize, Serialize};
2
3use crate::sap_annotations::function_import::*;
4
5use parameter::Parameter;
6
7pub mod parameter;
8
9// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
10/// Represents a `<FunctionImport>` tag
11///
12/// # Child Nodes
13/// `1:n Parameter`
14#[derive(Debug, Serialize, Deserialize)]
15#[serde(rename_all = "PascalCase")]
16pub struct FunctionImport {
17    #[serde(rename = "@Name")]
18    pub name: String,
19    #[serde(rename = "@ReturnType")]
20    pub return_type: String,
21    #[serde(rename = "@EntitySet")]
22    pub entity_set: Option<String>,
23    #[serde(rename = "@HttpMethod")]
24    pub http_method: String,
25    #[serde(flatten)]
26    pub sap_annotations: SAPAnnotationsFunctionImport,
27    #[serde(rename = "Parameter")]
28    pub parameters: Option<Vec<Parameter>>,
29}