use crate::common;
use serde::{Deserialize, Serialize};
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct GeoLineAggregation {
#[serde(rename = "sort")]
pub sort: common::aggregations::GeoLineSort,
#[serde(
rename = "sort_order",
default,
skip_serializing_if = "Option::is_none"
)]
pub sort_order: Option<String>,
#[serde(
rename = "include_sort",
default,
skip_serializing_if = "Option::is_none"
)]
pub include_sort: Option<bool>,
#[serde(rename = "size", default, skip_serializing_if = "Option::is_none")]
pub size: Option<u32>,
#[serde(rename = "point")]
pub point: common::aggregations::GeoLinePoint,
}
impl GeoLineAggregation {
pub fn new(
sort: common::aggregations::GeoLineSort,
point: common::aggregations::GeoLinePoint,
) -> GeoLineAggregation {
GeoLineAggregation {
sort,
sort_order: None,
include_sort: None,
size: None,
point,
}
}
}