teloxide_core/payloads/edit_chat_invite_link.rs
1//! Generated by `codegen_payloads`, do not edit by hand.
2
3use chrono::{DateTime, Utc};
4use serde::Serialize;
5
6use crate::types::{ChatInviteLink, Recipient};
7
8impl_payload! {
9 /// Use this method to edit a non-primary invite link created by the bot. The bot must be an administrator in the chat for this to work and must have the appropriate admin rights. Returns the edited invite link as a [`ChatInviteLink`] object.
10 ///
11 /// [`ChatInviteLink`]: crate::types::ChatInviteLink
12 #[derive(Debug, PartialEq, Eq, Hash, Clone, Serialize)]
13 pub EditChatInviteLink (EditChatInviteLinkSetters) => ChatInviteLink {
14 required {
15 /// Unique identifier for the target chat or username of the target channel (in the format `@channelusername`)
16 pub chat_id: Recipient [into],
17 /// The invite link to edit
18 pub invite_link: String [into],
19 }
20 optional {
21 /// Invite link name; 0-32 characters
22 pub name: String [into],
23 /// Point in time (Unix timestamp) when the link will expire
24 #[serde(with = "crate::types::serde_opt_date_from_unix_timestamp")]
25 pub expire_date: DateTime<Utc> [into],
26 /// Maximum number of users that can be members of the chat simultaneously after joining the chat via this invite link; 1-99999
27 pub member_limit: u32,
28 /// True, if users joining the chat via the link need to be approved by chat administrators. If True, member_limit can't be specified
29 pub creates_join_request: bool,
30 }
31 }
32}