Skip to main content

geoengine_api_client/models/
temporal_raster_aggregation_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/// TemporalRasterAggregationParameters : Parameters for the `TemporalRasterAggregation` operator.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct TemporalRasterAggregationParameters {
17    /// Aggregation method for values within each time window.  Encountering NO DATA makes the aggregation result NO DATA unless `ignoreNoData` is `true` for the selected aggregation variant.
18    #[serde(rename = "aggregation")]
19    pub aggregation: Box<models::Aggregation>,
20    /// Optional output raster data type.
21    #[serde(rename = "outputType", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
22    pub output_type: Option<Option<models::RasterDataType>>,
23    /// Window size and granularity for the output time series.
24    #[serde(rename = "window")]
25    pub window: Box<models::TimeStep>,
26    /// Optional reference timestamp used as the anchor for window boundaries.  If omitted, windows are anchored at `1970-01-01T00:00:00Z`.
27    #[serde(rename = "windowReference", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
28    pub window_reference: Option<Option<i64>>,
29}
30
31impl TemporalRasterAggregationParameters {
32    /// Parameters for the `TemporalRasterAggregation` operator.
33    pub fn new(aggregation: models::Aggregation, window: models::TimeStep) -> TemporalRasterAggregationParameters {
34        TemporalRasterAggregationParameters {
35            aggregation: Box::new(aggregation),
36            output_type: None,
37            window: Box::new(window),
38            window_reference: None,
39        }
40    }
41}
42