geoengine-api-client 0.9.1

No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
Documentation
/*
 * Geo Engine API
 *
 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
 *
 * Contact: dev@geoengine.de
 * Generated by: https://openapi-generator.tech
 */

use crate::models;
use serde::{Deserialize, Serialize};

/// ExpressionParameters : ## Types  The following describes the types used in the parameters.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct ExpressionParameters {
    /// Expression script  Example: `\"(A - B) / (A + B)\"`
    #[serde(rename = "expression")]
    pub expression: String,
    /// Should NO DATA values be mapped with the `expression`? Otherwise, they are mapped automatically to NO DATA.
    #[serde(rename = "mapNoData")]
    pub map_no_data: bool,
    /// Description about the output
    #[serde(rename = "outputBand", skip_serializing_if = "Option::is_none")]
    pub output_band: Option<Box<models::RasterBandDescriptor>>,
    /// A raster data type for the output
    #[serde(rename = "outputType")]
    pub output_type: models::RasterDataType,
}

impl ExpressionParameters {
    /// ## Types  The following describes the types used in the parameters.
    pub fn new(expression: String, map_no_data: bool, output_type: models::RasterDataType) -> ExpressionParameters {
        ExpressionParameters {
            expression,
            map_no_data,
            output_band: None,
            output_type,
        }
    }
}