Skip to main content

conogram/entities/
input_location_message_content.rs

1use serde::Serialize;
2
3/// Represents the [content](https://core.telegram.org/bots/api/#inputmessagecontent) of a location message to be sent as the result of an inline query.
4///
5/// API Reference: [link](https://core.telegram.org/bots/api/#inputlocationmessagecontent)
6#[derive(Debug, Clone, Default, PartialEq, Serialize)]
7pub struct InputLocationMessageContent {
8    /// Latitude of the location in degrees
9    pub latitude: f64,
10
11    /// Longitude of the location in degrees
12    pub longitude: f64,
13
14    /// *Optional*. The radius of uncertainty for the location, measured in meters; 0-1500
15    #[serde(skip_serializing_if = "Option::is_none")]
16    pub horizontal_accuracy: Option<f64>,
17
18    /// *Optional*. Period in seconds during which the location can be updated, should be between 60 and 86400, or 0x7FFFFFFF for live locations that can be edited indefinitely.
19    #[serde(skip_serializing_if = "Option::is_none")]
20    pub live_period: Option<i64>,
21
22    /// *Optional*. For live locations, a direction in which the user is moving, in degrees. Must be between 1 and 360 if specified.
23    #[serde(skip_serializing_if = "Option::is_none")]
24    pub heading: Option<i64>,
25
26    /// *Optional*. For live locations, a maximum distance for proximity alerts about approaching another chat member, in meters. Must be between 1 and 100000 if specified.
27    #[serde(skip_serializing_if = "Option::is_none")]
28    pub proximity_alert_radius: Option<i64>,
29}
30
31// Divider: all content below this line will be preserved after code regen