Skip to main content

geoengine_api_client/models/
expression_parameters.rs

1/*
2 * Geo Engine API
3 *
4 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5 *
6 * The version of the OpenAPI document: 0.9.0
7 * Contact: dev@geoengine.de
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// ExpressionParameters : ## Types  The following describes the types used in the parameters.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct ExpressionParameters {
17    /// Expression script  Example: `\"(A - B) / (A + B)\"`
18    #[serde(rename = "expression")]
19    pub expression: String,
20    /// Should NO DATA values be mapped with the `expression`? Otherwise, they are mapped automatically to NO DATA.
21    #[serde(rename = "mapNoData")]
22    pub map_no_data: bool,
23    /// Description about the output
24    #[serde(rename = "outputBand", skip_serializing_if = "Option::is_none")]
25    pub output_band: Option<Box<models::RasterBandDescriptor>>,
26    /// A raster data type for the output
27    #[serde(rename = "outputType")]
28    pub output_type: models::RasterDataType,
29}
30
31impl ExpressionParameters {
32    /// ## Types  The following describes the types used in the parameters.
33    pub fn new(expression: String, map_no_data: bool, output_type: models::RasterDataType) -> ExpressionParameters {
34        ExpressionParameters {
35            expression,
36            map_no_data,
37            output_band: None,
38            output_type,
39        }
40    }
41}
42