teloxide_core/payloads/edit_message_live_location.rs
1//! Generated by `codegen_payloads`, do not edit by hand.
2
3use serde::Serialize;
4
5use crate::types::{BusinessConnectionId, LivePeriod, Message, MessageId, Recipient, ReplyMarkup};
6
7impl_payload! {
8 /// Use this method to edit live location messages. A location can be edited until its live_period expires or editing is explicitly disabled by a call to [`StopMessageLiveLocation`]. On success, the edited Message is returned.
9 ///
10 /// See also: [`EditMessageLiveLocationInline`](crate::payloads::EditMessageLiveLocationInline)
11 ///
12 /// [`StopMessageLiveLocation`]: crate::payloads::StopMessageLiveLocation
13 #[derive(Debug, PartialEq, Clone, Serialize)]
14 pub EditMessageLiveLocation (EditMessageLiveLocationSetters) => Message {
15 required {
16 /// Unique identifier for the target chat or username of the target channel (in the format `@channelusername`)
17 pub chat_id: Recipient [into],
18 /// Identifier of the message to edit
19 #[serde(flatten)]
20 pub message_id: MessageId,
21 /// Latitude of new location
22 pub latitude: f64,
23 /// Longitude of new location
24 pub longitude: f64,
25 }
26 optional {
27 /// Unique identifier of the business connection on behalf of which the message to be edited was sent
28 pub business_connection_id: BusinessConnectionId,
29 /// New period in seconds during which the location can be updated, starting from the message send date. If 0x7FFFFFFF is specified, then the location can be updated forever. Otherwise, the new value must not exceed the current live_period by more than a day, and the live location expiration date must remain within the next 90 days. If not specified, then live_period remains unchanged
30 pub live_period: LivePeriod,
31 /// The radius of uncertainty for the location, measured in meters; 0-1500
32 pub horizontal_accuracy: f64,
33 /// For live locations, a direction in which the user is moving, in degrees. Must be between 1 and 360 if specified.
34 pub heading: u16,
35 /// For live locations, a maximum distance for proximity alerts about approaching another chat member, in meters. Must be between 1 and 100000 if specified.
36 pub proximity_alert_radius: u32,
37 /// Additional interface options. A JSON-serialized object for an [inline keyboard], [custom reply keyboard], instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account.
38 ///
39 /// [inline keyboard]: https://core.telegram.org/bots#inline-keyboards-and-on-the-fly-updating
40 /// [custom reply keyboard]: https://core.telegram.org/bots#keyboards
41 pub reply_markup: ReplyMarkup [into],
42 }
43 }
44}