use rtdlib::types::*;
use serde::{Serialize, Serializer, Deserialize, Deserializer};
use rtdlib::types::{RObject, RTDType};
#[derive(Debug, Clone)]
pub struct TGUpdateNewChat {
inner: UpdateNewChat
}
impl RObject for TGUpdateNewChat {
fn td_name(&self) -> &'static str {
self.inner.td_name()
}
fn td_type(&self) -> RTDType {
self.inner.td_type()
}
fn to_json(&self) -> String {
self.inner.to_json()
}
}
impl Serialize for TGUpdateNewChat {
fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error> where S: Serializer {
self.inner.serialize(serializer)
}
}
impl<'de> Deserialize<'de> for TGUpdateNewChat {
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error> where D: Deserializer<'de> {
UpdateNewChat::deserialize(deserializer).map(|inner| TGUpdateNewChat::new(inner))
}
}
impl TGUpdateNewChat {
pub fn new(inner: UpdateNewChat) -> Self {
Self { inner }
}
pub fn from_json<S: AsRef<str>>(json: S) -> Option<TGUpdateNewChat> {
UpdateNewChat::from_json(json).map(|inner| TGUpdateNewChat::new(inner))
}
pub fn td_origin(&self) -> &UpdateNewChat { &self.inner }
pub fn td_origin_mut(&mut self) -> &mut UpdateNewChat { &mut self.inner }
}
#[derive(Debug, Clone)]
pub struct TGUpdateChatLastMessage {
inner: UpdateChatLastMessage
}
impl RObject for TGUpdateChatLastMessage {
fn td_name(&self) -> &'static str {
self.inner.td_name()
}
fn td_type(&self) -> RTDType {
self.inner.td_type()
}
fn to_json(&self) -> String {
self.inner.to_json()
}
}
impl Serialize for TGUpdateChatLastMessage {
fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error> where S: Serializer {
self.inner.serialize(serializer)
}
}
impl<'de> Deserialize<'de> for TGUpdateChatLastMessage {
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error> where D: Deserializer<'de> {
UpdateChatLastMessage::deserialize(deserializer).map(|inner| TGUpdateChatLastMessage::new(inner))
}
}
impl TGUpdateChatLastMessage {
pub fn new(inner: UpdateChatLastMessage) -> Self {
Self { inner }
}
pub fn from_json<S: AsRef<str>>(json: S) -> Option<TGUpdateChatLastMessage> {
UpdateChatLastMessage::from_json(json).map(|inner| TGUpdateChatLastMessage::new(inner))
}
pub fn td_origin(&self) -> &UpdateChatLastMessage { &self.inner }
pub fn td_origin_mut(&mut self) -> &mut UpdateChatLastMessage { &mut self.inner }
}
#[derive(Debug, Clone)]
pub struct TGChat {
inner: Chat
}
impl RObject for TGChat {
fn td_name(&self) -> &'static str {
self.inner.td_name()
}
fn td_type(&self) -> RTDType {
self.inner.td_type()
}
fn to_json(&self) -> String {
self.inner.to_json()
}
}
impl Serialize for TGChat {
fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error> where S: Serializer {
self.inner.serialize(serializer)
}
}
impl<'de> Deserialize<'de> for TGChat {
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error> where D: Deserializer<'de> {
Chat::deserialize(deserializer).map(|inner| TGChat::new(inner))
}
}
impl TGChat {
pub fn new(inner: Chat) -> Self {
Self { inner }
}
pub fn from_json<S: AsRef<str>>(json: S) -> Option<TGChat> {
Chat::from_json(json).map(|inner| TGChat::new(inner))
}
pub fn td_origin(&self) -> &Chat { &self.inner }
pub fn td_origin_mut(&mut self) -> &mut Chat { &mut self.inner }
}
#[derive(Debug, Clone)]
pub struct TGDraftMessage {
inner: DraftMessage
}
impl RObject for TGDraftMessage {
fn td_name(&self) -> &'static str {
self.inner.td_name()
}
fn td_type(&self) -> RTDType {
self.inner.td_type()
}
fn to_json(&self) -> String {
self.inner.to_json()
}
}
impl Serialize for TGDraftMessage {
fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error> where S: Serializer {
self.inner.serialize(serializer)
}
}
impl<'de> Deserialize<'de> for TGDraftMessage {
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error> where D: Deserializer<'de> {
DraftMessage::deserialize(deserializer).map(|inner| TGDraftMessage::new(inner))
}
}
impl TGDraftMessage {
pub fn new(inner: DraftMessage) -> Self {
Self { inner }
}
pub fn from_json<S: AsRef<str>>(json: S) -> Option<TGDraftMessage> {
DraftMessage::from_json(json).map(|inner| TGDraftMessage::new(inner))
}
pub fn td_origin(&self) -> &DraftMessage { &self.inner }
pub fn td_origin_mut(&mut self) -> &mut DraftMessage { &mut self.inner }
}
#[derive(Debug, Clone)]
pub struct TGChatTypePrivate {
inner: ChatTypePrivate
}
impl RObject for TGChatTypePrivate {
fn td_name(&self) -> &'static str {
self.inner.td_name()
}
fn td_type(&self) -> RTDType {
self.inner.td_type()
}
fn to_json(&self) -> String {
self.inner.to_json()
}
}
impl Serialize for TGChatTypePrivate {
fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error> where S: Serializer {
self.inner.serialize(serializer)
}
}
impl<'de> Deserialize<'de> for TGChatTypePrivate {
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error> where D: Deserializer<'de> {
ChatTypePrivate::deserialize(deserializer).map(|inner| TGChatTypePrivate::new(inner))
}
}
impl TGChatTypePrivate {
pub fn new(inner: ChatTypePrivate) -> Self {
Self { inner }
}
pub fn from_json<S: AsRef<str>>(json: S) -> Option<TGChatTypePrivate> {
ChatTypePrivate::from_json(json).map(|inner| TGChatTypePrivate::new(inner))
}
pub fn td_origin(&self) -> &ChatTypePrivate { &self.inner }
pub fn td_origin_mut(&mut self) -> &mut ChatTypePrivate { &mut self.inner }
}
#[derive(Debug, Clone)]
pub struct TGChatTypeBasicGroup {
inner: ChatTypeBasicGroup
}
impl RObject for TGChatTypeBasicGroup {
fn td_name(&self) -> &'static str {
self.inner.td_name()
}
fn td_type(&self) -> RTDType {
self.inner.td_type()
}
fn to_json(&self) -> String {
self.inner.to_json()
}
}
impl Serialize for TGChatTypeBasicGroup {
fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error> where S: Serializer {
self.inner.serialize(serializer)
}
}
impl<'de> Deserialize<'de> for TGChatTypeBasicGroup {
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error> where D: Deserializer<'de> {
ChatTypeBasicGroup::deserialize(deserializer).map(|inner| TGChatTypeBasicGroup::new(inner))
}
}
impl TGChatTypeBasicGroup {
pub fn new(inner: ChatTypeBasicGroup) -> Self {
Self { inner }
}
pub fn from_json<S: AsRef<str>>(json: S) -> Option<TGChatTypeBasicGroup> {
ChatTypeBasicGroup::from_json(json).map(|inner| TGChatTypeBasicGroup::new(inner))
}
pub fn td_origin(&self) -> &ChatTypeBasicGroup { &self.inner }
pub fn td_origin_mut(&mut self) -> &mut ChatTypeBasicGroup { &mut self.inner }
}
#[derive(Debug, Clone)]
pub struct TGChatTypeSupergroup {
inner: ChatTypeSupergroup
}
impl RObject for TGChatTypeSupergroup {
fn td_name(&self) -> &'static str {
self.inner.td_name()
}
fn td_type(&self) -> RTDType {
self.inner.td_type()
}
fn to_json(&self) -> String {
self.inner.to_json()
}
}
impl Serialize for TGChatTypeSupergroup {
fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error> where S: Serializer {
self.inner.serialize(serializer)
}
}
impl<'de> Deserialize<'de> for TGChatTypeSupergroup {
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error> where D: Deserializer<'de> {
ChatTypeSupergroup::deserialize(deserializer).map(|inner| TGChatTypeSupergroup::new(inner))
}
}
impl TGChatTypeSupergroup {
pub fn new(inner: ChatTypeSupergroup) -> Self {
Self { inner }
}
pub fn from_json<S: AsRef<str>>(json: S) -> Option<TGChatTypeSupergroup> {
ChatTypeSupergroup::from_json(json).map(|inner| TGChatTypeSupergroup::new(inner))
}
pub fn td_origin(&self) -> &ChatTypeSupergroup { &self.inner }
pub fn td_origin_mut(&mut self) -> &mut ChatTypeSupergroup { &mut self.inner }
}
#[derive(Debug, Clone)]
pub struct TGChatTypeSecret {
inner: ChatTypeSecret
}
impl RObject for TGChatTypeSecret {
fn td_name(&self) -> &'static str {
self.inner.td_name()
}
fn td_type(&self) -> RTDType {
self.inner.td_type()
}
fn to_json(&self) -> String {
self.inner.to_json()
}
}
impl Serialize for TGChatTypeSecret {
fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error> where S: Serializer {
self.inner.serialize(serializer)
}
}
impl<'de> Deserialize<'de> for TGChatTypeSecret {
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error> where D: Deserializer<'de> {
ChatTypeSecret::deserialize(deserializer).map(|inner| TGChatTypeSecret::new(inner))
}
}
impl TGChatTypeSecret {
pub fn new(inner: ChatTypeSecret) -> Self {
Self { inner }
}
pub fn from_json<S: AsRef<str>>(json: S) -> Option<TGChatTypeSecret> {
ChatTypeSecret::from_json(json).map(|inner| TGChatTypeSecret::new(inner))
}
pub fn td_origin(&self) -> &ChatTypeSecret { &self.inner }
pub fn td_origin_mut(&mut self) -> &mut ChatTypeSecret { &mut self.inner }
}
#[derive(Debug, Clone)]
pub struct TGChatNotificationSettings {
inner: ChatNotificationSettings
}
impl RObject for TGChatNotificationSettings {
fn td_name(&self) -> &'static str {
self.inner.td_name()
}
fn td_type(&self) -> RTDType {
self.inner.td_type()
}
fn to_json(&self) -> String {
self.inner.to_json()
}
}
impl Serialize for TGChatNotificationSettings {
fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error> where S: Serializer {
self.inner.serialize(serializer)
}
}
impl<'de> Deserialize<'de> for TGChatNotificationSettings {
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error> where D: Deserializer<'de> {
ChatNotificationSettings::deserialize(deserializer).map(|inner| TGChatNotificationSettings::new(inner))
}
}
impl TGChatNotificationSettings {
pub fn new(inner: ChatNotificationSettings) -> Self {
Self { inner }
}
pub fn from_json<S: AsRef<str>>(json: S) -> Option<TGChatNotificationSettings> {
ChatNotificationSettings::from_json(json).map(|inner| TGChatNotificationSettings::new(inner))
}
pub fn td_origin(&self) -> &ChatNotificationSettings { &self.inner }
pub fn td_origin_mut(&mut self) -> &mut ChatNotificationSettings { &mut self.inner }
}
#[derive(Debug, Clone)]
pub struct TGUpdateUserChatAction {
inner: UpdateUserChatAction
}
impl RObject for TGUpdateUserChatAction {
fn td_name(&self) -> &'static str {
self.inner.td_name()
}
fn td_type(&self) -> RTDType {
self.inner.td_type()
}
fn to_json(&self) -> String {
self.inner.to_json()
}
}
impl Serialize for TGUpdateUserChatAction {
fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error> where S: Serializer {
self.inner.serialize(serializer)
}
}
impl<'de> Deserialize<'de> for TGUpdateUserChatAction {
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error> where D: Deserializer<'de> {
UpdateUserChatAction::deserialize(deserializer).map(|inner| TGUpdateUserChatAction::new(inner))
}
}
impl TGUpdateUserChatAction {
pub fn new(inner: UpdateUserChatAction) -> Self {
Self { inner }
}
pub fn from_json<S: AsRef<str>>(json: S) -> Option<TGUpdateUserChatAction> {
UpdateUserChatAction::from_json(json).map(|inner| TGUpdateUserChatAction::new(inner))
}
pub fn td_origin(&self) -> &UpdateUserChatAction { &self.inner }
pub fn td_origin_mut(&mut self) -> &mut UpdateUserChatAction { &mut self.inner }
}
#[derive(Debug, Clone)]
pub struct TGChatActionCancel {
inner: ChatActionCancel
}
impl RObject for TGChatActionCancel {
fn td_name(&self) -> &'static str {
self.inner.td_name()
}
fn td_type(&self) -> RTDType {
self.inner.td_type()
}
fn to_json(&self) -> String {
self.inner.to_json()
}
}
impl Serialize for TGChatActionCancel {
fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error> where S: Serializer {
self.inner.serialize(serializer)
}
}
impl<'de> Deserialize<'de> for TGChatActionCancel {
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error> where D: Deserializer<'de> {
ChatActionCancel::deserialize(deserializer).map(|inner| TGChatActionCancel::new(inner))
}
}
impl TGChatActionCancel {
pub fn new(inner: ChatActionCancel) -> Self {
Self { inner }
}
pub fn from_json<S: AsRef<str>>(json: S) -> Option<TGChatActionCancel> {
ChatActionCancel::from_json(json).map(|inner| TGChatActionCancel::new(inner))
}
pub fn td_origin(&self) -> &ChatActionCancel { &self.inner }
pub fn td_origin_mut(&mut self) -> &mut ChatActionCancel { &mut self.inner }
}
#[derive(Debug, Clone)]
pub struct TGChatActionChoosingContact {
inner: ChatActionChoosingContact
}
impl RObject for TGChatActionChoosingContact {
fn td_name(&self) -> &'static str {
self.inner.td_name()
}
fn td_type(&self) -> RTDType {
self.inner.td_type()
}
fn to_json(&self) -> String {
self.inner.to_json()
}
}
impl Serialize for TGChatActionChoosingContact {
fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error> where S: Serializer {
self.inner.serialize(serializer)
}
}
impl<'de> Deserialize<'de> for TGChatActionChoosingContact {
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error> where D: Deserializer<'de> {
ChatActionChoosingContact::deserialize(deserializer).map(|inner| TGChatActionChoosingContact::new(inner))
}
}
impl TGChatActionChoosingContact {
pub fn new(inner: ChatActionChoosingContact) -> Self {
Self { inner }
}
pub fn from_json<S: AsRef<str>>(json: S) -> Option<TGChatActionChoosingContact> {
ChatActionChoosingContact::from_json(json).map(|inner| TGChatActionChoosingContact::new(inner))
}
pub fn td_origin(&self) -> &ChatActionChoosingContact { &self.inner }
pub fn td_origin_mut(&mut self) -> &mut ChatActionChoosingContact { &mut self.inner }
}
#[derive(Debug, Clone)]
pub struct TGChatActionChoosingLocation {
inner: ChatActionChoosingLocation
}
impl RObject for TGChatActionChoosingLocation {
fn td_name(&self) -> &'static str {
self.inner.td_name()
}
fn td_type(&self) -> RTDType {
self.inner.td_type()
}
fn to_json(&self) -> String {
self.inner.to_json()
}
}
impl Serialize for TGChatActionChoosingLocation {
fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error> where S: Serializer {
self.inner.serialize(serializer)
}
}
impl<'de> Deserialize<'de> for TGChatActionChoosingLocation {
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error> where D: Deserializer<'de> {
ChatActionChoosingLocation::deserialize(deserializer).map(|inner| TGChatActionChoosingLocation::new(inner))
}
}
impl TGChatActionChoosingLocation {
pub fn new(inner: ChatActionChoosingLocation) -> Self {
Self { inner }
}
pub fn from_json<S: AsRef<str>>(json: S) -> Option<TGChatActionChoosingLocation> {
ChatActionChoosingLocation::from_json(json).map(|inner| TGChatActionChoosingLocation::new(inner))
}
pub fn td_origin(&self) -> &ChatActionChoosingLocation { &self.inner }
pub fn td_origin_mut(&mut self) -> &mut ChatActionChoosingLocation { &mut self.inner }
}
#[derive(Debug, Clone)]
pub struct TGChatActionRecordingVideo {
inner: ChatActionRecordingVideo
}
impl RObject for TGChatActionRecordingVideo {
fn td_name(&self) -> &'static str {
self.inner.td_name()
}
fn td_type(&self) -> RTDType {
self.inner.td_type()
}
fn to_json(&self) -> String {
self.inner.to_json()
}
}
impl Serialize for TGChatActionRecordingVideo {
fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error> where S: Serializer {
self.inner.serialize(serializer)
}
}
impl<'de> Deserialize<'de> for TGChatActionRecordingVideo {
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error> where D: Deserializer<'de> {
ChatActionRecordingVideo::deserialize(deserializer).map(|inner| TGChatActionRecordingVideo::new(inner))
}
}
impl TGChatActionRecordingVideo {
pub fn new(inner: ChatActionRecordingVideo) -> Self {
Self { inner }
}
pub fn from_json<S: AsRef<str>>(json: S) -> Option<TGChatActionRecordingVideo> {
ChatActionRecordingVideo::from_json(json).map(|inner| TGChatActionRecordingVideo::new(inner))
}
pub fn td_origin(&self) -> &ChatActionRecordingVideo { &self.inner }
pub fn td_origin_mut(&mut self) -> &mut ChatActionRecordingVideo { &mut self.inner }
}
#[derive(Debug, Clone)]
pub struct TGChatActionRecordingVideoNote {
inner: ChatActionRecordingVideoNote
}
impl RObject for TGChatActionRecordingVideoNote {
fn td_name(&self) -> &'static str {
self.inner.td_name()
}
fn td_type(&self) -> RTDType {
self.inner.td_type()
}
fn to_json(&self) -> String {
self.inner.to_json()
}
}
impl Serialize for TGChatActionRecordingVideoNote {
fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error> where S: Serializer {
self.inner.serialize(serializer)
}
}
impl<'de> Deserialize<'de> for TGChatActionRecordingVideoNote {
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error> where D: Deserializer<'de> {
ChatActionRecordingVideoNote::deserialize(deserializer).map(|inner| TGChatActionRecordingVideoNote::new(inner))
}
}
impl TGChatActionRecordingVideoNote {
pub fn new(inner: ChatActionRecordingVideoNote) -> Self {
Self { inner }
}
pub fn from_json<S: AsRef<str>>(json: S) -> Option<TGChatActionRecordingVideoNote> {
ChatActionRecordingVideoNote::from_json(json).map(|inner| TGChatActionRecordingVideoNote::new(inner))
}
pub fn td_origin(&self) -> &ChatActionRecordingVideoNote { &self.inner }
pub fn td_origin_mut(&mut self) -> &mut ChatActionRecordingVideoNote { &mut self.inner }
}
#[derive(Debug, Clone)]
pub struct TGChatActionRecordingVoiceNote {
inner: ChatActionRecordingVoiceNote
}
impl RObject for TGChatActionRecordingVoiceNote {
fn td_name(&self) -> &'static str {
self.inner.td_name()
}
fn td_type(&self) -> RTDType {
self.inner.td_type()
}
fn to_json(&self) -> String {
self.inner.to_json()
}
}
impl Serialize for TGChatActionRecordingVoiceNote {
fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error> where S: Serializer {
self.inner.serialize(serializer)
}
}
impl<'de> Deserialize<'de> for TGChatActionRecordingVoiceNote {
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error> where D: Deserializer<'de> {
ChatActionRecordingVoiceNote::deserialize(deserializer).map(|inner| TGChatActionRecordingVoiceNote::new(inner))
}
}
impl TGChatActionRecordingVoiceNote {
pub fn new(inner: ChatActionRecordingVoiceNote) -> Self {
Self { inner }
}
pub fn from_json<S: AsRef<str>>(json: S) -> Option<TGChatActionRecordingVoiceNote> {
ChatActionRecordingVoiceNote::from_json(json).map(|inner| TGChatActionRecordingVoiceNote::new(inner))
}
pub fn td_origin(&self) -> &ChatActionRecordingVoiceNote { &self.inner }
pub fn td_origin_mut(&mut self) -> &mut ChatActionRecordingVoiceNote { &mut self.inner }
}
#[derive(Debug, Clone)]
pub struct TGChatActionStartPlayingGame {
inner: ChatActionStartPlayingGame
}
impl RObject for TGChatActionStartPlayingGame {
fn td_name(&self) -> &'static str {
self.inner.td_name()
}
fn td_type(&self) -> RTDType {
self.inner.td_type()
}
fn to_json(&self) -> String {
self.inner.to_json()
}
}
impl Serialize for TGChatActionStartPlayingGame {
fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error> where S: Serializer {
self.inner.serialize(serializer)
}
}
impl<'de> Deserialize<'de> for TGChatActionStartPlayingGame {
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error> where D: Deserializer<'de> {
ChatActionStartPlayingGame::deserialize(deserializer).map(|inner| TGChatActionStartPlayingGame::new(inner))
}
}
impl TGChatActionStartPlayingGame {
pub fn new(inner: ChatActionStartPlayingGame) -> Self {
Self { inner }
}
pub fn from_json<S: AsRef<str>>(json: S) -> Option<TGChatActionStartPlayingGame> {
ChatActionStartPlayingGame::from_json(json).map(|inner| TGChatActionStartPlayingGame::new(inner))
}
pub fn td_origin(&self) -> &ChatActionStartPlayingGame { &self.inner }
pub fn td_origin_mut(&mut self) -> &mut ChatActionStartPlayingGame { &mut self.inner }
}
#[derive(Debug, Clone)]
pub struct TGChatActionTyping {
inner: ChatActionTyping
}
impl RObject for TGChatActionTyping {
fn td_name(&self) -> &'static str {
self.inner.td_name()
}
fn td_type(&self) -> RTDType {
self.inner.td_type()
}
fn to_json(&self) -> String {
self.inner.to_json()
}
}
impl Serialize for TGChatActionTyping {
fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error> where S: Serializer {
self.inner.serialize(serializer)
}
}
impl<'de> Deserialize<'de> for TGChatActionTyping {
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error> where D: Deserializer<'de> {
ChatActionTyping::deserialize(deserializer).map(|inner| TGChatActionTyping::new(inner))
}
}
impl TGChatActionTyping {
pub fn new(inner: ChatActionTyping) -> Self {
Self { inner }
}
pub fn from_json<S: AsRef<str>>(json: S) -> Option<TGChatActionTyping> {
ChatActionTyping::from_json(json).map(|inner| TGChatActionTyping::new(inner))
}
pub fn td_origin(&self) -> &ChatActionTyping { &self.inner }
pub fn td_origin_mut(&mut self) -> &mut ChatActionTyping { &mut self.inner }
}
#[derive(Debug, Clone)]
pub struct TGChatActionUploadingDocument {
inner: ChatActionUploadingDocument
}
impl RObject for TGChatActionUploadingDocument {
fn td_name(&self) -> &'static str {
self.inner.td_name()
}
fn td_type(&self) -> RTDType {
self.inner.td_type()
}
fn to_json(&self) -> String {
self.inner.to_json()
}
}
impl Serialize for TGChatActionUploadingDocument {
fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error> where S: Serializer {
self.inner.serialize(serializer)
}
}
impl<'de> Deserialize<'de> for TGChatActionUploadingDocument {
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error> where D: Deserializer<'de> {
ChatActionUploadingDocument::deserialize(deserializer).map(|inner| TGChatActionUploadingDocument::new(inner))
}
}
impl TGChatActionUploadingDocument {
pub fn new(inner: ChatActionUploadingDocument) -> Self {
Self { inner }
}
pub fn from_json<S: AsRef<str>>(json: S) -> Option<TGChatActionUploadingDocument> {
ChatActionUploadingDocument::from_json(json).map(|inner| TGChatActionUploadingDocument::new(inner))
}
pub fn td_origin(&self) -> &ChatActionUploadingDocument { &self.inner }
pub fn td_origin_mut(&mut self) -> &mut ChatActionUploadingDocument { &mut self.inner }
}
#[derive(Debug, Clone)]
pub struct TGChatActionUploadingPhoto {
inner: ChatActionUploadingPhoto
}
impl RObject for TGChatActionUploadingPhoto {
fn td_name(&self) -> &'static str {
self.inner.td_name()
}
fn td_type(&self) -> RTDType {
self.inner.td_type()
}
fn to_json(&self) -> String {
self.inner.to_json()
}
}
impl Serialize for TGChatActionUploadingPhoto {
fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error> where S: Serializer {
self.inner.serialize(serializer)
}
}
impl<'de> Deserialize<'de> for TGChatActionUploadingPhoto {
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error> where D: Deserializer<'de> {
ChatActionUploadingPhoto::deserialize(deserializer).map(|inner| TGChatActionUploadingPhoto::new(inner))
}
}
impl TGChatActionUploadingPhoto {
pub fn new(inner: ChatActionUploadingPhoto) -> Self {
Self { inner }
}
pub fn from_json<S: AsRef<str>>(json: S) -> Option<TGChatActionUploadingPhoto> {
ChatActionUploadingPhoto::from_json(json).map(|inner| TGChatActionUploadingPhoto::new(inner))
}
pub fn td_origin(&self) -> &ChatActionUploadingPhoto { &self.inner }
pub fn td_origin_mut(&mut self) -> &mut ChatActionUploadingPhoto { &mut self.inner }
}
#[derive(Debug, Clone)]
pub struct TGChatActionUploadingVideo {
inner: ChatActionUploadingVideo
}
impl RObject for TGChatActionUploadingVideo {
fn td_name(&self) -> &'static str {
self.inner.td_name()
}
fn td_type(&self) -> RTDType {
self.inner.td_type()
}
fn to_json(&self) -> String {
self.inner.to_json()
}
}
impl Serialize for TGChatActionUploadingVideo {
fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error> where S: Serializer {
self.inner.serialize(serializer)
}
}
impl<'de> Deserialize<'de> for TGChatActionUploadingVideo {
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error> where D: Deserializer<'de> {
ChatActionUploadingVideo::deserialize(deserializer).map(|inner| TGChatActionUploadingVideo::new(inner))
}
}
impl TGChatActionUploadingVideo {
pub fn new(inner: ChatActionUploadingVideo) -> Self {
Self { inner }
}
pub fn from_json<S: AsRef<str>>(json: S) -> Option<TGChatActionUploadingVideo> {
ChatActionUploadingVideo::from_json(json).map(|inner| TGChatActionUploadingVideo::new(inner))
}
pub fn td_origin(&self) -> &ChatActionUploadingVideo { &self.inner }
pub fn td_origin_mut(&mut self) -> &mut ChatActionUploadingVideo { &mut self.inner }
}
#[derive(Debug, Clone)]
pub struct TGChatActionUploadingVideoNote {
inner: ChatActionUploadingVideoNote
}
impl RObject for TGChatActionUploadingVideoNote {
fn td_name(&self) -> &'static str {
self.inner.td_name()
}
fn td_type(&self) -> RTDType {
self.inner.td_type()
}
fn to_json(&self) -> String {
self.inner.to_json()
}
}
impl Serialize for TGChatActionUploadingVideoNote {
fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error> where S: Serializer {
self.inner.serialize(serializer)
}
}
impl<'de> Deserialize<'de> for TGChatActionUploadingVideoNote {
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error> where D: Deserializer<'de> {
ChatActionUploadingVideoNote::deserialize(deserializer).map(|inner| TGChatActionUploadingVideoNote::new(inner))
}
}
impl TGChatActionUploadingVideoNote {
pub fn new(inner: ChatActionUploadingVideoNote) -> Self {
Self { inner }
}
pub fn from_json<S: AsRef<str>>(json: S) -> Option<TGChatActionUploadingVideoNote> {
ChatActionUploadingVideoNote::from_json(json).map(|inner| TGChatActionUploadingVideoNote::new(inner))
}
pub fn td_origin(&self) -> &ChatActionUploadingVideoNote { &self.inner }
pub fn td_origin_mut(&mut self) -> &mut ChatActionUploadingVideoNote { &mut self.inner }
}
#[derive(Debug, Clone)]
pub struct TGChatActionUploadingVoiceNote {
inner: ChatActionUploadingVoiceNote
}
impl RObject for TGChatActionUploadingVoiceNote {
fn td_name(&self) -> &'static str {
self.inner.td_name()
}
fn td_type(&self) -> RTDType {
self.inner.td_type()
}
fn to_json(&self) -> String {
self.inner.to_json()
}
}
impl Serialize for TGChatActionUploadingVoiceNote {
fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error> where S: Serializer {
self.inner.serialize(serializer)
}
}
impl<'de> Deserialize<'de> for TGChatActionUploadingVoiceNote {
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error> where D: Deserializer<'de> {
ChatActionUploadingVoiceNote::deserialize(deserializer).map(|inner| TGChatActionUploadingVoiceNote::new(inner))
}
}
impl TGChatActionUploadingVoiceNote {
pub fn new(inner: ChatActionUploadingVoiceNote) -> Self {
Self { inner }
}
pub fn from_json<S: AsRef<str>>(json: S) -> Option<TGChatActionUploadingVoiceNote> {
ChatActionUploadingVoiceNote::from_json(json).map(|inner| TGChatActionUploadingVoiceNote::new(inner))
}
pub fn td_origin(&self) -> &ChatActionUploadingVoiceNote { &self.inner }
pub fn td_origin_mut(&mut self) -> &mut ChatActionUploadingVoiceNote { &mut self.inner }
}