fromJson static method
Inherited by: BotWriteAccessAllowReasonAcceptedRequest BotWriteAccessAllowReasonAddedToAttachmentMenu BotWriteAccessAllowReasonConnectedWebsite BotWriteAccessAllowReasonLaunchedWebApp
Implementation
static BotWriteAccessAllowReason? fromJson(Map<String, dynamic>? json) {
if (json == null) {
return null;
}
switch (json['@type']) {
case BotWriteAccessAllowReasonAcceptedRequest.constructor:
return BotWriteAccessAllowReasonAcceptedRequest.fromJson(json);
case BotWriteAccessAllowReasonAddedToAttachmentMenu.constructor:
return BotWriteAccessAllowReasonAddedToAttachmentMenu.fromJson(json);
case BotWriteAccessAllowReasonConnectedWebsite.constructor:
return BotWriteAccessAllowReasonConnectedWebsite.fromJson(json);
case BotWriteAccessAllowReasonLaunchedWebApp.constructor:
return BotWriteAccessAllowReasonLaunchedWebApp.fromJson(json);
default:
return null;
}
}