-module(telega@model). -compile([no_auto_import, nowarn_unused_vars, nowarn_unused_function, nowarn_nomatch]). -export([webhook_info_decoder/0, user_decoder/0, chat_decoder/0, message_id_decoder/0, inaccessible_message_decoder/0, message_entity_decoder/0, text_quote_decoder/0, message_origin_user_decoder/0, message_origin_hidden_user_decoder/0, message_origin_chat_decoder/0, message_origin_channel_decoder/0, photo_size_decoder/0, animation_decoder/0, audio_decoder/0, document_decoder/0, story_decoder/0, video_decoder/0, video_note_decoder/0, voice_decoder/0, paid_media_preview_decoder/0, paid_media_photo_decoder/0, paid_media_video_decoder/0, contact_decoder/0, dice_decoder/0, poll_option_decoder/0, input_poll_option_decoder/0, poll_answer_decoder/0, poll_decoder/0, location_decoder/0, venue_decoder/0, web_app_data_decoder/0, proximity_alert_triggered_decoder/0, message_auto_delete_timer_changed_decoder/0, chat_boost_added_decoder/0, background_fill_solid_decoder/0, background_fill_gradient_decoder/0, background_fill_freeform_gradient_decoder/0, background_type_wallpaper_decoder/0, background_type_chat_theme_decoder/0, forum_topic_created_decoder/0, forum_topic_closed_decoder/0, forum_topic_edited_decoder/0, forum_topic_reopened_decoder/0, general_forum_topic_hidden_decoder/0, general_forum_topic_unhidden_decoder/0, shared_user_decoder/0, users_shared_decoder/0, chat_shared_decoder/0, write_access_allowed_decoder/0, video_chat_scheduled_decoder/0, video_chat_started_decoder/0, video_chat_ended_decoder/0, video_chat_participants_invited_decoder/0, giveaway_created_decoder/0, giveaway_decoder/0, giveaway_winners_decoder/0, link_preview_options_decoder/0, user_profile_photos_decoder/0, file_decoder/0, web_app_info_decoder/0, keyboard_button_request_users_decoder/0, keyboard_button_poll_type_decoder/0, reply_keyboard_remove_decoder/0, login_url_decoder/0, switch_inline_query_chosen_chat_decoder/0, copy_text_button_decoder/0, force_reply_decoder/0, chat_photo_decoder/0, chat_invite_link_decoder/0, chat_administrator_rights_decoder/0, keyboard_button_request_chat_decoder/0, keyboard_button_decoder/0, reply_keyboard_markup_decoder/0, chat_member_owner_decoder/0, chat_member_administrator_decoder/0, chat_member_member_decoder/0, chat_member_restricted_decoder/0, chat_member_left_decoder/0, chat_member_banned_decoder/0, chat_join_request_decoder/0, chat_permissions_decoder/0, birthdate_decoder/0, business_location_decoder/0, business_opening_hours_interval_decoder/0, business_opening_hours_decoder/0, chat_location_decoder/0, reaction_type_emoji_decoder/0, reaction_type_custom_emoji_decoder/0, reaction_type_paid_decoder/0, forum_topic_decoder/0, unique_gift_backdrop_colors_decoder/0, unique_gift_backdrop_decoder/0, accepted_gift_types_decoder/0, star_amount_decoder/0, bot_command_decoder/0, bot_command_scope_default_decoder/0, bot_command_scope_all_private_chats_decoder/0, bot_command_scope_all_group_chats_decoder/0, bot_command_scope_all_chat_administrators_decoder/0, bot_name_decoder/0, bot_description_decoder/0, bot_short_description_decoder/0, menu_button_commands_decoder/0, menu_button_web_app_decoder/0, menu_button_default_decoder/0, chat_boost_source_premium_decoder/0, chat_boost_source_gift_code_decoder/0, chat_boost_source_giveaway_decoder/0, business_bot_rights_decoder/0, business_connection_decoder/0, business_messages_deleted_decoder/0, response_parameters_decoder/0, input_media_photo_decoder/0, input_media_video_decoder/0, input_media_animation_decoder/0, input_media_audio_decoder/0, input_media_document_decoder/0, input_paid_media_photo_decoder/0, input_paid_media_video_decoder/0, mask_position_decoder/0, sticker_decoder/0, business_intro_decoder/0, gift_decoder/0, gifts_decoder/0, unique_gift_model_decoder/0, unique_gift_symbol_decoder/0, unique_gift_decoder/0, gift_info_decoder/0, unique_gift_info_decoder/0, owned_gift_decoder/0, owned_gift_regular_decoder/0, owned_gift_unique_decoder/0, owned_gifts_decoder/0, sticker_set_decoder/0, inline_query_decoder/0, inline_query_results_button_decoder/0, input_text_message_content_decoder/0, input_location_message_content_decoder/0, input_venue_message_content_decoder/0, input_contact_message_content_decoder/0, chosen_inline_result_decoder/0, sent_web_app_message_decoder/0, prepared_inline_message_decoder/0, labeled_price_decoder/0, input_invoice_message_content_decoder/0, invoice_decoder/0, shipping_address_decoder/0, order_info_decoder/0, shipping_option_decoder/0, successful_payment_decoder/0, refunded_payment_decoder/0, shipping_query_decoder/0, pre_checkout_query_decoder/0, paid_media_purchased_decoder/0, revenue_withdrawal_state_pending_decoder/0, revenue_withdrawal_state_succeeded_decoder/0, revenue_withdrawal_state_failed_decoder/0, affiliate_info_decoder/0, transaction_partner_chat_decoder/0, transaction_partner_affiliate_program_decoder/0, transaction_partner_telegram_ads_decoder/0, transaction_partner_telegram_api_decoder/0, transaction_partner_other_decoder/0, passport_file_decoder/0, encrypted_passport_element_decoder/0, encrypted_credentials_decoder/0, passport_data_decoder/0, passport_element_error_data_field_decoder/0, passport_element_error_front_side_decoder/0, passport_element_error_reverse_side_decoder/0, passport_element_error_selfie_decoder/0, passport_element_error_file_decoder/0, passport_element_error_files_decoder/0, passport_element_error_translation_file_decoder/0, passport_element_error_translation_files_decoder/0, passport_element_error_unspecified_decoder/0, game_decoder/0, callback_game_decoder/0, inline_keyboard_button_decoder/0, inline_keyboard_markup_decoder/0, inline_query_result_game_decoder/0, game_high_score_decoder/0, message_origin_decoder/0, paid_media_decoder/0, paid_media_info_decoder/0, external_reply_info_decoder/0, transaction_partner_user_decoder/0, background_fill_decoder/0, background_type_fill_decoder/0, background_type_pattern_decoder/0, background_type_decoder/0, chat_background_decoder/0, chat_member_decoder/0, chat_member_updated_decoder/0, reaction_type_decoder/0, reaction_count_decoder/0, message_reaction_updated_decoder/0, message_reaction_count_updated_decoder/0, menu_button_decoder/0, chat_boost_source_decoder/0, chat_boost_decoder/0, chat_boost_updated_decoder/0, chat_boost_removed_decoder/0, user_chat_boosts_decoder/0, input_media_decoder/0, input_paid_media_decoder/0, input_message_content_decoder/0, inline_query_result_article_decoder/0, inline_query_result_photo_decoder/0, inline_query_result_gif_decoder/0, inline_query_result_mpeg4_gif_decoder/0, inline_query_result_video_decoder/0, inline_query_result_audio_decoder/0, inline_query_result_voice_decoder/0, inline_query_result_document_decoder/0, inline_query_result_location_decoder/0, inline_query_result_venue_decoder/0, inline_query_result_contact_decoder/0, inline_query_result_cached_photo_decoder/0, inline_query_result_cached_gif_decoder/0, inline_query_result_cached_mpeg4_gif_decoder/0, inline_query_result_cached_sticker_decoder/0, inline_query_result_cached_document_decoder/0, inline_query_result_cached_video_decoder/0, inline_query_result_cached_voice_decoder/0, inline_query_result_cached_audio_decoder/0, inline_query_result_decoder/0, revenue_withdrawal_state_decoder/0, transaction_partner_fragment_decoder/0, transaction_partner_decoder/0, star_transaction_decoder/0, star_transactions_decoder/0, passport_element_error_decoder/0, file_or_string_decoder/0, input_sticker_decoder/0, new_answer_callback_query_parameters/1, default_bot_command_parameters/0, bot_commands_from/1, int_or_string_decoder/0, reply_parameters_decoder/0, bot_command_scope_chat_decoder/0, bot_command_scope_chat_administrators_decoder/0, bot_command_scope_chat_member_decoder/0, bot_command_scope_decoder/0, encode_int_or_string/1, json_object_filter_nulls/1, encode_webhook_info/1, encode_user/1, encode_chat/1, encode_message_id/1, encode_inaccessible_message/1, encode_message_entity/1, encode_text_quote/1, encode_reply_parameters/1, encode_message_origin_user/1, encode_message_origin_hidden_user/1, encode_message_origin_chat/1, encode_message_origin_channel/1, encode_photo_size/1, encode_animation/1, encode_audio/1, encode_document/1, encode_story/1, encode_video/1, encode_video_note/1, encode_voice/1, encode_paid_media_preview/1, encode_paid_media_photo/1, encode_paid_media_video/1, encode_contact/1, encode_dice/1, encode_poll_option/1, encode_input_poll_option/1, encode_poll_answer/1, encode_poll/1, encode_location/1, encode_venue/1, encode_web_app_data/1, encode_proximity_alert_triggered/1, encode_message_auto_delete_timer_changed/1, encode_chat_boost_added/1, encode_background_fill_solid/1, encode_background_fill_gradient/1, encode_background_fill_freeform_gradient/1, encode_background_type_wallpaper/1, encode_background_type_chat_theme/1, encode_forum_topic_created/1, encode_forum_topic_closed/1, encode_forum_topic_edited/1, encode_forum_topic_reopened/1, encode_general_forum_topic_hidden/1, encode_general_forum_topic_unhidden/1, encode_shared_user/1, encode_users_shared/1, encode_chat_shared/1, encode_write_access_allowed/1, encode_video_chat_scheduled/1, encode_video_chat_started/1, encode_video_chat_ended/1, encode_video_chat_participants_invited/1, encode_giveaway_created/1, encode_giveaway/1, encode_giveaway_winners/1, encode_link_preview_options/1, encode_user_profile_photos/1, encode_file/1, encode_web_app_info/1, encode_keyboard_button_request_users/1, encode_keyboard_button_poll_type/1, encode_reply_keyboard_remove/1, encode_login_url/1, encode_switch_inline_query_chosen_chat/1, encode_copy_text_button/1, encode_force_reply/1, encode_chat_photo/1, encode_chat_invite_link/1, encode_chat_administrator_rights/1, encode_keyboard_button_request_chat/1, encode_keyboard_button/1, encode_reply_keyboard_markup/1, encode_chat_member_owner/1, encode_chat_member_administrator/1, encode_chat_member_member/1, encode_chat_member_restricted/1, encode_chat_member_left/1, encode_chat_member_banned/1, encode_chat_join_request/1, encode_chat_permissions/1, encode_birthdate/1, encode_business_location/1, encode_business_opening_hours_interval/1, encode_business_opening_hours/1, encode_story_area_position/1, encode_location_address/1, encode_story_area_type/1, encode_story_area_type_location/1, encode_story_area_type_link/1, encode_story_area_type_weather/1, encode_story_area_type_unique_gift/1, encode_story_area/1, encode_chat_location/1, encode_reaction_type_emoji/1, encode_reaction_type_custom_emoji/1, encode_reaction_type_paid/1, encode_forum_topic/1, encode_unique_gift_backdrop_colors/1, encode_unique_gift_backdrop/1, encode_accepted_gift_types/1, encode_star_amount/1, encode_bot_command/1, encode_bot_command_scope_default/1, encode_bot_command_scope_all_private_chats/1, encode_bot_command_scope_all_group_chats/1, encode_bot_command_scope_all_chat_administrators/1, encode_bot_command_scope_chat/1, encode_bot_command_scope_chat_administrators/1, encode_bot_command_scope_chat_member/1, encode_bot_name/1, encode_bot_description/1, encode_bot_short_description/1, encode_menu_button_commands/1, encode_menu_button_web_app/1, encode_menu_button_default/1, encode_chat_boost_source_premium/1, encode_chat_boost_source_gift_code/1, encode_chat_boost_source_giveaway/1, encode_business_bot_rights/1, encode_business_connection/1, encode_business_messages_deleted/1, encode_response_parameters/1, encode_input_media_photo/1, encode_input_media_video/1, encode_input_media_animation/1, encode_input_media_audio/1, encode_input_media_document/1, encode_input_paid_media_photo/1, encode_input_paid_media_video/1, encode_input_profile_photo_static/1, encode_input_profile_photo_animated/1, encode_input_story_content/1, encode_input_story_content_photo/1, encode_input_story_content_video/1, encode_mask_position/1, encode_sticker/1, encode_business_intro/1, encode_gift/1, encode_gifts/1, encode_unique_gift_model/1, encode_unique_gift_symbol/1, encode_unique_gift/1, encode_gift_info/1, encode_unique_gift_info/1, encode_owned_gift/1, encode_owned_gift_regular/1, encode_owned_gift_unique/1, encode_owned_gifts/1, encode_sticker_set/1, encode_inline_query/1, encode_inline_query_results_button/1, encode_input_text_message_content/1, encode_input_location_message_content/1, encode_input_venue_message_content/1, encode_input_contact_message_content/1, encode_chosen_inline_result/1, encode_sent_web_app_message/1, encode_prepared_inline_message/1, encode_labeled_price/1, encode_input_invoice_message_content/1, encode_invoice/1, encode_shipping_address/1, encode_order_info/1, encode_shipping_option/1, encode_successful_payment/1, encode_refunded_payment/1, encode_shipping_query/1, encode_pre_checkout_query/1, encode_paid_media_purchased/1, encode_revenue_withdrawal_state_pending/1, encode_revenue_withdrawal_state_succeeded/1, encode_revenue_withdrawal_state_failed/1, encode_affiliate_info/1, encode_transaction_partner_chat/1, encode_transaction_partner_affiliate_program/1, encode_transaction_partner_telegram_ads/1, encode_transaction_partner_telegram_api/1, encode_transaction_partner_other/1, encode_passport_file/1, encode_encrypted_passport_element/1, encode_encrypted_credentials/1, encode_passport_data/1, encode_passport_element_error_data_field/1, encode_passport_element_error_front_side/1, encode_passport_element_error_reverse_side/1, encode_passport_element_error_selfie/1, encode_passport_element_error_file/1, encode_passport_element_error_files/1, encode_passport_element_error_translation_file/1, encode_passport_element_error_translation_files/1, encode_passport_element_error_unspecified/1, encode_game/1, encode_callback_game/1, encode_inline_keyboard_button/1, encode_inline_keyboard_markup/1, encode_inline_query_result_game/1, encode_game_high_score/1, encode_message_origin/1, encode_paid_media/1, encode_paid_media_info/1, encode_external_reply_info/1, encode_transaction_partner_user/1, encode_background_fill/1, encode_background_type_fill/1, encode_background_type_pattern/1, encode_background_type/1, encode_chat_background/1, encode_chat_member/1, encode_chat_member_updated/1, encode_reaction_type/1, encode_story_area_type_suggested_reaction/1, encode_reaction_count/1, encode_message_reaction_updated/1, encode_message_reaction_count_updated/1, encode_bot_command_scope/1, encode_menu_button/1, encode_chat_boost_source/1, encode_chat_boost/1, encode_chat_boost_updated/1, encode_chat_boost_removed/1, encode_user_chat_boosts/1, encode_input_media/1, encode_input_profile_photo/1, encode_input_paid_media/1, encode_input_message_content/1, encode_inline_query_result_article/1, encode_inline_query_result_photo/1, encode_inline_query_result_gif/1, encode_inline_query_result_mpeg4_gif/1, encode_inline_query_result_video/1, encode_inline_query_result_audio/1, encode_inline_query_result_voice/1, encode_inline_query_result_document/1, encode_inline_query_result_location/1, encode_inline_query_result_venue/1, encode_inline_query_result_contact/1, encode_inline_query_result_cached_photo/1, encode_inline_query_result_cached_gif/1, encode_inline_query_result_cached_mpeg4_gif/1, encode_inline_query_result_cached_sticker/1, encode_inline_query_result_cached_document/1, encode_inline_query_result_cached_video/1, encode_inline_query_result_cached_voice/1, encode_inline_query_result_cached_audio/1, encode_inline_query_result/1, encode_revenue_withdrawal_state/1, encode_transaction_partner_fragment/1, encode_transaction_partner/1, encode_star_transaction/1, encode_star_transactions/1, encode_passport_element_error/1, encode_file_or_string/1, encode_input_sticker/1, encode_answer_callback_query_parameters/1, bot_command_scope_to_json/1, encode_bot_command_parameters/1, encode_edit_message_text_parameters/1, encode_forward_message_parameters/1, encode_forward_messages_parameters/1, encode_send_dice_parameters/1, encode_send_message_reply_markup_parameters/1, encode_send_message_parameters/1, encode_set_chat_menu_button_parameters/1, encode_set_webhook_parameters/1, encode_copy_message_parameters/1, encode_copy_messages_parameters/1, encode_send_photo_parameters/1, encode_send_audio_parameters/1, encode_send_document_parameters/1, encode_send_video_parameters/1, encode_send_animation_parameters/1, encode_send_voice_parameters/1, encode_send_video_note_parameters/1, encode_send_media_group_parameters/1, encode_send_location_parameters/1, encode_send_venue_parameters/1, encode_send_contact_parameters/1, encode_send_poll_parameters/1, encode_send_chat_action_parameters/1, encode_send_invoice_parameters/1, encode_create_invoice_link_parameters/1, encode_send_sticker_parameters/1, encode_get_sticker_set_parameters/1, encode_set_message_reaction_parameters/1, encode_get_user_profile_photos_parameters/1, encode_edit_message_caption_parameters/1, encode_edit_message_media_parameters/1, encode_edit_message_live_location_parameters/1, encode_stop_message_live_location_parameters/1, encode_edit_message_reply_markup_parameters/1, encode_stop_poll_parameters/1, encode_delete_message_parameters/1, encode_delete_messages_parameters/1, encode_ban_chat_member_parameters/1, encode_unban_chat_member_parameters/1, encode_restrict_chat_member_parameters/1, encode_promote_chat_member_parameters/1, encode_set_chat_administrator_custom_title_parameters/1, encode_ban_chat_sender_chat_parameters/1, encode_unban_chat_sender_chat_parameters/1, encode_set_chat_permissions_parameters/1, encode_export_chat_invite_link_parameters/1, encode_create_chat_invite_link_parameters/1, encode_edit_chat_invite_link_parameters/1, encode_create_chat_subscription_invite_link_parameters/1, encode_edit_chat_subscription_invite_link_parameters/1, encode_revoke_chat_invite_link_parameters/1, encode_approve_chat_join_request_parameters/1, encode_decline_chat_join_request_parameters/1, encode_set_chat_photo_parameters/1, encode_delete_chat_photo_parameters/1, encode_set_chat_title_parameters/1, encode_set_chat_description_parameters/1, encode_pin_chat_message_parameters/1, encode_unpin_chat_message_parameters/1, encode_unpin_all_chat_messages_parameters/1, encode_leave_chat_parameters/1, encode_get_chat_administrators_parameters/1, encode_get_chat_member_count_parameters/1, encode_get_chat_member_parameters/1, encode_set_chat_sticker_set_parameters/1, encode_delete_chat_sticker_set_parameters/1, encode_create_forum_topic_parameters/1, encode_edit_forum_topic_parameters/1, encode_close_forum_topic_parameters/1, encode_reopen_forum_topic_parameters/1, encode_delete_forum_topic_parameters/1, encode_unpin_all_forum_topic_messages_parameters/1, encode_unpin_all_general_forum_topic_pinned_messages_parameters/1, encode_edit_general_forum_topic_parameters/1, encode_close_general_forum_topic_parameters/1, encode_reopen_general_forum_topic_parameters/1, encode_hide_general_forum_topic_parameters/1, encode_unhide_general_forum_topic_parameters/1, encode_unpin_all_general_forum_topic_messages_parameters/1, encode_get_user_chat_boosts_parameters/1, encode_get_business_connection_parameters/1, encode_set_my_name_parameters/1, encode_get_my_name_parameters/1, encode_set_my_description_parameters/1, encode_get_my_description_parameters/1, encode_set_my_short_description_parameters/1, encode_get_my_short_description_parameters/1, encode_get_chat_menu_button_parameters/1, encode_set_my_default_administrator_rights_parameters/1, encode_get_my_default_administrator_rights_parameters/1, encode_send_gift_parameters/1, encode_gift_premium_subscription_parameters/1, encode_verify_user_parameters/1, encode_verify_chat_parameters/1, encode_remove_user_verification_parameters/1, encode_remove_chat_verification_parameters/1, encode_get_custom_emoji_stickers_parameters/1, encode_upload_sticker_file_parameters/1, encode_create_new_sticker_set_parameters/1, encode_add_sticker_to_set_parameters/1, encode_set_sticker_position_in_set_parameters/1, encode_delete_sticker_from_set_parameters/1, encode_replace_sticker_in_set_parameters/1, encode_set_sticker_emoji_list_parameters/1, encode_set_sticker_keywords_parameters/1, encode_set_sticker_mask_position_parameters/1, encode_set_sticker_set_title_parameters/1, encode_set_sticker_set_thumbnail_parameters/1, encode_set_custom_emoji_sticker_set_thumbnail_parameters/1, encode_delete_sticker_set_parameters/1, encode_answer_inline_query_parameters/1, encode_answer_shipping_query_parameters/1, encode_answer_pre_checkout_query_parameters/1, encode_get_star_transactions_parameters/1, encode_refund_star_payment_parameters/1, encode_edit_user_star_subscription_parameters/1, encode_send_game_parameters/1, encode_set_game_score_parameters/1, encode_get_game_high_scores_parameters/1, encode_read_business_message_parameters/1, encode_delete_business_messages_parameters/1, encode_set_business_account_name_parameters/1, encode_set_business_account_username_parameters/1, encode_set_business_account_bio_parameters/1, encode_set_business_account_profile_photo_parameters/1, encode_remove_business_account_profile_photo_parameters/1, encode_set_business_account_gift_settings_parameters/1, encode_get_business_account_star_balance_parameters/1, encode_transfer_business_account_stars_parameters/1, encode_get_business_account_gifts_parameters/1, encode_convert_gift_to_stars_parameters/1, encode_upgrade_gift_parameters/1, encode_transfer_gift_parameters/1, encode_post_story_parameters/1, encode_edit_story_parameters/1, encode_delete_story_parameters/1, encode_giveaway_completed/1, encode_message/1, encode_chat_full_info/1, encode_maybe_inaccessible_message/1, encode_callback_query/1, encode_update/1, giveaway_completed_decoder/0, message_decoder/0, chat_full_info_decoder/0, maybe_inaccessible_message_decoder/0, callback_query_decoder/0, update_decoder/0]). -export_type([maybe_inaccessible_message/0, message_origin/0, paid_media/0, background_fill/0, background_type/0, chat_member/0, reaction_type/0, bot_command_scope/0, menu_button/0, chat_boost_source/0, input_media/0, input_paid_media/0, input_profile_photo/0, inline_query_result/0, input_message_content/0, revenue_withdrawal_state/0, transaction_partner/0, passport_element_error/0, update/0, webhook_info/0, user/0, chat/0, chat_full_info/0, message/0, message_id/0, inaccessible_message/0, message_entity/0, text_quote/0, external_reply_info/0, reply_parameters/0, message_origin_user/0, message_origin_hidden_user/0, message_origin_chat/0, message_origin_channel/0, photo_size/0, animation/0, audio/0, document/0, story/0, video/0, video_note/0, voice/0, paid_media_info/0, paid_media_preview/0, paid_media_photo/0, paid_media_video/0, contact/0, dice/0, poll_option/0, input_poll_option/0, poll_answer/0, poll/0, location/0, venue/0, web_app_data/0, proximity_alert_triggered/0, message_auto_delete_timer_changed/0, chat_boost_added/0, background_fill_solid/0, background_fill_gradient/0, background_fill_freeform_gradient/0, background_type_fill/0, background_type_wallpaper/0, background_type_pattern/0, background_type_chat_theme/0, chat_background/0, forum_topic_created/0, forum_topic_closed/0, forum_topic_edited/0, forum_topic_reopened/0, general_forum_topic_hidden/0, general_forum_topic_unhidden/0, shared_user/0, users_shared/0, chat_shared/0, write_access_allowed/0, video_chat_scheduled/0, video_chat_started/0, video_chat_ended/0, video_chat_participants_invited/0, giveaway_created/0, giveaway/0, giveaway_winners/0, giveaway_completed/0, link_preview_options/0, user_profile_photos/0, file/0, web_app_info/0, reply_keyboard_markup/0, keyboard_button/0, keyboard_button_request_users/0, keyboard_button_request_chat/0, keyboard_button_poll_type/0, reply_keyboard_remove/0, inline_keyboard_markup/0, inline_keyboard_button/0, login_url/0, switch_inline_query_chosen_chat/0, copy_text_button/0, callback_query/0, force_reply/0, chat_photo/0, chat_invite_link/0, chat_administrator_rights/0, chat_member_updated/0, chat_member_owner/0, chat_member_administrator/0, chat_member_member/0, chat_member_restricted/0, chat_member_left/0, chat_member_banned/0, chat_join_request/0, chat_permissions/0, birthdate/0, business_intro/0, business_location/0, business_opening_hours_interval/0, business_opening_hours/0, story_area_position/0, location_address/0, story_area_type/0, story_area_type_location/0, story_area_type_suggested_reaction/0, story_area_type_link/0, story_area_type_weather/0, story_area_type_unique_gift/0, story_area/0, chat_location/0, reaction_type_emoji/0, reaction_type_custom_emoji/0, reaction_type_paid/0, reaction_count/0, message_reaction_updated/0, message_reaction_count_updated/0, forum_topic/0, unique_gift_model/0, unique_gift_symbol/0, unique_gift_backdrop_colors/0, unique_gift_backdrop/0, unique_gift/0, gift_info/0, unique_gift_info/0, owned_gift/0, owned_gift_regular/0, owned_gift_unique/0, owned_gifts/0, accepted_gift_types/0, star_amount/0, bot_command/0, bot_command_scope_default/0, bot_command_scope_all_private_chats/0, bot_command_scope_all_group_chats/0, bot_command_scope_all_chat_administrators/0, bot_command_scope_chat/0, bot_command_scope_chat_administrators/0, bot_command_scope_chat_member/0, bot_name/0, bot_description/0, bot_short_description/0, menu_button_commands/0, menu_button_web_app/0, menu_button_default/0, chat_boost_source_premium/0, chat_boost_source_gift_code/0, chat_boost_source_giveaway/0, chat_boost/0, chat_boost_updated/0, chat_boost_removed/0, user_chat_boosts/0, business_bot_rights/0, business_connection/0, business_messages_deleted/0, response_parameters/0, input_media_photo/0, input_media_video/0, input_media_animation/0, input_media_audio/0, input_media_document/0, input_paid_media_photo/0, input_paid_media_video/0, input_profile_photo_static/0, input_profile_photo_animated/0, input_story_content/0, input_story_content_photo/0, input_story_content_video/0, sticker/0, sticker_set/0, mask_position/0, input_sticker/0, gift/0, gifts/0, inline_query/0, inline_query_results_button/0, inline_query_result_article/0, inline_query_result_photo/0, inline_query_result_gif/0, inline_query_result_mpeg4_gif/0, inline_query_result_video/0, inline_query_result_audio/0, inline_query_result_voice/0, inline_query_result_document/0, inline_query_result_location/0, inline_query_result_venue/0, inline_query_result_contact/0, inline_query_result_game/0, inline_query_result_cached_photo/0, inline_query_result_cached_gif/0, inline_query_result_cached_mpeg4_gif/0, inline_query_result_cached_sticker/0, inline_query_result_cached_document/0, inline_query_result_cached_video/0, inline_query_result_cached_voice/0, inline_query_result_cached_audio/0, input_text_message_content/0, input_location_message_content/0, input_venue_message_content/0, input_contact_message_content/0, input_invoice_message_content/0, chosen_inline_result/0, sent_web_app_message/0, prepared_inline_message/0, labeled_price/0, invoice/0, shipping_address/0, order_info/0, shipping_option/0, successful_payment/0, refunded_payment/0, shipping_query/0, pre_checkout_query/0, paid_media_purchased/0, revenue_withdrawal_state_pending/0, revenue_withdrawal_state_succeeded/0, revenue_withdrawal_state_failed/0, affiliate_info/0, transaction_partner_user/0, transaction_partner_chat/0, transaction_partner_affiliate_program/0, transaction_partner_fragment/0, transaction_partner_telegram_ads/0, transaction_partner_telegram_api/0, transaction_partner_other/0, star_transaction/0, star_transactions/0, passport_data/0, passport_file/0, encrypted_passport_element/0, encrypted_credentials/0, passport_element_error_data_field/0, passport_element_error_front_side/0, passport_element_error_reverse_side/0, passport_element_error_selfie/0, passport_element_error_file/0, passport_element_error_files/0, passport_element_error_translation_file/0, passport_element_error_translation_files/0, passport_element_error_unspecified/0, game/0, callback_game/0, game_high_score/0, file_or_string/0, answer_callback_query_parameters/0, bot_command_parameters/0, edit_message_text_parameters/0, forward_message_parameters/0, forward_messages_parameters/0, send_dice_parameters/0, send_message_reply_markup_parameters/0, send_message_parameters/0, set_chat_menu_button_parameters/0, set_webhook_parameters/0, get_updates_parameters/0, copy_message_parameters/0, copy_messages_parameters/0, send_photo_parameters/0, send_audio_parameters/0, send_document_parameters/0, send_video_parameters/0, send_animation_parameters/0, send_voice_parameters/0, send_video_note_parameters/0, send_media_group_parameters/0, send_location_parameters/0, send_venue_parameters/0, send_contact_parameters/0, send_poll_parameters/0, chat_action/0, send_chat_action_parameters/0, send_invoice_parameters/0, create_invoice_link_parameters/0, send_sticker_parameters/0, get_sticker_set_parameters/0, set_message_reaction_parameters/0, get_user_profile_photos_parameters/0, edit_message_caption_parameters/0, edit_message_media_parameters/0, edit_message_live_location_parameters/0, stop_message_live_location_parameters/0, edit_message_reply_markup_parameters/0, stop_poll_parameters/0, delete_message_parameters/0, delete_messages_parameters/0, ban_chat_member_parameters/0, unban_chat_member_parameters/0, restrict_chat_member_parameters/0, promote_chat_member_parameters/0, set_chat_administrator_custom_title_parameters/0, ban_chat_sender_chat_parameters/0, unban_chat_sender_chat_parameters/0, set_chat_permissions_parameters/0, export_chat_invite_link_parameters/0, create_chat_invite_link_parameters/0, edit_chat_invite_link_parameters/0, create_chat_subscription_invite_link_parameters/0, edit_chat_subscription_invite_link_parameters/0, revoke_chat_invite_link_parameters/0, approve_chat_join_request_parameters/0, decline_chat_join_request_parameters/0, set_chat_photo_parameters/0, delete_chat_photo_parameters/0, set_chat_title_parameters/0, set_chat_description_parameters/0, pin_chat_message_parameters/0, unpin_chat_message_parameters/0, unpin_all_chat_messages_parameters/0, leave_chat_parameters/0, get_chat_administrators_parameters/0, get_chat_member_count_parameters/0, get_chat_member_parameters/0, set_chat_sticker_set_parameters/0, delete_chat_sticker_set_parameters/0, create_forum_topic_parameters/0, edit_forum_topic_parameters/0, close_forum_topic_parameters/0, reopen_forum_topic_parameters/0, delete_forum_topic_parameters/0, unpin_all_forum_topic_messages_parameters/0, unpin_all_general_forum_topic_pinned_messages_parameters/0, edit_general_forum_topic_parameters/0, close_general_forum_topic_parameters/0, reopen_general_forum_topic_parameters/0, hide_general_forum_topic_parameters/0, unhide_general_forum_topic_parameters/0, unpin_all_general_forum_topic_messages_parameters/0, get_user_chat_boosts_parameters/0, get_business_connection_parameters/0, set_my_name_parameters/0, get_my_name_parameters/0, set_my_description_parameters/0, get_my_description_parameters/0, set_my_short_description_parameters/0, get_my_short_description_parameters/0, get_chat_menu_button_parameters/0, set_my_default_administrator_rights_parameters/0, get_my_default_administrator_rights_parameters/0, send_gift_parameters/0, gift_premium_subscription_parameters/0, verify_user_parameters/0, verify_chat_parameters/0, remove_user_verification_parameters/0, remove_chat_verification_parameters/0, get_custom_emoji_stickers_parameters/0, upload_sticker_file_parameters/0, create_new_sticker_set_parameters/0, add_sticker_to_set_parameters/0, set_sticker_position_in_set_parameters/0, delete_sticker_from_set_parameters/0, replace_sticker_in_set_parameters/0, set_sticker_emoji_list_parameters/0, set_sticker_keywords_parameters/0, set_sticker_mask_position_parameters/0, set_sticker_set_title_parameters/0, set_sticker_set_thumbnail_parameters/0, set_custom_emoji_sticker_set_thumbnail_parameters/0, delete_sticker_set_parameters/0, answer_inline_query_parameters/0, answer_shipping_query_parameters/0, answer_pre_checkout_query_parameters/0, get_star_transactions_parameters/0, refund_star_payment_parameters/0, edit_user_star_subscription_parameters/0, send_game_parameters/0, set_game_score_parameters/0, get_game_high_scores_parameters/0, read_business_message_parameters/0, delete_business_messages_parameters/0, set_business_account_name_parameters/0, set_business_account_username_parameters/0, set_business_account_bio_parameters/0, set_business_account_profile_photo_parameters/0, remove_business_account_profile_photo_parameters/0, set_business_account_gift_settings_parameters/0, get_business_account_star_balance_parameters/0, transfer_business_account_stars_parameters/0, get_business_account_gifts_parameters/0, convert_gift_to_stars_parameters/0, upgrade_gift_parameters/0, transfer_gift_parameters/0, post_story_parameters/0, edit_story_parameters/0, delete_story_parameters/0, int_or_string/0]). -type maybe_inaccessible_message() :: {message_maybe_inaccessible_message, message()} | {inaccessible_message_maybe_inaccessible_message, inaccessible_message()}. -type message_origin() :: {message_origin_user_message_origin, message_origin_user()} | {message_origin_hidden_user_message_origin, message_origin_hidden_user()} | {message_origin_chat_message_origin, message_origin_chat()} | {message_origin_channel_message_origin, message_origin_channel()}. -type paid_media() :: {paid_media_preview_paid_media, paid_media_preview()} | {paid_media_photo_paid_media, paid_media_photo()} | {paid_media_video_paid_media, paid_media_video()}. -type background_fill() :: {background_fill_solid_background_fill, background_fill_solid()} | {background_fill_gradient_background_fill, background_fill_gradient()} | {background_fill_freeform_gradient_background_fill, background_fill_freeform_gradient()}. -type background_type() :: {background_type_fill_background_type, background_type_fill()} | {background_type_wallpaper_background_type, background_type_wallpaper()} | {background_type_pattern_background_type, background_type_pattern()} | {background_type_chat_theme_background_type, background_type_chat_theme()}. -type chat_member() :: {chat_member_owner_chat_member, chat_member_owner()} | {chat_member_administrator_chat_member, chat_member_administrator()} | {chat_member_member_chat_member, chat_member_member()} | {chat_member_restricted_chat_member, chat_member_restricted()} | {chat_member_left_chat_member, chat_member_left()} | {chat_member_banned_chat_member, chat_member_banned()}. -type reaction_type() :: {reaction_type_emoji_reaction_type, reaction_type_emoji()} | {reaction_type_custom_emoji_reaction_type, reaction_type_custom_emoji()} | {reaction_type_paid_reaction_type, reaction_type_paid()}. -type bot_command_scope() :: {bot_command_scope_default_bot_command_scope, bot_command_scope_default()} | {bot_command_scope_all_private_chats_bot_command_scope, bot_command_scope_all_private_chats()} | {bot_command_scope_all_group_chats_bot_command_scope, bot_command_scope_all_group_chats()} | {bot_command_scope_all_chat_administrators_bot_command_scope, bot_command_scope_all_chat_administrators()} | {bot_command_scope_chat_bot_command_scope, bot_command_scope_chat()} | {bot_command_scope_chat_administrators_bot_command_scope, bot_command_scope_chat_administrators()} | {bot_command_scope_chat_member_bot_command_scope, bot_command_scope_chat_member()}. -type menu_button() :: {menu_button_commands_menu_button, menu_button_commands()} | {menu_button_web_app_menu_button, menu_button_web_app()} | {menu_button_default_menu_button, menu_button_default()}. -type chat_boost_source() :: {chat_boost_source_premium_chat_boost_source, chat_boost_source_premium()} | {chat_boost_source_gift_code_chat_boost_source, chat_boost_source_gift_code()} | {chat_boost_source_giveaway_chat_boost_source, chat_boost_source_giveaway()}. -type input_media() :: {input_media_animation_input_media, input_media_animation()} | {input_media_document_input_media, input_media_document()} | {input_media_audio_input_media, input_media_audio()} | {input_media_photo_input_media, input_media_photo()} | {input_media_video_input_media, input_media_video()}. -type input_paid_media() :: {input_paid_media_photo_input_paid_media, input_paid_media_photo()} | {input_paid_media_video_input_paid_media, input_paid_media_video()}. -type input_profile_photo() :: {input_profile_photo_static_input_profile_photo, input_profile_photo_static()} | {input_profile_photo_animated_input_profile_photo, input_profile_photo_animated()}. -type inline_query_result() :: {inline_query_result_cached_audio_inline_query_result, inline_query_result_cached_audio()} | {inline_query_result_cached_document_inline_query_result, inline_query_result_cached_document()} | {inline_query_result_cached_gif_inline_query_result, inline_query_result_cached_gif()} | {inline_query_result_cached_mpeg4_gif_inline_query_result, inline_query_result_cached_mpeg4_gif()} | {inline_query_result_cached_photo_inline_query_result, inline_query_result_cached_photo()} | {inline_query_result_cached_sticker_inline_query_result, inline_query_result_cached_sticker()} | {inline_query_result_cached_video_inline_query_result, inline_query_result_cached_video()} | {inline_query_result_cached_voice_inline_query_result, inline_query_result_cached_voice()} | {inline_query_result_article_inline_query_result, inline_query_result_article()} | {inline_query_result_audio_inline_query_result, inline_query_result_audio()} | {inline_query_result_contact_inline_query_result, inline_query_result_contact()} | {inline_query_result_game_inline_query_result, inline_query_result_game()} | {inline_query_result_document_inline_query_result, inline_query_result_document()} | {inline_query_result_gif_inline_query_result, inline_query_result_gif()} | {inline_query_result_location_inline_query_result, inline_query_result_location()} | {inline_query_result_mpeg4_gif_inline_query_result, inline_query_result_mpeg4_gif()} | {inline_query_result_photo_inline_query_result, inline_query_result_photo()} | {inline_query_result_venue_inline_query_result, inline_query_result_venue()} | {inline_query_result_video_inline_query_result, inline_query_result_video()} | {inline_query_result_voice_inline_query_result, inline_query_result_voice()}. -type input_message_content() :: {input_text_message_content_input_message_content, input_text_message_content()} | {input_location_message_content_input_message_content, input_location_message_content()} | {input_venue_message_content_input_message_content, input_venue_message_content()} | {input_contact_message_content_input_message_content, input_contact_message_content()} | {input_invoice_message_content_input_message_content, input_invoice_message_content()}. -type revenue_withdrawal_state() :: {revenue_withdrawal_state_pending_revenue_withdrawal_state, revenue_withdrawal_state_pending()} | {revenue_withdrawal_state_succeeded_revenue_withdrawal_state, revenue_withdrawal_state_succeeded()} | {revenue_withdrawal_state_failed_revenue_withdrawal_state, revenue_withdrawal_state_failed()}. -type transaction_partner() :: {transaction_partner_user_transaction_partner, transaction_partner_user()} | {transaction_partner_chat_transaction_partner, transaction_partner_chat()} | {transaction_partner_affiliate_program_transaction_partner, transaction_partner_affiliate_program()} | {transaction_partner_fragment_transaction_partner, transaction_partner_fragment()} | {transaction_partner_telegram_ads_transaction_partner, transaction_partner_telegram_ads()} | {transaction_partner_telegram_api_transaction_partner, transaction_partner_telegram_api()} | {transaction_partner_other_transaction_partner, transaction_partner_other()}. -type passport_element_error() :: {passport_element_error_data_field_passport_element_error, passport_element_error_data_field()} | {passport_element_error_front_side_passport_element_error, passport_element_error_front_side()} | {passport_element_error_reverse_side_passport_element_error, passport_element_error_reverse_side()} | {passport_element_error_selfie_passport_element_error, passport_element_error_selfie()} | {passport_element_error_file_passport_element_error, passport_element_error_file()} | {passport_element_error_files_passport_element_error, passport_element_error_files()} | {passport_element_error_translation_file_passport_element_error, passport_element_error_translation_file()} | {passport_element_error_translation_files_passport_element_error, passport_element_error_translation_files()} | {passport_element_error_unspecified_passport_element_error, passport_element_error_unspecified()}. -type update() :: {update, integer(), gleam@option:option(message()), gleam@option:option(message()), gleam@option:option(message()), gleam@option:option(message()), gleam@option:option(business_connection()), gleam@option:option(message()), gleam@option:option(message()), gleam@option:option(business_messages_deleted()), gleam@option:option(message_reaction_updated()), gleam@option:option(message_reaction_count_updated()), gleam@option:option(inline_query()), gleam@option:option(chosen_inline_result()), gleam@option:option(callback_query()), gleam@option:option(shipping_query()), gleam@option:option(pre_checkout_query()), gleam@option:option(paid_media_purchased()), gleam@option:option(poll()), gleam@option:option(poll_answer()), gleam@option:option(chat_member_updated()), gleam@option:option(chat_member_updated()), gleam@option:option(chat_join_request()), gleam@option:option(chat_boost_updated()), gleam@option:option(chat_boost_removed())}. -type webhook_info() :: {webhook_info, binary(), boolean(), integer(), gleam@option:option(binary()), gleam@option:option(integer()), gleam@option:option(binary()), gleam@option:option(integer()), gleam@option:option(integer()), gleam@option:option(list(binary()))}. -type user() :: {user, integer(), boolean(), binary(), gleam@option:option(binary()), gleam@option:option(binary()), gleam@option:option(binary()), gleam@option:option(boolean()), gleam@option:option(boolean()), gleam@option:option(boolean()), gleam@option:option(boolean()), gleam@option:option(boolean()), gleam@option:option(boolean()), gleam@option:option(boolean())}. -type chat() :: {chat, integer(), gleam@option:option(binary()), gleam@option:option(binary()), gleam@option:option(binary()), gleam@option:option(binary()), gleam@option:option(binary()), gleam@option:option(boolean())}. -type chat_full_info() :: {chat_full_info, integer(), binary(), gleam@option:option(binary()), gleam@option:option(binary()), gleam@option:option(binary()), gleam@option:option(binary()), gleam@option:option(boolean()), integer(), integer(), gleam@option:option(chat_photo()), gleam@option:option(list(binary())), gleam@option:option(birthdate()), gleam@option:option(business_intro()), gleam@option:option(business_location()), gleam@option:option(business_opening_hours()), gleam@option:option(chat()), gleam@option:option(list(reaction_type())), gleam@option:option(binary()), gleam@option:option(integer()), gleam@option:option(binary()), gleam@option:option(binary()), gleam@option:option(integer()), gleam@option:option(binary()), gleam@option:option(boolean()), gleam@option:option(boolean()), gleam@option:option(boolean()), gleam@option:option(boolean()), gleam@option:option(binary()), gleam@option:option(binary()), gleam@option:option(message()), gleam@option:option(chat_permissions()), gleam@option:option(boolean()), gleam@option:option(boolean()), gleam@option:option(integer()), gleam@option:option(integer()), gleam@option:option(integer()), gleam@option:option(boolean()), gleam@option:option(boolean()), gleam@option:option(boolean()), gleam@option:option(boolean()), gleam@option:option(binary()), gleam@option:option(boolean()), gleam@option:option(binary()), gleam@option:option(integer()), gleam@option:option(chat_location())}. -type message() :: {message, integer(), gleam@option:option(integer()), gleam@option:option(user()), gleam@option:option(chat()), gleam@option:option(integer()), gleam@option:option(user()), integer(), gleam@option:option(binary()), chat(), gleam@option:option(message_origin()), gleam@option:option(boolean()), gleam@option:option(boolean()), gleam@option:option(message()), gleam@option:option(external_reply_info()), gleam@option:option(text_quote()), gleam@option:option(story()), gleam@option:option(user()), gleam@option:option(integer()), gleam@option:option(boolean()), gleam@option:option(boolean()), gleam@option:option(binary()), gleam@option:option(binary()), gleam@option:option(binary()), gleam@option:option(list(message_entity())), gleam@option:option(link_preview_options()), gleam@option:option(binary()), gleam@option:option(animation()), gleam@option:option(audio()), gleam@option:option(document()), gleam@option:option(paid_media_info()), gleam@option:option(list(photo_size())), gleam@option:option(sticker()), gleam@option:option(story()), gleam@option:option(video()), gleam@option:option(video_note()), gleam@option:option(voice()), gleam@option:option(binary()), gleam@option:option(list(message_entity())), gleam@option:option(boolean()), gleam@option:option(boolean()), gleam@option:option(contact()), gleam@option:option(dice()), gleam@option:option(game()), gleam@option:option(poll()), gleam@option:option(venue()), gleam@option:option(location()), gleam@option:option(list(user())), gleam@option:option(user()), gleam@option:option(binary()), gleam@option:option(list(photo_size())), gleam@option:option(boolean()), gleam@option:option(boolean()), gleam@option:option(boolean()), gleam@option:option(boolean()), gleam@option:option(message_auto_delete_timer_changed()), gleam@option:option(integer()), gleam@option:option(integer()), gleam@option:option(maybe_inaccessible_message()), gleam@option:option(invoice()), gleam@option:option(successful_payment()), gleam@option:option(refunded_payment()), gleam@option:option(users_shared()), gleam@option:option(chat_shared()), gleam@option:option(binary()), gleam@option:option(write_access_allowed()), gleam@option:option(passport_data()), gleam@option:option(proximity_alert_triggered()), gleam@option:option(chat_boost_added()), gleam@option:option(chat_background()), gleam@option:option(forum_topic_created()), gleam@option:option(forum_topic_edited()), gleam@option:option(forum_topic_closed()), gleam@option:option(forum_topic_reopened()), gleam@option:option(general_forum_topic_hidden()), gleam@option:option(general_forum_topic_unhidden()), gleam@option:option(giveaway_created()), gleam@option:option(giveaway()), gleam@option:option(giveaway_winners()), gleam@option:option(giveaway_completed()), gleam@option:option(video_chat_scheduled()), gleam@option:option(video_chat_started()), gleam@option:option(video_chat_ended()), gleam@option:option(video_chat_participants_invited()), gleam@option:option(web_app_data()), gleam@option:option(inline_keyboard_markup())}. -type message_id() :: {message_id, integer()}. -type inaccessible_message() :: {inaccessible_message, chat(), integer(), integer()}. -type message_entity() :: {message_entity, binary(), integer(), integer(), gleam@option:option(binary()), gleam@option:option(user()), gleam@option:option(binary()), gleam@option:option(binary())}. -type text_quote() :: {text_quote, binary(), gleam@option:option(list(message_entity())), integer(), gleam@option:option(boolean())}. -type external_reply_info() :: {external_reply_info, message_origin(), gleam@option:option(chat()), gleam@option:option(integer()), gleam@option:option(link_preview_options()), gleam@option:option(animation()), gleam@option:option(audio()), gleam@option:option(document()), gleam@option:option(paid_media_info()), gleam@option:option(list(photo_size())), gleam@option:option(sticker()), gleam@option:option(story()), gleam@option:option(video()), gleam@option:option(video_note()), gleam@option:option(voice()), gleam@option:option(boolean()), gleam@option:option(contact()), gleam@option:option(dice()), gleam@option:option(game()), gleam@option:option(giveaway()), gleam@option:option(giveaway_winners()), gleam@option:option(invoice()), gleam@option:option(location()), gleam@option:option(poll()), gleam@option:option(venue())}. -type reply_parameters() :: {reply_parameters, integer(), gleam@option:option(int_or_string()), gleam@option:option(boolean()), gleam@option:option(binary()), gleam@option:option(binary()), gleam@option:option(list(message_entity())), gleam@option:option(integer())}. -type message_origin_user() :: {message_origin_user, binary(), integer(), user()}. -type message_origin_hidden_user() :: {message_origin_hidden_user, binary(), integer(), binary()}. -type message_origin_chat() :: {message_origin_chat, binary(), integer(), chat(), gleam@option:option(binary())}. -type message_origin_channel() :: {message_origin_channel, binary(), integer(), chat(), integer(), gleam@option:option(binary())}. -type photo_size() :: {photo_size, binary(), binary(), integer(), integer(), gleam@option:option(integer())}. -type animation() :: {animation, binary(), binary(), integer(), integer(), integer(), gleam@option:option(photo_size()), gleam@option:option(binary()), gleam@option:option(binary()), gleam@option:option(integer())}. -type audio() :: {audio, binary(), binary(), integer(), gleam@option:option(binary()), gleam@option:option(binary()), gleam@option:option(binary()), gleam@option:option(binary()), gleam@option:option(integer()), gleam@option:option(photo_size())}. -type document() :: {document, binary(), binary(), gleam@option:option(photo_size()), gleam@option:option(binary()), gleam@option:option(binary()), gleam@option:option(integer())}. -type story() :: {story, chat(), integer()}. -type video() :: {video, binary(), binary(), integer(), integer(), integer(), gleam@option:option(photo_size()), gleam@option:option(list(photo_size())), gleam@option:option(integer()), gleam@option:option(binary()), gleam@option:option(binary()), gleam@option:option(integer())}. -type video_note() :: {video_note, binary(), binary(), integer(), integer(), gleam@option:option(photo_size()), gleam@option:option(integer())}. -type voice() :: {voice, binary(), binary(), integer(), gleam@option:option(binary()), gleam@option:option(integer())}. -type paid_media_info() :: {paid_media_info, integer(), list(paid_media())}. -type paid_media_preview() :: {paid_media_preview, binary(), gleam@option:option(integer()), gleam@option:option(integer()), gleam@option:option(integer())}. -type paid_media_photo() :: {paid_media_photo, binary(), list(photo_size())}. -type paid_media_video() :: {paid_media_video, binary(), video()}. -type contact() :: {contact, binary(), binary(), gleam@option:option(binary()), gleam@option:option(integer()), gleam@option:option(binary())}. -type dice() :: {dice, binary(), integer()}. -type poll_option() :: {poll_option, binary(), gleam@option:option(list(message_entity())), integer()}. -type input_poll_option() :: {input_poll_option, binary(), gleam@option:option(binary()), gleam@option:option(list(message_entity()))}. -type poll_answer() :: {poll_answer, binary(), gleam@option:option(chat()), gleam@option:option(user()), list(integer())}. -type poll() :: {poll, binary(), binary(), gleam@option:option(list(message_entity())), list(poll_option()), integer(), boolean(), boolean(), binary(), boolean(), gleam@option:option(integer()), gleam@option:option(binary()), gleam@option:option(list(message_entity())), gleam@option:option(integer()), gleam@option:option(integer())}. -type location() :: {location, float(), float(), gleam@option:option(float()), gleam@option:option(integer()), gleam@option:option(integer()), gleam@option:option(integer())}. -type venue() :: {venue, location(), binary(), binary(), gleam@option:option(binary()), gleam@option:option(binary()), gleam@option:option(binary()), gleam@option:option(binary())}. -type web_app_data() :: {web_app_data, binary(), binary()}. -type proximity_alert_triggered() :: {proximity_alert_triggered, user(), user(), integer()}. -type message_auto_delete_timer_changed() :: {message_auto_delete_timer_changed, integer()}. -type chat_boost_added() :: {chat_boost_added, integer()}. -type background_fill_solid() :: {background_fill_solid, binary(), integer()}. -type background_fill_gradient() :: {background_fill_gradient, binary(), integer(), integer(), integer()}. -type background_fill_freeform_gradient() :: {background_fill_freeform_gradient, binary(), list(integer())}. -type background_type_fill() :: {background_type_fill, binary(), background_fill(), integer()}. -type background_type_wallpaper() :: {background_type_wallpaper, binary(), document(), integer(), gleam@option:option(boolean()), gleam@option:option(boolean())}. -type background_type_pattern() :: {background_type_pattern, binary(), document(), background_fill(), integer(), gleam@option:option(boolean()), gleam@option:option(boolean())}. -type background_type_chat_theme() :: {background_type_chat_theme, binary(), binary()}. -type chat_background() :: {chat_background, background_type()}. -type forum_topic_created() :: {forum_topic_created, binary(), integer(), gleam@option:option(binary())}. -type forum_topic_closed() :: forum_topic_closed. -type forum_topic_edited() :: {forum_topic_edited, gleam@option:option(binary()), gleam@option:option(binary())}. -type forum_topic_reopened() :: forum_topic_reopened. -type general_forum_topic_hidden() :: general_forum_topic_hidden. -type general_forum_topic_unhidden() :: general_forum_topic_unhidden. -type shared_user() :: {shared_user, integer(), gleam@option:option(binary()), gleam@option:option(binary()), gleam@option:option(binary()), gleam@option:option(list(photo_size()))}. -type users_shared() :: {users_shared, integer(), list(shared_user())}. -type chat_shared() :: {chat_shared, integer(), integer(), gleam@option:option(binary()), gleam@option:option(binary()), gleam@option:option(list(photo_size()))}. -type write_access_allowed() :: {write_access_allowed, gleam@option:option(boolean()), gleam@option:option(binary()), gleam@option:option(boolean())}. -type video_chat_scheduled() :: {video_chat_scheduled, integer()}. -type video_chat_started() :: video_chat_started. -type video_chat_ended() :: {video_chat_ended, integer()}. -type video_chat_participants_invited() :: {video_chat_participants_invited, list(user())}. -type giveaway_created() :: {giveaway_created, gleam@option:option(integer())}. -type giveaway() :: {giveaway, list(chat()), integer(), integer(), gleam@option:option(boolean()), gleam@option:option(boolean()), gleam@option:option(binary()), gleam@option:option(list(binary())), gleam@option:option(integer()), gleam@option:option(integer())}. -type giveaway_winners() :: {giveaway_winners, chat(), integer(), integer(), integer(), list(user()), gleam@option:option(integer()), gleam@option:option(integer()), gleam@option:option(integer()), gleam@option:option(integer()), gleam@option:option(boolean()), gleam@option:option(boolean()), gleam@option:option(binary())}. -type giveaway_completed() :: {giveaway_completed, integer(), gleam@option:option(integer()), gleam@option:option(message()), gleam@option:option(boolean())}. -type link_preview_options() :: {link_preview_options, gleam@option:option(boolean()), gleam@option:option(binary()), gleam@option:option(boolean()), gleam@option:option(boolean()), gleam@option:option(boolean())}. -type user_profile_photos() :: {user_profile_photos, integer(), list(list(photo_size()))}. -type file() :: {file, binary(), binary(), gleam@option:option(integer()), gleam@option:option(binary())}. -type web_app_info() :: {web_app_info, binary()}. -type reply_keyboard_markup() :: {reply_keyboard_markup, list(list(keyboard_button())), gleam@option:option(boolean()), gleam@option:option(boolean()), gleam@option:option(boolean()), gleam@option:option(binary()), gleam@option:option(boolean())}. -type keyboard_button() :: {keyboard_button, binary(), gleam@option:option(keyboard_button_request_users()), gleam@option:option(keyboard_button_request_chat()), gleam@option:option(boolean()), gleam@option:option(boolean()), gleam@option:option(keyboard_button_poll_type()), gleam@option:option(web_app_info())}. -type keyboard_button_request_users() :: {keyboard_button_request_users, integer(), gleam@option:option(boolean()), gleam@option:option(boolean()), gleam@option:option(integer()), gleam@option:option(boolean()), gleam@option:option(boolean()), gleam@option:option(boolean())}. -type keyboard_button_request_chat() :: {keyboard_button_request_chat, integer(), boolean(), gleam@option:option(boolean()), gleam@option:option(boolean()), gleam@option:option(boolean()), gleam@option:option(chat_administrator_rights()), gleam@option:option(chat_administrator_rights()), gleam@option:option(boolean()), gleam@option:option(boolean()), gleam@option:option(boolean()), gleam@option:option(boolean())}. -type keyboard_button_poll_type() :: {keyboard_button_poll_type, gleam@option:option(binary())}. -type reply_keyboard_remove() :: {reply_keyboard_remove, boolean(), gleam@option:option(boolean())}. -type inline_keyboard_markup() :: {inline_keyboard_markup, list(list(inline_keyboard_button()))}. -type inline_keyboard_button() :: {inline_keyboard_button, binary(), gleam@option:option(binary()), gleam@option:option(binary()), gleam@option:option(web_app_info()), gleam@option:option(login_url()), gleam@option:option(binary()), gleam@option:option(binary()), gleam@option:option(switch_inline_query_chosen_chat()), gleam@option:option(copy_text_button()), gleam@option:option(callback_game()), gleam@option:option(boolean())}. -type login_url() :: {login_url, binary(), gleam@option:option(binary()), gleam@option:option(binary()), gleam@option:option(boolean())}. -type switch_inline_query_chosen_chat() :: {switch_inline_query_chosen_chat, gleam@option:option(binary()), gleam@option:option(boolean()), gleam@option:option(boolean()), gleam@option:option(boolean()), gleam@option:option(boolean())}. -type copy_text_button() :: {copy_text_button, binary()}. -type callback_query() :: {callback_query, binary(), user(), gleam@option:option(maybe_inaccessible_message()), gleam@option:option(binary()), binary(), gleam@option:option(binary()), gleam@option:option(binary())}. -type force_reply() :: {force_reply, boolean(), gleam@option:option(binary()), gleam@option:option(boolean())}. -type chat_photo() :: {chat_photo, binary(), binary(), binary(), binary()}. -type chat_invite_link() :: {chat_invite_link, binary(), user(), boolean(), boolean(), boolean(), gleam@option:option(binary()), gleam@option:option(integer()), gleam@option:option(integer()), gleam@option:option(integer()), gleam@option:option(integer()), gleam@option:option(integer())}. -type chat_administrator_rights() :: {chat_administrator_rights, boolean(), boolean(), boolean(), boolean(), boolean(), boolean(), boolean(), boolean(), boolean(), boolean(), boolean(), gleam@option:option(boolean()), gleam@option:option(boolean()), gleam@option:option(boolean()), gleam@option:option(boolean())}. -type chat_member_updated() :: {chat_member_updated, chat(), user(), integer(), chat_member(), chat_member(), gleam@option:option(chat_invite_link()), gleam@option:option(boolean()), gleam@option:option(boolean())}. -type chat_member_owner() :: {chat_member_owner, binary(), user(), boolean(), gleam@option:option(binary())}. -type chat_member_administrator() :: {chat_member_administrator, binary(), user(), boolean(), boolean(), boolean(), boolean(), boolean(), boolean(), boolean(), boolean(), boolean(), boolean(), boolean(), boolean(), gleam@option:option(boolean()), gleam@option:option(boolean()), gleam@option:option(boolean()), gleam@option:option(boolean()), gleam@option:option(binary())}. -type chat_member_member() :: {chat_member_member, binary(), user(), gleam@option:option(integer())}. -type chat_member_restricted() :: {chat_member_restricted, binary(), user(), boolean(), boolean(), boolean(), boolean(), boolean(), boolean(), boolean(), boolean(), boolean(), boolean(), boolean(), boolean(), boolean(), boolean(), boolean(), integer()}. -type chat_member_left() :: {chat_member_left, binary(), user()}. -type chat_member_banned() :: {chat_member_banned, binary(), user(), integer()}. -type chat_join_request() :: {chat_join_request, chat(), user(), integer(), integer(), gleam@option:option(binary()), gleam@option:option(chat_invite_link())}. -type chat_permissions() :: {chat_permissions, gleam@option:option(boolean()), gleam@option:option(boolean()), gleam@option:option(boolean()), gleam@option:option(boolean()), gleam@option:option(boolean()), gleam@option:option(boolean()), gleam@option:option(boolean()), gleam@option:option(boolean()), gleam@option:option(boolean()), gleam@option:option(boolean()), gleam@option:option(boolean()), gleam@option:option(boolean()), gleam@option:option(boolean()), gleam@option:option(boolean())}. -type birthdate() :: {birthdate, integer(), integer(), gleam@option:option(integer())}. -type business_intro() :: {business_intro, gleam@option:option(binary()), gleam@option:option(binary()), gleam@option:option(sticker())}. -type business_location() :: {business_location, binary(), gleam@option:option(location())}. -type business_opening_hours_interval() :: {business_opening_hours_interval, integer(), integer()}. -type business_opening_hours() :: {business_opening_hours, binary(), list(business_opening_hours_interval())}. -type story_area_position() :: {story_area_position, float(), float(), float(), float(), float(), float()}. -type location_address() :: {location_address, binary(), gleam@option:option(binary()), gleam@option:option(binary()), gleam@option:option(binary())}. -type story_area_type() :: {story_area_type, binary(), float(), float(), gleam@option:option(location_address())}. -type story_area_type_location() :: {story_area_type_location, binary(), float(), float(), gleam@option:option(location_address())}. -type story_area_type_suggested_reaction() :: {story_area_type_suggested_reaction, binary(), reaction_type(), gleam@option:option(boolean()), gleam@option:option(boolean())}. -type story_area_type_link() :: {story_area_type_link, binary(), binary()}. -type story_area_type_weather() :: {story_area_type_weather, binary(), float(), binary(), integer()}. -type story_area_type_unique_gift() :: {story_area_type_unique_gift, binary(), binary()}. -type story_area() :: {story_area, story_area_position(), story_area_type()}. -type chat_location() :: {chat_location, location(), binary()}. -type reaction_type_emoji() :: {reaction_type_emoji, binary(), binary()}. -type reaction_type_custom_emoji() :: {reaction_type_custom_emoji, binary(), binary()}. -type reaction_type_paid() :: {reaction_type_paid, binary()}. -type reaction_count() :: {reaction_count, reaction_type(), integer()}. -type message_reaction_updated() :: {message_reaction_updated, chat(), integer(), gleam@option:option(user()), gleam@option:option(chat()), integer(), list(reaction_type()), list(reaction_type())}. -type message_reaction_count_updated() :: {message_reaction_count_updated, chat(), integer(), integer(), list(reaction_count())}. -type forum_topic() :: {forum_topic, integer(), binary(), integer(), gleam@option:option(binary())}. -type unique_gift_model() :: {unique_gift_model, binary(), sticker(), integer()}. -type unique_gift_symbol() :: {unique_gift_symbol, binary(), sticker(), integer()}. -type unique_gift_backdrop_colors() :: {unique_gift_backdrop_colors, integer(), integer(), integer(), integer()}. -type unique_gift_backdrop() :: {unique_gift_backdrop, binary(), unique_gift_backdrop_colors(), integer()}. -type unique_gift() :: {unique_gift, binary(), binary(), integer(), unique_gift_model(), unique_gift_symbol(), unique_gift_backdrop()}. -type gift_info() :: {gift_info, gift(), gleam@option:option(binary()), gleam@option:option(integer()), gleam@option:option(integer()), gleam@option:option(boolean()), gleam@option:option(binary()), gleam@option:option(list(message_entity())), gleam@option:option(boolean())}. -type unique_gift_info() :: {unique_gift_info, unique_gift(), binary(), gleam@option:option(binary()), gleam@option:option(integer())}. -type owned_gift() :: {owned_gift, binary(), gift(), gleam@option:option(binary()), gleam@option:option(user()), integer(), gleam@option:option(binary()), gleam@option:option(list(message_entity())), gleam@option:option(boolean()), gleam@option:option(boolean()), gleam@option:option(boolean()), gleam@option:option(boolean()), gleam@option:option(integer()), gleam@option:option(integer())}. -type owned_gift_regular() :: {owned_gift_regular, binary(), gift(), gleam@option:option(binary()), gleam@option:option(user()), integer(), gleam@option:option(binary()), gleam@option:option(list(message_entity())), gleam@option:option(boolean()), gleam@option:option(boolean()), gleam@option:option(boolean()), gleam@option:option(boolean()), gleam@option:option(integer()), gleam@option:option(integer())}. -type owned_gift_unique() :: {owned_gift_unique, binary(), unique_gift(), gleam@option:option(binary()), gleam@option:option(user()), integer(), gleam@option:option(boolean()), gleam@option:option(boolean()), gleam@option:option(integer())}. -type owned_gifts() :: {owned_gifts, integer(), list(owned_gift()), gleam@option:option(binary())}. -type accepted_gift_types() :: {accepted_gift_types, boolean(), boolean(), boolean(), boolean()}. -type star_amount() :: {star_amount, integer(), gleam@option:option(integer())}. -type bot_command() :: {bot_command, binary(), binary()}. -type bot_command_scope_default() :: {bot_command_scope_default, binary()}. -type bot_command_scope_all_private_chats() :: {bot_command_scope_all_private_chats, binary()}. -type bot_command_scope_all_group_chats() :: {bot_command_scope_all_group_chats, binary()}. -type bot_command_scope_all_chat_administrators() :: {bot_command_scope_all_chat_administrators, binary()}. -type bot_command_scope_chat() :: {bot_command_scope_chat, binary(), int_or_string()}. -type bot_command_scope_chat_administrators() :: {bot_command_scope_chat_administrators, binary(), int_or_string()}. -type bot_command_scope_chat_member() :: {bot_command_scope_chat_member, binary(), int_or_string(), integer()}. -type bot_name() :: {bot_name, binary()}. -type bot_description() :: {bot_description, binary()}. -type bot_short_description() :: {bot_short_description, binary()}. -type menu_button_commands() :: {menu_button_commands, binary()}. -type menu_button_web_app() :: {menu_button_web_app, binary(), binary(), web_app_info()}. -type menu_button_default() :: {menu_button_default, binary()}. -type chat_boost_source_premium() :: {chat_boost_source_premium, binary(), user()}. -type chat_boost_source_gift_code() :: {chat_boost_source_gift_code, binary(), user()}. -type chat_boost_source_giveaway() :: {chat_boost_source_giveaway, binary(), integer(), gleam@option:option(user()), gleam@option:option(integer()), gleam@option:option(boolean())}. -type chat_boost() :: {chat_boost, binary(), integer(), integer(), chat_boost_source()}. -type chat_boost_updated() :: {chat_boost_updated, chat(), chat_boost()}. -type chat_boost_removed() :: {chat_boost_removed, chat(), binary(), integer(), chat_boost_source()}. -type user_chat_boosts() :: {user_chat_boosts, list(chat_boost())}. -type business_bot_rights() :: {business_bot_rights, gleam@option:option(boolean()), gleam@option:option(boolean()), gleam@option:option(boolean()), gleam@option:option(boolean()), gleam@option:option(boolean()), gleam@option:option(boolean()), gleam@option:option(boolean()), gleam@option:option(boolean()), gleam@option:option(boolean()), gleam@option:option(boolean()), gleam@option:option(boolean()), gleam@option:option(boolean()), gleam@option:option(boolean()), gleam@option:option(boolean())}. -type business_connection() :: {business_connection, binary(), user(), integer(), integer(), gleam@option:option(business_bot_rights()), boolean()}. -type business_messages_deleted() :: {business_messages_deleted, binary(), chat(), list(integer())}. -type response_parameters() :: {response_parameters, gleam@option:option(integer()), gleam@option:option(integer())}. -type input_media_photo() :: {input_media_photo, binary(), binary(), gleam@option:option(binary()), gleam@option:option(binary()), gleam@option:option(list(message_entity())), gleam@option:option(boolean()), gleam@option:option(boolean())}. -type input_media_video() :: {input_media_video, binary(), binary(), gleam@option:option(binary()), gleam@option:option(binary()), gleam@option:option(integer()), gleam@option:option(binary()), gleam@option:option(binary()), gleam@option:option(list(message_entity())), gleam@option:option(boolean()), gleam@option:option(integer()), gleam@option:option(integer()), gleam@option:option(integer()), gleam@option:option(boolean()), gleam@option:option(boolean())}. -type input_media_animation() :: {input_media_animation, binary(), binary(), gleam@option:option(binary()), gleam@option:option(binary()), gleam@option:option(binary()), gleam@option:option(list(message_entity())), gleam@option:option(boolean()), gleam@option:option(integer()), gleam@option:option(integer()), gleam@option:option(integer()), gleam@option:option(boolean())}. -type input_media_audio() :: {input_media_audio, binary(), binary(), gleam@option:option(binary()), gleam@option:option(binary()), gleam@option:option(binary()), gleam@option:option(list(message_entity())), gleam@option:option(integer()), gleam@option:option(binary()), gleam@option:option(binary())}. -type input_media_document() :: {input_media_document, binary(), binary(), gleam@option:option(binary()), gleam@option:option(binary()), gleam@option:option(binary()), gleam@option:option(list(message_entity())), gleam@option:option(boolean())}. -type input_paid_media_photo() :: {input_paid_media_photo, binary(), binary()}. -type input_paid_media_video() :: {input_paid_media_video, binary(), binary(), gleam@option:option(binary()), gleam@option:option(binary()), gleam@option:option(integer()), gleam@option:option(integer()), gleam@option:option(integer()), gleam@option:option(integer()), gleam@option:option(boolean())}. -type input_profile_photo_static() :: {input_profile_photo_static, binary(), binary()}. -type input_profile_photo_animated() :: {input_profile_photo_animated, binary(), binary(), gleam@option:option(float())}. -type input_story_content() :: {input_story_content, binary(), binary()}. -type input_story_content_photo() :: {input_story_content_photo, binary(), binary()}. -type input_story_content_video() :: {input_story_content_video, binary(), binary(), gleam@option:option(float()), gleam@option:option(float()), gleam@option:option(boolean())}. -type sticker() :: {sticker, binary(), binary(), binary(), integer(), integer(), boolean(), boolean(), gleam@option:option(photo_size()), gleam@option:option(binary()), gleam@option:option(binary()), gleam@option:option(file()), gleam@option:option(mask_position()), gleam@option:option(binary()), gleam@option:option(boolean()), gleam@option:option(integer())}. -type sticker_set() :: {sticker_set, binary(), binary(), binary(), list(sticker()), gleam@option:option(photo_size())}. -type mask_position() :: {mask_position, binary(), float(), float(), float()}. -type input_sticker() :: {input_sticker, file_or_string(), binary(), list(binary()), gleam@option:option(mask_position()), gleam@option:option(list(binary()))}. -type gift() :: {gift, binary(), sticker(), integer(), gleam@option:option(integer()), gleam@option:option(integer()), gleam@option:option(integer())}. -type gifts() :: {gifts, list(gift())}. -type inline_query() :: {inline_query, binary(), user(), binary(), binary(), gleam@option:option(binary()), gleam@option:option(location())}. -type inline_query_results_button() :: {inline_query_results_button, binary(), gleam@option:option(web_app_info()), gleam@option:option(binary())}. -type inline_query_result_article() :: {inline_query_result_article, binary(), binary(), binary(), input_message_content(), gleam@option:option(inline_keyboard_markup()), gleam@option:option(binary()), gleam@option:option(binary()), gleam@option:option(binary()), gleam@option:option(integer()), gleam@option:option(integer())}. -type inline_query_result_photo() :: {inline_query_result_photo, binary(), binary(), binary(), binary(), gleam@option:option(integer()), gleam@option:option(integer()), gleam@option:option(binary()), gleam@option:option(binary()), gleam@option:option(binary()), gleam@option:option(binary()), gleam@option:option(list(message_entity())), gleam@option:option(boolean()), gleam@option:option(inline_keyboard_markup()), gleam@option:option(input_message_content())}. -type inline_query_result_gif() :: {inline_query_result_gif, binary(), binary(), binary(), gleam@option:option(integer()), gleam@option:option(integer()), gleam@option:option(integer()), binary(), gleam@option:option(binary()), gleam@option:option(binary()), gleam@option:option(binary()), gleam@option:option(binary()), gleam@option:option(list(message_entity())), gleam@option:option(boolean()), gleam@option:option(inline_keyboard_markup()), gleam@option:option(input_message_content())}. -type inline_query_result_mpeg4_gif() :: {inline_query_result_mpeg4_gif, binary(), binary(), binary(), gleam@option:option(integer()), gleam@option:option(integer()), gleam@option:option(integer()), binary(), gleam@option:option(binary()), gleam@option:option(binary()), gleam@option:option(binary()), gleam@option:option(binary()), gleam@option:option(list(message_entity())), gleam@option:option(boolean()), gleam@option:option(inline_keyboard_markup()), gleam@option:option(input_message_content())}. -type inline_query_result_video() :: {inline_query_result_video, binary(), binary(), binary(), binary(), binary(), binary(), gleam@option:option(binary()), gleam@option:option(binary()), gleam@option:option(list(message_entity())), gleam@option:option(boolean()), gleam@option:option(integer()), gleam@option:option(integer()), gleam@option:option(integer()), gleam@option:option(binary()), gleam@option:option(inline_keyboard_markup()), gleam@option:option(input_message_content())}. -type inline_query_result_audio() :: {inline_query_result_audio, binary(), binary(), binary(), binary(), gleam@option:option(binary()), gleam@option:option(binary()), gleam@option:option(list(message_entity())), gleam@option:option(binary()), gleam@option:option(integer()), gleam@option:option(inline_keyboard_markup()), gleam@option:option(input_message_content())}. -type inline_query_result_voice() :: {inline_query_result_voice, binary(), binary(), binary(), binary(), gleam@option:option(binary()), gleam@option:option(binary()), gleam@option:option(list(message_entity())), gleam@option:option(integer()), gleam@option:option(inline_keyboard_markup()), gleam@option:option(input_message_content())}. -type inline_query_result_document() :: {inline_query_result_document, binary(), binary(), binary(), gleam@option:option(binary()), gleam@option:option(binary()), gleam@option:option(list(message_entity())), binary(), binary(), gleam@option:option(binary()), gleam@option:option(inline_keyboard_markup()), gleam@option:option(input_message_content()), gleam@option:option(binary()), gleam@option:option(integer()), gleam@option:option(integer())}. -type inline_query_result_location() :: {inline_query_result_location, binary(), binary(), float(), float(), binary(), gleam@option:option(float()), gleam@option:option(integer()), gleam@option:option(integer()), gleam@option:option(integer()), gleam@option:option(inline_keyboard_markup()), gleam@option:option(input_message_content()), gleam@option:option(binary()), gleam@option:option(integer()), gleam@option:option(integer())}. -type inline_query_result_venue() :: {inline_query_result_venue, binary(), binary(), float(), float(), binary(), binary(), gleam@option:option(binary()), gleam@option:option(binary()), gleam@option:option(binary()), gleam@option:option(binary()), gleam@option:option(inline_keyboard_markup()), gleam@option:option(input_message_content()), gleam@option:option(binary()), gleam@option:option(integer()), gleam@option:option(integer())}. -type inline_query_result_contact() :: {inline_query_result_contact, binary(), binary(), binary(), binary(), gleam@option:option(binary()), gleam@option:option(binary()), gleam@option:option(inline_keyboard_markup()), gleam@option:option(input_message_content()), gleam@option:option(binary()), gleam@option:option(integer()), gleam@option:option(integer())}. -type inline_query_result_game() :: {inline_query_result_game, binary(), binary(), binary(), gleam@option:option(inline_keyboard_markup())}. -type inline_query_result_cached_photo() :: {inline_query_result_cached_photo, binary(), binary(), binary(), gleam@option:option(binary()), gleam@option:option(binary()), gleam@option:option(binary()), gleam@option:option(binary()), gleam@option:option(list(message_entity())), gleam@option:option(boolean()), gleam@option:option(inline_keyboard_markup()), gleam@option:option(input_message_content())}. -type inline_query_result_cached_gif() :: {inline_query_result_cached_gif, binary(), binary(), binary(), gleam@option:option(binary()), gleam@option:option(binary()), gleam@option:option(binary()), gleam@option:option(list(message_entity())), gleam@option:option(boolean()), gleam@option:option(inline_keyboard_markup()), gleam@option:option(input_message_content())}. -type inline_query_result_cached_mpeg4_gif() :: {inline_query_result_cached_mpeg4_gif, binary(), binary(), binary(), gleam@option:option(binary()), gleam@option:option(binary()), gleam@option:option(binary()), gleam@option:option(list(message_entity())), gleam@option:option(boolean()), gleam@option:option(inline_keyboard_markup()), gleam@option:option(input_message_content())}. -type inline_query_result_cached_sticker() :: {inline_query_result_cached_sticker, binary(), binary(), binary(), gleam@option:option(inline_keyboard_markup()), gleam@option:option(input_message_content())}. -type inline_query_result_cached_document() :: {inline_query_result_cached_document, binary(), binary(), binary(), binary(), gleam@option:option(binary()), gleam@option:option(binary()), gleam@option:option(binary()), gleam@option:option(list(message_entity())), gleam@option:option(inline_keyboard_markup()), gleam@option:option(input_message_content())}. -type inline_query_result_cached_video() :: {inline_query_result_cached_video, binary(), binary(), binary(), binary(), gleam@option:option(binary()), gleam@option:option(binary()), gleam@option:option(binary()), gleam@option:option(list(message_entity())), gleam@option:option(boolean()), gleam@option:option(inline_keyboard_markup()), gleam@option:option(input_message_content())}. -type inline_query_result_cached_voice() :: {inline_query_result_cached_voice, binary(), binary(), binary(), binary(), gleam@option:option(binary()), gleam@option:option(binary()), gleam@option:option(list(message_entity())), gleam@option:option(inline_keyboard_markup()), gleam@option:option(input_message_content())}. -type inline_query_result_cached_audio() :: {inline_query_result_cached_audio, binary(), binary(), binary(), gleam@option:option(binary()), gleam@option:option(binary()), gleam@option:option(list(message_entity())), gleam@option:option(inline_keyboard_markup()), gleam@option:option(input_message_content())}. -type input_text_message_content() :: {input_text_message_content, binary(), gleam@option:option(binary()), gleam@option:option(list(message_entity())), gleam@option:option(link_preview_options())}. -type input_location_message_content() :: {input_location_message_content, float(), float(), gleam@option:option(float()), gleam@option:option(integer()), gleam@option:option(integer()), gleam@option:option(integer())}. -type input_venue_message_content() :: {input_venue_message_content, float(), float(), binary(), binary(), gleam@option:option(binary()), gleam@option:option(binary()), gleam@option:option(binary()), gleam@option:option(binary())}. -type input_contact_message_content() :: {input_contact_message_content, binary(), binary(), gleam@option:option(binary()), gleam@option:option(binary())}. -type input_invoice_message_content() :: {input_invoice_message_content, binary(), binary(), binary(), gleam@option:option(binary()), binary(), list(labeled_price()), gleam@option:option(integer()), gleam@option:option(list(integer())), gleam@option:option(binary()), gleam@option:option(binary()), gleam@option:option(integer()), gleam@option:option(integer()), gleam@option:option(integer()), gleam@option:option(boolean()), gleam@option:option(boolean()), gleam@option:option(boolean()), gleam@option:option(boolean()), gleam@option:option(boolean()), gleam@option:option(boolean()), gleam@option:option(boolean())}. -type chosen_inline_result() :: {chosen_inline_result, binary(), user(), gleam@option:option(location()), gleam@option:option(binary()), binary()}. -type sent_web_app_message() :: {sent_web_app_message, gleam@option:option(binary())}. -type prepared_inline_message() :: {prepared_inline_message, binary(), integer()}. -type labeled_price() :: {labeled_price, binary(), integer()}. -type invoice() :: {invoice, binary(), binary(), binary(), binary(), integer()}. -type shipping_address() :: {shipping_address, binary(), binary(), binary(), binary(), binary(), binary()}. -type order_info() :: {order_info, gleam@option:option(binary()), gleam@option:option(binary()), gleam@option:option(binary()), gleam@option:option(shipping_address())}. -type shipping_option() :: {shipping_option, binary(), binary(), list(labeled_price())}. -type successful_payment() :: {successful_payment, binary(), integer(), binary(), gleam@option:option(integer()), gleam@option:option(boolean()), gleam@option:option(boolean()), gleam@option:option(binary()), gleam@option:option(order_info()), binary(), binary()}. -type refunded_payment() :: {refunded_payment, binary(), integer(), binary(), binary(), gleam@option:option(binary())}. -type shipping_query() :: {shipping_query, binary(), user(), binary(), shipping_address()}. -type pre_checkout_query() :: {pre_checkout_query, binary(), user(), binary(), integer(), binary(), gleam@option:option(binary()), gleam@option:option(order_info())}. -type paid_media_purchased() :: {paid_media_purchased, user(), binary()}. -type revenue_withdrawal_state_pending() :: {revenue_withdrawal_state_pending, binary()}. -type revenue_withdrawal_state_succeeded() :: {revenue_withdrawal_state_succeeded, binary(), integer(), binary()}. -type revenue_withdrawal_state_failed() :: {revenue_withdrawal_state_failed, binary()}. -type affiliate_info() :: {affiliate_info, gleam@option:option(user()), gleam@option:option(chat()), integer(), integer(), gleam@option:option(integer())}. -type transaction_partner_user() :: {transaction_partner_user, binary(), user(), gleam@option:option(affiliate_info()), gleam@option:option(binary()), gleam@option:option(integer()), gleam@option:option(list(paid_media())), gleam@option:option(binary()), gleam@option:option(gift())}. -type transaction_partner_chat() :: {transaction_partner_chat, binary(), chat(), gleam@option:option(gift())}. -type transaction_partner_affiliate_program() :: {transaction_partner_affiliate_program, binary(), gleam@option:option(user()), integer()}. -type transaction_partner_fragment() :: {transaction_partner_fragment, binary(), gleam@option:option(revenue_withdrawal_state())}. -type transaction_partner_telegram_ads() :: {transaction_partner_telegram_ads, binary()}. -type transaction_partner_telegram_api() :: {transaction_partner_telegram_api, binary(), integer()}. -type transaction_partner_other() :: {transaction_partner_other, binary()}. -type star_transaction() :: {star_transaction, binary(), integer(), gleam@option:option(integer()), integer(), gleam@option:option(transaction_partner()), gleam@option:option(transaction_partner())}. -type star_transactions() :: {star_transactions, list(star_transaction())}. -type passport_data() :: {passport_data, list(encrypted_passport_element()), encrypted_credentials()}. -type passport_file() :: {passport_file, binary(), binary(), integer(), integer()}. -type encrypted_passport_element() :: {encrypted_passport_element, binary(), gleam@option:option(binary()), gleam@option:option(binary()), gleam@option:option(binary()), gleam@option:option(list(passport_file())), gleam@option:option(passport_file()), gleam@option:option(passport_file()), gleam@option:option(passport_file()), gleam@option:option(list(passport_file())), binary()}. -type encrypted_credentials() :: {encrypted_credentials, binary(), binary(), binary()}. -type passport_element_error_data_field() :: {passport_element_error_data_field, binary(), binary(), binary(), binary(), binary()}. -type passport_element_error_front_side() :: {passport_element_error_front_side, binary(), binary(), binary(), binary()}. -type passport_element_error_reverse_side() :: {passport_element_error_reverse_side, binary(), binary(), binary(), binary()}. -type passport_element_error_selfie() :: {passport_element_error_selfie, binary(), binary(), binary(), binary()}. -type passport_element_error_file() :: {passport_element_error_file, binary(), binary(), binary(), binary()}. -type passport_element_error_files() :: {passport_element_error_files, binary(), binary(), list(binary()), binary()}. -type passport_element_error_translation_file() :: {passport_element_error_translation_file, binary(), binary(), binary(), binary()}. -type passport_element_error_translation_files() :: {passport_element_error_translation_files, binary(), binary(), list(binary()), binary()}. -type passport_element_error_unspecified() :: {passport_element_error_unspecified, binary(), binary(), binary(), binary()}. -type game() :: {game, binary(), binary(), list(photo_size()), gleam@option:option(binary()), gleam@option:option(list(message_entity())), gleam@option:option(animation())}. -type callback_game() :: {callback_game, integer(), integer(), gleam@option:option(boolean()), gleam@option:option(boolean()), gleam@option:option(integer()), gleam@option:option(integer()), gleam@option:option(binary())}. -type game_high_score() :: {game_high_score, integer(), user(), integer()}. -type file_or_string() :: {file_v, file()} | {string_v, binary()}. -type answer_callback_query_parameters() :: {answer_callback_query_parameters, binary(), gleam@option:option(binary()), gleam@option:option(boolean()), gleam@option:option(binary()), gleam@option:option(integer())}. -type bot_command_parameters() :: {bot_command_parameters, gleam@option:option(bot_command_scope()), gleam@option:option(binary())}. -type edit_message_text_parameters() :: {edit_message_text_parameters, gleam@option:option(int_or_string()), gleam@option:option(integer()), gleam@option:option(binary()), binary(), gleam@option:option(binary()), gleam@option:option(list(message_entity())), gleam@option:option(link_preview_options()), gleam@option:option(inline_keyboard_markup())}. -type forward_message_parameters() :: {forward_message_parameters, int_or_string(), int_or_string(), integer(), gleam@option:option(boolean()), gleam@option:option(integer()), gleam@option:option(boolean())}. -type forward_messages_parameters() :: {forward_messages_parameters, int_or_string(), gleam@option:option(integer()), int_or_string(), list(integer()), gleam@option:option(boolean()), gleam@option:option(boolean())}. -type send_dice_parameters() :: {send_dice_parameters, int_or_string(), gleam@option:option(integer()), gleam@option:option(binary()), gleam@option:option(boolean()), gleam@option:option(boolean()), gleam@option:option(reply_keyboard_markup())}. -type send_message_reply_markup_parameters() :: {send_message_reply_inline_keyboard_markup_parameters, inline_keyboard_markup()} | {send_message_reply_reply_keyboard_markup_parameters, reply_keyboard_markup()} | {send_message_reply_remove_keyboard_markup_parameters, reply_keyboard_remove()} | {send_message_reply_force_reply_markup_parameters, force_reply()}. -type send_message_parameters() :: {send_message_parameters, gleam@option:option(binary()), int_or_string(), gleam@option:option(integer()), binary(), gleam@option:option(binary()), gleam@option:option(list(message_entity())), gleam@option:option(link_preview_options()), gleam@option:option(boolean()), gleam@option:option(boolean()), gleam@option:option(boolean()), gleam@option:option(binary()), gleam@option:option(reply_parameters()), gleam@option:option(send_message_reply_markup_parameters())}. -type set_chat_menu_button_parameters() :: {set_chat_menu_button_parameters, gleam@option:option(integer()), gleam@option:option(menu_button())}. -type set_webhook_parameters() :: {set_webhook_parameters, binary(), gleam@option:option(file()), gleam@option:option(integer()), gleam@option:option(binary()), gleam@option:option(list(binary())), gleam@option:option(boolean()), gleam@option:option(binary())}. -type get_updates_parameters() :: {get_updates_parameters, gleam@option:option(integer()), gleam@option:option(integer()), gleam@option:option(integer()), gleam@option:option(list(binary()))}. -type copy_message_parameters() :: {copy_message_parameters, int_or_string(), gleam@option:option(integer()), int_or_string(), integer(), gleam@option:option(integer()), gleam@option:option(binary()), gleam@option:option(binary()), gleam@option:option(list(message_entity())), gleam@option:option(boolean()), gleam@option:option(boolean()), gleam@option:option(boolean()), gleam@option:option(boolean()), gleam@option:option(reply_parameters()), gleam@option:option(send_message_reply_markup_parameters())}. -type copy_messages_parameters() :: {copy_messages_parameters, int_or_string(), gleam@option:option(integer()), int_or_string(), list(integer()), gleam@option:option(boolean()), gleam@option:option(boolean()), gleam@option:option(boolean())}. -type send_photo_parameters() :: {send_photo_parameters, int_or_string(), gleam@option:option(binary()), gleam@option:option(integer()), file_or_string(), gleam@option:option(binary()), gleam@option:option(binary()), gleam@option:option(list(message_entity())), gleam@option:option(boolean()), gleam@option:option(boolean()), gleam@option:option(boolean()), gleam@option:option(boolean()), gleam@option:option(boolean()), gleam@option:option(binary()), gleam@option:option(reply_parameters()), gleam@option:option(send_message_reply_markup_parameters())}. -type send_audio_parameters() :: {send_audio_parameters, int_or_string(), gleam@option:option(binary()), gleam@option:option(integer()), file_or_string(), gleam@option:option(binary()), gleam@option:option(binary()), gleam@option:option(list(message_entity())), gleam@option:option(integer()), gleam@option:option(binary()), gleam@option:option(binary()), gleam@option:option(file_or_string()), gleam@option:option(boolean()), gleam@option:option(boolean()), gleam@option:option(boolean()), gleam@option:option(binary()), gleam@option:option(reply_parameters()), gleam@option:option(send_message_reply_markup_parameters())}. -type send_document_parameters() :: {send_document_parameters, int_or_string(), gleam@option:option(binary()), gleam@option:option(integer()), file_or_string(), gleam@option:option(file_or_string()), gleam@option:option(binary()), gleam@option:option(binary()), gleam@option:option(list(message_entity())), gleam@option:option(boolean()), gleam@option:option(boolean()), gleam@option:option(boolean()), gleam@option:option(boolean()), gleam@option:option(binary()), gleam@option:option(reply_parameters()), gleam@option:option(send_message_reply_markup_parameters())}. -type send_video_parameters() :: {send_video_parameters, int_or_string(), gleam@option:option(binary()), gleam@option:option(integer()), file_or_string(), gleam@option:option(integer()), gleam@option:option(integer()), gleam@option:option(integer()), gleam@option:option(file_or_string()), gleam@option:option(file_or_string()), gleam@option:option(integer()), gleam@option:option(binary()), gleam@option:option(binary()), gleam@option:option(list(message_entity())), gleam@option:option(boolean()), gleam@option:option(boolean()), gleam@option:option(boolean()), gleam@option:option(boolean()), gleam@option:option(boolean()), gleam@option:option(boolean()), gleam@option:option(binary()), gleam@option:option(reply_parameters()), gleam@option:option(send_message_reply_markup_parameters())}. -type send_animation_parameters() :: {send_animation_parameters, int_or_string(), gleam@option:option(binary()), gleam@option:option(integer()), file_or_string(), gleam@option:option(integer()), gleam@option:option(integer()), gleam@option:option(integer()), gleam@option:option(file_or_string()), gleam@option:option(binary()), gleam@option:option(binary()), gleam@option:option(list(message_entity())), gleam@option:option(boolean()), gleam@option:option(boolean()), gleam@option:option(boolean()), gleam@option:option(boolean()), gleam@option:option(boolean()), gleam@option:option(binary()), gleam@option:option(reply_parameters()), gleam@option:option(send_message_reply_markup_parameters())}. -type send_voice_parameters() :: {send_voice_parameters, int_or_string(), gleam@option:option(binary()), gleam@option:option(integer()), file_or_string(), gleam@option:option(binary()), gleam@option:option(binary()), gleam@option:option(list(message_entity())), gleam@option:option(integer()), gleam@option:option(boolean()), gleam@option:option(boolean()), gleam@option:option(boolean()), gleam@option:option(binary()), gleam@option:option(reply_parameters()), gleam@option:option(send_message_reply_markup_parameters())}. -type send_video_note_parameters() :: {send_video_note_parameters, int_or_string(), gleam@option:option(binary()), gleam@option:option(integer()), file_or_string(), gleam@option:option(integer()), gleam@option:option(integer()), gleam@option:option(file_or_string()), gleam@option:option(boolean()), gleam@option:option(boolean()), gleam@option:option(boolean()), gleam@option:option(binary()), gleam@option:option(reply_parameters()), gleam@option:option(send_message_reply_markup_parameters())}. -type send_media_group_parameters() :: {send_media_group_parameters, int_or_string(), gleam@option:option(binary()), gleam@option:option(integer()), list(input_media()), gleam@option:option(boolean()), gleam@option:option(boolean()), gleam@option:option(boolean()), gleam@option:option(binary()), gleam@option:option(reply_parameters())}. -type send_location_parameters() :: {send_location_parameters, int_or_string(), gleam@option:option(binary()), gleam@option:option(integer()), float(), float(), gleam@option:option(float()), gleam@option:option(integer()), gleam@option:option(integer()), gleam@option:option(integer()), gleam@option:option(boolean()), gleam@option:option(boolean()), gleam@option:option(boolean()), gleam@option:option(binary()), gleam@option:option(reply_parameters()), gleam@option:option(send_message_reply_markup_parameters())}. -type send_venue_parameters() :: {send_venue_parameters, int_or_string(), gleam@option:option(binary()), gleam@option:option(integer()), float(), float(), binary(), binary(), gleam@option:option(binary()), gleam@option:option(binary()), gleam@option:option(binary()), gleam@option:option(binary()), gleam@option:option(boolean()), gleam@option:option(boolean()), gleam@option:option(boolean()), gleam@option:option(binary()), gleam@option:option(reply_parameters()), gleam@option:option(send_message_reply_markup_parameters())}. -type send_contact_parameters() :: {send_contact_parameters, int_or_string(), gleam@option:option(binary()), gleam@option:option(integer()), binary(), binary(), gleam@option:option(binary()), gleam@option:option(binary()), gleam@option:option(boolean()), gleam@option:option(boolean()), gleam@option:option(boolean()), gleam@option:option(binary()), gleam@option:option(reply_parameters()), gleam@option:option(send_message_reply_markup_parameters())}. -type send_poll_parameters() :: {send_poll_parameters, int_or_string(), gleam@option:option(binary()), gleam@option:option(integer()), binary(), gleam@option:option(binary()), gleam@option:option(list(message_entity())), list(binary()), gleam@option:option(boolean()), gleam@option:option(binary()), gleam@option:option(boolean()), gleam@option:option(integer()), gleam@option:option(binary()), gleam@option:option(binary()), gleam@option:option(list(message_entity())), gleam@option:option(integer()), gleam@option:option(integer()), gleam@option:option(boolean()), gleam@option:option(boolean()), gleam@option:option(boolean()), gleam@option:option(boolean()), gleam@option:option(binary()), gleam@option:option(reply_parameters()), gleam@option:option(send_message_reply_markup_parameters())}. -type chat_action() :: typing | upload_photo | record_video | upload_video | record_voice | upload_voice | upload_document | choose_sticker | find_location | record_video_note | upload_video_note. -type send_chat_action_parameters() :: {send_chat_action_parameters, int_or_string(), gleam@option:option(binary()), gleam@option:option(integer()), chat_action()}. -type send_invoice_parameters() :: {send_invoice_parameters, int_or_string(), gleam@option:option(integer()), binary(), binary(), binary(), gleam@option:option(binary()), binary(), list(labeled_price()), gleam@option:option(integer()), gleam@option:option(list(integer())), gleam@option:option(binary()), gleam@option:option(binary()), gleam@option:option(binary()), gleam@option:option(integer()), gleam@option:option(integer()), gleam@option:option(integer()), gleam@option:option(boolean()), gleam@option:option(boolean()), gleam@option:option(boolean()), gleam@option:option(boolean()), gleam@option:option(boolean()), gleam@option:option(boolean()), gleam@option:option(boolean()), gleam@option:option(boolean()), gleam@option:option(boolean()), gleam@option:option(boolean()), gleam@option:option(binary()), gleam@option:option(reply_parameters()), gleam@option:option(inline_keyboard_markup())}. -type create_invoice_link_parameters() :: {create_invoice_link_parameters, gleam@option:option(binary()), binary(), binary(), binary(), gleam@option:option(binary()), binary(), list(labeled_price()), gleam@option:option(integer()), gleam@option:option(integer()), gleam@option:option(list(integer())), gleam@option:option(binary()), gleam@option:option(binary()), gleam@option:option(integer()), gleam@option:option(integer()), gleam@option:option(integer()), gleam@option:option(boolean()), gleam@option:option(boolean()), gleam@option:option(boolean()), gleam@option:option(boolean()), gleam@option:option(boolean()), gleam@option:option(boolean()), gleam@option:option(boolean())}. -type send_sticker_parameters() :: {send_sticker_parameters, int_or_string(), gleam@option:option(binary()), gleam@option:option(integer()), file_or_string(), gleam@option:option(binary()), gleam@option:option(boolean()), gleam@option:option(boolean()), gleam@option:option(boolean()), gleam@option:option(binary()), gleam@option:option(reply_parameters()), gleam@option:option(send_message_reply_markup_parameters())}. -type get_sticker_set_parameters() :: {get_sticker_set_parameters, binary()}. -type set_message_reaction_parameters() :: {set_message_reaction_parameters, int_or_string(), integer(), gleam@option:option(list(reaction_type())), gleam@option:option(boolean())}. -type get_user_profile_photos_parameters() :: {get_user_profile_photos_parameters, integer(), gleam@option:option(integer()), gleam@option:option(integer())}. -type edit_message_caption_parameters() :: {edit_message_caption_parameters, gleam@option:option(binary()), gleam@option:option(int_or_string()), gleam@option:option(integer()), gleam@option:option(binary()), gleam@option:option(binary()), gleam@option:option(binary()), gleam@option:option(list(message_entity())), gleam@option:option(boolean()), gleam@option:option(inline_keyboard_markup())}. -type edit_message_media_parameters() :: {edit_message_media_parameters, gleam@option:option(binary()), gleam@option:option(int_or_string()), gleam@option:option(integer()), gleam@option:option(binary()), input_media(), gleam@option:option(inline_keyboard_markup())}. -type edit_message_live_location_parameters() :: {edit_message_live_location_parameters, gleam@option:option(binary()), gleam@option:option(int_or_string()), gleam@option:option(integer()), gleam@option:option(binary()), float(), float(), gleam@option:option(integer()), gleam@option:option(float()), gleam@option:option(integer()), gleam@option:option(integer()), gleam@option:option(inline_keyboard_markup())}. -type stop_message_live_location_parameters() :: {stop_message_live_location_parameters, gleam@option:option(binary()), gleam@option:option(int_or_string()), gleam@option:option(integer()), gleam@option:option(binary()), gleam@option:option(inline_keyboard_markup())}. -type edit_message_reply_markup_parameters() :: {edit_message_reply_markup_parameters, gleam@option:option(binary()), gleam@option:option(int_or_string()), gleam@option:option(integer()), gleam@option:option(binary()), gleam@option:option(inline_keyboard_markup())}. -type stop_poll_parameters() :: {stop_poll_parameters, gleam@option:option(binary()), int_or_string(), integer(), gleam@option:option(inline_keyboard_markup())}. -type delete_message_parameters() :: {delete_message_parameters, int_or_string(), integer()}. -type delete_messages_parameters() :: {delete_messages_parameters, int_or_string(), list(integer())}. -type ban_chat_member_parameters() :: {ban_chat_member_parameters, int_or_string(), integer(), gleam@option:option(integer()), gleam@option:option(boolean())}. -type unban_chat_member_parameters() :: {unban_chat_member_parameters, int_or_string(), integer(), gleam@option:option(boolean())}. -type restrict_chat_member_parameters() :: {restrict_chat_member_parameters, int_or_string(), integer(), chat_permissions(), gleam@option:option(integer())}. -type promote_chat_member_parameters() :: {promote_chat_member_parameters, int_or_string(), integer(), gleam@option:option(boolean()), gleam@option:option(boolean()), gleam@option:option(boolean()), gleam@option:option(boolean()), gleam@option:option(boolean()), gleam@option:option(boolean()), gleam@option:option(boolean()), gleam@option:option(boolean()), gleam@option:option(boolean()), gleam@option:option(boolean()), gleam@option:option(boolean()), gleam@option:option(boolean()), gleam@option:option(boolean()), gleam@option:option(boolean()), gleam@option:option(boolean())}. -type set_chat_administrator_custom_title_parameters() :: {set_chat_administrator_custom_title_parameters, int_or_string(), integer(), binary()}. -type ban_chat_sender_chat_parameters() :: {ban_chat_sender_chat_parameters, int_or_string(), integer()}. -type unban_chat_sender_chat_parameters() :: {unban_chat_sender_chat_parameters, int_or_string(), integer()}. -type set_chat_permissions_parameters() :: {set_chat_permissions_parameters, int_or_string(), chat_permissions(), gleam@option:option(boolean())}. -type export_chat_invite_link_parameters() :: {export_chat_invite_link_parameters, int_or_string()}. -type create_chat_invite_link_parameters() :: {create_chat_invite_link_parameters, int_or_string(), gleam@option:option(binary()), gleam@option:option(integer()), gleam@option:option(integer()), gleam@option:option(boolean())}. -type edit_chat_invite_link_parameters() :: {edit_chat_invite_link_parameters, int_or_string(), binary(), gleam@option:option(binary()), gleam@option:option(integer()), gleam@option:option(integer()), gleam@option:option(boolean())}. -type create_chat_subscription_invite_link_parameters() :: {create_chat_subscription_invite_link_parameters, int_or_string(), gleam@option:option(binary()), integer(), integer()}. -type edit_chat_subscription_invite_link_parameters() :: {edit_chat_subscription_invite_link_parameters, int_or_string(), binary(), gleam@option:option(binary())}. -type revoke_chat_invite_link_parameters() :: {revoke_chat_invite_link_parameters, int_or_string(), binary()}. -type approve_chat_join_request_parameters() :: {approve_chat_join_request_parameters, int_or_string(), integer()}. -type decline_chat_join_request_parameters() :: {decline_chat_join_request_parameters, int_or_string(), integer()}. -type set_chat_photo_parameters() :: {set_chat_photo_parameters, int_or_string(), file()}. -type delete_chat_photo_parameters() :: {delete_chat_photo_parameters, int_or_string()}. -type set_chat_title_parameters() :: {set_chat_title_parameters, int_or_string(), binary()}. -type set_chat_description_parameters() :: {set_chat_description_parameters, int_or_string(), gleam@option:option(binary())}. -type pin_chat_message_parameters() :: {pin_chat_message_parameters, int_or_string(), integer(), gleam@option:option(binary()), gleam@option:option(boolean())}. -type unpin_chat_message_parameters() :: {unpin_chat_message_parameters, int_or_string(), gleam@option:option(integer()), gleam@option:option(binary())}. -type unpin_all_chat_messages_parameters() :: {unpin_all_chat_messages_parameters, int_or_string()}. -type leave_chat_parameters() :: {leave_chat_parameters, int_or_string()}. -type get_chat_administrators_parameters() :: {get_chat_administrators_parameters, int_or_string()}. -type get_chat_member_count_parameters() :: {get_chat_member_count_parameters, int_or_string()}. -type get_chat_member_parameters() :: {get_chat_member_parameters, int_or_string(), integer()}. -type set_chat_sticker_set_parameters() :: {set_chat_sticker_set_parameters, int_or_string(), binary()}. -type delete_chat_sticker_set_parameters() :: {delete_chat_sticker_set_parameters, int_or_string()}. -type create_forum_topic_parameters() :: {create_forum_topic_parameters, int_or_string(), binary(), gleam@option:option(integer()), gleam@option:option(binary())}. -type edit_forum_topic_parameters() :: {edit_forum_topic_parameters, int_or_string(), integer(), gleam@option:option(binary()), gleam@option:option(binary())}. -type close_forum_topic_parameters() :: {close_forum_topic_parameters, int_or_string(), integer()}. -type reopen_forum_topic_parameters() :: {reopen_forum_topic_parameters, int_or_string(), integer()}. -type delete_forum_topic_parameters() :: {delete_forum_topic_parameters, int_or_string(), integer()}. -type unpin_all_forum_topic_messages_parameters() :: {unpin_all_forum_topic_messages_parameters, int_or_string(), integer()}. -type unpin_all_general_forum_topic_pinned_messages_parameters() :: {unpin_all_general_forum_topic_pinned_messages_parameters, int_or_string()}. -type edit_general_forum_topic_parameters() :: {edit_general_forum_topic_parameters, int_or_string(), binary()}. -type close_general_forum_topic_parameters() :: {close_general_forum_topic_parameters, int_or_string()}. -type reopen_general_forum_topic_parameters() :: {reopen_general_forum_topic_parameters, int_or_string()}. -type hide_general_forum_topic_parameters() :: {hide_general_forum_topic_parameters, int_or_string()}. -type unhide_general_forum_topic_parameters() :: {unhide_general_forum_topic_parameters, int_or_string()}. -type unpin_all_general_forum_topic_messages_parameters() :: {unpin_all_general_forum_topic_messages_parameters, int_or_string()}. -type get_user_chat_boosts_parameters() :: {get_user_chat_boosts_parameters, int_or_string(), integer()}. -type get_business_connection_parameters() :: {get_business_connection_parameters, binary()}. -type set_my_name_parameters() :: {set_my_name_parameters, gleam@option:option(binary()), gleam@option:option(binary())}. -type get_my_name_parameters() :: {get_my_name_parameters, gleam@option:option(binary())}. -type set_my_description_parameters() :: {set_my_description_parameters, gleam@option:option(binary()), gleam@option:option(binary())}. -type get_my_description_parameters() :: {get_my_description_parameters, gleam@option:option(binary())}. -type set_my_short_description_parameters() :: {set_my_short_description_parameters, gleam@option:option(binary()), gleam@option:option(binary())}. -type get_my_short_description_parameters() :: {get_my_short_description_parameters, gleam@option:option(binary())}. -type get_chat_menu_button_parameters() :: {get_chat_menu_button_parameters, gleam@option:option(integer())}. -type set_my_default_administrator_rights_parameters() :: {set_my_default_administrator_rights_parameters, gleam@option:option(chat_administrator_rights()), gleam@option:option(boolean())}. -type get_my_default_administrator_rights_parameters() :: {get_my_default_administrator_rights_parameters, gleam@option:option(boolean())}. -type send_gift_parameters() :: {send_gift_parameters, gleam@option:option(integer()), gleam@option:option(int_or_string()), binary(), gleam@option:option(boolean()), gleam@option:option(binary()), gleam@option:option(binary()), gleam@option:option(list(message_entity()))}. -type gift_premium_subscription_parameters() :: {gift_premium_subscription_parameters, integer(), integer(), integer(), gleam@option:option(binary()), gleam@option:option(binary()), gleam@option:option(list(message_entity()))}. -type verify_user_parameters() :: {verify_user_parameters, integer(), gleam@option:option(binary())}. -type verify_chat_parameters() :: {verify_chat_parameters, int_or_string(), gleam@option:option(binary())}. -type remove_user_verification_parameters() :: {remove_user_verification_parameters, integer()}. -type remove_chat_verification_parameters() :: {remove_chat_verification_parameters, int_or_string()}. -type get_custom_emoji_stickers_parameters() :: {get_custom_emoji_stickers_parameters, list(binary())}. -type upload_sticker_file_parameters() :: {upload_sticker_file_parameters, integer(), file(), binary()}. -type create_new_sticker_set_parameters() :: {create_new_sticker_set_parameters, integer(), binary(), binary(), list(input_sticker()), gleam@option:option(binary()), gleam@option:option(boolean())}. -type add_sticker_to_set_parameters() :: {add_sticker_to_set_parameters, integer(), binary(), input_sticker()}. -type set_sticker_position_in_set_parameters() :: {set_sticker_position_in_set_parameters, binary(), integer()}. -type delete_sticker_from_set_parameters() :: {delete_sticker_from_set_parameters, binary()}. -type replace_sticker_in_set_parameters() :: {replace_sticker_in_set_parameters, integer(), binary(), binary(), input_sticker()}. -type set_sticker_emoji_list_parameters() :: {set_sticker_emoji_list_parameters, binary(), list(binary())}. -type set_sticker_keywords_parameters() :: {set_sticker_keywords_parameters, binary(), gleam@option:option(list(binary()))}. -type set_sticker_mask_position_parameters() :: {set_sticker_mask_position_parameters, binary(), gleam@option:option(mask_position())}. -type set_sticker_set_title_parameters() :: {set_sticker_set_title_parameters, binary(), binary()}. -type set_sticker_set_thumbnail_parameters() :: {set_sticker_set_thumbnail_parameters, binary(), integer(), gleam@option:option(file_or_string()), binary()}. -type set_custom_emoji_sticker_set_thumbnail_parameters() :: {set_custom_emoji_sticker_set_thumbnail_parameters, binary(), gleam@option:option(binary())}. -type delete_sticker_set_parameters() :: {delete_sticker_set_parameters, binary()}. -type answer_inline_query_parameters() :: {answer_inline_query_parameters, binary(), list(inline_query_result()), gleam@option:option(integer()), gleam@option:option(boolean()), gleam@option:option(binary()), gleam@option:option(inline_query_results_button())}. -type answer_shipping_query_parameters() :: {answer_shipping_query_parameters, binary(), boolean(), gleam@option:option(list(shipping_option())), gleam@option:option(binary())}. -type answer_pre_checkout_query_parameters() :: {answer_pre_checkout_query_parameters, binary(), boolean(), gleam@option:option(binary())}. -type get_star_transactions_parameters() :: {get_star_transactions_parameters, gleam@option:option(integer()), gleam@option:option(integer())}. -type refund_star_payment_parameters() :: {refund_star_payment_parameters, integer(), binary()}. -type edit_user_star_subscription_parameters() :: {edit_user_star_subscription_parameters, integer(), binary(), boolean()}. -type send_game_parameters() :: {send_game_parameters, gleam@option:option(binary()), integer(), gleam@option:option(integer()), binary(), gleam@option:option(boolean()), gleam@option:option(boolean()), gleam@option:option(boolean()), gleam@option:option(binary()), gleam@option:option(reply_parameters()), gleam@option:option(inline_keyboard_markup())}. -type set_game_score_parameters() :: {set_game_score_parameters, integer(), integer(), gleam@option:option(boolean()), gleam@option:option(boolean()), gleam@option:option(integer()), gleam@option:option(integer()), gleam@option:option(binary())}. -type get_game_high_scores_parameters() :: {get_game_high_scores_parameters, integer(), gleam@option:option(integer()), gleam@option:option(integer()), gleam@option:option(binary())}. -type read_business_message_parameters() :: {read_business_message_parameters, binary(), integer(), integer()}. -type delete_business_messages_parameters() :: {delete_business_messages_parameters, binary(), list(integer())}. -type set_business_account_name_parameters() :: {set_business_account_name_parameters, binary(), binary(), gleam@option:option(binary())}. -type set_business_account_username_parameters() :: {set_business_account_username_parameters, binary(), gleam@option:option(binary())}. -type set_business_account_bio_parameters() :: {set_business_account_bio_parameters, binary(), gleam@option:option(binary())}. -type set_business_account_profile_photo_parameters() :: {set_business_account_profile_photo_parameters, binary(), input_profile_photo(), gleam@option:option(boolean())}. -type remove_business_account_profile_photo_parameters() :: {remove_business_account_profile_photo_parameters, binary(), gleam@option:option(boolean())}. -type set_business_account_gift_settings_parameters() :: {set_business_account_gift_settings_parameters, binary(), boolean(), accepted_gift_types()}. -type get_business_account_star_balance_parameters() :: {get_business_account_star_balance_parameters, binary()}. -type transfer_business_account_stars_parameters() :: {transfer_business_account_stars_parameters, binary(), integer()}. -type get_business_account_gifts_parameters() :: {get_business_account_gifts_parameters, binary(), gleam@option:option(boolean()), gleam@option:option(boolean()), gleam@option:option(boolean()), gleam@option:option(boolean()), gleam@option:option(boolean()), gleam@option:option(boolean()), gleam@option:option(binary()), gleam@option:option(integer())}. -type convert_gift_to_stars_parameters() :: {convert_gift_to_stars_parameters, binary(), binary()}. -type upgrade_gift_parameters() :: {upgrade_gift_parameters, binary(), binary(), gleam@option:option(boolean()), gleam@option:option(integer())}. -type transfer_gift_parameters() :: {transfer_gift_parameters, binary(), binary(), integer(), gleam@option:option(integer())}. -type post_story_parameters() :: {post_story_parameters, binary(), input_story_content(), integer(), gleam@option:option(binary()), gleam@option:option(binary()), gleam@option:option(list(message_entity())), gleam@option:option(list(story_area())), gleam@option:option(boolean()), gleam@option:option(boolean())}. -type edit_story_parameters() :: {edit_story_parameters, binary(), integer(), input_story_content(), gleam@option:option(binary()), gleam@option:option(binary()), gleam@option:option(list(message_entity())), gleam@option:option(list(story_area()))}. -type delete_story_parameters() :: {delete_story_parameters, binary(), integer()}. -type int_or_string() :: {int, integer()} | {str, binary()}. -file("src/telega/model.gleam", 4537). -spec webhook_info_decoder() -> gleam@dynamic@decode:decoder(webhook_info()). webhook_info_decoder() -> gleam@dynamic@decode:field( <<"url"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Url) -> gleam@dynamic@decode:field( <<"has_custom_certificate"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_bool/1}, fun(Has_custom_certificate) -> gleam@dynamic@decode:field( <<"pending_update_count"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_int/1}, fun(Pending_update_count) -> gleam@dynamic@decode:optional_field( <<"ip_address"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_string/1} ), fun(Ip_address) -> gleam@dynamic@decode:optional_field( <<"last_error_date"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_int/1} ), fun(Last_error_date) -> gleam@dynamic@decode:optional_field( <<"last_error_message"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_string/1} ), fun(Last_error_message) -> gleam@dynamic@decode:optional_field( <<"last_synchronization_error_date"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_int/1} ), fun( Last_synchronization_error_date ) -> gleam@dynamic@decode:optional_field( <<"max_connections"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_int/1} ), fun( Max_connections ) -> gleam@dynamic@decode:optional_field( <<"allowed_updates"/utf8>>, none, gleam@dynamic@decode:optional( gleam@dynamic@decode:list( {decoder, fun gleam@dynamic@decode:decode_string/1} ) ), fun( Allowed_updates ) -> gleam@dynamic@decode:success( {webhook_info, Url, Has_custom_certificate, Pending_update_count, Ip_address, Last_error_date, Last_error_message, Last_synchronization_error_date, Max_connections, Allowed_updates} ) end ) end ) end ) end ) end ) end ) end ) end ) end ). -file("src/telega/model.gleam", 4587). -spec user_decoder() -> gleam@dynamic@decode:decoder(user()). user_decoder() -> gleam@dynamic@decode:field( <<"id"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_int/1}, fun(Id) -> gleam@dynamic@decode:field( <<"is_bot"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_bool/1}, fun(Is_bot) -> gleam@dynamic@decode:field( <<"first_name"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(First_name) -> gleam@dynamic@decode:optional_field( <<"last_name"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_string/1} ), fun(Last_name) -> gleam@dynamic@decode:optional_field( <<"username"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_string/1} ), fun(Username) -> gleam@dynamic@decode:optional_field( <<"language_code"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_string/1} ), fun(Language_code) -> gleam@dynamic@decode:optional_field( <<"is_premium"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_bool/1} ), fun(Is_premium) -> gleam@dynamic@decode:optional_field( <<"added_to_attachment_menu"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_bool/1} ), fun( Added_to_attachment_menu ) -> gleam@dynamic@decode:optional_field( <<"can_join_groups"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_bool/1} ), fun( Can_join_groups ) -> gleam@dynamic@decode:optional_field( <<"can_read_all_group_messages"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_bool/1} ), fun( Can_read_all_group_messages ) -> gleam@dynamic@decode:optional_field( <<"supports_inline_queries"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_bool/1} ), fun( Supports_inline_queries ) -> gleam@dynamic@decode:optional_field( <<"can_connect_to_business"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_bool/1} ), fun( Can_connect_to_business ) -> gleam@dynamic@decode:optional_field( <<"has_main_web_app"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_bool/1} ), fun( Has_main_web_app ) -> gleam@dynamic@decode:success( {user, Id, Is_bot, First_name, Last_name, Username, Language_code, Is_premium, Added_to_attachment_menu, Can_join_groups, Can_read_all_group_messages, Supports_inline_queries, Can_connect_to_business, Has_main_web_app} ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ). -file("src/telega/model.gleam", 4658). -spec chat_decoder() -> gleam@dynamic@decode:decoder(chat()). chat_decoder() -> gleam@dynamic@decode:field( <<"id"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_int/1}, fun(Id) -> gleam@dynamic@decode:optional_field( <<"type"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_string/1} ), fun(Type_) -> gleam@dynamic@decode:optional_field( <<"title"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_string/1} ), fun(Title) -> gleam@dynamic@decode:optional_field( <<"username"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_string/1} ), fun(Username) -> gleam@dynamic@decode:optional_field( <<"first_name"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_string/1} ), fun(First_name) -> gleam@dynamic@decode:optional_field( <<"last_name"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_string/1} ), fun(Last_name) -> gleam@dynamic@decode:optional_field( <<"is_forum"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_bool/1} ), fun(Is_forum) -> gleam@dynamic@decode:success( {chat, Id, Type_, Title, Username, First_name, Last_name, Is_forum} ) end ) end ) end ) end ) end ) end ) end ). -file("src/telega/model.gleam", 5459). -spec message_id_decoder() -> gleam@dynamic@decode:decoder(message_id()). message_id_decoder() -> gleam@dynamic@decode:field( <<"message_id"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_int/1}, fun(Message_id) -> gleam@dynamic@decode:success({message_id, Message_id}) end ). -file("src/telega/model.gleam", 5464). -spec inaccessible_message_decoder() -> gleam@dynamic@decode:decoder(inaccessible_message()). inaccessible_message_decoder() -> gleam@dynamic@decode:field( <<"chat"/utf8>>, chat_decoder(), fun(Chat) -> gleam@dynamic@decode:field( <<"message_id"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_int/1}, fun(Message_id) -> gleam@dynamic@decode:field( <<"date"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_int/1}, fun(Date) -> gleam@dynamic@decode:success( {inaccessible_message, Chat, Message_id, Date} ) end ) end ) end ). -file("src/telega/model.gleam", 5475). -spec message_entity_decoder() -> gleam@dynamic@decode:decoder(message_entity()). message_entity_decoder() -> gleam@dynamic@decode:field( <<"type"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Type_) -> gleam@dynamic@decode:field( <<"offset"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_int/1}, fun(Offset) -> gleam@dynamic@decode:field( <<"length"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_int/1}, fun(Length) -> gleam@dynamic@decode:optional_field( <<"url"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_string/1} ), fun(Url) -> gleam@dynamic@decode:optional_field( <<"user"/utf8>>, none, gleam@dynamic@decode:optional( user_decoder() ), fun(User) -> gleam@dynamic@decode:optional_field( <<"language"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_string/1} ), fun(Language) -> gleam@dynamic@decode:optional_field( <<"custom_emoji_id"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_string/1} ), fun(Custom_emoji_id) -> gleam@dynamic@decode:success( {message_entity, Type_, Offset, Length, Url, User, Language, Custom_emoji_id} ) end ) end ) end ) end ) end ) end ) end ). -file("src/telega/model.gleam", 5506). -spec text_quote_decoder() -> gleam@dynamic@decode:decoder(text_quote()). text_quote_decoder() -> gleam@dynamic@decode:field( <<"text"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Text) -> gleam@dynamic@decode:optional_field( <<"entities"/utf8>>, none, gleam@dynamic@decode:optional( gleam@dynamic@decode:list(message_entity_decoder()) ), fun(Entities) -> gleam@dynamic@decode:field( <<"position"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_int/1}, fun(Position) -> gleam@dynamic@decode:optional_field( <<"is_manual"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_bool/1} ), fun(Is_manual) -> gleam@dynamic@decode:success( {text_quote, Text, Entities, Position, Is_manual} ) end ) end ) end ) end ). -file("src/telega/model.gleam", 5715). -spec message_origin_user_decoder() -> gleam@dynamic@decode:decoder(message_origin_user()). message_origin_user_decoder() -> gleam@dynamic@decode:field( <<"type"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Type_) -> gleam@dynamic@decode:field( <<"date"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_int/1}, fun(Date) -> gleam@dynamic@decode:field( <<"sender_user"/utf8>>, user_decoder(), fun(Sender_user) -> gleam@dynamic@decode:success( {message_origin_user, Type_, Date, Sender_user} ) end ) end ) end ). -file("src/telega/model.gleam", 5726). -spec message_origin_hidden_user_decoder() -> gleam@dynamic@decode:decoder(message_origin_hidden_user()). message_origin_hidden_user_decoder() -> gleam@dynamic@decode:field( <<"type"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Type_) -> gleam@dynamic@decode:field( <<"date"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_int/1}, fun(Date) -> gleam@dynamic@decode:field( <<"sender_user_name"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Sender_user_name) -> gleam@dynamic@decode:success( {message_origin_hidden_user, Type_, Date, Sender_user_name} ) end ) end ) end ). -file("src/telega/model.gleam", 5739). -spec message_origin_chat_decoder() -> gleam@dynamic@decode:decoder(message_origin_chat()). message_origin_chat_decoder() -> gleam@dynamic@decode:field( <<"type"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Type_) -> gleam@dynamic@decode:field( <<"date"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_int/1}, fun(Date) -> gleam@dynamic@decode:field( <<"sender_chat"/utf8>>, chat_decoder(), fun(Sender_chat) -> gleam@dynamic@decode:optional_field( <<"author_signature"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_string/1} ), fun(Author_signature) -> gleam@dynamic@decode:success( {message_origin_chat, Type_, Date, Sender_chat, Author_signature} ) end ) end ) end ) end ). -file("src/telega/model.gleam", 5756). -spec message_origin_channel_decoder() -> gleam@dynamic@decode:decoder(message_origin_channel()). message_origin_channel_decoder() -> gleam@dynamic@decode:field( <<"type"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Type_) -> gleam@dynamic@decode:field( <<"date"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_int/1}, fun(Date) -> gleam@dynamic@decode:field( <<"chat"/utf8>>, chat_decoder(), fun(Chat) -> gleam@dynamic@decode:field( <<"message_id"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_int/1}, fun(Message_id) -> gleam@dynamic@decode:optional_field( <<"author_signature"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_string/1} ), fun(Author_signature) -> gleam@dynamic@decode:success( {message_origin_channel, Type_, Date, Chat, Message_id, Author_signature} ) end ) end ) end ) end ) end ). -file("src/telega/model.gleam", 5775). -spec photo_size_decoder() -> gleam@dynamic@decode:decoder(photo_size()). photo_size_decoder() -> gleam@dynamic@decode:field( <<"file_id"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(File_id) -> gleam@dynamic@decode:field( <<"file_unique_id"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(File_unique_id) -> gleam@dynamic@decode:field( <<"width"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_int/1}, fun(Width) -> gleam@dynamic@decode:field( <<"height"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_int/1}, fun(Height) -> gleam@dynamic@decode:optional_field( <<"file_size"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_int/1} ), fun(File_size) -> gleam@dynamic@decode:success( {photo_size, File_id, File_unique_id, Width, Height, File_size} ) end ) end ) end ) end ) end ). -file("src/telega/model.gleam", 5794). -spec animation_decoder() -> gleam@dynamic@decode:decoder(animation()). animation_decoder() -> gleam@dynamic@decode:field( <<"file_id"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(File_id) -> gleam@dynamic@decode:field( <<"file_unique_id"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(File_unique_id) -> gleam@dynamic@decode:field( <<"width"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_int/1}, fun(Width) -> gleam@dynamic@decode:field( <<"height"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_int/1}, fun(Height) -> gleam@dynamic@decode:field( <<"duration"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_int/1}, fun(Duration) -> gleam@dynamic@decode:optional_field( <<"thumbnail"/utf8>>, none, gleam@dynamic@decode:optional( photo_size_decoder() ), fun(Thumbnail) -> gleam@dynamic@decode:optional_field( <<"file_name"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_string/1} ), fun(File_name) -> gleam@dynamic@decode:optional_field( <<"mime_type"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_string/1} ), fun(Mime_type) -> gleam@dynamic@decode:optional_field( <<"file_size"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_int/1} ), fun( File_size ) -> gleam@dynamic@decode:success( {animation, File_id, File_unique_id, Width, Height, Duration, Thumbnail, File_name, Mime_type, File_size} ) end ) end ) end ) end ) end ) end ) end ) end ) end ). -file("src/telega/model.gleam", 5833). -spec audio_decoder() -> gleam@dynamic@decode:decoder(audio()). audio_decoder() -> gleam@dynamic@decode:field( <<"file_id"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(File_id) -> gleam@dynamic@decode:field( <<"file_unique_id"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(File_unique_id) -> gleam@dynamic@decode:field( <<"duration"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_int/1}, fun(Duration) -> gleam@dynamic@decode:optional_field( <<"performer"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_string/1} ), fun(Performer) -> gleam@dynamic@decode:optional_field( <<"title"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_string/1} ), fun(Title) -> gleam@dynamic@decode:optional_field( <<"file_name"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_string/1} ), fun(File_name) -> gleam@dynamic@decode:optional_field( <<"mime_type"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_string/1} ), fun(Mime_type) -> gleam@dynamic@decode:optional_field( <<"file_size"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_int/1} ), fun(File_size) -> gleam@dynamic@decode:optional_field( <<"thumbnail"/utf8>>, none, gleam@dynamic@decode:optional( photo_size_decoder( ) ), fun( Thumbnail ) -> gleam@dynamic@decode:success( {audio, File_id, File_unique_id, Duration, Performer, Title, File_name, Mime_type, File_size, Thumbnail} ) end ) end ) end ) end ) end ) end ) end ) end ) end ). -file("src/telega/model.gleam", 5880). -spec document_decoder() -> gleam@dynamic@decode:decoder(document()). document_decoder() -> gleam@dynamic@decode:field( <<"file_id"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(File_id) -> gleam@dynamic@decode:field( <<"file_unique_id"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(File_unique_id) -> gleam@dynamic@decode:optional_field( <<"thumbnail"/utf8>>, none, gleam@dynamic@decode:optional(photo_size_decoder()), fun(Thumbnail) -> gleam@dynamic@decode:optional_field( <<"file_name"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_string/1} ), fun(File_name) -> gleam@dynamic@decode:optional_field( <<"mime_type"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_string/1} ), fun(Mime_type) -> gleam@dynamic@decode:optional_field( <<"file_size"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_int/1} ), fun(File_size) -> gleam@dynamic@decode:success( {document, File_id, File_unique_id, Thumbnail, File_name, Mime_type, File_size} ) end ) end ) end ) end ) end ) end ). -file("src/telega/model.gleam", 5913). -spec story_decoder() -> gleam@dynamic@decode:decoder(story()). story_decoder() -> gleam@dynamic@decode:field( <<"chat"/utf8>>, chat_decoder(), fun(Chat) -> gleam@dynamic@decode:field( <<"id"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_int/1}, fun(Id) -> gleam@dynamic@decode:success({story, Chat, Id}) end ) end ). -file("src/telega/model.gleam", 5919). -spec video_decoder() -> gleam@dynamic@decode:decoder(video()). video_decoder() -> gleam@dynamic@decode:field( <<"file_id"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(File_id) -> gleam@dynamic@decode:field( <<"file_unique_id"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(File_unique_id) -> gleam@dynamic@decode:field( <<"width"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_int/1}, fun(Width) -> gleam@dynamic@decode:field( <<"height"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_int/1}, fun(Height) -> gleam@dynamic@decode:field( <<"duration"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_int/1}, fun(Duration) -> gleam@dynamic@decode:optional_field( <<"thumbnail"/utf8>>, none, gleam@dynamic@decode:optional( photo_size_decoder() ), fun(Thumbnail) -> gleam@dynamic@decode:optional_field( <<"cover"/utf8>>, none, gleam@dynamic@decode:optional( gleam@dynamic@decode:list( photo_size_decoder( ) ) ), fun(Cover) -> gleam@dynamic@decode:optional_field( <<"start_timestamp"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_int/1} ), fun( Start_timestamp ) -> gleam@dynamic@decode:optional_field( <<"file_name"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_string/1} ), fun( File_name ) -> gleam@dynamic@decode:optional_field( <<"mime_type"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_string/1} ), fun( Mime_type ) -> gleam@dynamic@decode:optional_field( <<"file_size"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_int/1} ), fun( File_size ) -> gleam@dynamic@decode:success( {video, File_id, File_unique_id, Width, Height, Duration, Thumbnail, Cover, Start_timestamp, File_name, Mime_type, File_size} ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ). -file("src/telega/model.gleam", 5970). -spec video_note_decoder() -> gleam@dynamic@decode:decoder(video_note()). video_note_decoder() -> gleam@dynamic@decode:field( <<"file_id"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(File_id) -> gleam@dynamic@decode:field( <<"file_unique_id"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(File_unique_id) -> gleam@dynamic@decode:field( <<"length"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_int/1}, fun(Length) -> gleam@dynamic@decode:field( <<"duration"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_int/1}, fun(Duration) -> gleam@dynamic@decode:optional_field( <<"thumbnail"/utf8>>, none, gleam@dynamic@decode:optional( photo_size_decoder() ), fun(Thumbnail) -> gleam@dynamic@decode:optional_field( <<"file_size"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_int/1} ), fun(File_size) -> gleam@dynamic@decode:success( {video_note, File_id, File_unique_id, Length, Duration, Thumbnail, File_size} ) end ) end ) end ) end ) end ) end ). -file("src/telega/model.gleam", 5995). -spec voice_decoder() -> gleam@dynamic@decode:decoder(voice()). voice_decoder() -> gleam@dynamic@decode:field( <<"file_id"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(File_id) -> gleam@dynamic@decode:field( <<"file_unique_id"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(File_unique_id) -> gleam@dynamic@decode:field( <<"duration"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_int/1}, fun(Duration) -> gleam@dynamic@decode:optional_field( <<"mime_type"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_string/1} ), fun(Mime_type) -> gleam@dynamic@decode:optional_field( <<"file_size"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_int/1} ), fun(File_size) -> gleam@dynamic@decode:success( {voice, File_id, File_unique_id, Duration, Mime_type, File_size} ) end ) end ) end ) end ) end ). -file("src/telega/model.gleam", 6027). -spec paid_media_preview_decoder() -> gleam@dynamic@decode:decoder(paid_media_preview()). paid_media_preview_decoder() -> gleam@dynamic@decode:field( <<"type"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Type_) -> gleam@dynamic@decode:optional_field( <<"width"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_int/1} ), fun(Width) -> gleam@dynamic@decode:optional_field( <<"height"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_int/1} ), fun(Height) -> gleam@dynamic@decode:optional_field( <<"duration"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_int/1} ), fun(Duration) -> gleam@dynamic@decode:success( {paid_media_preview, Type_, Width, Height, Duration} ) end ) end ) end ) end ). -file("src/telega/model.gleam", 6048). -spec paid_media_photo_decoder() -> gleam@dynamic@decode:decoder(paid_media_photo()). paid_media_photo_decoder() -> gleam@dynamic@decode:field( <<"type"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Type_) -> gleam@dynamic@decode:field( <<"photo"/utf8>>, gleam@dynamic@decode:list(photo_size_decoder()), fun(Photo) -> gleam@dynamic@decode:success( {paid_media_photo, Type_, Photo} ) end ) end ). -file("src/telega/model.gleam", 6054). -spec paid_media_video_decoder() -> gleam@dynamic@decode:decoder(paid_media_video()). paid_media_video_decoder() -> gleam@dynamic@decode:field( <<"type"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Type_) -> gleam@dynamic@decode:field( <<"video"/utf8>>, video_decoder(), fun(Video) -> gleam@dynamic@decode:success( {paid_media_video, Type_, Video} ) end ) end ). -file("src/telega/model.gleam", 6060). -spec contact_decoder() -> gleam@dynamic@decode:decoder(contact()). contact_decoder() -> gleam@dynamic@decode:field( <<"phone_number"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Phone_number) -> gleam@dynamic@decode:field( <<"first_name"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(First_name) -> gleam@dynamic@decode:optional_field( <<"last_name"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_string/1} ), fun(Last_name) -> gleam@dynamic@decode:optional_field( <<"user_id"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_int/1} ), fun(User_id) -> gleam@dynamic@decode:optional_field( <<"vcard"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_string/1} ), fun(Vcard) -> gleam@dynamic@decode:success( {contact, Phone_number, First_name, Last_name, User_id, Vcard} ) end ) end ) end ) end ) end ). -file("src/telega/model.gleam", 6087). -spec dice_decoder() -> gleam@dynamic@decode:decoder(dice()). dice_decoder() -> gleam@dynamic@decode:field( <<"emoji"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Emoji) -> gleam@dynamic@decode:field( <<"value"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_int/1}, fun(Value) -> gleam@dynamic@decode:success({dice, Emoji, Value}) end ) end ). -file("src/telega/model.gleam", 6093). -spec poll_option_decoder() -> gleam@dynamic@decode:decoder(poll_option()). poll_option_decoder() -> gleam@dynamic@decode:field( <<"text"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Text) -> gleam@dynamic@decode:optional_field( <<"text_entities"/utf8>>, none, gleam@dynamic@decode:optional( gleam@dynamic@decode:list(message_entity_decoder()) ), fun(Text_entities) -> gleam@dynamic@decode:field( <<"voter_count"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_int/1}, fun(Voter_count) -> gleam@dynamic@decode:success( {poll_option, Text, Text_entities, Voter_count} ) end ) end ) end ). -file("src/telega/model.gleam", 6108). -spec input_poll_option_decoder() -> gleam@dynamic@decode:decoder(input_poll_option()). input_poll_option_decoder() -> gleam@dynamic@decode:field( <<"text"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Text) -> gleam@dynamic@decode:optional_field( <<"text_parse_mode"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_string/1} ), fun(Text_parse_mode) -> gleam@dynamic@decode:optional_field( <<"text_entities"/utf8>>, none, gleam@dynamic@decode:optional( gleam@dynamic@decode:list(message_entity_decoder()) ), fun(Text_entities) -> gleam@dynamic@decode:success( {input_poll_option, Text, Text_parse_mode, Text_entities} ) end ) end ) end ). -file("src/telega/model.gleam", 6127). -spec poll_answer_decoder() -> gleam@dynamic@decode:decoder(poll_answer()). poll_answer_decoder() -> gleam@dynamic@decode:field( <<"poll_id"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Poll_id) -> gleam@dynamic@decode:optional_field( <<"voter_chat"/utf8>>, none, gleam@dynamic@decode:optional(chat_decoder()), fun(Voter_chat) -> gleam@dynamic@decode:optional_field( <<"user"/utf8>>, none, gleam@dynamic@decode:optional(user_decoder()), fun(User) -> gleam@dynamic@decode:field( <<"option_ids"/utf8>>, gleam@dynamic@decode:list( {decoder, fun gleam@dynamic@decode:decode_int/1} ), fun(Option_ids) -> gleam@dynamic@decode:success( {poll_answer, Poll_id, Voter_chat, User, Option_ids} ) end ) end ) end ) end ). -file("src/telega/model.gleam", 6148). -spec poll_decoder() -> gleam@dynamic@decode:decoder(poll()). poll_decoder() -> gleam@dynamic@decode:field( <<"id"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Id) -> gleam@dynamic@decode:field( <<"question"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Question) -> gleam@dynamic@decode:optional_field( <<"question_entities"/utf8>>, none, gleam@dynamic@decode:optional( gleam@dynamic@decode:list(message_entity_decoder()) ), fun(Question_entities) -> gleam@dynamic@decode:field( <<"options"/utf8>>, gleam@dynamic@decode:list(poll_option_decoder()), fun(Options) -> gleam@dynamic@decode:field( <<"total_voter_count"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_int/1}, fun(Total_voter_count) -> gleam@dynamic@decode:field( <<"is_closed"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_bool/1}, fun(Is_closed) -> gleam@dynamic@decode:field( <<"is_anonymous"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_bool/1}, fun(Is_anonymous) -> gleam@dynamic@decode:field( <<"type"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Type_) -> gleam@dynamic@decode:field( <<"allows_multiple_answers"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_bool/1}, fun( Allows_multiple_answers ) -> gleam@dynamic@decode:optional_field( <<"correct_option_id"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_int/1} ), fun( Correct_option_id ) -> gleam@dynamic@decode:optional_field( <<"explanation"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_string/1} ), fun( Explanation ) -> gleam@dynamic@decode:optional_field( <<"explanation_entities"/utf8>>, none, gleam@dynamic@decode:optional( gleam@dynamic@decode:list( message_entity_decoder( ) ) ), fun( Explanation_entities ) -> gleam@dynamic@decode:optional_field( <<"open_period"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_int/1} ), fun( Open_period ) -> gleam@dynamic@decode:optional_field( <<"close_date"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_int/1} ), fun( Close_date ) -> gleam@dynamic@decode:success( {poll, Id, Question, Question_entities, Options, Total_voter_count, Is_closed, Is_anonymous, Type_, Allows_multiple_answers, Correct_option_id, Explanation, Explanation_entities, Open_period, Close_date} ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ). -file("src/telega/model.gleam", 6208). -spec location_decoder() -> gleam@dynamic@decode:decoder(location()). location_decoder() -> gleam@dynamic@decode:field( <<"latitude"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_float/1}, fun(Latitude) -> gleam@dynamic@decode:field( <<"longitude"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_float/1}, fun(Longitude) -> gleam@dynamic@decode:optional_field( <<"horizontal_accuracy"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_float/1} ), fun(Horizontal_accuracy) -> gleam@dynamic@decode:optional_field( <<"live_period"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_int/1} ), fun(Live_period) -> gleam@dynamic@decode:optional_field( <<"heading"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_int/1} ), fun(Heading) -> gleam@dynamic@decode:optional_field( <<"proximity_alert_radius"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_int/1} ), fun(Proximity_alert_radius) -> gleam@dynamic@decode:success( {location, Latitude, Longitude, Horizontal_accuracy, Live_period, Heading, Proximity_alert_radius} ) end ) end ) end ) end ) end ) end ). -file("src/telega/model.gleam", 6241). -spec venue_decoder() -> gleam@dynamic@decode:decoder(venue()). venue_decoder() -> gleam@dynamic@decode:field( <<"location"/utf8>>, location_decoder(), fun(Location) -> gleam@dynamic@decode:field( <<"title"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Title) -> gleam@dynamic@decode:field( <<"address"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Address) -> gleam@dynamic@decode:optional_field( <<"foursquare_id"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_string/1} ), fun(Foursquare_id) -> gleam@dynamic@decode:optional_field( <<"foursquare_type"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_string/1} ), fun(Foursquare_type) -> gleam@dynamic@decode:optional_field( <<"google_place_id"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_string/1} ), fun(Google_place_id) -> gleam@dynamic@decode:optional_field( <<"google_place_type"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_string/1} ), fun(Google_place_type) -> gleam@dynamic@decode:success( {venue, Location, Title, Address, Foursquare_id, Foursquare_type, Google_place_id, Google_place_type} ) end ) end ) end ) end ) end ) end ) end ). -file("src/telega/model.gleam", 6276). -spec web_app_data_decoder() -> gleam@dynamic@decode:decoder(web_app_data()). web_app_data_decoder() -> gleam@dynamic@decode:field( <<"data"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Data) -> gleam@dynamic@decode:field( <<"button_text"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Button_text) -> gleam@dynamic@decode:success( {web_app_data, Data, Button_text} ) end ) end ). -file("src/telega/model.gleam", 6282). -spec proximity_alert_triggered_decoder() -> gleam@dynamic@decode:decoder(proximity_alert_triggered()). proximity_alert_triggered_decoder() -> gleam@dynamic@decode:field( <<"traveler"/utf8>>, user_decoder(), fun(Traveler) -> gleam@dynamic@decode:field( <<"watcher"/utf8>>, user_decoder(), fun(Watcher) -> gleam@dynamic@decode:field( <<"distance"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_int/1}, fun(Distance) -> gleam@dynamic@decode:success( {proximity_alert_triggered, Traveler, Watcher, Distance} ) end ) end ) end ). -file("src/telega/model.gleam", 6295). -spec message_auto_delete_timer_changed_decoder() -> gleam@dynamic@decode:decoder(message_auto_delete_timer_changed()). message_auto_delete_timer_changed_decoder() -> gleam@dynamic@decode:field( <<"message_auto_delete_time"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_int/1}, fun(Message_auto_delete_time) -> gleam@dynamic@decode:success( {message_auto_delete_timer_changed, Message_auto_delete_time} ) end ). -file("src/telega/model.gleam", 6307). -spec chat_boost_added_decoder() -> gleam@dynamic@decode:decoder(chat_boost_added()). chat_boost_added_decoder() -> gleam@dynamic@decode:field( <<"boost_count"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_int/1}, fun(Boost_count) -> gleam@dynamic@decode:success({chat_boost_added, Boost_count}) end ). -file("src/telega/model.gleam", 6312). -spec background_fill_solid_decoder() -> gleam@dynamic@decode:decoder(background_fill_solid()). background_fill_solid_decoder() -> gleam@dynamic@decode:field( <<"type"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Type_) -> gleam@dynamic@decode:field( <<"color"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_int/1}, fun(Color) -> gleam@dynamic@decode:success( {background_fill_solid, Type_, Color} ) end ) end ). -file("src/telega/model.gleam", 6318). -spec background_fill_gradient_decoder() -> gleam@dynamic@decode:decoder(background_fill_gradient()). background_fill_gradient_decoder() -> gleam@dynamic@decode:field( <<"type"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Type_) -> gleam@dynamic@decode:field( <<"top_color"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_int/1}, fun(Top_color) -> gleam@dynamic@decode:field( <<"bottom_color"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_int/1}, fun(Bottom_color) -> gleam@dynamic@decode:field( <<"rotation_angle"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_int/1}, fun(Rotation_angle) -> gleam@dynamic@decode:success( {background_fill_gradient, Type_, Top_color, Bottom_color, Rotation_angle} ) end ) end ) end ) end ). -file("src/telega/model.gleam", 6333). -spec background_fill_freeform_gradient_decoder() -> gleam@dynamic@decode:decoder(background_fill_freeform_gradient()). background_fill_freeform_gradient_decoder() -> gleam@dynamic@decode:field( <<"type"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Type_) -> gleam@dynamic@decode:field( <<"colors"/utf8>>, gleam@dynamic@decode:list( {decoder, fun gleam@dynamic@decode:decode_int/1} ), fun(Colors) -> gleam@dynamic@decode:success( {background_fill_freeform_gradient, Type_, Colors} ) end ) end ). -file("src/telega/model.gleam", 6352). -spec background_type_wallpaper_decoder() -> gleam@dynamic@decode:decoder(background_type_wallpaper()). background_type_wallpaper_decoder() -> gleam@dynamic@decode:field( <<"type"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Type_) -> gleam@dynamic@decode:field( <<"document"/utf8>>, document_decoder(), fun(Document) -> gleam@dynamic@decode:field( <<"dark_theme_dimming"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_int/1}, fun(Dark_theme_dimming) -> gleam@dynamic@decode:optional_field( <<"is_blurred"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_bool/1} ), fun(Is_blurred) -> gleam@dynamic@decode:optional_field( <<"is_moving"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_bool/1} ), fun(Is_moving) -> gleam@dynamic@decode:success( {background_type_wallpaper, Type_, Document, Dark_theme_dimming, Is_blurred, Is_moving} ) end ) end ) end ) end ) end ). -file("src/telega/model.gleam", 6404). -spec background_type_chat_theme_decoder() -> gleam@dynamic@decode:decoder(background_type_chat_theme()). background_type_chat_theme_decoder() -> gleam@dynamic@decode:field( <<"type"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Type_) -> gleam@dynamic@decode:field( <<"theme_name"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Theme_name) -> gleam@dynamic@decode:success( {background_type_chat_theme, Type_, Theme_name} ) end ) end ). -file("src/telega/model.gleam", 6417). -spec forum_topic_created_decoder() -> gleam@dynamic@decode:decoder(forum_topic_created()). forum_topic_created_decoder() -> gleam@dynamic@decode:field( <<"name"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Name) -> gleam@dynamic@decode:field( <<"icon_color"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_int/1}, fun(Icon_color) -> gleam@dynamic@decode:optional_field( <<"icon_custom_emoji_id"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_string/1} ), fun(Icon_custom_emoji_id) -> gleam@dynamic@decode:success( {forum_topic_created, Name, Icon_color, Icon_custom_emoji_id} ) end ) end ) end ). -file("src/telega/model.gleam", 6432). -spec forum_topic_closed_decoder() -> gleam@dynamic@decode:decoder(forum_topic_closed()). forum_topic_closed_decoder() -> gleam@dynamic@decode:success(forum_topic_closed). -file("src/telega/model.gleam", 6436). -spec forum_topic_edited_decoder() -> gleam@dynamic@decode:decoder(forum_topic_edited()). forum_topic_edited_decoder() -> gleam@dynamic@decode:optional_field( <<"name"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_string/1} ), fun(Name) -> gleam@dynamic@decode:optional_field( <<"icon_custom_emoji_id"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_string/1} ), fun(Icon_custom_emoji_id) -> gleam@dynamic@decode:success( {forum_topic_edited, Name, Icon_custom_emoji_id} ) end ) end ). -file("src/telega/model.gleam", 6453). -spec forum_topic_reopened_decoder() -> gleam@dynamic@decode:decoder(forum_topic_reopened()). forum_topic_reopened_decoder() -> gleam@dynamic@decode:success(forum_topic_reopened). -file("src/telega/model.gleam", 6457). -spec general_forum_topic_hidden_decoder() -> gleam@dynamic@decode:decoder(general_forum_topic_hidden()). general_forum_topic_hidden_decoder() -> gleam@dynamic@decode:success(general_forum_topic_hidden). -file("src/telega/model.gleam", 6463). -spec general_forum_topic_unhidden_decoder() -> gleam@dynamic@decode:decoder(general_forum_topic_unhidden()). general_forum_topic_unhidden_decoder() -> gleam@dynamic@decode:success(general_forum_topic_unhidden). -file("src/telega/model.gleam", 6469). -spec shared_user_decoder() -> gleam@dynamic@decode:decoder(shared_user()). shared_user_decoder() -> gleam@dynamic@decode:field( <<"user_id"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_int/1}, fun(User_id) -> gleam@dynamic@decode:optional_field( <<"first_name"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_string/1} ), fun(First_name) -> gleam@dynamic@decode:optional_field( <<"last_name"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_string/1} ), fun(Last_name) -> gleam@dynamic@decode:optional_field( <<"username"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_string/1} ), fun(Username) -> gleam@dynamic@decode:optional_field( <<"photo"/utf8>>, none, gleam@dynamic@decode:optional( gleam@dynamic@decode:list( photo_size_decoder() ) ), fun(Photo) -> gleam@dynamic@decode:success( {shared_user, User_id, First_name, Last_name, Username, Photo} ) end ) end ) end ) end ) end ). -file("src/telega/model.gleam", 6500). -spec users_shared_decoder() -> gleam@dynamic@decode:decoder(users_shared()). users_shared_decoder() -> gleam@dynamic@decode:field( <<"request_id"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_int/1}, fun(Request_id) -> gleam@dynamic@decode:field( <<"users"/utf8>>, gleam@dynamic@decode:list(shared_user_decoder()), fun(Users) -> gleam@dynamic@decode:success( {users_shared, Request_id, Users} ) end ) end ). -file("src/telega/model.gleam", 6506). -spec chat_shared_decoder() -> gleam@dynamic@decode:decoder(chat_shared()). chat_shared_decoder() -> gleam@dynamic@decode:field( <<"request_id"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_int/1}, fun(Request_id) -> gleam@dynamic@decode:field( <<"chat_id"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_int/1}, fun(Chat_id) -> gleam@dynamic@decode:optional_field( <<"title"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_string/1} ), fun(Title) -> gleam@dynamic@decode:optional_field( <<"username"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_string/1} ), fun(Username) -> gleam@dynamic@decode:optional_field( <<"photo"/utf8>>, none, gleam@dynamic@decode:optional( gleam@dynamic@decode:list( photo_size_decoder() ) ), fun(Photo) -> gleam@dynamic@decode:success( {chat_shared, Request_id, Chat_id, Title, Username, Photo} ) end ) end ) end ) end ) end ). -file("src/telega/model.gleam", 6533). -spec write_access_allowed_decoder() -> gleam@dynamic@decode:decoder(write_access_allowed()). write_access_allowed_decoder() -> gleam@dynamic@decode:optional_field( <<"from_request"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_bool/1} ), fun(From_request) -> gleam@dynamic@decode:optional_field( <<"web_app_name"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_string/1} ), fun(Web_app_name) -> gleam@dynamic@decode:optional_field( <<"from_attachment_menu"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_bool/1} ), fun(From_attachment_menu) -> gleam@dynamic@decode:success( {write_access_allowed, From_request, Web_app_name, From_attachment_menu} ) end ) end ) end ). -file("src/telega/model.gleam", 6556). -spec video_chat_scheduled_decoder() -> gleam@dynamic@decode:decoder(video_chat_scheduled()). video_chat_scheduled_decoder() -> gleam@dynamic@decode:field( <<"start_date"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_int/1}, fun(Start_date) -> gleam@dynamic@decode:success({video_chat_scheduled, Start_date}) end ). -file("src/telega/model.gleam", 6561). -spec video_chat_started_decoder() -> gleam@dynamic@decode:decoder(video_chat_started()). video_chat_started_decoder() -> gleam@dynamic@decode:success(video_chat_started). -file("src/telega/model.gleam", 6565). -spec video_chat_ended_decoder() -> gleam@dynamic@decode:decoder(video_chat_ended()). video_chat_ended_decoder() -> gleam@dynamic@decode:field( <<"duration"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_int/1}, fun(Duration) -> gleam@dynamic@decode:success({video_chat_ended, Duration}) end ). -file("src/telega/model.gleam", 6570). -spec video_chat_participants_invited_decoder() -> gleam@dynamic@decode:decoder(video_chat_participants_invited()). video_chat_participants_invited_decoder() -> gleam@dynamic@decode:field( <<"users"/utf8>>, gleam@dynamic@decode:list(user_decoder()), fun(Users) -> gleam@dynamic@decode:success( {video_chat_participants_invited, Users} ) end ). -file("src/telega/model.gleam", 6577). -spec giveaway_created_decoder() -> gleam@dynamic@decode:decoder(giveaway_created()). giveaway_created_decoder() -> gleam@dynamic@decode:optional_field( <<"prize_star_count"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_int/1} ), fun(Prize_star_count) -> gleam@dynamic@decode:success({giveaway_created, Prize_star_count}) end ). -file("src/telega/model.gleam", 6586). -spec giveaway_decoder() -> gleam@dynamic@decode:decoder(giveaway()). giveaway_decoder() -> gleam@dynamic@decode:field( <<"chats"/utf8>>, gleam@dynamic@decode:list(chat_decoder()), fun(Chats) -> gleam@dynamic@decode:field( <<"winners_selection_date"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_int/1}, fun(Winners_selection_date) -> gleam@dynamic@decode:field( <<"winner_count"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_int/1}, fun(Winner_count) -> gleam@dynamic@decode:optional_field( <<"only_new_members"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_bool/1} ), fun(Only_new_members) -> gleam@dynamic@decode:optional_field( <<"has_public_winners"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_bool/1} ), fun(Has_public_winners) -> gleam@dynamic@decode:optional_field( <<"prize_description"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_string/1} ), fun(Prize_description) -> gleam@dynamic@decode:optional_field( <<"country_codes"/utf8>>, none, gleam@dynamic@decode:optional( gleam@dynamic@decode:list( {decoder, fun gleam@dynamic@decode:decode_string/1} ) ), fun(Country_codes) -> gleam@dynamic@decode:optional_field( <<"prize_star_count"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_int/1} ), fun( Prize_star_count ) -> gleam@dynamic@decode:optional_field( <<"premium_subscription_month_count"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_int/1} ), fun( Premium_subscription_month_count ) -> gleam@dynamic@decode:success( {giveaway, Chats, Winners_selection_date, Winner_count, Only_new_members, Has_public_winners, Prize_description, Country_codes, Prize_star_count, Premium_subscription_month_count} ) end ) end ) end ) end ) end ) end ) end ) end ) end ). -file("src/telega/model.gleam", 6636). -spec giveaway_winners_decoder() -> gleam@dynamic@decode:decoder(giveaway_winners()). giveaway_winners_decoder() -> gleam@dynamic@decode:field( <<"chat"/utf8>>, chat_decoder(), fun(Chat) -> gleam@dynamic@decode:field( <<"giveaway_message_id"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_int/1}, fun(Giveaway_message_id) -> gleam@dynamic@decode:field( <<"winners_selection_date"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_int/1}, fun(Winners_selection_date) -> gleam@dynamic@decode:field( <<"winner_count"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_int/1}, fun(Winner_count) -> gleam@dynamic@decode:field( <<"winners"/utf8>>, gleam@dynamic@decode:list( user_decoder() ), fun(Winners) -> gleam@dynamic@decode:optional_field( <<"additional_chat_count"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_int/1} ), fun(Additional_chat_count) -> gleam@dynamic@decode:optional_field( <<"prize_star_count"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_int/1} ), fun(Prize_star_count) -> gleam@dynamic@decode:optional_field( <<"premium_subscription_month_count"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_int/1} ), fun( Premium_subscription_month_count ) -> gleam@dynamic@decode:optional_field( <<"unclaimed_prize_count"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_int/1} ), fun( Unclaimed_prize_count ) -> gleam@dynamic@decode:optional_field( <<"only_new_members"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_bool/1} ), fun( Only_new_members ) -> gleam@dynamic@decode:optional_field( <<"was_refunded"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_bool/1} ), fun( Was_refunded ) -> gleam@dynamic@decode:optional_field( <<"prize_description"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_string/1} ), fun( Prize_description ) -> gleam@dynamic@decode:success( {giveaway_winners, Chat, Giveaway_message_id, Winners_selection_date, Winner_count, Winners, Additional_chat_count, Prize_star_count, Premium_subscription_month_count, Unclaimed_prize_count, Only_new_members, Was_refunded, Prize_description} ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ). -file("src/telega/model.gleam", 6721). -spec link_preview_options_decoder() -> gleam@dynamic@decode:decoder(link_preview_options()). link_preview_options_decoder() -> gleam@dynamic@decode:optional_field( <<"is_disabled"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_bool/1} ), fun(Is_disabled) -> gleam@dynamic@decode:optional_field( <<"url"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_string/1} ), fun(Url) -> gleam@dynamic@decode:optional_field( <<"prefer_small_media"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_bool/1} ), fun(Prefer_small_media) -> gleam@dynamic@decode:optional_field( <<"prefer_large_media"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_bool/1} ), fun(Prefer_large_media) -> gleam@dynamic@decode:optional_field( <<"show_above_text"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_bool/1} ), fun(Show_above_text) -> gleam@dynamic@decode:success( {link_preview_options, Is_disabled, Url, Prefer_small_media, Prefer_large_media, Show_above_text} ) end ) end ) end ) end ) end ). -file("src/telega/model.gleam", 6752). -spec user_profile_photos_decoder() -> gleam@dynamic@decode:decoder(user_profile_photos()). user_profile_photos_decoder() -> gleam@dynamic@decode:field( <<"total_count"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_int/1}, fun(Total_count) -> gleam@dynamic@decode:field( <<"photos"/utf8>>, gleam@dynamic@decode:list( gleam@dynamic@decode:list(photo_size_decoder()) ), fun(Photos) -> gleam@dynamic@decode:success( {user_profile_photos, Total_count, Photos} ) end ) end ). -file("src/telega/model.gleam", 6761). -spec file_decoder() -> gleam@dynamic@decode:decoder(file()). file_decoder() -> gleam@dynamic@decode:field( <<"file_id"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(File_id) -> gleam@dynamic@decode:field( <<"file_unique_id"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(File_unique_id) -> gleam@dynamic@decode:optional_field( <<"file_size"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_int/1} ), fun(File_size) -> gleam@dynamic@decode:optional_field( <<"file_path"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_string/1} ), fun(File_path) -> gleam@dynamic@decode:success( {file, File_id, File_unique_id, File_size, File_path} ) end ) end ) end ) end ). -file("src/telega/model.gleam", 6782). -spec web_app_info_decoder() -> gleam@dynamic@decode:decoder(web_app_info()). web_app_info_decoder() -> gleam@dynamic@decode:field( <<"url"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Url) -> gleam@dynamic@decode:success({web_app_info, Url}) end ). -file("src/telega/model.gleam", 6870). -spec keyboard_button_request_users_decoder() -> gleam@dynamic@decode:decoder(keyboard_button_request_users()). keyboard_button_request_users_decoder() -> gleam@dynamic@decode:field( <<"request_id"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_int/1}, fun(Request_id) -> gleam@dynamic@decode:optional_field( <<"user_is_bot"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_bool/1} ), fun(User_is_bot) -> gleam@dynamic@decode:optional_field( <<"user_is_premium"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_bool/1} ), fun(User_is_premium) -> gleam@dynamic@decode:optional_field( <<"max_quantity"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_int/1} ), fun(Max_quantity) -> gleam@dynamic@decode:optional_field( <<"request_name"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_bool/1} ), fun(Request_name) -> gleam@dynamic@decode:optional_field( <<"request_username"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_bool/1} ), fun(Request_username) -> gleam@dynamic@decode:optional_field( <<"request_photo"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_bool/1} ), fun(Request_photo) -> gleam@dynamic@decode:success( {keyboard_button_request_users, Request_id, User_is_bot, User_is_premium, Max_quantity, Request_name, Request_username, Request_photo} ) end ) end ) end ) end ) end ) end ) end ). -file("src/telega/model.gleam", 6980). -spec keyboard_button_poll_type_decoder() -> gleam@dynamic@decode:decoder(keyboard_button_poll_type()). keyboard_button_poll_type_decoder() -> gleam@dynamic@decode:optional_field( <<"type"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_string/1} ), fun(Type_) -> gleam@dynamic@decode:success({keyboard_button_poll_type, Type_}) end ). -file("src/telega/model.gleam", 6991). -spec reply_keyboard_remove_decoder() -> gleam@dynamic@decode:decoder(reply_keyboard_remove()). reply_keyboard_remove_decoder() -> gleam@dynamic@decode:field( <<"remove_keyboard"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_bool/1}, fun(Remove_keyboard) -> gleam@dynamic@decode:optional_field( <<"selective"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_bool/1} ), fun(Selective) -> gleam@dynamic@decode:success( {reply_keyboard_remove, Remove_keyboard, Selective} ) end ) end ). -file("src/telega/model.gleam", 7071). -spec login_url_decoder() -> gleam@dynamic@decode:decoder(login_url()). login_url_decoder() -> gleam@dynamic@decode:field( <<"url"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Url) -> gleam@dynamic@decode:optional_field( <<"forward_text"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_string/1} ), fun(Forward_text) -> gleam@dynamic@decode:optional_field( <<"bot_username"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_string/1} ), fun(Bot_username) -> gleam@dynamic@decode:optional_field( <<"request_write_access"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_bool/1} ), fun(Request_write_access) -> gleam@dynamic@decode:success( {login_url, Url, Forward_text, Bot_username, Request_write_access} ) end ) end ) end ) end ). -file("src/telega/model.gleam", 7096). -spec switch_inline_query_chosen_chat_decoder() -> gleam@dynamic@decode:decoder(switch_inline_query_chosen_chat()). switch_inline_query_chosen_chat_decoder() -> gleam@dynamic@decode:optional_field( <<"query"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_string/1} ), fun(Query) -> gleam@dynamic@decode:optional_field( <<"allow_user_chats"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_bool/1} ), fun(Allow_user_chats) -> gleam@dynamic@decode:optional_field( <<"allow_bot_chats"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_bool/1} ), fun(Allow_bot_chats) -> gleam@dynamic@decode:optional_field( <<"allow_group_chats"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_bool/1} ), fun(Allow_group_chats) -> gleam@dynamic@decode:optional_field( <<"allow_channel_chats"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_bool/1} ), fun(Allow_channel_chats) -> gleam@dynamic@decode:success( {switch_inline_query_chosen_chat, Query, Allow_user_chats, Allow_bot_chats, Allow_group_chats, Allow_channel_chats} ) end ) end ) end ) end ) end ). -file("src/telega/model.gleam", 7133). -spec copy_text_button_decoder() -> gleam@dynamic@decode:decoder(copy_text_button()). copy_text_button_decoder() -> gleam@dynamic@decode:field( <<"text"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Text) -> gleam@dynamic@decode:success({copy_text_button, Text}) end ). -file("src/telega/model.gleam", 7173). -spec force_reply_decoder() -> gleam@dynamic@decode:decoder(force_reply()). force_reply_decoder() -> gleam@dynamic@decode:field( <<"force_reply"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_bool/1}, fun(Force_reply) -> gleam@dynamic@decode:optional_field( <<"input_field_placeholder"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_string/1} ), fun(Input_field_placeholder) -> gleam@dynamic@decode:optional_field( <<"selective"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_bool/1} ), fun(Selective) -> gleam@dynamic@decode:success( {force_reply, Force_reply, Input_field_placeholder, Selective} ) end ) end ) end ). -file("src/telega/model.gleam", 7192). -spec chat_photo_decoder() -> gleam@dynamic@decode:decoder(chat_photo()). chat_photo_decoder() -> gleam@dynamic@decode:field( <<"small_file_id"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Small_file_id) -> gleam@dynamic@decode:field( <<"small_file_unique_id"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Small_file_unique_id) -> gleam@dynamic@decode:field( <<"big_file_id"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Big_file_id) -> gleam@dynamic@decode:field( <<"big_file_unique_id"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Big_file_unique_id) -> gleam@dynamic@decode:success( {chat_photo, Small_file_id, Small_file_unique_id, Big_file_id, Big_file_unique_id} ) end ) end ) end ) end ). -file("src/telega/model.gleam", 7208). -spec chat_invite_link_decoder() -> gleam@dynamic@decode:decoder(chat_invite_link()). chat_invite_link_decoder() -> gleam@dynamic@decode:field( <<"invite_link"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Invite_link) -> gleam@dynamic@decode:field( <<"creator"/utf8>>, user_decoder(), fun(Creator) -> gleam@dynamic@decode:field( <<"creates_join_request"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_bool/1}, fun(Creates_join_request) -> gleam@dynamic@decode:field( <<"is_primary"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_bool/1}, fun(Is_primary) -> gleam@dynamic@decode:field( <<"is_revoked"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_bool/1}, fun(Is_revoked) -> gleam@dynamic@decode:optional_field( <<"name"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_string/1} ), fun(Name) -> gleam@dynamic@decode:optional_field( <<"expire_date"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_int/1} ), fun(Expire_date) -> gleam@dynamic@decode:optional_field( <<"member_limit"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_int/1} ), fun( Member_limit ) -> gleam@dynamic@decode:optional_field( <<"pending_join_request_count"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_int/1} ), fun( Pending_join_request_count ) -> gleam@dynamic@decode:optional_field( <<"subscription_period"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_int/1} ), fun( Subscription_period ) -> gleam@dynamic@decode:optional_field( <<"subscription_price"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_int/1} ), fun( Subscription_price ) -> gleam@dynamic@decode:success( {chat_invite_link, Invite_link, Creator, Creates_join_request, Is_primary, Is_revoked, Name, Expire_date, Member_limit, Pending_join_request_count, Subscription_period, Subscription_price} ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ). -file("src/telega/model.gleam", 7259). -spec chat_administrator_rights_decoder() -> gleam@dynamic@decode:decoder(chat_administrator_rights()). chat_administrator_rights_decoder() -> gleam@dynamic@decode:field( <<"is_anonymous"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_bool/1}, fun(Is_anonymous) -> gleam@dynamic@decode:field( <<"can_manage_chat"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_bool/1}, fun(Can_manage_chat) -> gleam@dynamic@decode:field( <<"can_delete_messages"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_bool/1}, fun(Can_delete_messages) -> gleam@dynamic@decode:field( <<"can_manage_video_chats"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_bool/1}, fun(Can_manage_video_chats) -> gleam@dynamic@decode:field( <<"can_restrict_members"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_bool/1}, fun(Can_restrict_members) -> gleam@dynamic@decode:field( <<"can_promote_members"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_bool/1}, fun(Can_promote_members) -> gleam@dynamic@decode:field( <<"can_change_info"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_bool/1}, fun(Can_change_info) -> gleam@dynamic@decode:field( <<"can_invite_users"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_bool/1}, fun( Can_invite_users ) -> gleam@dynamic@decode:field( <<"can_post_stories"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_bool/1}, fun( Can_post_stories ) -> gleam@dynamic@decode:field( <<"can_edit_stories"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_bool/1}, fun( Can_edit_stories ) -> gleam@dynamic@decode:field( <<"can_delete_stories"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_bool/1}, fun( Can_delete_stories ) -> gleam@dynamic@decode:optional_field( <<"can_post_messages"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_bool/1} ), fun( Can_post_messages ) -> gleam@dynamic@decode:optional_field( <<"can_edit_messages"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_bool/1} ), fun( Can_edit_messages ) -> gleam@dynamic@decode:optional_field( <<"can_pin_messages"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_bool/1} ), fun( Can_pin_messages ) -> gleam@dynamic@decode:optional_field( <<"can_manage_topics"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_bool/1} ), fun( Can_manage_topics ) -> gleam@dynamic@decode:success( {chat_administrator_rights, Is_anonymous, Can_manage_chat, Can_delete_messages, Can_manage_video_chats, Can_restrict_members, Can_promote_members, Can_change_info, Can_invite_users, Can_post_stories, Can_edit_stories, Can_delete_stories, Can_post_messages, Can_edit_messages, Can_pin_messages, Can_manage_topics} ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ). -file("src/telega/model.gleam", 6915). -spec keyboard_button_request_chat_decoder() -> gleam@dynamic@decode:decoder(keyboard_button_request_chat()). keyboard_button_request_chat_decoder() -> gleam@dynamic@decode:field( <<"request_id"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_int/1}, fun(Request_id) -> gleam@dynamic@decode:field( <<"chat_is_channel"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_bool/1}, fun(Chat_is_channel) -> gleam@dynamic@decode:optional_field( <<"chat_is_forum"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_bool/1} ), fun(Chat_is_forum) -> gleam@dynamic@decode:optional_field( <<"chat_has_username"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_bool/1} ), fun(Chat_has_username) -> gleam@dynamic@decode:optional_field( <<"chat_is_created"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_bool/1} ), fun(Chat_is_created) -> gleam@dynamic@decode:optional_field( <<"user_administrator_rights"/utf8>>, none, gleam@dynamic@decode:optional( chat_administrator_rights_decoder( ) ), fun(User_administrator_rights) -> gleam@dynamic@decode:optional_field( <<"bot_administrator_rights"/utf8>>, none, gleam@dynamic@decode:optional( chat_administrator_rights_decoder( ) ), fun( Bot_administrator_rights ) -> gleam@dynamic@decode:optional_field( <<"bot_is_member"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_bool/1} ), fun( Bot_is_member ) -> gleam@dynamic@decode:optional_field( <<"request_title"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_bool/1} ), fun( Request_title ) -> gleam@dynamic@decode:optional_field( <<"request_username"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_bool/1} ), fun( Request_username ) -> gleam@dynamic@decode:optional_field( <<"request_photo"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_bool/1} ), fun( Request_photo ) -> gleam@dynamic@decode:success( {keyboard_button_request_chat, Request_id, Chat_is_channel, Chat_is_forum, Chat_has_username, Chat_is_created, User_administrator_rights, Bot_administrator_rights, Bot_is_member, Request_title, Request_username, Request_photo} ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ). -file("src/telega/model.gleam", 6827). -spec keyboard_button_decoder() -> gleam@dynamic@decode:decoder(keyboard_button()). keyboard_button_decoder() -> gleam@dynamic@decode:field( <<"text"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Text) -> gleam@dynamic@decode:optional_field( <<"request_users"/utf8>>, none, gleam@dynamic@decode:optional( keyboard_button_request_users_decoder() ), fun(Request_users) -> gleam@dynamic@decode:optional_field( <<"request_chat"/utf8>>, none, gleam@dynamic@decode:optional( keyboard_button_request_chat_decoder() ), fun(Request_chat) -> gleam@dynamic@decode:optional_field( <<"request_contact"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_bool/1} ), fun(Request_contact) -> gleam@dynamic@decode:optional_field( <<"request_location"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_bool/1} ), fun(Request_location) -> gleam@dynamic@decode:optional_field( <<"request_poll"/utf8>>, none, gleam@dynamic@decode:optional( keyboard_button_poll_type_decoder( ) ), fun(Request_poll) -> gleam@dynamic@decode:optional_field( <<"web_app"/utf8>>, none, gleam@dynamic@decode:optional( web_app_info_decoder( ) ), fun(Web_app) -> gleam@dynamic@decode:success( {keyboard_button, Text, Request_users, Request_chat, Request_contact, Request_location, Request_poll, Web_app} ) end ) end ) end ) end ) end ) end ) end ). -file("src/telega/model.gleam", 6787). -spec reply_keyboard_markup_decoder() -> gleam@dynamic@decode:decoder(reply_keyboard_markup()). reply_keyboard_markup_decoder() -> gleam@dynamic@decode:field( <<"keyboard"/utf8>>, gleam@dynamic@decode:list( gleam@dynamic@decode:list(keyboard_button_decoder()) ), fun(Keyboard) -> gleam@dynamic@decode:optional_field( <<"is_persistent"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_bool/1} ), fun(Is_persistent) -> gleam@dynamic@decode:optional_field( <<"resize_keyboard"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_bool/1} ), fun(Resize_keyboard) -> gleam@dynamic@decode:optional_field( <<"one_time_keyboard"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_bool/1} ), fun(One_time_keyboard) -> gleam@dynamic@decode:optional_field( <<"input_field_placeholder"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_string/1} ), fun(Input_field_placeholder) -> gleam@dynamic@decode:optional_field( <<"selective"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_bool/1} ), fun(Selective) -> gleam@dynamic@decode:success( {reply_keyboard_markup, Keyboard, Is_persistent, Resize_keyboard, One_time_keyboard, Input_field_placeholder, Selective} ) end ) end ) end ) end ) end ) end ). -file("src/telega/model.gleam", 7348). -spec chat_member_owner_decoder() -> gleam@dynamic@decode:decoder(chat_member_owner()). chat_member_owner_decoder() -> gleam@dynamic@decode:field( <<"status"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Status) -> gleam@dynamic@decode:field( <<"user"/utf8>>, user_decoder(), fun(User) -> gleam@dynamic@decode:field( <<"is_anonymous"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_bool/1}, fun(Is_anonymous) -> gleam@dynamic@decode:optional_field( <<"custom_title"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_string/1} ), fun(Custom_title) -> gleam@dynamic@decode:success( {chat_member_owner, Status, User, Is_anonymous, Custom_title} ) end ) end ) end ) end ). -file("src/telega/model.gleam", 7365). -spec chat_member_administrator_decoder() -> gleam@dynamic@decode:decoder(chat_member_administrator()). chat_member_administrator_decoder() -> gleam@dynamic@decode:field( <<"status"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Status) -> gleam@dynamic@decode:field( <<"user"/utf8>>, user_decoder(), fun(User) -> gleam@dynamic@decode:field( <<"can_be_edited"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_bool/1}, fun(Can_be_edited) -> gleam@dynamic@decode:field( <<"is_anonymous"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_bool/1}, fun(Is_anonymous) -> gleam@dynamic@decode:field( <<"can_manage_chat"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_bool/1}, fun(Can_manage_chat) -> gleam@dynamic@decode:field( <<"can_delete_messages"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_bool/1}, fun(Can_delete_messages) -> gleam@dynamic@decode:field( <<"can_manage_video_chats"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_bool/1}, fun( Can_manage_video_chats ) -> gleam@dynamic@decode:field( <<"can_restrict_members"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_bool/1}, fun( Can_restrict_members ) -> gleam@dynamic@decode:field( <<"can_promote_members"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_bool/1}, fun( Can_promote_members ) -> gleam@dynamic@decode:field( <<"can_change_info"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_bool/1}, fun( Can_change_info ) -> gleam@dynamic@decode:field( <<"can_invite_users"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_bool/1}, fun( Can_invite_users ) -> gleam@dynamic@decode:field( <<"can_post_stories"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_bool/1}, fun( Can_post_stories ) -> gleam@dynamic@decode:field( <<"can_edit_stories"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_bool/1}, fun( Can_edit_stories ) -> gleam@dynamic@decode:field( <<"can_delete_stories"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_bool/1}, fun( Can_delete_stories ) -> gleam@dynamic@decode:optional_field( <<"can_post_messages"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_bool/1} ), fun( Can_post_messages ) -> gleam@dynamic@decode:optional_field( <<"can_edit_messages"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_bool/1} ), fun( Can_edit_messages ) -> gleam@dynamic@decode:optional_field( <<"can_pin_messages"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_bool/1} ), fun( Can_pin_messages ) -> gleam@dynamic@decode:optional_field( <<"can_manage_topics"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_bool/1} ), fun( Can_manage_topics ) -> gleam@dynamic@decode:optional_field( <<"custom_title"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_string/1} ), fun( Custom_title ) -> gleam@dynamic@decode:success( {chat_member_administrator, Status, User, Can_be_edited, Is_anonymous, Can_manage_chat, Can_delete_messages, Can_manage_video_chats, Can_restrict_members, Can_promote_members, Can_change_info, Can_invite_users, Can_post_stories, Can_edit_stories, Can_delete_stories, Can_post_messages, Can_edit_messages, Can_pin_messages, Can_manage_topics, Custom_title} ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ). -file("src/telega/model.gleam", 7433). -spec chat_member_member_decoder() -> gleam@dynamic@decode:decoder(chat_member_member()). chat_member_member_decoder() -> gleam@dynamic@decode:field( <<"status"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Status) -> gleam@dynamic@decode:field( <<"user"/utf8>>, user_decoder(), fun(User) -> gleam@dynamic@decode:optional_field( <<"until_date"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_int/1} ), fun(Until_date) -> gleam@dynamic@decode:success( {chat_member_member, Status, User, Until_date} ) end ) end ) end ). -file("src/telega/model.gleam", 7448). -spec chat_member_restricted_decoder() -> gleam@dynamic@decode:decoder(chat_member_restricted()). chat_member_restricted_decoder() -> gleam@dynamic@decode:field( <<"status"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Status) -> gleam@dynamic@decode:field( <<"user"/utf8>>, user_decoder(), fun(User) -> gleam@dynamic@decode:field( <<"is_member"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_bool/1}, fun(Is_member) -> gleam@dynamic@decode:field( <<"can_send_messages"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_bool/1}, fun(Can_send_messages) -> gleam@dynamic@decode:field( <<"can_send_audios"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_bool/1}, fun(Can_send_audios) -> gleam@dynamic@decode:field( <<"can_send_documents"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_bool/1}, fun(Can_send_documents) -> gleam@dynamic@decode:field( <<"can_send_photos"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_bool/1}, fun(Can_send_photos) -> gleam@dynamic@decode:field( <<"can_send_videos"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_bool/1}, fun( Can_send_videos ) -> gleam@dynamic@decode:field( <<"can_send_video_notes"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_bool/1}, fun( Can_send_video_notes ) -> gleam@dynamic@decode:field( <<"can_send_voice_notes"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_bool/1}, fun( Can_send_voice_notes ) -> gleam@dynamic@decode:field( <<"can_send_polls"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_bool/1}, fun( Can_send_polls ) -> gleam@dynamic@decode:field( <<"can_send_other_messages"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_bool/1}, fun( Can_send_other_messages ) -> gleam@dynamic@decode:field( <<"can_add_web_page_previews"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_bool/1}, fun( Can_add_web_page_previews ) -> gleam@dynamic@decode:field( <<"can_change_info"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_bool/1}, fun( Can_change_info ) -> gleam@dynamic@decode:field( <<"can_invite_users"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_bool/1}, fun( Can_invite_users ) -> gleam@dynamic@decode:field( <<"can_pin_messages"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_bool/1}, fun( Can_pin_messages ) -> gleam@dynamic@decode:field( <<"can_manage_topics"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_bool/1}, fun( Can_manage_topics ) -> gleam@dynamic@decode:field( <<"until_date"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_int/1}, fun( Until_date ) -> gleam@dynamic@decode:success( {chat_member_restricted, Status, User, Is_member, Can_send_messages, Can_send_audios, Can_send_documents, Can_send_photos, Can_send_videos, Can_send_video_notes, Can_send_voice_notes, Can_send_polls, Can_send_other_messages, Can_add_web_page_previews, Can_change_info, Can_invite_users, Can_pin_messages, Can_manage_topics, Until_date} ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ). -file("src/telega/model.gleam", 7495). -spec chat_member_left_decoder() -> gleam@dynamic@decode:decoder(chat_member_left()). chat_member_left_decoder() -> gleam@dynamic@decode:field( <<"status"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Status) -> gleam@dynamic@decode:field( <<"user"/utf8>>, user_decoder(), fun(User) -> gleam@dynamic@decode:success( {chat_member_left, Status, User} ) end ) end ). -file("src/telega/model.gleam", 7501). -spec chat_member_banned_decoder() -> gleam@dynamic@decode:decoder(chat_member_banned()). chat_member_banned_decoder() -> gleam@dynamic@decode:field( <<"status"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Status) -> gleam@dynamic@decode:field( <<"user"/utf8>>, user_decoder(), fun(User) -> gleam@dynamic@decode:field( <<"until_date"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_int/1}, fun(Until_date) -> gleam@dynamic@decode:success( {chat_member_banned, Status, User, Until_date} ) end ) end ) end ). -file("src/telega/model.gleam", 7512). -spec chat_join_request_decoder() -> gleam@dynamic@decode:decoder(chat_join_request()). chat_join_request_decoder() -> gleam@dynamic@decode:field( <<"chat"/utf8>>, chat_decoder(), fun(Chat) -> gleam@dynamic@decode:field( <<"from"/utf8>>, user_decoder(), fun(From) -> gleam@dynamic@decode:field( <<"user_chat_id"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_int/1}, fun(User_chat_id) -> gleam@dynamic@decode:field( <<"date"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_int/1}, fun(Date) -> gleam@dynamic@decode:optional_field( <<"bio"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_string/1} ), fun(Bio) -> gleam@dynamic@decode:optional_field( <<"invite_link"/utf8>>, none, gleam@dynamic@decode:optional( chat_invite_link_decoder() ), fun(Invite_link) -> gleam@dynamic@decode:success( {chat_join_request, Chat, From, User_chat_id, Date, Bio, Invite_link} ) end ) end ) end ) end ) end ) end ). -file("src/telega/model.gleam", 7533). -spec chat_permissions_decoder() -> gleam@dynamic@decode:decoder(chat_permissions()). chat_permissions_decoder() -> gleam@dynamic@decode:optional_field( <<"can_send_messages"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_bool/1} ), fun(Can_send_messages) -> gleam@dynamic@decode:optional_field( <<"can_send_audios"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_bool/1} ), fun(Can_send_audios) -> gleam@dynamic@decode:optional_field( <<"can_send_documents"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_bool/1} ), fun(Can_send_documents) -> gleam@dynamic@decode:optional_field( <<"can_send_photos"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_bool/1} ), fun(Can_send_photos) -> gleam@dynamic@decode:optional_field( <<"can_send_videos"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_bool/1} ), fun(Can_send_videos) -> gleam@dynamic@decode:optional_field( <<"can_send_video_notes"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_bool/1} ), fun(Can_send_video_notes) -> gleam@dynamic@decode:optional_field( <<"can_send_voice_notes"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_bool/1} ), fun( Can_send_voice_notes ) -> gleam@dynamic@decode:optional_field( <<"can_send_polls"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_bool/1} ), fun( Can_send_polls ) -> gleam@dynamic@decode:optional_field( <<"can_send_other_messages"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_bool/1} ), fun( Can_send_other_messages ) -> gleam@dynamic@decode:optional_field( <<"can_add_web_page_previews"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_bool/1} ), fun( Can_add_web_page_previews ) -> gleam@dynamic@decode:optional_field( <<"can_change_info"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_bool/1} ), fun( Can_change_info ) -> gleam@dynamic@decode:optional_field( <<"can_invite_users"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_bool/1} ), fun( Can_invite_users ) -> gleam@dynamic@decode:optional_field( <<"can_pin_messages"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_bool/1} ), fun( Can_pin_messages ) -> gleam@dynamic@decode:optional_field( <<"can_manage_topics"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_bool/1} ), fun( Can_manage_topics ) -> gleam@dynamic@decode:success( {chat_permissions, Can_send_messages, Can_send_audios, Can_send_documents, Can_send_photos, Can_send_videos, Can_send_video_notes, Can_send_voice_notes, Can_send_polls, Can_send_other_messages, Can_add_web_page_previews, Can_change_info, Can_invite_users, Can_pin_messages, Can_manage_topics} ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ). -file("src/telega/model.gleam", 7622). -spec birthdate_decoder() -> gleam@dynamic@decode:decoder(birthdate()). birthdate_decoder() -> gleam@dynamic@decode:field( <<"day"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_int/1}, fun(Day) -> gleam@dynamic@decode:field( <<"month"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_int/1}, fun(Month) -> gleam@dynamic@decode:optional_field( <<"year"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_int/1} ), fun(Year) -> gleam@dynamic@decode:success( {birthdate, Day, Month, Year} ) end ) end ) end ). -file("src/telega/model.gleam", 7648). -spec business_location_decoder() -> gleam@dynamic@decode:decoder(business_location()). business_location_decoder() -> gleam@dynamic@decode:field( <<"address"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Address) -> gleam@dynamic@decode:optional_field( <<"location"/utf8>>, none, gleam@dynamic@decode:optional(location_decoder()), fun(Location) -> gleam@dynamic@decode:success( {business_location, Address, Location} ) end ) end ). -file("src/telega/model.gleam", 7658). -spec business_opening_hours_interval_decoder() -> gleam@dynamic@decode:decoder(business_opening_hours_interval()). business_opening_hours_interval_decoder() -> gleam@dynamic@decode:field( <<"opening_minute"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_int/1}, fun(Opening_minute) -> gleam@dynamic@decode:field( <<"closing_minute"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_int/1}, fun(Closing_minute) -> gleam@dynamic@decode:success( {business_opening_hours_interval, Opening_minute, Closing_minute} ) end ) end ). -file("src/telega/model.gleam", 7669). -spec business_opening_hours_decoder() -> gleam@dynamic@decode:decoder(business_opening_hours()). business_opening_hours_decoder() -> gleam@dynamic@decode:field( <<"time_zone_name"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Time_zone_name) -> gleam@dynamic@decode:field( <<"opening_hours"/utf8>>, gleam@dynamic@decode:list( business_opening_hours_interval_decoder() ), fun(Opening_hours) -> gleam@dynamic@decode:success( {business_opening_hours, Time_zone_name, Opening_hours} ) end ) end ). -file("src/telega/model.gleam", 7681). -spec chat_location_decoder() -> gleam@dynamic@decode:decoder(chat_location()). chat_location_decoder() -> gleam@dynamic@decode:field( <<"location"/utf8>>, location_decoder(), fun(Location) -> gleam@dynamic@decode:field( <<"address"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Address) -> gleam@dynamic@decode:success( {chat_location, Location, Address} ) end ) end ). -file("src/telega/model.gleam", 7687). -spec reaction_type_emoji_decoder() -> gleam@dynamic@decode:decoder(reaction_type_emoji()). reaction_type_emoji_decoder() -> gleam@dynamic@decode:field( <<"type"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Type_) -> gleam@dynamic@decode:field( <<"emoji"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Emoji) -> gleam@dynamic@decode:success( {reaction_type_emoji, Type_, Emoji} ) end ) end ). -file("src/telega/model.gleam", 7693). -spec reaction_type_custom_emoji_decoder() -> gleam@dynamic@decode:decoder(reaction_type_custom_emoji()). reaction_type_custom_emoji_decoder() -> gleam@dynamic@decode:field( <<"type"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Type_) -> gleam@dynamic@decode:field( <<"custom_emoji_id"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Custom_emoji_id) -> gleam@dynamic@decode:success( {reaction_type_custom_emoji, Type_, Custom_emoji_id} ) end ) end ). -file("src/telega/model.gleam", 7704). -spec reaction_type_paid_decoder() -> gleam@dynamic@decode:decoder(reaction_type_paid()). reaction_type_paid_decoder() -> gleam@dynamic@decode:field( <<"type"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Type_) -> gleam@dynamic@decode:success({reaction_type_paid, Type_}) end ). -file("src/telega/model.gleam", 7768). -spec forum_topic_decoder() -> gleam@dynamic@decode:decoder(forum_topic()). forum_topic_decoder() -> gleam@dynamic@decode:field( <<"message_thread_id"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_int/1}, fun(Message_thread_id) -> gleam@dynamic@decode:field( <<"name"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Name) -> gleam@dynamic@decode:field( <<"icon_color"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_int/1}, fun(Icon_color) -> gleam@dynamic@decode:optional_field( <<"icon_custom_emoji_id"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_string/1} ), fun(Icon_custom_emoji_id) -> gleam@dynamic@decode:success( {forum_topic, Message_thread_id, Name, Icon_color, Icon_custom_emoji_id} ) end ) end ) end ) end ). -file("src/telega/model.gleam", 7835). -spec unique_gift_backdrop_colors_decoder() -> gleam@dynamic@decode:decoder(unique_gift_backdrop_colors()). unique_gift_backdrop_colors_decoder() -> gleam@dynamic@decode:field( <<"center_color"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_int/1}, fun(Center_color) -> gleam@dynamic@decode:field( <<"edge_color"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_int/1}, fun(Edge_color) -> gleam@dynamic@decode:field( <<"symbol_color"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_int/1}, fun(Symbol_color) -> gleam@dynamic@decode:field( <<"text_color"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_int/1}, fun(Text_color) -> gleam@dynamic@decode:success( {unique_gift_backdrop_colors, Center_color, Edge_color, Symbol_color, Text_color} ) end ) end ) end ) end ). -file("src/telega/model.gleam", 7850). -spec unique_gift_backdrop_decoder() -> gleam@dynamic@decode:decoder(unique_gift_backdrop()). unique_gift_backdrop_decoder() -> gleam@dynamic@decode:field( <<"name"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Name) -> gleam@dynamic@decode:field( <<"colors"/utf8>>, unique_gift_backdrop_colors_decoder(), fun(Colors) -> gleam@dynamic@decode:field( <<"rarity_per_mille"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_int/1}, fun(Rarity_per_mille) -> gleam@dynamic@decode:success( {unique_gift_backdrop, Name, Colors, Rarity_per_mille} ) end ) end ) end ). -file("src/telega/model.gleam", 8075). -spec accepted_gift_types_decoder() -> gleam@dynamic@decode:decoder(accepted_gift_types()). accepted_gift_types_decoder() -> gleam@dynamic@decode:field( <<"unlimited_gifts"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_bool/1}, fun(Unlimited_gifts) -> gleam@dynamic@decode:field( <<"limited_gifts"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_bool/1}, fun(Limited_gifts) -> gleam@dynamic@decode:field( <<"unique_gifts"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_bool/1}, fun(Unique_gifts) -> gleam@dynamic@decode:field( <<"premium_subscription"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_bool/1}, fun(Premium_subscription) -> gleam@dynamic@decode:success( {accepted_gift_types, Unlimited_gifts, Limited_gifts, Unique_gifts, Premium_subscription} ) end ) end ) end ) end ). -file("src/telega/model.gleam", 8088). -spec star_amount_decoder() -> gleam@dynamic@decode:decoder(star_amount()). star_amount_decoder() -> gleam@dynamic@decode:field( <<"amount"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_int/1}, fun(Amount) -> gleam@dynamic@decode:field( <<"nanostar_amount"/utf8>>, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_int/1} ), fun(Nanostar_amount) -> gleam@dynamic@decode:success( {star_amount, Amount, Nanostar_amount} ) end ) end ). -file("src/telega/model.gleam", 8097). -spec bot_command_decoder() -> gleam@dynamic@decode:decoder(bot_command()). bot_command_decoder() -> gleam@dynamic@decode:field( <<"command"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Command) -> gleam@dynamic@decode:field( <<"description"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Description) -> gleam@dynamic@decode:success( {bot_command, Command, Description} ) end ) end ). -file("src/telega/model.gleam", 8103). -spec bot_command_scope_default_decoder() -> gleam@dynamic@decode:decoder(bot_command_scope_default()). bot_command_scope_default_decoder() -> gleam@dynamic@decode:field( <<"type"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Type_) -> gleam@dynamic@decode:success({bot_command_scope_default, Type_}) end ). -file("src/telega/model.gleam", 8110). -spec bot_command_scope_all_private_chats_decoder() -> gleam@dynamic@decode:decoder(bot_command_scope_all_private_chats()). bot_command_scope_all_private_chats_decoder() -> gleam@dynamic@decode:field( <<"type"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Type_) -> gleam@dynamic@decode:success( {bot_command_scope_all_private_chats, Type_} ) end ). -file("src/telega/model.gleam", 8117). -spec bot_command_scope_all_group_chats_decoder() -> gleam@dynamic@decode:decoder(bot_command_scope_all_group_chats()). bot_command_scope_all_group_chats_decoder() -> gleam@dynamic@decode:field( <<"type"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Type_) -> gleam@dynamic@decode:success( {bot_command_scope_all_group_chats, Type_} ) end ). -file("src/telega/model.gleam", 8124). -spec bot_command_scope_all_chat_administrators_decoder() -> gleam@dynamic@decode:decoder(bot_command_scope_all_chat_administrators()). bot_command_scope_all_chat_administrators_decoder() -> gleam@dynamic@decode:field( <<"type"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Type_) -> gleam@dynamic@decode:success( {bot_command_scope_all_chat_administrators, Type_} ) end ). -file("src/telega/model.gleam", 8161). -spec bot_name_decoder() -> gleam@dynamic@decode:decoder(bot_name()). bot_name_decoder() -> gleam@dynamic@decode:field( <<"name"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Name) -> gleam@dynamic@decode:success({bot_name, Name}) end ). -file("src/telega/model.gleam", 8166). -spec bot_description_decoder() -> gleam@dynamic@decode:decoder(bot_description()). bot_description_decoder() -> gleam@dynamic@decode:field( <<"description"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Description) -> gleam@dynamic@decode:success({bot_description, Description}) end ). -file("src/telega/model.gleam", 8171). -spec bot_short_description_decoder() -> gleam@dynamic@decode:decoder(bot_short_description()). bot_short_description_decoder() -> gleam@dynamic@decode:field( <<"short_description"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Short_description) -> gleam@dynamic@decode:success( {bot_short_description, Short_description} ) end ). -file("src/telega/model.gleam", 8176). -spec menu_button_commands_decoder() -> gleam@dynamic@decode:decoder(menu_button_commands()). menu_button_commands_decoder() -> gleam@dynamic@decode:field( <<"type"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Type_) -> gleam@dynamic@decode:success({menu_button_commands, Type_}) end ). -file("src/telega/model.gleam", 8181). -spec menu_button_web_app_decoder() -> gleam@dynamic@decode:decoder(menu_button_web_app()). menu_button_web_app_decoder() -> gleam@dynamic@decode:field( <<"type"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Type_) -> gleam@dynamic@decode:field( <<"text"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Text) -> gleam@dynamic@decode:field( <<"web_app"/utf8>>, web_app_info_decoder(), fun(Web_app) -> gleam@dynamic@decode:success( {menu_button_web_app, Type_, Text, Web_app} ) end ) end ) end ). -file("src/telega/model.gleam", 8188). -spec menu_button_default_decoder() -> gleam@dynamic@decode:decoder(menu_button_default()). menu_button_default_decoder() -> gleam@dynamic@decode:field( <<"type"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Type_) -> gleam@dynamic@decode:success({menu_button_default, Type_}) end ). -file("src/telega/model.gleam", 8193). -spec chat_boost_source_premium_decoder() -> gleam@dynamic@decode:decoder(chat_boost_source_premium()). chat_boost_source_premium_decoder() -> gleam@dynamic@decode:field( <<"source"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Source) -> gleam@dynamic@decode:field( <<"user"/utf8>>, user_decoder(), fun(User) -> gleam@dynamic@decode:success( {chat_boost_source_premium, Source, User} ) end ) end ). -file("src/telega/model.gleam", 8201). -spec chat_boost_source_gift_code_decoder() -> gleam@dynamic@decode:decoder(chat_boost_source_gift_code()). chat_boost_source_gift_code_decoder() -> gleam@dynamic@decode:field( <<"source"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Source) -> gleam@dynamic@decode:field( <<"user"/utf8>>, user_decoder(), fun(User) -> gleam@dynamic@decode:success( {chat_boost_source_gift_code, Source, User} ) end ) end ). -file("src/telega/model.gleam", 8209). -spec chat_boost_source_giveaway_decoder() -> gleam@dynamic@decode:decoder(chat_boost_source_giveaway()). chat_boost_source_giveaway_decoder() -> gleam@dynamic@decode:field( <<"source"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Source) -> gleam@dynamic@decode:field( <<"giveaway_message_id"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_int/1}, fun(Giveaway_message_id) -> gleam@dynamic@decode:optional_field( <<"user"/utf8>>, none, gleam@dynamic@decode:optional(user_decoder()), fun(User) -> gleam@dynamic@decode:optional_field( <<"prize_star_count"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_int/1} ), fun(Prize_star_count) -> gleam@dynamic@decode:optional_field( <<"is_unclaimed"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_bool/1} ), fun(Is_unclaimed) -> gleam@dynamic@decode:success( {chat_boost_source_giveaway, Source, Giveaway_message_id, User, Prize_star_count, Is_unclaimed} ) end ) end ) end ) end ) end ). -file("src/telega/model.gleam", 8275). -spec business_bot_rights_decoder() -> gleam@dynamic@decode:decoder(business_bot_rights()). business_bot_rights_decoder() -> gleam@dynamic@decode:field( <<"can_reply"/utf8>>, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_bool/1} ), fun(Can_reply) -> gleam@dynamic@decode:field( <<"can_read_messages"/utf8>>, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_bool/1} ), fun(Can_read_messages) -> gleam@dynamic@decode:field( <<"can_delete_outgoing_messages"/utf8>>, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_bool/1} ), fun(Can_delete_outgoing_messages) -> gleam@dynamic@decode:field( <<"can_delete_all_messages"/utf8>>, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_bool/1} ), fun(Can_delete_all_messages) -> gleam@dynamic@decode:field( <<"can_edit_name"/utf8>>, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_bool/1} ), fun(Can_edit_name) -> gleam@dynamic@decode:field( <<"can_edit_bio"/utf8>>, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_bool/1} ), fun(Can_edit_bio) -> gleam@dynamic@decode:field( <<"can_edit_profile_photo"/utf8>>, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_bool/1} ), fun( Can_edit_profile_photo ) -> gleam@dynamic@decode:field( <<"can_edit_username"/utf8>>, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_bool/1} ), fun( Can_edit_username ) -> gleam@dynamic@decode:field( <<"can_change_gift_settings"/utf8>>, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_bool/1} ), fun( Can_change_gift_settings ) -> gleam@dynamic@decode:field( <<"can_view_gifts_and_stars"/utf8>>, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_bool/1} ), fun( Can_view_gifts_and_stars ) -> gleam@dynamic@decode:field( <<"can_convert_gifts_to_stars"/utf8>>, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_bool/1} ), fun( Can_convert_gifts_to_stars ) -> gleam@dynamic@decode:field( <<"can_transfer_and_upgrade_gifts"/utf8>>, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_bool/1} ), fun( Can_transfer_and_upgrade_gifts ) -> gleam@dynamic@decode:field( <<"can_transfer_stars"/utf8>>, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_bool/1} ), fun( Can_transfer_stars ) -> gleam@dynamic@decode:field( <<"can_manage_stories"/utf8>>, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_bool/1} ), fun( Can_manage_stories ) -> gleam@dynamic@decode:success( {business_bot_rights, Can_reply, Can_read_messages, Can_delete_outgoing_messages, Can_delete_all_messages, Can_edit_name, Can_edit_bio, Can_edit_profile_photo, Can_edit_username, Can_change_gift_settings, Can_view_gifts_and_stars, Can_convert_gifts_to_stars, Can_transfer_and_upgrade_gifts, Can_transfer_stars, Can_manage_stories} ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ). -file("src/telega/model.gleam", 8344). -spec business_connection_decoder() -> gleam@dynamic@decode:decoder(business_connection()). business_connection_decoder() -> gleam@dynamic@decode:field( <<"id"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Id) -> gleam@dynamic@decode:field( <<"user"/utf8>>, user_decoder(), fun(User) -> gleam@dynamic@decode:field( <<"user_chat_id"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_int/1}, fun(User_chat_id) -> gleam@dynamic@decode:field( <<"date"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_int/1}, fun(Date) -> gleam@dynamic@decode:field( <<"rights"/utf8>>, gleam@dynamic@decode:optional( business_bot_rights_decoder() ), fun(Rights) -> gleam@dynamic@decode:field( <<"is_enabled"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_bool/1}, fun(Is_enabled) -> gleam@dynamic@decode:success( {business_connection, Id, User, User_chat_id, Date, Rights, Is_enabled} ) end ) end ) end ) end ) end ) end ). -file("src/telega/model.gleam", 8364). -spec business_messages_deleted_decoder() -> gleam@dynamic@decode:decoder(business_messages_deleted()). business_messages_deleted_decoder() -> gleam@dynamic@decode:field( <<"business_connection_id"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Business_connection_id) -> gleam@dynamic@decode:field( <<"chat"/utf8>>, chat_decoder(), fun(Chat) -> gleam@dynamic@decode:field( <<"message_ids"/utf8>>, gleam@dynamic@decode:list( {decoder, fun gleam@dynamic@decode:decode_int/1} ), fun(Message_ids) -> gleam@dynamic@decode:success( {business_messages_deleted, Business_connection_id, Chat, Message_ids} ) end ) end ) end ). -file("src/telega/model.gleam", 8380). -spec response_parameters_decoder() -> gleam@dynamic@decode:decoder(response_parameters()). response_parameters_decoder() -> gleam@dynamic@decode:optional_field( <<"migrate_to_chat_id"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_int/1} ), fun(Migrate_to_chat_id) -> gleam@dynamic@decode:optional_field( <<"retry_after"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_int/1} ), fun(Retry_after) -> gleam@dynamic@decode:success( {response_parameters, Migrate_to_chat_id, Retry_after} ) end ) end ). -file("src/telega/model.gleam", 8397). -spec input_media_photo_decoder() -> gleam@dynamic@decode:decoder(input_media_photo()). input_media_photo_decoder() -> gleam@dynamic@decode:field( <<"type"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Type_) -> gleam@dynamic@decode:field( <<"media"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Media) -> gleam@dynamic@decode:optional_field( <<"caption"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_string/1} ), fun(Caption) -> gleam@dynamic@decode:optional_field( <<"parse_mode"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_string/1} ), fun(Parse_mode) -> gleam@dynamic@decode:optional_field( <<"caption_entities"/utf8>>, none, gleam@dynamic@decode:optional( gleam@dynamic@decode:list( message_entity_decoder() ) ), fun(Caption_entities) -> gleam@dynamic@decode:optional_field( <<"show_caption_above_media"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_bool/1} ), fun(Show_caption_above_media) -> gleam@dynamic@decode:optional_field( <<"has_spoiler"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_bool/1} ), fun(Has_spoiler) -> gleam@dynamic@decode:success( {input_media_photo, Type_, Media, Caption, Parse_mode, Caption_entities, Show_caption_above_media, Has_spoiler} ) end ) end ) end ) end ) end ) end ) end ). -file("src/telega/model.gleam", 8436). -spec input_media_video_decoder() -> gleam@dynamic@decode:decoder(input_media_video()). input_media_video_decoder() -> gleam@dynamic@decode:field( <<"type"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Type_) -> gleam@dynamic@decode:field( <<"media"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Media) -> gleam@dynamic@decode:optional_field( <<"thumbnail"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_string/1} ), fun(Thumbnail) -> gleam@dynamic@decode:optional_field( <<"cover"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_string/1} ), fun(Cover) -> gleam@dynamic@decode:optional_field( <<"start_timestamp"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_int/1} ), fun(Start_timestamp) -> gleam@dynamic@decode:optional_field( <<"caption"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_string/1} ), fun(Caption) -> gleam@dynamic@decode:optional_field( <<"parse_mode"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_string/1} ), fun(Parse_mode) -> gleam@dynamic@decode:optional_field( <<"caption_entities"/utf8>>, none, gleam@dynamic@decode:optional( gleam@dynamic@decode:list( message_entity_decoder( ) ) ), fun( Caption_entities ) -> gleam@dynamic@decode:optional_field( <<"show_caption_above_media"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_bool/1} ), fun( Show_caption_above_media ) -> gleam@dynamic@decode:optional_field( <<"width"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_int/1} ), fun( Width ) -> gleam@dynamic@decode:optional_field( <<"height"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_int/1} ), fun( Height ) -> gleam@dynamic@decode:optional_field( <<"duration"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_int/1} ), fun( Duration ) -> gleam@dynamic@decode:optional_field( <<"supports_streaming"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_bool/1} ), fun( Supports_streaming ) -> gleam@dynamic@decode:optional_field( <<"has_spoiler"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_bool/1} ), fun( Has_spoiler ) -> gleam@dynamic@decode:success( {input_media_video, Type_, Media, Thumbnail, Cover, Start_timestamp, Caption, Parse_mode, Caption_entities, Show_caption_above_media, Width, Height, Duration, Supports_streaming, Has_spoiler} ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ). -file("src/telega/model.gleam", 8513). -spec input_media_animation_decoder() -> gleam@dynamic@decode:decoder(input_media_animation()). input_media_animation_decoder() -> gleam@dynamic@decode:field( <<"type"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Type_) -> gleam@dynamic@decode:field( <<"media"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Media) -> gleam@dynamic@decode:optional_field( <<"thumbnail"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_string/1} ), fun(Thumbnail) -> gleam@dynamic@decode:optional_field( <<"caption"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_string/1} ), fun(Caption) -> gleam@dynamic@decode:optional_field( <<"parse_mode"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_string/1} ), fun(Parse_mode) -> gleam@dynamic@decode:optional_field( <<"caption_entities"/utf8>>, none, gleam@dynamic@decode:optional( gleam@dynamic@decode:list( message_entity_decoder() ) ), fun(Caption_entities) -> gleam@dynamic@decode:optional_field( <<"show_caption_above_media"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_bool/1} ), fun( Show_caption_above_media ) -> gleam@dynamic@decode:optional_field( <<"width"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_int/1} ), fun(Width) -> gleam@dynamic@decode:optional_field( <<"height"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_int/1} ), fun( Height ) -> gleam@dynamic@decode:optional_field( <<"duration"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_int/1} ), fun( Duration ) -> gleam@dynamic@decode:optional_field( <<"has_spoiler"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_bool/1} ), fun( Has_spoiler ) -> gleam@dynamic@decode:success( {input_media_animation, Type_, Media, Thumbnail, Caption, Parse_mode, Caption_entities, Show_caption_above_media, Width, Height, Duration, Has_spoiler} ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ). -file("src/telega/model.gleam", 8572). -spec input_media_audio_decoder() -> gleam@dynamic@decode:decoder(input_media_audio()). input_media_audio_decoder() -> gleam@dynamic@decode:field( <<"type"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Type_) -> gleam@dynamic@decode:field( <<"media"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Media) -> gleam@dynamic@decode:optional_field( <<"thumbnail"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_string/1} ), fun(Thumbnail) -> gleam@dynamic@decode:optional_field( <<"caption"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_string/1} ), fun(Caption) -> gleam@dynamic@decode:optional_field( <<"parse_mode"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_string/1} ), fun(Parse_mode) -> gleam@dynamic@decode:optional_field( <<"caption_entities"/utf8>>, none, gleam@dynamic@decode:optional( gleam@dynamic@decode:list( message_entity_decoder() ) ), fun(Caption_entities) -> gleam@dynamic@decode:optional_field( <<"duration"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_int/1} ), fun(Duration) -> gleam@dynamic@decode:optional_field( <<"performer"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_string/1} ), fun(Performer) -> gleam@dynamic@decode:optional_field( <<"title"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_string/1} ), fun( Title ) -> gleam@dynamic@decode:success( {input_media_audio, Type_, Media, Thumbnail, Caption, Parse_mode, Caption_entities, Duration, Performer, Title} ) end ) end ) end ) end ) end ) end ) end ) end ) end ). -file("src/telega/model.gleam", 8623). -spec input_media_document_decoder() -> gleam@dynamic@decode:decoder(input_media_document()). input_media_document_decoder() -> gleam@dynamic@decode:field( <<"type"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Type_) -> gleam@dynamic@decode:field( <<"media"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Media) -> gleam@dynamic@decode:optional_field( <<"thumbnail"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_string/1} ), fun(Thumbnail) -> gleam@dynamic@decode:optional_field( <<"caption"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_string/1} ), fun(Caption) -> gleam@dynamic@decode:optional_field( <<"parse_mode"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_string/1} ), fun(Parse_mode) -> gleam@dynamic@decode:optional_field( <<"caption_entities"/utf8>>, none, gleam@dynamic@decode:optional( gleam@dynamic@decode:list( message_entity_decoder() ) ), fun(Caption_entities) -> gleam@dynamic@decode:optional_field( <<"disable_content_type_detection"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_bool/1} ), fun( Disable_content_type_detection ) -> gleam@dynamic@decode:success( {input_media_document, Type_, Media, Thumbnail, Caption, Parse_mode, Caption_entities, Disable_content_type_detection} ) end ) end ) end ) end ) end ) end ) end ). -file("src/telega/model.gleam", 8662). -spec input_paid_media_photo_decoder() -> gleam@dynamic@decode:decoder(input_paid_media_photo()). input_paid_media_photo_decoder() -> gleam@dynamic@decode:field( <<"type"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Type_) -> gleam@dynamic@decode:field( <<"media"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Media) -> gleam@dynamic@decode:success( {input_paid_media_photo, Type_, Media} ) end ) end ). -file("src/telega/model.gleam", 8668). -spec input_paid_media_video_decoder() -> gleam@dynamic@decode:decoder(input_paid_media_video()). input_paid_media_video_decoder() -> gleam@dynamic@decode:field( <<"type"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Type_) -> gleam@dynamic@decode:field( <<"media"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Media) -> gleam@dynamic@decode:optional_field( <<"thumbnail"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_string/1} ), fun(Thumbnail) -> gleam@dynamic@decode:optional_field( <<"cover"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_string/1} ), fun(Cover) -> gleam@dynamic@decode:optional_field( <<"start_timestamp"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_int/1} ), fun(Start_timestamp) -> gleam@dynamic@decode:optional_field( <<"width"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_int/1} ), fun(Width) -> gleam@dynamic@decode:optional_field( <<"height"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_int/1} ), fun(Height) -> gleam@dynamic@decode:optional_field( <<"duration"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_int/1} ), fun(Duration) -> gleam@dynamic@decode:optional_field( <<"supports_streaming"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_bool/1} ), fun( Supports_streaming ) -> gleam@dynamic@decode:success( {input_paid_media_video, Type_, Media, Thumbnail, Cover, Start_timestamp, Width, Height, Duration, Supports_streaming} ) end ) end ) end ) end ) end ) end ) end ) end ) end ). -file("src/telega/model.gleam", 8801). -spec mask_position_decoder() -> gleam@dynamic@decode:decoder(mask_position()). mask_position_decoder() -> gleam@dynamic@decode:field( <<"point"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Point) -> gleam@dynamic@decode:field( <<"x_shift"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_float/1}, fun(X_shift) -> gleam@dynamic@decode:field( <<"y_shift"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_float/1}, fun(Y_shift) -> gleam@dynamic@decode:field( <<"scale"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_float/1}, fun(Scale) -> gleam@dynamic@decode:success( {mask_position, Point, X_shift, Y_shift, Scale} ) end ) end ) end ) end ). -file("src/telega/model.gleam", 8715). -spec sticker_decoder() -> gleam@dynamic@decode:decoder(sticker()). sticker_decoder() -> gleam@dynamic@decode:field( <<"file_id"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(File_id) -> gleam@dynamic@decode:field( <<"file_unique_id"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(File_unique_id) -> gleam@dynamic@decode:field( <<"type"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Type_) -> gleam@dynamic@decode:field( <<"width"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_int/1}, fun(Width) -> gleam@dynamic@decode:field( <<"height"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_int/1}, fun(Height) -> gleam@dynamic@decode:field( <<"is_animated"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_bool/1}, fun(Is_animated) -> gleam@dynamic@decode:field( <<"is_video"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_bool/1}, fun(Is_video) -> gleam@dynamic@decode:optional_field( <<"thumbnail"/utf8>>, none, gleam@dynamic@decode:optional( photo_size_decoder( ) ), fun(Thumbnail) -> gleam@dynamic@decode:optional_field( <<"emoji"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_string/1} ), fun( Emoji ) -> gleam@dynamic@decode:optional_field( <<"set_name"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_string/1} ), fun( Set_name ) -> gleam@dynamic@decode:optional_field( <<"premium_animation"/utf8>>, none, gleam@dynamic@decode:optional( file_decoder( ) ), fun( Premium_animation ) -> gleam@dynamic@decode:optional_field( <<"mask_position"/utf8>>, none, gleam@dynamic@decode:optional( mask_position_decoder( ) ), fun( Mask_position ) -> gleam@dynamic@decode:optional_field( <<"custom_emoji_id"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_string/1} ), fun( Custom_emoji_id ) -> gleam@dynamic@decode:optional_field( <<"needs_repainting"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_bool/1} ), fun( Needs_repainting ) -> gleam@dynamic@decode:optional_field( <<"file_size"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_int/1} ), fun( File_size ) -> gleam@dynamic@decode:success( {sticker, File_id, File_unique_id, Type_, Width, Height, Is_animated, Is_video, Thumbnail, Emoji, Set_name, Premium_animation, Mask_position, Custom_emoji_id, Needs_repainting, File_size} ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ). -file("src/telega/model.gleam", 7629). -spec business_intro_decoder() -> gleam@dynamic@decode:decoder(business_intro()). business_intro_decoder() -> gleam@dynamic@decode:optional_field( <<"title"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_string/1} ), fun(Title) -> gleam@dynamic@decode:optional_field( <<"message"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_string/1} ), fun(Message) -> gleam@dynamic@decode:optional_field( <<"sticker"/utf8>>, none, gleam@dynamic@decode:optional(sticker_decoder()), fun(Sticker) -> gleam@dynamic@decode:success( {business_intro, Title, Message, Sticker} ) end ) end ) end ). -file("src/telega/model.gleam", 7785). -spec gift_decoder() -> gleam@dynamic@decode:decoder(gift()). gift_decoder() -> gleam@dynamic@decode:field( <<"id"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Id) -> gleam@dynamic@decode:field( <<"sticker"/utf8>>, sticker_decoder(), fun(Sticker) -> gleam@dynamic@decode:field( <<"star_count"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_int/1}, fun(Star_count) -> gleam@dynamic@decode:field( <<"upgrade_star_count"/utf8>>, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_int/1} ), fun(Upgrade_star_count) -> gleam@dynamic@decode:field( <<"total_count"/utf8>>, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_int/1} ), fun(Total_count) -> gleam@dynamic@decode:field( <<"remaining_count"/utf8>>, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_int/1} ), fun(Remaining_count) -> gleam@dynamic@decode:success( {gift, Id, Sticker, Star_count, Upgrade_star_count, Total_count, Remaining_count} ) end ) end ) end ) end ) end ) end ). -file("src/telega/model.gleam", 7808). -spec gifts_decoder() -> gleam@dynamic@decode:decoder(gifts()). gifts_decoder() -> gleam@dynamic@decode:field( <<"gifts"/utf8>>, gleam@dynamic@decode:list(gift_decoder()), fun(Gifts) -> gleam@dynamic@decode:success({gifts, Gifts}) end ). -file("src/telega/model.gleam", 7813). -spec unique_gift_model_decoder() -> gleam@dynamic@decode:decoder(unique_gift_model()). unique_gift_model_decoder() -> gleam@dynamic@decode:field( <<"name"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Name) -> gleam@dynamic@decode:field( <<"sticker"/utf8>>, sticker_decoder(), fun(Sticker) -> gleam@dynamic@decode:field( <<"rarity_per_mille"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_int/1}, fun(Rarity_per_mille) -> gleam@dynamic@decode:success( {unique_gift_model, Name, Sticker, Rarity_per_mille} ) end ) end ) end ). -file("src/telega/model.gleam", 7824). -spec unique_gift_symbol_decoder() -> gleam@dynamic@decode:decoder(unique_gift_symbol()). unique_gift_symbol_decoder() -> gleam@dynamic@decode:field( <<"name"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Name) -> gleam@dynamic@decode:field( <<"sticker"/utf8>>, sticker_decoder(), fun(Sticker) -> gleam@dynamic@decode:field( <<"rarity_per_mille"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_int/1}, fun(Rarity_per_mille) -> gleam@dynamic@decode:success( {unique_gift_symbol, Name, Sticker, Rarity_per_mille} ) end ) end ) end ). -file("src/telega/model.gleam", 7861). -spec unique_gift_decoder() -> gleam@dynamic@decode:decoder(unique_gift()). unique_gift_decoder() -> gleam@dynamic@decode:field( <<"base_name"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Base_name) -> gleam@dynamic@decode:field( <<"name"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Name) -> gleam@dynamic@decode:field( <<"number"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_int/1}, fun(Number) -> gleam@dynamic@decode:field( <<"model"/utf8>>, unique_gift_model_decoder(), fun(Model) -> gleam@dynamic@decode:field( <<"symbol"/utf8>>, unique_gift_symbol_decoder(), fun(Symbol) -> gleam@dynamic@decode:field( <<"backdrop"/utf8>>, unique_gift_backdrop_decoder(), fun(Backdrop) -> gleam@dynamic@decode:success( {unique_gift, Base_name, Name, Number, Model, Symbol, Backdrop} ) end ) end ) end ) end ) end ) end ). -file("src/telega/model.gleam", 7878). -spec gift_info_decoder() -> gleam@dynamic@decode:decoder(gift_info()). gift_info_decoder() -> gleam@dynamic@decode:field( <<"gift"/utf8>>, gift_decoder(), fun(Gift) -> gleam@dynamic@decode:field( <<"owned_gift_id"/utf8>>, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_string/1} ), fun(Owned_gift_id) -> gleam@dynamic@decode:field( <<"convert_star_count"/utf8>>, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_int/1} ), fun(Convert_star_count) -> gleam@dynamic@decode:field( <<"prepaid_upgrade_star_count"/utf8>>, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_int/1} ), fun(Prepaid_upgrade_star_count) -> gleam@dynamic@decode:field( <<"can_be_upgraded"/utf8>>, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_bool/1} ), fun(Can_be_upgraded) -> gleam@dynamic@decode:field( <<"text"/utf8>>, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_string/1} ), fun(Text) -> gleam@dynamic@decode:field( <<"entities"/utf8>>, gleam@dynamic@decode:optional( gleam@dynamic@decode:list( message_entity_decoder( ) ) ), fun(Entities) -> gleam@dynamic@decode:field( <<"is_private"/utf8>>, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_bool/1} ), fun(Is_private) -> gleam@dynamic@decode:success( {gift_info, Gift, Owned_gift_id, Convert_star_count, Prepaid_upgrade_star_count, Can_be_upgraded, Text, Entities, Is_private} ) end ) end ) end ) end ) end ) end ) end ) end ). -file("src/telega/model.gleam", 7914). -spec unique_gift_info_decoder() -> gleam@dynamic@decode:decoder(unique_gift_info()). unique_gift_info_decoder() -> gleam@dynamic@decode:field( <<"gift"/utf8>>, unique_gift_decoder(), fun(Gift) -> gleam@dynamic@decode:field( <<"origin"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Origin) -> gleam@dynamic@decode:field( <<"owned_gift_id"/utf8>>, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_string/1} ), fun(Owned_gift_id) -> gleam@dynamic@decode:field( <<"transfer_star_count"/utf8>>, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_int/1} ), fun(Transfer_star_count) -> gleam@dynamic@decode:success( {unique_gift_info, Gift, Origin, Owned_gift_id, Transfer_star_count} ) end ) end ) end ) end ). -file("src/telega/model.gleam", 7933). -spec owned_gift_decoder() -> gleam@dynamic@decode:decoder(owned_gift()). owned_gift_decoder() -> gleam@dynamic@decode:field( <<"type_"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Type_) -> gleam@dynamic@decode:field( <<"gift"/utf8>>, gift_decoder(), fun(Gift) -> gleam@dynamic@decode:field( <<"owned_gift_id"/utf8>>, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_string/1} ), fun(Owned_gift_id) -> gleam@dynamic@decode:field( <<"sender_user"/utf8>>, gleam@dynamic@decode:optional(user_decoder()), fun(Sender_user) -> gleam@dynamic@decode:field( <<"send_date"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_int/1}, fun(Send_date) -> gleam@dynamic@decode:field( <<"text"/utf8>>, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_string/1} ), fun(Text) -> gleam@dynamic@decode:field( <<"entities"/utf8>>, gleam@dynamic@decode:optional( gleam@dynamic@decode:list( message_entity_decoder( ) ) ), fun(Entities) -> gleam@dynamic@decode:field( <<"is_private"/utf8>>, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_bool/1} ), fun(Is_private) -> gleam@dynamic@decode:field( <<"is_saved"/utf8>>, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_bool/1} ), fun( Is_saved ) -> gleam@dynamic@decode:field( <<"can_be_upgraded"/utf8>>, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_bool/1} ), fun( Can_be_upgraded ) -> gleam@dynamic@decode:field( <<"was_refunded"/utf8>>, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_bool/1} ), fun( Was_refunded ) -> gleam@dynamic@decode:field( <<"convert_star_count"/utf8>>, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_int/1} ), fun( Convert_star_count ) -> gleam@dynamic@decode:field( <<"prepaid_upgrade_star_count"/utf8>>, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_int/1} ), fun( Prepaid_upgrade_star_count ) -> gleam@dynamic@decode:success( {owned_gift, Type_, Gift, Owned_gift_id, Sender_user, Send_date, Text, Entities, Is_private, Is_saved, Can_be_upgraded, Was_refunded, Convert_star_count, Prepaid_upgrade_star_count} ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ). -file("src/telega/model.gleam", 7982). -spec owned_gift_regular_decoder() -> gleam@dynamic@decode:decoder(owned_gift_regular()). owned_gift_regular_decoder() -> gleam@dynamic@decode:field( <<"type_"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Type_) -> gleam@dynamic@decode:field( <<"gift"/utf8>>, gift_decoder(), fun(Gift) -> gleam@dynamic@decode:field( <<"owned_gift_id"/utf8>>, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_string/1} ), fun(Owned_gift_id) -> gleam@dynamic@decode:field( <<"sender_user"/utf8>>, gleam@dynamic@decode:optional(user_decoder()), fun(Sender_user) -> gleam@dynamic@decode:field( <<"send_date"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_int/1}, fun(Send_date) -> gleam@dynamic@decode:field( <<"text"/utf8>>, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_string/1} ), fun(Text) -> gleam@dynamic@decode:field( <<"entities"/utf8>>, gleam@dynamic@decode:optional( gleam@dynamic@decode:list( message_entity_decoder( ) ) ), fun(Entities) -> gleam@dynamic@decode:field( <<"is_private"/utf8>>, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_bool/1} ), fun(Is_private) -> gleam@dynamic@decode:field( <<"is_saved"/utf8>>, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_bool/1} ), fun( Is_saved ) -> gleam@dynamic@decode:field( <<"can_be_upgraded"/utf8>>, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_bool/1} ), fun( Can_be_upgraded ) -> gleam@dynamic@decode:field( <<"was_refunded"/utf8>>, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_bool/1} ), fun( Was_refunded ) -> gleam@dynamic@decode:field( <<"convert_star_count"/utf8>>, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_int/1} ), fun( Convert_star_count ) -> gleam@dynamic@decode:field( <<"prepaid_upgrade_star_count"/utf8>>, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_int/1} ), fun( Prepaid_upgrade_star_count ) -> gleam@dynamic@decode:success( {owned_gift_regular, Type_, Gift, Owned_gift_id, Sender_user, Send_date, Text, Entities, Is_private, Is_saved, Can_be_upgraded, Was_refunded, Convert_star_count, Prepaid_upgrade_star_count} ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ). -file("src/telega/model.gleam", 8031). -spec owned_gift_unique_decoder() -> gleam@dynamic@decode:decoder(owned_gift_unique()). owned_gift_unique_decoder() -> gleam@dynamic@decode:field( <<"type_"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Type_) -> gleam@dynamic@decode:field( <<"gift"/utf8>>, unique_gift_decoder(), fun(Gift) -> gleam@dynamic@decode:field( <<"owned_gift_id"/utf8>>, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_string/1} ), fun(Owned_gift_id) -> gleam@dynamic@decode:field( <<"sender_user"/utf8>>, gleam@dynamic@decode:optional(user_decoder()), fun(Sender_user) -> gleam@dynamic@decode:field( <<"send_date"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_int/1}, fun(Send_date) -> gleam@dynamic@decode:field( <<"is_saved"/utf8>>, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_bool/1} ), fun(Is_saved) -> gleam@dynamic@decode:field( <<"can_be_transferred"/utf8>>, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_bool/1} ), fun(Can_be_transferred) -> gleam@dynamic@decode:field( <<"transfer_star_count"/utf8>>, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_int/1} ), fun( Transfer_star_count ) -> gleam@dynamic@decode:success( {owned_gift_unique, Type_, Gift, Owned_gift_id, Sender_user, Send_date, Is_saved, Can_be_transferred, Transfer_star_count} ) end ) end ) end ) end ) end ) end ) end ) end ). -file("src/telega/model.gleam", 8064). -spec owned_gifts_decoder() -> gleam@dynamic@decode:decoder(owned_gifts()). owned_gifts_decoder() -> gleam@dynamic@decode:field( <<"total_count"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_int/1}, fun(Total_count) -> gleam@dynamic@decode:field( <<"gifts"/utf8>>, gleam@dynamic@decode:list(owned_gift_decoder()), fun(Gifts) -> gleam@dynamic@decode:field( <<"next_offset"/utf8>>, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_string/1} ), fun(Next_offset) -> gleam@dynamic@decode:success( {owned_gifts, Total_count, Gifts, Next_offset} ) end ) end ) end ). -file("src/telega/model.gleam", 8782). -spec sticker_set_decoder() -> gleam@dynamic@decode:decoder(sticker_set()). sticker_set_decoder() -> gleam@dynamic@decode:field( <<"name"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Name) -> gleam@dynamic@decode:field( <<"title"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Title) -> gleam@dynamic@decode:field( <<"sticker_type"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Sticker_type) -> gleam@dynamic@decode:field( <<"stickers"/utf8>>, gleam@dynamic@decode:list(sticker_decoder()), fun(Stickers) -> gleam@dynamic@decode:optional_field( <<"thumbnail"/utf8>>, none, gleam@dynamic@decode:optional( photo_size_decoder() ), fun(Thumbnail) -> gleam@dynamic@decode:success( {sticker_set, Name, Title, Sticker_type, Stickers, Thumbnail} ) end ) end ) end ) end ) end ). -file("src/telega/model.gleam", 8837). -spec inline_query_decoder() -> gleam@dynamic@decode:decoder(inline_query()). inline_query_decoder() -> gleam@dynamic@decode:field( <<"id"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Id) -> gleam@dynamic@decode:field( <<"from"/utf8>>, user_decoder(), fun(From) -> gleam@dynamic@decode:field( <<"query"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Query) -> gleam@dynamic@decode:field( <<"offset"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Offset) -> gleam@dynamic@decode:optional_field( <<"chat_type"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_string/1} ), fun(Chat_type) -> gleam@dynamic@decode:optional_field( <<"location"/utf8>>, none, gleam@dynamic@decode:optional( location_decoder() ), fun(Location) -> gleam@dynamic@decode:success( {inline_query, Id, From, Query, Offset, Chat_type, Location} ) end ) end ) end ) end ) end ) end ). -file("src/telega/model.gleam", 8862). -spec inline_query_results_button_decoder() -> gleam@dynamic@decode:decoder(inline_query_results_button()). inline_query_results_button_decoder() -> gleam@dynamic@decode:field( <<"text"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Text) -> gleam@dynamic@decode:optional_field( <<"web_app"/utf8>>, none, gleam@dynamic@decode:optional(web_app_info_decoder()), fun(Web_app) -> gleam@dynamic@decode:optional_field( <<"start_parameter"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_string/1} ), fun(Start_parameter) -> gleam@dynamic@decode:success( {inline_query_results_button, Text, Web_app, Start_parameter} ) end ) end ) end ). -file("src/telega/model.gleam", 10038). -spec input_text_message_content_decoder() -> gleam@dynamic@decode:decoder(input_text_message_content()). input_text_message_content_decoder() -> gleam@dynamic@decode:field( <<"message_text"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Message_text) -> gleam@dynamic@decode:optional_field( <<"parse_mode"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_string/1} ), fun(Parse_mode) -> gleam@dynamic@decode:optional_field( <<"entities"/utf8>>, none, gleam@dynamic@decode:optional( gleam@dynamic@decode:list(message_entity_decoder()) ), fun(Entities) -> gleam@dynamic@decode:optional_field( <<"link_preview_options"/utf8>>, none, gleam@dynamic@decode:optional( link_preview_options_decoder() ), fun(Link_preview_options) -> gleam@dynamic@decode:success( {input_text_message_content, Message_text, Parse_mode, Entities, Link_preview_options} ) end ) end ) end ) end ). -file("src/telega/model.gleam", 10065). -spec input_location_message_content_decoder() -> gleam@dynamic@decode:decoder(input_location_message_content()). input_location_message_content_decoder() -> gleam@dynamic@decode:field( <<"latitude"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_float/1}, fun(Latitude) -> gleam@dynamic@decode:field( <<"longitude"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_float/1}, fun(Longitude) -> gleam@dynamic@decode:optional_field( <<"horizontal_accuracy"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_float/1} ), fun(Horizontal_accuracy) -> gleam@dynamic@decode:optional_field( <<"live_period"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_int/1} ), fun(Live_period) -> gleam@dynamic@decode:optional_field( <<"heading"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_int/1} ), fun(Heading) -> gleam@dynamic@decode:optional_field( <<"proximity_alert_radius"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_int/1} ), fun(Proximity_alert_radius) -> gleam@dynamic@decode:success( {input_location_message_content, Latitude, Longitude, Horizontal_accuracy, Live_period, Heading, Proximity_alert_radius} ) end ) end ) end ) end ) end ) end ). -file("src/telega/model.gleam", 10100). -spec input_venue_message_content_decoder() -> gleam@dynamic@decode:decoder(input_venue_message_content()). input_venue_message_content_decoder() -> gleam@dynamic@decode:field( <<"latitude"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_float/1}, fun(Latitude) -> gleam@dynamic@decode:field( <<"longitude"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_float/1}, fun(Longitude) -> gleam@dynamic@decode:field( <<"title"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Title) -> gleam@dynamic@decode:field( <<"address"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Address) -> gleam@dynamic@decode:optional_field( <<"foursquare_id"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_string/1} ), fun(Foursquare_id) -> gleam@dynamic@decode:optional_field( <<"foursquare_type"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_string/1} ), fun(Foursquare_type) -> gleam@dynamic@decode:optional_field( <<"google_place_id"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_string/1} ), fun(Google_place_id) -> gleam@dynamic@decode:optional_field( <<"google_place_type"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_string/1} ), fun( Google_place_type ) -> gleam@dynamic@decode:success( {input_venue_message_content, Latitude, Longitude, Title, Address, Foursquare_id, Foursquare_type, Google_place_id, Google_place_type} ) end ) end ) end ) end ) end ) end ) end ) end ). -file("src/telega/model.gleam", 10139). -spec input_contact_message_content_decoder() -> gleam@dynamic@decode:decoder(input_contact_message_content()). input_contact_message_content_decoder() -> gleam@dynamic@decode:field( <<"phone_number"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Phone_number) -> gleam@dynamic@decode:field( <<"first_name"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(First_name) -> gleam@dynamic@decode:optional_field( <<"last_name"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_string/1} ), fun(Last_name) -> gleam@dynamic@decode:optional_field( <<"vcard"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_string/1} ), fun(Vcard) -> gleam@dynamic@decode:success( {input_contact_message_content, Phone_number, First_name, Last_name, Vcard} ) end ) end ) end ) end ). -file("src/telega/model.gleam", 10269). -spec chosen_inline_result_decoder() -> gleam@dynamic@decode:decoder(chosen_inline_result()). chosen_inline_result_decoder() -> gleam@dynamic@decode:field( <<"result_id"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Result_id) -> gleam@dynamic@decode:field( <<"from"/utf8>>, user_decoder(), fun(From) -> gleam@dynamic@decode:optional_field( <<"location"/utf8>>, none, gleam@dynamic@decode:optional(location_decoder()), fun(Location) -> gleam@dynamic@decode:optional_field( <<"inline_message_id"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_string/1} ), fun(Inline_message_id) -> gleam@dynamic@decode:field( <<"query"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Query) -> gleam@dynamic@decode:success( {chosen_inline_result, Result_id, From, Location, Inline_message_id, Query} ) end ) end ) end ) end ) end ). -file("src/telega/model.gleam", 10292). -spec sent_web_app_message_decoder() -> gleam@dynamic@decode:decoder(sent_web_app_message()). sent_web_app_message_decoder() -> gleam@dynamic@decode:optional_field( <<"inline_message_id"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_string/1} ), fun(Inline_message_id) -> gleam@dynamic@decode:success( {sent_web_app_message, Inline_message_id} ) end ). -file("src/telega/model.gleam", 10301). -spec prepared_inline_message_decoder() -> gleam@dynamic@decode:decoder(prepared_inline_message()). prepared_inline_message_decoder() -> gleam@dynamic@decode:field( <<"id"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Id) -> gleam@dynamic@decode:field( <<"expiration_date"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_int/1}, fun(Expiration_date) -> gleam@dynamic@decode:success( {prepared_inline_message, Id, Expiration_date} ) end ) end ). -file("src/telega/model.gleam", 10309). -spec labeled_price_decoder() -> gleam@dynamic@decode:decoder(labeled_price()). labeled_price_decoder() -> gleam@dynamic@decode:field( <<"label"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Label) -> gleam@dynamic@decode:field( <<"amount"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_int/1}, fun(Amount) -> gleam@dynamic@decode:success({labeled_price, Label, Amount}) end ) end ). -file("src/telega/model.gleam", 10162). -spec input_invoice_message_content_decoder() -> gleam@dynamic@decode:decoder(input_invoice_message_content()). input_invoice_message_content_decoder() -> gleam@dynamic@decode:field( <<"title"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Title) -> gleam@dynamic@decode:field( <<"description"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Description) -> gleam@dynamic@decode:field( <<"payload"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Payload) -> gleam@dynamic@decode:optional_field( <<"provider_token"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_string/1} ), fun(Provider_token) -> gleam@dynamic@decode:field( <<"currency"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Currency) -> gleam@dynamic@decode:field( <<"prices"/utf8>>, gleam@dynamic@decode:list( labeled_price_decoder() ), fun(Prices) -> gleam@dynamic@decode:optional_field( <<"max_tip_amount"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_int/1} ), fun(Max_tip_amount) -> gleam@dynamic@decode:optional_field( <<"suggested_tip_amounts"/utf8>>, none, gleam@dynamic@decode:optional( gleam@dynamic@decode:list( {decoder, fun gleam@dynamic@decode:decode_int/1} ) ), fun( Suggested_tip_amounts ) -> gleam@dynamic@decode:optional_field( <<"provider_data"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_string/1} ), fun( Provider_data ) -> gleam@dynamic@decode:optional_field( <<"photo_url"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_string/1} ), fun( Photo_url ) -> gleam@dynamic@decode:optional_field( <<"photo_size"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_int/1} ), fun( Photo_size ) -> gleam@dynamic@decode:optional_field( <<"photo_width"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_int/1} ), fun( Photo_width ) -> gleam@dynamic@decode:optional_field( <<"photo_height"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_int/1} ), fun( Photo_height ) -> gleam@dynamic@decode:optional_field( <<"need_name"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_bool/1} ), fun( Need_name ) -> gleam@dynamic@decode:optional_field( <<"need_phone_number"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_bool/1} ), fun( Need_phone_number ) -> gleam@dynamic@decode:optional_field( <<"need_email"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_bool/1} ), fun( Need_email ) -> gleam@dynamic@decode:optional_field( <<"need_shipping_address"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_bool/1} ), fun( Need_shipping_address ) -> gleam@dynamic@decode:optional_field( <<"send_phone_number_to_provider"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_bool/1} ), fun( Send_phone_number_to_provider ) -> gleam@dynamic@decode:optional_field( <<"send_email_to_provider"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_bool/1} ), fun( Send_email_to_provider ) -> gleam@dynamic@decode:optional_field( <<"is_flexible"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_bool/1} ), fun( Is_flexible ) -> gleam@dynamic@decode:success( {input_invoice_message_content, Title, Description, Payload, Provider_token, Currency, Prices, Max_tip_amount, Suggested_tip_amounts, Provider_data, Photo_url, Photo_size, Photo_width, Photo_height, Need_name, Need_phone_number, Need_email, Need_shipping_address, Send_phone_number_to_provider, Send_email_to_provider, Is_flexible} ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ). -file("src/telega/model.gleam", 10315). -spec invoice_decoder() -> gleam@dynamic@decode:decoder(invoice()). invoice_decoder() -> gleam@dynamic@decode:field( <<"title"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Title) -> gleam@dynamic@decode:field( <<"description"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Description) -> gleam@dynamic@decode:field( <<"start_parameter"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Start_parameter) -> gleam@dynamic@decode:field( <<"currency"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Currency) -> gleam@dynamic@decode:field( <<"total_amount"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_int/1}, fun(Total_amount) -> gleam@dynamic@decode:success( {invoice, Title, Description, Start_parameter, Currency, Total_amount} ) end ) end ) end ) end ) end ). -file("src/telega/model.gleam", 10330). -spec shipping_address_decoder() -> gleam@dynamic@decode:decoder(shipping_address()). shipping_address_decoder() -> gleam@dynamic@decode:field( <<"country_code"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Country_code) -> gleam@dynamic@decode:field( <<"state"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(State) -> gleam@dynamic@decode:field( <<"city"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(City) -> gleam@dynamic@decode:field( <<"street_line1"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Street_line1) -> gleam@dynamic@decode:field( <<"street_line2"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Street_line2) -> gleam@dynamic@decode:field( <<"post_code"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Post_code) -> gleam@dynamic@decode:success( {shipping_address, Country_code, State, City, Street_line1, Street_line2, Post_code} ) end ) end ) end ) end ) end ) end ). -file("src/telega/model.gleam", 10347). -spec order_info_decoder() -> gleam@dynamic@decode:decoder(order_info()). order_info_decoder() -> gleam@dynamic@decode:optional_field( <<"name"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_string/1} ), fun(Name) -> gleam@dynamic@decode:optional_field( <<"phone_number"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_string/1} ), fun(Phone_number) -> gleam@dynamic@decode:optional_field( <<"email"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_string/1} ), fun(Email) -> gleam@dynamic@decode:optional_field( <<"shipping_address"/utf8>>, none, gleam@dynamic@decode:optional( shipping_address_decoder() ), fun(Shipping_address) -> gleam@dynamic@decode:success( {order_info, Name, Phone_number, Email, Shipping_address} ) end ) end ) end ) end ). -file("src/telega/model.gleam", 10376). -spec shipping_option_decoder() -> gleam@dynamic@decode:decoder(shipping_option()). shipping_option_decoder() -> gleam@dynamic@decode:field( <<"id"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Id) -> gleam@dynamic@decode:field( <<"title"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Title) -> gleam@dynamic@decode:field( <<"prices"/utf8>>, gleam@dynamic@decode:list(labeled_price_decoder()), fun(Prices) -> gleam@dynamic@decode:success( {shipping_option, Id, Title, Prices} ) end ) end ) end ). -file("src/telega/model.gleam", 10383). -spec successful_payment_decoder() -> gleam@dynamic@decode:decoder(successful_payment()). successful_payment_decoder() -> gleam@dynamic@decode:field( <<"currency"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Currency) -> gleam@dynamic@decode:field( <<"total_amount"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_int/1}, fun(Total_amount) -> gleam@dynamic@decode:field( <<"invoice_payload"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Invoice_payload) -> gleam@dynamic@decode:optional_field( <<"subscription_expiration_date"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_int/1} ), fun(Subscription_expiration_date) -> gleam@dynamic@decode:optional_field( <<"is_recurring"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_bool/1} ), fun(Is_recurring) -> gleam@dynamic@decode:optional_field( <<"is_first_recurring"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_bool/1} ), fun(Is_first_recurring) -> gleam@dynamic@decode:optional_field( <<"shipping_option_id"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_string/1} ), fun(Shipping_option_id) -> gleam@dynamic@decode:optional_field( <<"order_info"/utf8>>, none, gleam@dynamic@decode:optional( order_info_decoder( ) ), fun(Order_info) -> gleam@dynamic@decode:field( <<"telegram_payment_charge_id"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun( Telegram_payment_charge_id ) -> gleam@dynamic@decode:field( <<"provider_payment_charge_id"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun( Provider_payment_charge_id ) -> gleam@dynamic@decode:success( {successful_payment, Currency, Total_amount, Invoice_payload, Subscription_expiration_date, Is_recurring, Is_first_recurring, Shipping_option_id, Order_info, Telegram_payment_charge_id, Provider_payment_charge_id} ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ). -file("src/telega/model.gleam", 10434). -spec refunded_payment_decoder() -> gleam@dynamic@decode:decoder(refunded_payment()). refunded_payment_decoder() -> gleam@dynamic@decode:field( <<"currency"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Currency) -> gleam@dynamic@decode:field( <<"total_amount"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_int/1}, fun(Total_amount) -> gleam@dynamic@decode:field( <<"invoice_payload"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Invoice_payload) -> gleam@dynamic@decode:field( <<"telegram_payment_charge_id"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Telegram_payment_charge_id) -> gleam@dynamic@decode:optional_field( <<"provider_payment_charge_id"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_string/1} ), fun(Provider_payment_charge_id) -> gleam@dynamic@decode:success( {refunded_payment, Currency, Total_amount, Invoice_payload, Telegram_payment_charge_id, Provider_payment_charge_id} ) end ) end ) end ) end ) end ). -file("src/telega/model.gleam", 10456). -spec shipping_query_decoder() -> gleam@dynamic@decode:decoder(shipping_query()). shipping_query_decoder() -> gleam@dynamic@decode:field( <<"id"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Id) -> gleam@dynamic@decode:field( <<"from"/utf8>>, user_decoder(), fun(From) -> gleam@dynamic@decode:field( <<"invoice_payload"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Invoice_payload) -> gleam@dynamic@decode:field( <<"shipping_address"/utf8>>, shipping_address_decoder(), fun(Shipping_address) -> gleam@dynamic@decode:success( {shipping_query, Id, From, Invoice_payload, Shipping_address} ) end ) end ) end ) end ). -file("src/telega/model.gleam", 10472). -spec pre_checkout_query_decoder() -> gleam@dynamic@decode:decoder(pre_checkout_query()). pre_checkout_query_decoder() -> gleam@dynamic@decode:field( <<"id"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Id) -> gleam@dynamic@decode:field( <<"from"/utf8>>, user_decoder(), fun(From) -> gleam@dynamic@decode:field( <<"currency"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Currency) -> gleam@dynamic@decode:field( <<"total_amount"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_int/1}, fun(Total_amount) -> gleam@dynamic@decode:field( <<"invoice_payload"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Invoice_payload) -> gleam@dynamic@decode:optional_field( <<"shipping_option_id"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_string/1} ), fun(Shipping_option_id) -> gleam@dynamic@decode:optional_field( <<"order_info"/utf8>>, none, gleam@dynamic@decode:optional( order_info_decoder() ), fun(Order_info) -> gleam@dynamic@decode:success( {pre_checkout_query, Id, From, Currency, Total_amount, Invoice_payload, Shipping_option_id, Order_info} ) end ) end ) end ) end ) end ) end ) end ). -file("src/telega/model.gleam", 10499). -spec paid_media_purchased_decoder() -> gleam@dynamic@decode:decoder(paid_media_purchased()). paid_media_purchased_decoder() -> gleam@dynamic@decode:field( <<"from"/utf8>>, user_decoder(), fun(From) -> gleam@dynamic@decode:field( <<"paid_media_payload"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Paid_media_payload) -> gleam@dynamic@decode:success( {paid_media_purchased, From, Paid_media_payload} ) end ) end ). -file("src/telega/model.gleam", 10508). -spec revenue_withdrawal_state_pending_decoder() -> gleam@dynamic@decode:decoder(revenue_withdrawal_state_pending()). revenue_withdrawal_state_pending_decoder() -> gleam@dynamic@decode:field( <<"type"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Type_) -> gleam@dynamic@decode:success( {revenue_withdrawal_state_pending, Type_} ) end ). -file("src/telega/model.gleam", 10515). -spec revenue_withdrawal_state_succeeded_decoder() -> gleam@dynamic@decode:decoder(revenue_withdrawal_state_succeeded()). revenue_withdrawal_state_succeeded_decoder() -> gleam@dynamic@decode:field( <<"type"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Type_) -> gleam@dynamic@decode:field( <<"date"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_int/1}, fun(Date) -> gleam@dynamic@decode:field( <<"url"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Url) -> gleam@dynamic@decode:success( {revenue_withdrawal_state_succeeded, Type_, Date, Url} ) end ) end ) end ). -file("src/telega/model.gleam", 10528). -spec revenue_withdrawal_state_failed_decoder() -> gleam@dynamic@decode:decoder(revenue_withdrawal_state_failed()). revenue_withdrawal_state_failed_decoder() -> gleam@dynamic@decode:field( <<"type"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Type_) -> gleam@dynamic@decode:success( {revenue_withdrawal_state_failed, Type_} ) end ). -file("src/telega/model.gleam", 10535). -spec affiliate_info_decoder() -> gleam@dynamic@decode:decoder(affiliate_info()). affiliate_info_decoder() -> gleam@dynamic@decode:optional_field( <<"affiliate_user"/utf8>>, none, gleam@dynamic@decode:optional(user_decoder()), fun(Affiliate_user) -> gleam@dynamic@decode:optional_field( <<"affiliate_chat"/utf8>>, none, gleam@dynamic@decode:optional(chat_decoder()), fun(Affiliate_chat) -> gleam@dynamic@decode:field( <<"commission_per_mille"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_int/1}, fun(Commission_per_mille) -> gleam@dynamic@decode:field( <<"amount"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_int/1}, fun(Amount) -> gleam@dynamic@decode:optional_field( <<"nanostar_amount"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_int/1} ), fun(Nanostar_amount) -> gleam@dynamic@decode:success( {affiliate_info, Affiliate_user, Affiliate_chat, Commission_per_mille, Amount, Nanostar_amount} ) end ) end ) end ) end ) end ). -file("src/telega/model.gleam", 10609). -spec transaction_partner_chat_decoder() -> gleam@dynamic@decode:decoder(transaction_partner_chat()). transaction_partner_chat_decoder() -> gleam@dynamic@decode:field( <<"type"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Type_) -> gleam@dynamic@decode:field( <<"chat"/utf8>>, chat_decoder(), fun(Chat) -> gleam@dynamic@decode:optional_field( <<"gift"/utf8>>, none, gleam@dynamic@decode:optional(gift_decoder()), fun(Gift) -> gleam@dynamic@decode:success( {transaction_partner_chat, Type_, Chat, Gift} ) end ) end ) end ). -file("src/telega/model.gleam", 10622). -spec transaction_partner_affiliate_program_decoder() -> gleam@dynamic@decode:decoder(transaction_partner_affiliate_program()). transaction_partner_affiliate_program_decoder() -> gleam@dynamic@decode:field( <<"type"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Type_) -> gleam@dynamic@decode:optional_field( <<"sponsor_user"/utf8>>, none, gleam@dynamic@decode:optional(user_decoder()), fun(Sponsor_user) -> gleam@dynamic@decode:field( <<"commission_per_mille"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_int/1}, fun(Commission_per_mille) -> gleam@dynamic@decode:success( {transaction_partner_affiliate_program, Type_, Sponsor_user, Commission_per_mille} ) end ) end ) end ). -file("src/telega/model.gleam", 10654). -spec transaction_partner_telegram_ads_decoder() -> gleam@dynamic@decode:decoder(transaction_partner_telegram_ads()). transaction_partner_telegram_ads_decoder() -> gleam@dynamic@decode:field( <<"type"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Type_) -> gleam@dynamic@decode:success( {transaction_partner_telegram_ads, Type_} ) end ). -file("src/telega/model.gleam", 10661). -spec transaction_partner_telegram_api_decoder() -> gleam@dynamic@decode:decoder(transaction_partner_telegram_api()). transaction_partner_telegram_api_decoder() -> gleam@dynamic@decode:field( <<"type"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Type_) -> gleam@dynamic@decode:field( <<"request_count"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_int/1}, fun(Request_count) -> gleam@dynamic@decode:success( {transaction_partner_telegram_api, Type_, Request_count} ) end ) end ). -file("src/telega/model.gleam", 10672). -spec transaction_partner_other_decoder() -> gleam@dynamic@decode:decoder(transaction_partner_other()). transaction_partner_other_decoder() -> gleam@dynamic@decode:field( <<"type"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Type_) -> gleam@dynamic@decode:success({transaction_partner_other, Type_}) end ). -file("src/telega/model.gleam", 10728). -spec passport_file_decoder() -> gleam@dynamic@decode:decoder(passport_file()). passport_file_decoder() -> gleam@dynamic@decode:field( <<"file_id"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(File_id) -> gleam@dynamic@decode:field( <<"file_unique_id"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(File_unique_id) -> gleam@dynamic@decode:field( <<"file_size"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_int/1}, fun(File_size) -> gleam@dynamic@decode:field( <<"file_date"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_int/1}, fun(File_date) -> gleam@dynamic@decode:success( {passport_file, File_id, File_unique_id, File_size, File_date} ) end ) end ) end ) end ). -file("src/telega/model.gleam", 10741). -spec encrypted_passport_element_decoder() -> gleam@dynamic@decode:decoder(encrypted_passport_element()). encrypted_passport_element_decoder() -> gleam@dynamic@decode:field( <<"type"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Type_) -> gleam@dynamic@decode:optional_field( <<"data"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_string/1} ), fun(Data) -> gleam@dynamic@decode:optional_field( <<"phone_number"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_string/1} ), fun(Phone_number) -> gleam@dynamic@decode:optional_field( <<"email"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_string/1} ), fun(Email) -> gleam@dynamic@decode:optional_field( <<"files"/utf8>>, none, gleam@dynamic@decode:optional( gleam@dynamic@decode:list( passport_file_decoder() ) ), fun(Files) -> gleam@dynamic@decode:optional_field( <<"front_side"/utf8>>, none, gleam@dynamic@decode:optional( passport_file_decoder() ), fun(Front_side) -> gleam@dynamic@decode:optional_field( <<"reverse_side"/utf8>>, none, gleam@dynamic@decode:optional( passport_file_decoder( ) ), fun(Reverse_side) -> gleam@dynamic@decode:optional_field( <<"selfie"/utf8>>, none, gleam@dynamic@decode:optional( passport_file_decoder( ) ), fun(Selfie) -> gleam@dynamic@decode:optional_field( <<"translation"/utf8>>, none, gleam@dynamic@decode:optional( gleam@dynamic@decode:list( passport_file_decoder( ) ) ), fun( Translation ) -> gleam@dynamic@decode:field( <<"hash"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun( Hash ) -> gleam@dynamic@decode:success( {encrypted_passport_element, Type_, Data, Phone_number, Email, Files, Front_side, Reverse_side, Selfie, Translation, Hash} ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ). -file("src/telega/model.gleam", 10800). -spec encrypted_credentials_decoder() -> gleam@dynamic@decode:decoder(encrypted_credentials()). encrypted_credentials_decoder() -> gleam@dynamic@decode:field( <<"data"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Data) -> gleam@dynamic@decode:field( <<"hash"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Hash) -> gleam@dynamic@decode:field( <<"secret"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Secret) -> gleam@dynamic@decode:success( {encrypted_credentials, Data, Hash, Secret} ) end ) end ) end ). -file("src/telega/model.gleam", 10716). -spec passport_data_decoder() -> gleam@dynamic@decode:decoder(passport_data()). passport_data_decoder() -> gleam@dynamic@decode:field( <<"data"/utf8>>, gleam@dynamic@decode:list(encrypted_passport_element_decoder()), fun(Data) -> gleam@dynamic@decode:field( <<"credentials"/utf8>>, encrypted_credentials_decoder(), fun(Credentials) -> gleam@dynamic@decode:success( {passport_data, Data, Credentials} ) end ) end ). -file("src/telega/model.gleam", 10807). -spec passport_element_error_data_field_decoder() -> gleam@dynamic@decode:decoder(passport_element_error_data_field()). passport_element_error_data_field_decoder() -> gleam@dynamic@decode:field( <<"source"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Source) -> gleam@dynamic@decode:field( <<"type"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Type_) -> gleam@dynamic@decode:field( <<"field_name"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Field_name) -> gleam@dynamic@decode:field( <<"data_hash"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Data_hash) -> gleam@dynamic@decode:field( <<"message"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Message) -> gleam@dynamic@decode:success( {passport_element_error_data_field, Source, Type_, Field_name, Data_hash, Message} ) end ) end ) end ) end ) end ). -file("src/telega/model.gleam", 10824). -spec passport_element_error_front_side_decoder() -> gleam@dynamic@decode:decoder(passport_element_error_front_side()). passport_element_error_front_side_decoder() -> gleam@dynamic@decode:field( <<"source"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Source) -> gleam@dynamic@decode:field( <<"type"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Type_) -> gleam@dynamic@decode:field( <<"file_hash"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(File_hash) -> gleam@dynamic@decode:field( <<"message"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Message) -> gleam@dynamic@decode:success( {passport_element_error_front_side, Source, Type_, File_hash, Message} ) end ) end ) end ) end ). -file("src/telega/model.gleam", 10839). -spec passport_element_error_reverse_side_decoder() -> gleam@dynamic@decode:decoder(passport_element_error_reverse_side()). passport_element_error_reverse_side_decoder() -> gleam@dynamic@decode:field( <<"source"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Source) -> gleam@dynamic@decode:field( <<"type"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Type_) -> gleam@dynamic@decode:field( <<"file_hash"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(File_hash) -> gleam@dynamic@decode:field( <<"message"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Message) -> gleam@dynamic@decode:success( {passport_element_error_reverse_side, Source, Type_, File_hash, Message} ) end ) end ) end ) end ). -file("src/telega/model.gleam", 10854). -spec passport_element_error_selfie_decoder() -> gleam@dynamic@decode:decoder(passport_element_error_selfie()). passport_element_error_selfie_decoder() -> gleam@dynamic@decode:field( <<"source"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Source) -> gleam@dynamic@decode:field( <<"type"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Type_) -> gleam@dynamic@decode:field( <<"file_hash"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(File_hash) -> gleam@dynamic@decode:field( <<"message"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Message) -> gleam@dynamic@decode:success( {passport_element_error_selfie, Source, Type_, File_hash, Message} ) end ) end ) end ) end ). -file("src/telega/model.gleam", 10869). -spec passport_element_error_file_decoder() -> gleam@dynamic@decode:decoder(passport_element_error_file()). passport_element_error_file_decoder() -> gleam@dynamic@decode:field( <<"source"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Source) -> gleam@dynamic@decode:field( <<"type"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Type_) -> gleam@dynamic@decode:field( <<"file_hash"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(File_hash) -> gleam@dynamic@decode:field( <<"message"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Message) -> gleam@dynamic@decode:success( {passport_element_error_file, Source, Type_, File_hash, Message} ) end ) end ) end ) end ). -file("src/telega/model.gleam", 10884). -spec passport_element_error_files_decoder() -> gleam@dynamic@decode:decoder(passport_element_error_files()). passport_element_error_files_decoder() -> gleam@dynamic@decode:field( <<"source"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Source) -> gleam@dynamic@decode:field( <<"type"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Type_) -> gleam@dynamic@decode:field( <<"file_hashes"/utf8>>, gleam@dynamic@decode:list( {decoder, fun gleam@dynamic@decode:decode_string/1} ), fun(File_hashes) -> gleam@dynamic@decode:field( <<"message"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Message) -> gleam@dynamic@decode:success( {passport_element_error_files, Source, Type_, File_hashes, Message} ) end ) end ) end ) end ). -file("src/telega/model.gleam", 10899). -spec passport_element_error_translation_file_decoder() -> gleam@dynamic@decode:decoder(passport_element_error_translation_file()). passport_element_error_translation_file_decoder() -> gleam@dynamic@decode:field( <<"source"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Source) -> gleam@dynamic@decode:field( <<"type"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Type_) -> gleam@dynamic@decode:field( <<"file_hash"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(File_hash) -> gleam@dynamic@decode:field( <<"message"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Message) -> gleam@dynamic@decode:success( {passport_element_error_translation_file, Source, Type_, File_hash, Message} ) end ) end ) end ) end ). -file("src/telega/model.gleam", 10914). -spec passport_element_error_translation_files_decoder() -> gleam@dynamic@decode:decoder(passport_element_error_translation_files()). passport_element_error_translation_files_decoder() -> gleam@dynamic@decode:field( <<"source"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Source) -> gleam@dynamic@decode:field( <<"type"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Type_) -> gleam@dynamic@decode:field( <<"file_hashes"/utf8>>, gleam@dynamic@decode:list( {decoder, fun gleam@dynamic@decode:decode_string/1} ), fun(File_hashes) -> gleam@dynamic@decode:field( <<"message"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Message) -> gleam@dynamic@decode:success( {passport_element_error_translation_files, Source, Type_, File_hashes, Message} ) end ) end ) end ) end ). -file("src/telega/model.gleam", 10929). -spec passport_element_error_unspecified_decoder() -> gleam@dynamic@decode:decoder(passport_element_error_unspecified()). passport_element_error_unspecified_decoder() -> gleam@dynamic@decode:field( <<"source"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Source) -> gleam@dynamic@decode:field( <<"type"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Type_) -> gleam@dynamic@decode:field( <<"element_hash"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Element_hash) -> gleam@dynamic@decode:field( <<"message"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Message) -> gleam@dynamic@decode:success( {passport_element_error_unspecified, Source, Type_, Element_hash, Message} ) end ) end ) end ) end ). -file("src/telega/model.gleam", 10944). -spec game_decoder() -> gleam@dynamic@decode:decoder(game()). game_decoder() -> gleam@dynamic@decode:field( <<"title"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Title) -> gleam@dynamic@decode:field( <<"description"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Description) -> gleam@dynamic@decode:field( <<"photo"/utf8>>, gleam@dynamic@decode:list(photo_size_decoder()), fun(Photo) -> gleam@dynamic@decode:optional_field( <<"text"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_string/1} ), fun(Text) -> gleam@dynamic@decode:optional_field( <<"text_entities"/utf8>>, none, gleam@dynamic@decode:optional( gleam@dynamic@decode:list( message_entity_decoder() ) ), fun(Text_entities) -> gleam@dynamic@decode:optional_field( <<"animation"/utf8>>, none, gleam@dynamic@decode:optional( animation_decoder() ), fun(Animation) -> gleam@dynamic@decode:success( {game, Title, Description, Photo, Text, Text_entities, Animation} ) end ) end ) end ) end ) end ) end ). -file("src/telega/model.gleam", 10973). -spec callback_game_decoder() -> gleam@dynamic@decode:decoder(callback_game()). callback_game_decoder() -> gleam@dynamic@decode:field( <<"user_id"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_int/1}, fun(User_id) -> gleam@dynamic@decode:field( <<"score"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_int/1}, fun(Score) -> gleam@dynamic@decode:optional_field( <<"force"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_bool/1} ), fun(Force) -> gleam@dynamic@decode:optional_field( <<"disable_edit_message"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_bool/1} ), fun(Disable_edit_message) -> gleam@dynamic@decode:optional_field( <<"chat_id"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_int/1} ), fun(Chat_id) -> gleam@dynamic@decode:optional_field( <<"message_id"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_int/1} ), fun(Message_id) -> gleam@dynamic@decode:optional_field( <<"inline_message_id"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_string/1} ), fun(Inline_message_id) -> gleam@dynamic@decode:success( {callback_game, User_id, Score, Force, Disable_edit_message, Chat_id, Message_id, Inline_message_id} ) end ) end ) end ) end ) end ) end ) end ). -file("src/telega/model.gleam", 7012). -spec inline_keyboard_button_decoder() -> gleam@dynamic@decode:decoder(inline_keyboard_button()). inline_keyboard_button_decoder() -> gleam@dynamic@decode:field( <<"text"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Text) -> gleam@dynamic@decode:optional_field( <<"url"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_string/1} ), fun(Url) -> gleam@dynamic@decode:optional_field( <<"callback_data"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_string/1} ), fun(Callback_data) -> gleam@dynamic@decode:optional_field( <<"web_app"/utf8>>, none, gleam@dynamic@decode:optional( web_app_info_decoder() ), fun(Web_app) -> gleam@dynamic@decode:optional_field( <<"login_url"/utf8>>, none, gleam@dynamic@decode:optional( login_url_decoder() ), fun(Login_url) -> gleam@dynamic@decode:optional_field( <<"switch_inline_query"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_string/1} ), fun(Switch_inline_query) -> gleam@dynamic@decode:optional_field( <<"switch_inline_query_current_chat"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_string/1} ), fun( Switch_inline_query_current_chat ) -> gleam@dynamic@decode:optional_field( <<"switch_inline_query_chosen_chat"/utf8>>, none, gleam@dynamic@decode:optional( switch_inline_query_chosen_chat_decoder( ) ), fun( Switch_inline_query_chosen_chat ) -> gleam@dynamic@decode:optional_field( <<"copy_text"/utf8>>, none, gleam@dynamic@decode:optional( copy_text_button_decoder( ) ), fun( Copy_text ) -> gleam@dynamic@decode:optional_field( <<"callback_game"/utf8>>, none, gleam@dynamic@decode:optional( callback_game_decoder( ) ), fun( Callback_game ) -> gleam@dynamic@decode:optional_field( <<"pay"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_bool/1} ), fun( Pay ) -> gleam@dynamic@decode:success( {inline_keyboard_button, Text, Url, Callback_data, Web_app, Login_url, Switch_inline_query, Switch_inline_query_current_chat, Switch_inline_query_chosen_chat, Copy_text, Callback_game, Pay} ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ). -file("src/telega/model.gleam", 7004). -spec inline_keyboard_markup_decoder() -> gleam@dynamic@decode:decoder(inline_keyboard_markup()). inline_keyboard_markup_decoder() -> gleam@dynamic@decode:field( <<"inline_keyboard"/utf8>>, gleam@dynamic@decode:list( gleam@dynamic@decode:list(inline_keyboard_button_decoder()) ), fun(Inline_keyboard) -> gleam@dynamic@decode:success( {inline_keyboard_markup, Inline_keyboard} ) end ). -file("src/telega/model.gleam", 9627). -spec inline_query_result_game_decoder() -> gleam@dynamic@decode:decoder(inline_query_result_game()). inline_query_result_game_decoder() -> gleam@dynamic@decode:field( <<"type"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Type_) -> gleam@dynamic@decode:field( <<"id"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Id) -> gleam@dynamic@decode:field( <<"game_short_name"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Game_short_name) -> gleam@dynamic@decode:optional_field( <<"reply_markup"/utf8>>, none, gleam@dynamic@decode:optional( inline_keyboard_markup_decoder() ), fun(Reply_markup) -> gleam@dynamic@decode:success( {inline_query_result_game, Type_, Id, Game_short_name, Reply_markup} ) end ) end ) end ) end ). -file("src/telega/model.gleam", 11012). -spec game_high_score_decoder() -> gleam@dynamic@decode:decoder(game_high_score()). game_high_score_decoder() -> gleam@dynamic@decode:field( <<"position"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_int/1}, fun(Position) -> gleam@dynamic@decode:field( <<"user"/utf8>>, user_decoder(), fun(User) -> gleam@dynamic@decode:field( <<"score"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_int/1}, fun(Score) -> gleam@dynamic@decode:success( {game_high_score, Position, User, Score} ) end ) end ) end ). -file("src/telega/model.gleam", 15783). -spec maybe_inaccessible_message_inaccessible_message_decoder() -> gleam@dynamic@decode:decoder(maybe_inaccessible_message()). maybe_inaccessible_message_inaccessible_message_decoder() -> gleam@dynamic@decode:then( inaccessible_message_decoder(), fun(Value) -> gleam@dynamic@decode:success( {inaccessible_message_maybe_inaccessible_message, Value} ) end ). -file("src/telega/model.gleam", 15796). -spec message_origin_decoder() -> gleam@dynamic@decode:decoder(message_origin()). message_origin_decoder() -> gleam@dynamic@decode:field( <<"type"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Variant) -> case Variant of <<"user"/utf8>> -> gleam@dynamic@decode:then( message_origin_user_decoder(), fun(Value) -> gleam@dynamic@decode:success( {message_origin_user_message_origin, Value} ) end ); <<"hidden_user"/utf8>> -> gleam@dynamic@decode:then( message_origin_hidden_user_decoder(), fun(Value@1) -> gleam@dynamic@decode:success( {message_origin_hidden_user_message_origin, Value@1} ) end ); <<"chat"/utf8>> -> gleam@dynamic@decode:then( message_origin_chat_decoder(), fun(Value@2) -> gleam@dynamic@decode:success( {message_origin_chat_message_origin, Value@2} ) end ); <<"channel"/utf8>> -> gleam@dynamic@decode:then( message_origin_channel_decoder(), fun(Value@3) -> gleam@dynamic@decode:success( {message_origin_channel_message_origin, Value@3} ) end ); _ -> erlang:error(#{gleam_error => panic, message => <<"Invalid variant for MessageOrigin"/utf8>>, module => <<"telega/model"/utf8>>, function => <<"message_origin_decoder"/utf8>>, line => 15815}) end end ). -file("src/telega/model.gleam", 15819). -spec paid_media_decoder() -> gleam@dynamic@decode:decoder(paid_media()). paid_media_decoder() -> gleam@dynamic@decode:field( <<"type"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Variant) -> case Variant of <<"preview"/utf8>> -> gleam@dynamic@decode:then( paid_media_preview_decoder(), fun(Value) -> gleam@dynamic@decode:success( {paid_media_preview_paid_media, Value} ) end ); <<"photo"/utf8>> -> gleam@dynamic@decode:then( paid_media_photo_decoder(), fun(Value@1) -> gleam@dynamic@decode:success( {paid_media_photo_paid_media, Value@1} ) end ); <<"video"/utf8>> -> gleam@dynamic@decode:then( paid_media_video_decoder(), fun(Value@2) -> gleam@dynamic@decode:success( {paid_media_video_paid_media, Value@2} ) end ); _ -> erlang:error(#{gleam_error => panic, message => <<"Invalid variant for PaidMedia"/utf8>>, module => <<"telega/model"/utf8>>, function => <<"paid_media_decoder"/utf8>>, line => 15834}) end end ). -file("src/telega/model.gleam", 6018). -spec paid_media_info_decoder() -> gleam@dynamic@decode:decoder(paid_media_info()). paid_media_info_decoder() -> gleam@dynamic@decode:field( <<"star_count"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_int/1}, fun(Star_count) -> gleam@dynamic@decode:field( <<"paid_media"/utf8>>, gleam@dynamic@decode:list(paid_media_decoder()), fun(Paid_media) -> gleam@dynamic@decode:success( {paid_media_info, Star_count, Paid_media} ) end ) end ). -file("src/telega/model.gleam", 5527). -spec external_reply_info_decoder() -> gleam@dynamic@decode:decoder(external_reply_info()). external_reply_info_decoder() -> gleam@dynamic@decode:field( <<"origin"/utf8>>, message_origin_decoder(), fun(Origin) -> gleam@dynamic@decode:optional_field( <<"chat"/utf8>>, none, gleam@dynamic@decode:optional(chat_decoder()), fun(Chat) -> gleam@dynamic@decode:optional_field( <<"message_id"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_int/1} ), fun(Message_id) -> gleam@dynamic@decode:optional_field( <<"link_preview_options"/utf8>>, none, gleam@dynamic@decode:optional( link_preview_options_decoder() ), fun(Link_preview_options) -> gleam@dynamic@decode:optional_field( <<"animation"/utf8>>, none, gleam@dynamic@decode:optional( animation_decoder() ), fun(Animation) -> gleam@dynamic@decode:optional_field( <<"audio"/utf8>>, none, gleam@dynamic@decode:optional( audio_decoder() ), fun(Audio) -> gleam@dynamic@decode:optional_field( <<"document"/utf8>>, none, gleam@dynamic@decode:optional( document_decoder() ), fun(Document) -> gleam@dynamic@decode:optional_field( <<"paid_media"/utf8>>, none, gleam@dynamic@decode:optional( paid_media_info_decoder( ) ), fun(Paid_media) -> gleam@dynamic@decode:optional_field( <<"photo"/utf8>>, none, gleam@dynamic@decode:optional( gleam@dynamic@decode:list( photo_size_decoder( ) ) ), fun( Photo ) -> gleam@dynamic@decode:optional_field( <<"sticker"/utf8>>, none, gleam@dynamic@decode:optional( sticker_decoder( ) ), fun( Sticker ) -> gleam@dynamic@decode:optional_field( <<"story"/utf8>>, none, gleam@dynamic@decode:optional( story_decoder( ) ), fun( Story ) -> gleam@dynamic@decode:optional_field( <<"video"/utf8>>, none, gleam@dynamic@decode:optional( video_decoder( ) ), fun( Video ) -> gleam@dynamic@decode:optional_field( <<"video_note"/utf8>>, none, gleam@dynamic@decode:optional( video_note_decoder( ) ), fun( Video_note ) -> gleam@dynamic@decode:optional_field( <<"voice"/utf8>>, none, gleam@dynamic@decode:optional( voice_decoder( ) ), fun( Voice ) -> gleam@dynamic@decode:optional_field( <<"has_media_spoiler"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_bool/1} ), fun( Has_media_spoiler ) -> gleam@dynamic@decode:optional_field( <<"contact"/utf8>>, none, gleam@dynamic@decode:optional( contact_decoder( ) ), fun( Contact ) -> gleam@dynamic@decode:optional_field( <<"dice"/utf8>>, none, gleam@dynamic@decode:optional( dice_decoder( ) ), fun( Dice ) -> gleam@dynamic@decode:optional_field( <<"game"/utf8>>, none, gleam@dynamic@decode:optional( game_decoder( ) ), fun( Game ) -> gleam@dynamic@decode:optional_field( <<"giveaway"/utf8>>, none, gleam@dynamic@decode:optional( giveaway_decoder( ) ), fun( Giveaway ) -> gleam@dynamic@decode:optional_field( <<"giveaway_winners"/utf8>>, none, gleam@dynamic@decode:optional( giveaway_winners_decoder( ) ), fun( Giveaway_winners ) -> gleam@dynamic@decode:optional_field( <<"invoice"/utf8>>, none, gleam@dynamic@decode:optional( invoice_decoder( ) ), fun( Invoice ) -> gleam@dynamic@decode:optional_field( <<"location"/utf8>>, none, gleam@dynamic@decode:optional( location_decoder( ) ), fun( Location ) -> gleam@dynamic@decode:optional_field( <<"poll"/utf8>>, none, gleam@dynamic@decode:optional( poll_decoder( ) ), fun( Poll ) -> gleam@dynamic@decode:optional_field( <<"venue"/utf8>>, none, gleam@dynamic@decode:optional( venue_decoder( ) ), fun( Venue ) -> gleam@dynamic@decode:success( {external_reply_info, Origin, Chat, Message_id, Link_preview_options, Animation, Audio, Document, Paid_media, Photo, Sticker, Story, Video, Video_note, Voice, Has_media_spoiler, Contact, Dice, Game, Giveaway, Giveaway_winners, Invoice, Location, Poll, Venue} ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ). -file("src/telega/model.gleam", 10562). -spec transaction_partner_user_decoder() -> gleam@dynamic@decode:decoder(transaction_partner_user()). transaction_partner_user_decoder() -> gleam@dynamic@decode:field( <<"type"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Type_) -> gleam@dynamic@decode:field( <<"user"/utf8>>, user_decoder(), fun(User) -> gleam@dynamic@decode:optional_field( <<"affiliate"/utf8>>, none, gleam@dynamic@decode:optional(affiliate_info_decoder()), fun(Affiliate) -> gleam@dynamic@decode:optional_field( <<"invoice_payload"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_string/1} ), fun(Invoice_payload) -> gleam@dynamic@decode:optional_field( <<"subscription_period"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_int/1} ), fun(Subscription_period) -> gleam@dynamic@decode:optional_field( <<"paid_media"/utf8>>, none, gleam@dynamic@decode:optional( gleam@dynamic@decode:list( paid_media_decoder() ) ), fun(Paid_media) -> gleam@dynamic@decode:optional_field( <<"paid_media_payload"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_string/1} ), fun(Paid_media_payload) -> gleam@dynamic@decode:optional_field( <<"gift"/utf8>>, none, gleam@dynamic@decode:optional( gift_decoder( ) ), fun(Gift) -> gleam@dynamic@decode:success( {transaction_partner_user, Type_, User, Affiliate, Invoice_payload, Subscription_period, Paid_media, Paid_media_payload, Gift} ) end ) end ) end ) end ) end ) end ) end ) end ). -file("src/telega/model.gleam", 15838). -spec background_fill_decoder() -> gleam@dynamic@decode:decoder(background_fill()). background_fill_decoder() -> gleam@dynamic@decode:field( <<"type"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Variant) -> case Variant of <<"solid"/utf8>> -> gleam@dynamic@decode:then( background_fill_solid_decoder(), fun(Value) -> gleam@dynamic@decode:success( {background_fill_solid_background_fill, Value} ) end ); <<"gradient"/utf8>> -> gleam@dynamic@decode:then( background_fill_gradient_decoder(), fun(Value@1) -> gleam@dynamic@decode:success( {background_fill_gradient_background_fill, Value@1} ) end ); <<"freeform_gradient"/utf8>> -> gleam@dynamic@decode:then( background_fill_freeform_gradient_decoder(), fun(Value@2) -> gleam@dynamic@decode:success( {background_fill_freeform_gradient_background_fill, Value@2} ) end ); _ -> erlang:error(#{gleam_error => panic, message => <<"Invalid variant for BackgroundFill"/utf8>>, module => <<"telega/model"/utf8>>, function => <<"background_fill_decoder"/utf8>>, line => 15853}) end end ). -file("src/telega/model.gleam", 6341). -spec background_type_fill_decoder() -> gleam@dynamic@decode:decoder(background_type_fill()). background_type_fill_decoder() -> gleam@dynamic@decode:field( <<"type"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Type_) -> gleam@dynamic@decode:field( <<"fill"/utf8>>, background_fill_decoder(), fun(Fill) -> gleam@dynamic@decode:field( <<"dark_theme_dimming"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_int/1}, fun(Dark_theme_dimming) -> gleam@dynamic@decode:success( {background_type_fill, Type_, Fill, Dark_theme_dimming} ) end ) end ) end ). -file("src/telega/model.gleam", 6377). -spec background_type_pattern_decoder() -> gleam@dynamic@decode:decoder(background_type_pattern()). background_type_pattern_decoder() -> gleam@dynamic@decode:field( <<"type"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Type_) -> gleam@dynamic@decode:field( <<"document"/utf8>>, document_decoder(), fun(Document) -> gleam@dynamic@decode:field( <<"fill"/utf8>>, background_fill_decoder(), fun(Fill) -> gleam@dynamic@decode:field( <<"intensity"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_int/1}, fun(Intensity) -> gleam@dynamic@decode:optional_field( <<"is_inverted"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_bool/1} ), fun(Is_inverted) -> gleam@dynamic@decode:optional_field( <<"is_moving"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_bool/1} ), fun(Is_moving) -> gleam@dynamic@decode:success( {background_type_pattern, Type_, Document, Fill, Intensity, Is_inverted, Is_moving} ) end ) end ) end ) end ) end ) end ). -file("src/telega/model.gleam", 15857). -spec background_type_decoder() -> gleam@dynamic@decode:decoder(background_type()). background_type_decoder() -> gleam@dynamic@decode:field( <<"type"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Variant) -> case Variant of <<"fill"/utf8>> -> gleam@dynamic@decode:then( background_type_fill_decoder(), fun(Value) -> gleam@dynamic@decode:success( {background_type_fill_background_type, Value} ) end ); <<"wallpaper"/utf8>> -> gleam@dynamic@decode:then( background_type_wallpaper_decoder(), fun(Value@1) -> gleam@dynamic@decode:success( {background_type_wallpaper_background_type, Value@1} ) end ); <<"pattern"/utf8>> -> gleam@dynamic@decode:then( background_type_pattern_decoder(), fun(Value@2) -> gleam@dynamic@decode:success( {background_type_pattern_background_type, Value@2} ) end ); <<"chat_theme"/utf8>> -> gleam@dynamic@decode:then( background_type_chat_theme_decoder(), fun(Value@3) -> gleam@dynamic@decode:success( {background_type_chat_theme_background_type, Value@3} ) end ); _ -> erlang:error(#{gleam_error => panic, message => <<"Invalid variant for BackgroundType"/utf8>>, module => <<"telega/model"/utf8>>, function => <<"background_type_decoder"/utf8>>, line => 15876}) end end ). -file("src/telega/model.gleam", 6412). -spec chat_background_decoder() -> gleam@dynamic@decode:decoder(chat_background()). chat_background_decoder() -> gleam@dynamic@decode:field( <<"type"/utf8>>, background_type_decoder(), fun(Type_) -> gleam@dynamic@decode:success({chat_background, Type_}) end ). -file("src/telega/model.gleam", 15880). -spec chat_member_decoder() -> gleam@dynamic@decode:decoder(chat_member()). chat_member_decoder() -> gleam@dynamic@decode:field( <<"status"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Variant) -> case Variant of <<"creator"/utf8>> -> gleam@dynamic@decode:then( chat_member_owner_decoder(), fun(Value) -> gleam@dynamic@decode:success( {chat_member_owner_chat_member, Value} ) end ); <<"administrator"/utf8>> -> gleam@dynamic@decode:then( chat_member_administrator_decoder(), fun(Value@1) -> gleam@dynamic@decode:success( {chat_member_administrator_chat_member, Value@1} ) end ); <<"member"/utf8>> -> gleam@dynamic@decode:then( chat_member_member_decoder(), fun(Value@2) -> gleam@dynamic@decode:success( {chat_member_member_chat_member, Value@2} ) end ); <<"restricted"/utf8>> -> gleam@dynamic@decode:then( chat_member_restricted_decoder(), fun(Value@3) -> gleam@dynamic@decode:success( {chat_member_restricted_chat_member, Value@3} ) end ); <<"left"/utf8>> -> gleam@dynamic@decode:then( chat_member_left_decoder(), fun(Value@4) -> gleam@dynamic@decode:success( {chat_member_left_chat_member, Value@4} ) end ); <<"banned"/utf8>> -> gleam@dynamic@decode:then( chat_member_banned_decoder(), fun(Value@5) -> gleam@dynamic@decode:success( {chat_member_banned_chat_member, Value@5} ) end ); _ -> erlang:error(#{gleam_error => panic, message => <<"Invalid variant for ChatMember"/utf8>>, module => <<"telega/model"/utf8>>, function => <<"chat_member_decoder"/utf8>>, line => 15907}) end end ). -file("src/telega/model.gleam", 7315). -spec chat_member_updated_decoder() -> gleam@dynamic@decode:decoder(chat_member_updated()). chat_member_updated_decoder() -> gleam@dynamic@decode:field( <<"chat"/utf8>>, chat_decoder(), fun(Chat) -> gleam@dynamic@decode:field( <<"from"/utf8>>, user_decoder(), fun(From) -> gleam@dynamic@decode:field( <<"date"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_int/1}, fun(Date) -> gleam@dynamic@decode:field( <<"old_chat_member"/utf8>>, chat_member_decoder(), fun(Old_chat_member) -> gleam@dynamic@decode:field( <<"new_chat_member"/utf8>>, chat_member_decoder(), fun(New_chat_member) -> gleam@dynamic@decode:optional_field( <<"invite_link"/utf8>>, none, gleam@dynamic@decode:optional( chat_invite_link_decoder() ), fun(Invite_link) -> gleam@dynamic@decode:optional_field( <<"via_join_request"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_bool/1} ), fun(Via_join_request) -> gleam@dynamic@decode:optional_field( <<"via_chat_folder_invite_link"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_bool/1} ), fun( Via_chat_folder_invite_link ) -> gleam@dynamic@decode:success( {chat_member_updated, Chat, From, Date, Old_chat_member, New_chat_member, Invite_link, Via_join_request, Via_chat_folder_invite_link} ) end ) end ) end ) end ) end ) end ) end ) end ). -file("src/telega/model.gleam", 15911). -spec reaction_type_decoder() -> gleam@dynamic@decode:decoder(reaction_type()). reaction_type_decoder() -> gleam@dynamic@decode:field( <<"type"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Variant) -> case Variant of <<"emoji"/utf8>> -> gleam@dynamic@decode:then( reaction_type_emoji_decoder(), fun(Value) -> gleam@dynamic@decode:success( {reaction_type_emoji_reaction_type, Value} ) end ); <<"custom_emoji"/utf8>> -> gleam@dynamic@decode:then( reaction_type_custom_emoji_decoder(), fun(Value@1) -> gleam@dynamic@decode:success( {reaction_type_custom_emoji_reaction_type, Value@1} ) end ); <<"paid"/utf8>> -> gleam@dynamic@decode:then( reaction_type_paid_decoder(), fun(Value@2) -> gleam@dynamic@decode:success( {reaction_type_paid_reaction_type, Value@2} ) end ); _ -> erlang:error(#{gleam_error => panic, message => <<"Invalid variant for ReactionType"/utf8>>, module => <<"telega/model"/utf8>>, function => <<"reaction_type_decoder"/utf8>>, line => 15926}) end end ). -file("src/telega/model.gleam", 7709). -spec reaction_count_decoder() -> gleam@dynamic@decode:decoder(reaction_count()). reaction_count_decoder() -> gleam@dynamic@decode:field( <<"type"/utf8>>, reaction_type_decoder(), fun(Type_) -> gleam@dynamic@decode:field( <<"total_count"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_int/1}, fun(Total_count) -> gleam@dynamic@decode:success( {reaction_count, Type_, Total_count} ) end ) end ). -file("src/telega/model.gleam", 7715). -spec message_reaction_updated_decoder() -> gleam@dynamic@decode:decoder(message_reaction_updated()). message_reaction_updated_decoder() -> gleam@dynamic@decode:field( <<"chat"/utf8>>, chat_decoder(), fun(Chat) -> gleam@dynamic@decode:field( <<"message_id"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_int/1}, fun(Message_id) -> gleam@dynamic@decode:optional_field( <<"user"/utf8>>, none, gleam@dynamic@decode:optional(user_decoder()), fun(User) -> gleam@dynamic@decode:optional_field( <<"actor_chat"/utf8>>, none, gleam@dynamic@decode:optional(chat_decoder()), fun(Actor_chat) -> gleam@dynamic@decode:field( <<"date"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_int/1}, fun(Date) -> gleam@dynamic@decode:field( <<"old_reaction"/utf8>>, gleam@dynamic@decode:list( reaction_type_decoder() ), fun(Old_reaction) -> gleam@dynamic@decode:field( <<"new_reaction"/utf8>>, gleam@dynamic@decode:list( reaction_type_decoder( ) ), fun(New_reaction) -> gleam@dynamic@decode:success( {message_reaction_updated, Chat, Message_id, User, Actor_chat, Date, Old_reaction, New_reaction} ) end ) end ) end ) end ) end ) end ) end ). -file("src/telega/model.gleam", 7750). -spec message_reaction_count_updated_decoder() -> gleam@dynamic@decode:decoder(message_reaction_count_updated()). message_reaction_count_updated_decoder() -> gleam@dynamic@decode:field( <<"chat"/utf8>>, chat_decoder(), fun(Chat) -> gleam@dynamic@decode:field( <<"message_id"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_int/1}, fun(Message_id) -> gleam@dynamic@decode:field( <<"date"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_int/1}, fun(Date) -> gleam@dynamic@decode:field( <<"reactions"/utf8>>, gleam@dynamic@decode:list( reaction_count_decoder() ), fun(Reactions) -> gleam@dynamic@decode:success( {message_reaction_count_updated, Chat, Message_id, Date, Reactions} ) end ) end ) end ) end ). -file("src/telega/model.gleam", 15967). -spec menu_button_decoder() -> gleam@dynamic@decode:decoder(menu_button()). menu_button_decoder() -> gleam@dynamic@decode:field( <<"type"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Variant) -> case Variant of <<"commands"/utf8>> -> gleam@dynamic@decode:then( menu_button_commands_decoder(), fun(Value) -> gleam@dynamic@decode:success( {menu_button_commands_menu_button, Value} ) end ); <<"web_app"/utf8>> -> gleam@dynamic@decode:then( menu_button_web_app_decoder(), fun(Value@1) -> gleam@dynamic@decode:success( {menu_button_web_app_menu_button, Value@1} ) end ); <<"default"/utf8>> -> gleam@dynamic@decode:then( menu_button_default_decoder(), fun(Value@2) -> gleam@dynamic@decode:success( {menu_button_default_menu_button, Value@2} ) end ); _ -> erlang:error(#{gleam_error => panic, message => <<"Invalid variant for MenuButton"/utf8>>, module => <<"telega/model"/utf8>>, function => <<"menu_button_decoder"/utf8>>, line => 15982}) end end ). -file("src/telega/model.gleam", 15986). -spec chat_boost_source_decoder() -> gleam@dynamic@decode:decoder(chat_boost_source()). chat_boost_source_decoder() -> gleam@dynamic@decode:field( <<"type"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Variant) -> case Variant of <<"premium"/utf8>> -> gleam@dynamic@decode:then( chat_boost_source_premium_decoder(), fun(Value) -> gleam@dynamic@decode:success( {chat_boost_source_premium_chat_boost_source, Value} ) end ); <<"gift_code"/utf8>> -> gleam@dynamic@decode:then( chat_boost_source_gift_code_decoder(), fun(Value@1) -> gleam@dynamic@decode:success( {chat_boost_source_gift_code_chat_boost_source, Value@1} ) end ); <<"giveaway"/utf8>> -> gleam@dynamic@decode:then( chat_boost_source_giveaway_decoder(), fun(Value@2) -> gleam@dynamic@decode:success( {chat_boost_source_giveaway_chat_boost_source, Value@2} ) end ); _ -> erlang:error(#{gleam_error => panic, message => <<"Invalid variant for ChatBoostSource"/utf8>>, module => <<"telega/model"/utf8>>, function => <<"chat_boost_source_decoder"/utf8>>, line => 16001}) end end ). -file("src/telega/model.gleam", 8238). -spec chat_boost_decoder() -> gleam@dynamic@decode:decoder(chat_boost()). chat_boost_decoder() -> gleam@dynamic@decode:field( <<"boost_id"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Boost_id) -> gleam@dynamic@decode:field( <<"add_date"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_int/1}, fun(Add_date) -> gleam@dynamic@decode:field( <<"expiration_date"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_int/1}, fun(Expiration_date) -> gleam@dynamic@decode:field( <<"source"/utf8>>, chat_boost_source_decoder(), fun(Source) -> gleam@dynamic@decode:success( {chat_boost, Boost_id, Add_date, Expiration_date, Source} ) end ) end ) end ) end ). -file("src/telega/model.gleam", 8251). -spec chat_boost_updated_decoder() -> gleam@dynamic@decode:decoder(chat_boost_updated()). chat_boost_updated_decoder() -> gleam@dynamic@decode:field( <<"chat"/utf8>>, chat_decoder(), fun(Chat) -> gleam@dynamic@decode:field( <<"boost"/utf8>>, chat_boost_decoder(), fun(Boost) -> gleam@dynamic@decode:success( {chat_boost_updated, Chat, Boost} ) end ) end ). -file("src/telega/model.gleam", 8257). -spec chat_boost_removed_decoder() -> gleam@dynamic@decode:decoder(chat_boost_removed()). chat_boost_removed_decoder() -> gleam@dynamic@decode:field( <<"chat"/utf8>>, chat_decoder(), fun(Chat) -> gleam@dynamic@decode:field( <<"boost_id"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Boost_id) -> gleam@dynamic@decode:field( <<"remove_date"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_int/1}, fun(Remove_date) -> gleam@dynamic@decode:field( <<"source"/utf8>>, chat_boost_source_decoder(), fun(Source) -> gleam@dynamic@decode:success( {chat_boost_removed, Chat, Boost_id, Remove_date, Source} ) end ) end ) end ) end ). -file("src/telega/model.gleam", 8270). -spec user_chat_boosts_decoder() -> gleam@dynamic@decode:decoder(user_chat_boosts()). user_chat_boosts_decoder() -> gleam@dynamic@decode:field( <<"boosts"/utf8>>, gleam@dynamic@decode:list(chat_boost_decoder()), fun(Boosts) -> gleam@dynamic@decode:success({user_chat_boosts, Boosts}) end ). -file("src/telega/model.gleam", 16005). -spec input_media_decoder() -> gleam@dynamic@decode:decoder(input_media()). input_media_decoder() -> gleam@dynamic@decode:field( <<"type"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Variant) -> case Variant of <<"animation"/utf8>> -> gleam@dynamic@decode:then( input_media_animation_decoder(), fun(Value) -> gleam@dynamic@decode:success( {input_media_animation_input_media, Value} ) end ); <<"document"/utf8>> -> gleam@dynamic@decode:then( input_media_document_decoder(), fun(Value@1) -> gleam@dynamic@decode:success( {input_media_document_input_media, Value@1} ) end ); <<"audio"/utf8>> -> gleam@dynamic@decode:then( input_media_audio_decoder(), fun(Value@2) -> gleam@dynamic@decode:success( {input_media_audio_input_media, Value@2} ) end ); <<"photo"/utf8>> -> gleam@dynamic@decode:then( input_media_photo_decoder(), fun(Value@3) -> gleam@dynamic@decode:success( {input_media_photo_input_media, Value@3} ) end ); <<"video"/utf8>> -> gleam@dynamic@decode:then( input_media_video_decoder(), fun(Value@4) -> gleam@dynamic@decode:success( {input_media_video_input_media, Value@4} ) end ); _ -> erlang:error(#{gleam_error => panic, message => <<"Invalid variant for InputMedia"/utf8>>, module => <<"telega/model"/utf8>>, function => <<"input_media_decoder"/utf8>>, line => 16028}) end end ). -file("src/telega/model.gleam", 16032). -spec input_paid_media_decoder() -> gleam@dynamic@decode:decoder(input_paid_media()). input_paid_media_decoder() -> gleam@dynamic@decode:field( <<"type"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Variant) -> case Variant of <<"photo"/utf8>> -> gleam@dynamic@decode:then( input_paid_media_photo_decoder(), fun(Value) -> gleam@dynamic@decode:success( {input_paid_media_photo_input_paid_media, Value} ) end ); <<"video"/utf8>> -> gleam@dynamic@decode:then( input_paid_media_video_decoder(), fun(Value@1) -> gleam@dynamic@decode:success( {input_paid_media_video_input_paid_media, Value@1} ) end ); _ -> erlang:error(#{gleam_error => panic, message => <<"Invalid variant for InputPaidMedia"/utf8>>, module => <<"telega/model"/utf8>>, function => <<"input_paid_media_decoder"/utf8>>, line => 16043}) end end ). -file("src/telega/model.gleam", 16185). -spec input_message_content_decoder() -> gleam@dynamic@decode:decoder(input_message_content()). input_message_content_decoder() -> gleam@dynamic@decode:field( <<"type"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Variant) -> case Variant of <<"input_text_message_content"/utf8>> -> gleam@dynamic@decode:then( input_text_message_content_decoder(), fun(Value) -> gleam@dynamic@decode:success( {input_text_message_content_input_message_content, Value} ) end ); <<"input_location_message_content"/utf8>> -> gleam@dynamic@decode:then( input_location_message_content_decoder(), fun(Value@1) -> gleam@dynamic@decode:success( {input_location_message_content_input_message_content, Value@1} ) end ); <<"input_venue_message_content"/utf8>> -> gleam@dynamic@decode:then( input_venue_message_content_decoder(), fun(Value@2) -> gleam@dynamic@decode:success( {input_venue_message_content_input_message_content, Value@2} ) end ); <<"input_contact_message_content"/utf8>> -> gleam@dynamic@decode:then( input_contact_message_content_decoder(), fun(Value@3) -> gleam@dynamic@decode:success( {input_contact_message_content_input_message_content, Value@3} ) end ); <<"input_invoice_message_content"/utf8>> -> gleam@dynamic@decode:then( input_invoice_message_content_decoder(), fun(Value@4) -> gleam@dynamic@decode:success( {input_invoice_message_content_input_message_content, Value@4} ) end ); _ -> erlang:error(#{gleam_error => panic, message => <<"Invalid variant for InputMessageContent"/utf8>>, module => <<"telega/model"/utf8>>, function => <<"input_message_content_decoder"/utf8>>, line => 16208}) end end ). -file("src/telega/model.gleam", 8883). -spec inline_query_result_article_decoder() -> gleam@dynamic@decode:decoder(inline_query_result_article()). inline_query_result_article_decoder() -> gleam@dynamic@decode:field( <<"type"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Type_) -> gleam@dynamic@decode:field( <<"id"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Id) -> gleam@dynamic@decode:field( <<"title"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Title) -> gleam@dynamic@decode:field( <<"input_message_content"/utf8>>, input_message_content_decoder(), fun(Input_message_content) -> gleam@dynamic@decode:optional_field( <<"reply_markup"/utf8>>, none, gleam@dynamic@decode:optional( inline_keyboard_markup_decoder() ), fun(Reply_markup) -> gleam@dynamic@decode:optional_field( <<"url"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_string/1} ), fun(Url) -> gleam@dynamic@decode:optional_field( <<"description"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_string/1} ), fun(Description) -> gleam@dynamic@decode:optional_field( <<"thumbnail_url"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_string/1} ), fun( Thumbnail_url ) -> gleam@dynamic@decode:optional_field( <<"thumbnail_width"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_int/1} ), fun( Thumbnail_width ) -> gleam@dynamic@decode:optional_field( <<"thumbnail_height"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_int/1} ), fun( Thumbnail_height ) -> gleam@dynamic@decode:success( {inline_query_result_article, Type_, Id, Title, Input_message_content, Reply_markup, Url, Description, Thumbnail_url, Thumbnail_width, Thumbnail_height} ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ). -file("src/telega/model.gleam", 8933). -spec inline_query_result_photo_decoder() -> gleam@dynamic@decode:decoder(inline_query_result_photo()). inline_query_result_photo_decoder() -> gleam@dynamic@decode:field( <<"type"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Type_) -> gleam@dynamic@decode:field( <<"id"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Id) -> gleam@dynamic@decode:field( <<"photo_url"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Photo_url) -> gleam@dynamic@decode:field( <<"thumbnail_url"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Thumbnail_url) -> gleam@dynamic@decode:optional_field( <<"photo_width"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_int/1} ), fun(Photo_width) -> gleam@dynamic@decode:optional_field( <<"photo_height"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_int/1} ), fun(Photo_height) -> gleam@dynamic@decode:optional_field( <<"title"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_string/1} ), fun(Title) -> gleam@dynamic@decode:optional_field( <<"description"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_string/1} ), fun(Description) -> gleam@dynamic@decode:optional_field( <<"caption"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_string/1} ), fun( Caption ) -> gleam@dynamic@decode:optional_field( <<"parse_mode"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_string/1} ), fun( Parse_mode ) -> gleam@dynamic@decode:optional_field( <<"caption_entities"/utf8>>, none, gleam@dynamic@decode:optional( gleam@dynamic@decode:list( message_entity_decoder( ) ) ), fun( Caption_entities ) -> gleam@dynamic@decode:optional_field( <<"show_caption_above_media"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_bool/1} ), fun( Show_caption_above_media ) -> gleam@dynamic@decode:optional_field( <<"reply_markup"/utf8>>, none, gleam@dynamic@decode:optional( inline_keyboard_markup_decoder( ) ), fun( Reply_markup ) -> gleam@dynamic@decode:optional_field( <<"input_message_content"/utf8>>, none, gleam@dynamic@decode:optional( input_message_content_decoder( ) ), fun( Input_message_content ) -> gleam@dynamic@decode:success( {inline_query_result_photo, Type_, Id, Photo_url, Thumbnail_url, Photo_width, Photo_height, Title, Description, Caption, Parse_mode, Caption_entities, Show_caption_above_media, Reply_markup, Input_message_content} ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ). -file("src/telega/model.gleam", 9008). -spec inline_query_result_gif_decoder() -> gleam@dynamic@decode:decoder(inline_query_result_gif()). inline_query_result_gif_decoder() -> gleam@dynamic@decode:field( <<"type"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Type_) -> gleam@dynamic@decode:field( <<"id"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Id) -> gleam@dynamic@decode:field( <<"gif_url"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Gif_url) -> gleam@dynamic@decode:optional_field( <<"gif_width"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_int/1} ), fun(Gif_width) -> gleam@dynamic@decode:optional_field( <<"gif_height"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_int/1} ), fun(Gif_height) -> gleam@dynamic@decode:optional_field( <<"gif_duration"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_int/1} ), fun(Gif_duration) -> gleam@dynamic@decode:field( <<"thumbnail_url"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Thumbnail_url) -> gleam@dynamic@decode:optional_field( <<"thumbnail_mime_type"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_string/1} ), fun( Thumbnail_mime_type ) -> gleam@dynamic@decode:optional_field( <<"title"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_string/1} ), fun( Title ) -> gleam@dynamic@decode:optional_field( <<"caption"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_string/1} ), fun( Caption ) -> gleam@dynamic@decode:optional_field( <<"parse_mode"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_string/1} ), fun( Parse_mode ) -> gleam@dynamic@decode:optional_field( <<"caption_entities"/utf8>>, none, gleam@dynamic@decode:optional( gleam@dynamic@decode:list( message_entity_decoder( ) ) ), fun( Caption_entities ) -> gleam@dynamic@decode:optional_field( <<"show_caption_above_media"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_bool/1} ), fun( Show_caption_above_media ) -> gleam@dynamic@decode:optional_field( <<"reply_markup"/utf8>>, none, gleam@dynamic@decode:optional( inline_keyboard_markup_decoder( ) ), fun( Reply_markup ) -> gleam@dynamic@decode:optional_field( <<"input_message_content"/utf8>>, none, gleam@dynamic@decode:optional( input_message_content_decoder( ) ), fun( Input_message_content ) -> gleam@dynamic@decode:success( {inline_query_result_gif, Type_, Id, Gif_url, Gif_width, Gif_height, Gif_duration, Thumbnail_url, Thumbnail_mime_type, Title, Caption, Parse_mode, Caption_entities, Show_caption_above_media, Reply_markup, Input_message_content} ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ). -file("src/telega/model.gleam", 9087). -spec inline_query_result_mpeg4_gif_decoder() -> gleam@dynamic@decode:decoder(inline_query_result_mpeg4_gif()). inline_query_result_mpeg4_gif_decoder() -> gleam@dynamic@decode:field( <<"type"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Type_) -> gleam@dynamic@decode:field( <<"id"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Id) -> gleam@dynamic@decode:field( <<"mpeg4_url"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Mpeg4_url) -> gleam@dynamic@decode:optional_field( <<"mpeg4_width"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_int/1} ), fun(Mpeg4_width) -> gleam@dynamic@decode:optional_field( <<"mpeg4_height"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_int/1} ), fun(Mpeg4_height) -> gleam@dynamic@decode:optional_field( <<"mpeg4_duration"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_int/1} ), fun(Mpeg4_duration) -> gleam@dynamic@decode:field( <<"thumbnail_url"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Thumbnail_url) -> gleam@dynamic@decode:optional_field( <<"thumbnail_mime_type"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_string/1} ), fun( Thumbnail_mime_type ) -> gleam@dynamic@decode:optional_field( <<"title"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_string/1} ), fun( Title ) -> gleam@dynamic@decode:optional_field( <<"caption"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_string/1} ), fun( Caption ) -> gleam@dynamic@decode:optional_field( <<"parse_mode"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_string/1} ), fun( Parse_mode ) -> gleam@dynamic@decode:optional_field( <<"caption_entities"/utf8>>, none, gleam@dynamic@decode:optional( gleam@dynamic@decode:list( message_entity_decoder( ) ) ), fun( Caption_entities ) -> gleam@dynamic@decode:optional_field( <<"show_caption_above_media"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_bool/1} ), fun( Show_caption_above_media ) -> gleam@dynamic@decode:optional_field( <<"reply_markup"/utf8>>, none, gleam@dynamic@decode:optional( inline_keyboard_markup_decoder( ) ), fun( Reply_markup ) -> gleam@dynamic@decode:optional_field( <<"input_message_content"/utf8>>, none, gleam@dynamic@decode:optional( input_message_content_decoder( ) ), fun( Input_message_content ) -> gleam@dynamic@decode:success( {inline_query_result_mpeg4_gif, Type_, Id, Mpeg4_url, Mpeg4_width, Mpeg4_height, Mpeg4_duration, Thumbnail_url, Thumbnail_mime_type, Title, Caption, Parse_mode, Caption_entities, Show_caption_above_media, Reply_markup, Input_message_content} ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ). -file("src/telega/model.gleam", 9168). -spec inline_query_result_video_decoder() -> gleam@dynamic@decode:decoder(inline_query_result_video()). inline_query_result_video_decoder() -> gleam@dynamic@decode:field( <<"type"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Type_) -> gleam@dynamic@decode:field( <<"id"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Id) -> gleam@dynamic@decode:field( <<"video_url"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Video_url) -> gleam@dynamic@decode:field( <<"mime_type"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Mime_type) -> gleam@dynamic@decode:field( <<"thumbnail_url"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Thumbnail_url) -> gleam@dynamic@decode:field( <<"title"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Title) -> gleam@dynamic@decode:optional_field( <<"caption"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_string/1} ), fun(Caption) -> gleam@dynamic@decode:optional_field( <<"parse_mode"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_string/1} ), fun(Parse_mode) -> gleam@dynamic@decode:optional_field( <<"caption_entities"/utf8>>, none, gleam@dynamic@decode:optional( gleam@dynamic@decode:list( message_entity_decoder( ) ) ), fun( Caption_entities ) -> gleam@dynamic@decode:optional_field( <<"show_caption_above_media"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_bool/1} ), fun( Show_caption_above_media ) -> gleam@dynamic@decode:optional_field( <<"video_width"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_int/1} ), fun( Video_width ) -> gleam@dynamic@decode:optional_field( <<"video_height"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_int/1} ), fun( Video_height ) -> gleam@dynamic@decode:optional_field( <<"video_duration"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_int/1} ), fun( Video_duration ) -> gleam@dynamic@decode:optional_field( <<"description"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_string/1} ), fun( Description ) -> gleam@dynamic@decode:optional_field( <<"reply_markup"/utf8>>, none, gleam@dynamic@decode:optional( inline_keyboard_markup_decoder( ) ), fun( Reply_markup ) -> gleam@dynamic@decode:optional_field( <<"input_message_content"/utf8>>, none, gleam@dynamic@decode:optional( input_message_content_decoder( ) ), fun( Input_message_content ) -> gleam@dynamic@decode:success( {inline_query_result_video, Type_, Id, Video_url, Mime_type, Thumbnail_url, Title, Caption, Parse_mode, Caption_entities, Show_caption_above_media, Video_width, Video_height, Video_duration, Description, Reply_markup, Input_message_content} ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ). -file("src/telega/model.gleam", 9247). -spec inline_query_result_audio_decoder() -> gleam@dynamic@decode:decoder(inline_query_result_audio()). inline_query_result_audio_decoder() -> gleam@dynamic@decode:field( <<"type"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Type_) -> gleam@dynamic@decode:field( <<"id"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Id) -> gleam@dynamic@decode:field( <<"audio_url"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Audio_url) -> gleam@dynamic@decode:field( <<"title"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Title) -> gleam@dynamic@decode:optional_field( <<"caption"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_string/1} ), fun(Caption) -> gleam@dynamic@decode:optional_field( <<"parse_mode"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_string/1} ), fun(Parse_mode) -> gleam@dynamic@decode:optional_field( <<"caption_entities"/utf8>>, none, gleam@dynamic@decode:optional( gleam@dynamic@decode:list( message_entity_decoder( ) ) ), fun(Caption_entities) -> gleam@dynamic@decode:optional_field( <<"performer"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_string/1} ), fun(Performer) -> gleam@dynamic@decode:optional_field( <<"audio_duration"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_int/1} ), fun( Audio_duration ) -> gleam@dynamic@decode:optional_field( <<"reply_markup"/utf8>>, none, gleam@dynamic@decode:optional( inline_keyboard_markup_decoder( ) ), fun( Reply_markup ) -> gleam@dynamic@decode:optional_field( <<"input_message_content"/utf8>>, none, gleam@dynamic@decode:optional( input_message_content_decoder( ) ), fun( Input_message_content ) -> gleam@dynamic@decode:success( {inline_query_result_audio, Type_, Id, Audio_url, Title, Caption, Parse_mode, Caption_entities, Performer, Audio_duration, Reply_markup, Input_message_content} ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ). -file("src/telega/model.gleam", 9304). -spec inline_query_result_voice_decoder() -> gleam@dynamic@decode:decoder(inline_query_result_voice()). inline_query_result_voice_decoder() -> gleam@dynamic@decode:field( <<"type"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Type_) -> gleam@dynamic@decode:field( <<"id"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Id) -> gleam@dynamic@decode:field( <<"voice_url"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Voice_url) -> gleam@dynamic@decode:field( <<"title"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Title) -> gleam@dynamic@decode:optional_field( <<"caption"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_string/1} ), fun(Caption) -> gleam@dynamic@decode:optional_field( <<"parse_mode"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_string/1} ), fun(Parse_mode) -> gleam@dynamic@decode:optional_field( <<"caption_entities"/utf8>>, none, gleam@dynamic@decode:optional( gleam@dynamic@decode:list( message_entity_decoder( ) ) ), fun(Caption_entities) -> gleam@dynamic@decode:optional_field( <<"voice_duration"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_int/1} ), fun( Voice_duration ) -> gleam@dynamic@decode:optional_field( <<"reply_markup"/utf8>>, none, gleam@dynamic@decode:optional( inline_keyboard_markup_decoder( ) ), fun( Reply_markup ) -> gleam@dynamic@decode:optional_field( <<"input_message_content"/utf8>>, none, gleam@dynamic@decode:optional( input_message_content_decoder( ) ), fun( Input_message_content ) -> gleam@dynamic@decode:success( {inline_query_result_voice, Type_, Id, Voice_url, Title, Caption, Parse_mode, Caption_entities, Voice_duration, Reply_markup, Input_message_content} ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ). -file("src/telega/model.gleam", 9355). -spec inline_query_result_document_decoder() -> gleam@dynamic@decode:decoder(inline_query_result_document()). inline_query_result_document_decoder() -> gleam@dynamic@decode:field( <<"type"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Type_) -> gleam@dynamic@decode:field( <<"id"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Id) -> gleam@dynamic@decode:field( <<"title"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Title) -> gleam@dynamic@decode:optional_field( <<"caption"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_string/1} ), fun(Caption) -> gleam@dynamic@decode:optional_field( <<"parse_mode"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_string/1} ), fun(Parse_mode) -> gleam@dynamic@decode:optional_field( <<"caption_entities"/utf8>>, none, gleam@dynamic@decode:optional( gleam@dynamic@decode:list( message_entity_decoder() ) ), fun(Caption_entities) -> gleam@dynamic@decode:field( <<"document_url"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Document_url) -> gleam@dynamic@decode:field( <<"mime_type"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Mime_type) -> gleam@dynamic@decode:optional_field( <<"description"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_string/1} ), fun( Description ) -> gleam@dynamic@decode:optional_field( <<"reply_markup"/utf8>>, none, gleam@dynamic@decode:optional( inline_keyboard_markup_decoder( ) ), fun( Reply_markup ) -> gleam@dynamic@decode:optional_field( <<"input_message_content"/utf8>>, none, gleam@dynamic@decode:optional( input_message_content_decoder( ) ), fun( Input_message_content ) -> gleam@dynamic@decode:optional_field( <<"thumbnail_url"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_string/1} ), fun( Thumbnail_url ) -> gleam@dynamic@decode:optional_field( <<"thumbnail_width"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_int/1} ), fun( Thumbnail_width ) -> gleam@dynamic@decode:optional_field( <<"thumbnail_height"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_int/1} ), fun( Thumbnail_height ) -> gleam@dynamic@decode:success( {inline_query_result_document, Type_, Id, Title, Caption, Parse_mode, Caption_entities, Document_url, Mime_type, Description, Reply_markup, Input_message_content, Thumbnail_url, Thumbnail_width, Thumbnail_height} ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ). -file("src/telega/model.gleam", 9426). -spec inline_query_result_location_decoder() -> gleam@dynamic@decode:decoder(inline_query_result_location()). inline_query_result_location_decoder() -> gleam@dynamic@decode:field( <<"type"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Type_) -> gleam@dynamic@decode:field( <<"id"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Id) -> gleam@dynamic@decode:field( <<"latitude"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_float/1}, fun(Latitude) -> gleam@dynamic@decode:field( <<"longitude"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_float/1}, fun(Longitude) -> gleam@dynamic@decode:field( <<"title"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Title) -> gleam@dynamic@decode:optional_field( <<"horizontal_accuracy"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_float/1} ), fun(Horizontal_accuracy) -> gleam@dynamic@decode:optional_field( <<"live_period"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_int/1} ), fun(Live_period) -> gleam@dynamic@decode:optional_field( <<"heading"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_int/1} ), fun(Heading) -> gleam@dynamic@decode:optional_field( <<"proximity_alert_radius"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_int/1} ), fun( Proximity_alert_radius ) -> gleam@dynamic@decode:optional_field( <<"reply_markup"/utf8>>, none, gleam@dynamic@decode:optional( inline_keyboard_markup_decoder( ) ), fun( Reply_markup ) -> gleam@dynamic@decode:optional_field( <<"input_message_content"/utf8>>, none, gleam@dynamic@decode:optional( input_message_content_decoder( ) ), fun( Input_message_content ) -> gleam@dynamic@decode:optional_field( <<"thumbnail_url"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_string/1} ), fun( Thumbnail_url ) -> gleam@dynamic@decode:optional_field( <<"thumbnail_width"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_int/1} ), fun( Thumbnail_width ) -> gleam@dynamic@decode:optional_field( <<"thumbnail_height"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_int/1} ), fun( Thumbnail_height ) -> gleam@dynamic@decode:success( {inline_query_result_location, Type_, Id, Latitude, Longitude, Title, Horizontal_accuracy, Live_period, Heading, Proximity_alert_radius, Reply_markup, Input_message_content, Thumbnail_url, Thumbnail_width, Thumbnail_height} ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ). -file("src/telega/model.gleam", 9497). -spec inline_query_result_venue_decoder() -> gleam@dynamic@decode:decoder(inline_query_result_venue()). inline_query_result_venue_decoder() -> gleam@dynamic@decode:field( <<"type"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Type_) -> gleam@dynamic@decode:field( <<"id"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Id) -> gleam@dynamic@decode:field( <<"latitude"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_float/1}, fun(Latitude) -> gleam@dynamic@decode:field( <<"longitude"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_float/1}, fun(Longitude) -> gleam@dynamic@decode:field( <<"title"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Title) -> gleam@dynamic@decode:field( <<"address"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Address) -> gleam@dynamic@decode:optional_field( <<"foursquare_id"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_string/1} ), fun(Foursquare_id) -> gleam@dynamic@decode:optional_field( <<"foursquare_type"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_string/1} ), fun( Foursquare_type ) -> gleam@dynamic@decode:optional_field( <<"google_place_id"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_string/1} ), fun( Google_place_id ) -> gleam@dynamic@decode:optional_field( <<"google_place_type"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_string/1} ), fun( Google_place_type ) -> gleam@dynamic@decode:optional_field( <<"reply_markup"/utf8>>, none, gleam@dynamic@decode:optional( inline_keyboard_markup_decoder( ) ), fun( Reply_markup ) -> gleam@dynamic@decode:optional_field( <<"input_message_content"/utf8>>, none, gleam@dynamic@decode:optional( input_message_content_decoder( ) ), fun( Input_message_content ) -> gleam@dynamic@decode:optional_field( <<"thumbnail_url"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_string/1} ), fun( Thumbnail_url ) -> gleam@dynamic@decode:optional_field( <<"thumbnail_width"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_int/1} ), fun( Thumbnail_width ) -> gleam@dynamic@decode:optional_field( <<"thumbnail_height"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_int/1} ), fun( Thumbnail_height ) -> gleam@dynamic@decode:success( {inline_query_result_venue, Type_, Id, Latitude, Longitude, Title, Address, Foursquare_id, Foursquare_type, Google_place_id, Google_place_type, Reply_markup, Input_message_content, Thumbnail_url, Thumbnail_width, Thumbnail_height} ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ). -file("src/telega/model.gleam", 9570). -spec inline_query_result_contact_decoder() -> gleam@dynamic@decode:decoder(inline_query_result_contact()). inline_query_result_contact_decoder() -> gleam@dynamic@decode:field( <<"type"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Type_) -> gleam@dynamic@decode:field( <<"id"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Id) -> gleam@dynamic@decode:field( <<"phone_number"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Phone_number) -> gleam@dynamic@decode:field( <<"first_name"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(First_name) -> gleam@dynamic@decode:optional_field( <<"last_name"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_string/1} ), fun(Last_name) -> gleam@dynamic@decode:optional_field( <<"vcard"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_string/1} ), fun(Vcard) -> gleam@dynamic@decode:optional_field( <<"reply_markup"/utf8>>, none, gleam@dynamic@decode:optional( inline_keyboard_markup_decoder( ) ), fun(Reply_markup) -> gleam@dynamic@decode:optional_field( <<"input_message_content"/utf8>>, none, gleam@dynamic@decode:optional( input_message_content_decoder( ) ), fun( Input_message_content ) -> gleam@dynamic@decode:optional_field( <<"thumbnail_url"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_string/1} ), fun( Thumbnail_url ) -> gleam@dynamic@decode:optional_field( <<"thumbnail_width"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_int/1} ), fun( Thumbnail_width ) -> gleam@dynamic@decode:optional_field( <<"thumbnail_height"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_int/1} ), fun( Thumbnail_height ) -> gleam@dynamic@decode:success( {inline_query_result_contact, Type_, Id, Phone_number, First_name, Last_name, Vcard, Reply_markup, Input_message_content, Thumbnail_url, Thumbnail_width, Thumbnail_height} ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ). -file("src/telega/model.gleam", 9646). -spec inline_query_result_cached_photo_decoder() -> gleam@dynamic@decode:decoder(inline_query_result_cached_photo()). inline_query_result_cached_photo_decoder() -> gleam@dynamic@decode:field( <<"type"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Type_) -> gleam@dynamic@decode:field( <<"id"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Id) -> gleam@dynamic@decode:field( <<"photo_file_id"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Photo_file_id) -> gleam@dynamic@decode:optional_field( <<"title"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_string/1} ), fun(Title) -> gleam@dynamic@decode:optional_field( <<"description"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_string/1} ), fun(Description) -> gleam@dynamic@decode:optional_field( <<"caption"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_string/1} ), fun(Caption) -> gleam@dynamic@decode:optional_field( <<"parse_mode"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_string/1} ), fun(Parse_mode) -> gleam@dynamic@decode:optional_field( <<"caption_entities"/utf8>>, none, gleam@dynamic@decode:optional( gleam@dynamic@decode:list( message_entity_decoder( ) ) ), fun( Caption_entities ) -> gleam@dynamic@decode:optional_field( <<"show_caption_above_media"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_bool/1} ), fun( Show_caption_above_media ) -> gleam@dynamic@decode:optional_field( <<"reply_markup"/utf8>>, none, gleam@dynamic@decode:optional( inline_keyboard_markup_decoder( ) ), fun( Reply_markup ) -> gleam@dynamic@decode:optional_field( <<"input_message_content"/utf8>>, none, gleam@dynamic@decode:optional( input_message_content_decoder( ) ), fun( Input_message_content ) -> gleam@dynamic@decode:success( {inline_query_result_cached_photo, Type_, Id, Photo_file_id, Title, Description, Caption, Parse_mode, Caption_entities, Show_caption_above_media, Reply_markup, Input_message_content} ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ). -file("src/telega/model.gleam", 9707). -spec inline_query_result_cached_gif_decoder() -> gleam@dynamic@decode:decoder(inline_query_result_cached_gif()). inline_query_result_cached_gif_decoder() -> gleam@dynamic@decode:field( <<"type"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Type_) -> gleam@dynamic@decode:field( <<"id"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Id) -> gleam@dynamic@decode:field( <<"gif_file_id"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Gif_file_id) -> gleam@dynamic@decode:optional_field( <<"title"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_string/1} ), fun(Title) -> gleam@dynamic@decode:optional_field( <<"caption"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_string/1} ), fun(Caption) -> gleam@dynamic@decode:optional_field( <<"parse_mode"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_string/1} ), fun(Parse_mode) -> gleam@dynamic@decode:optional_field( <<"caption_entities"/utf8>>, none, gleam@dynamic@decode:optional( gleam@dynamic@decode:list( message_entity_decoder( ) ) ), fun(Caption_entities) -> gleam@dynamic@decode:optional_field( <<"show_caption_above_media"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_bool/1} ), fun( Show_caption_above_media ) -> gleam@dynamic@decode:optional_field( <<"reply_markup"/utf8>>, none, gleam@dynamic@decode:optional( inline_keyboard_markup_decoder( ) ), fun( Reply_markup ) -> gleam@dynamic@decode:optional_field( <<"input_message_content"/utf8>>, none, gleam@dynamic@decode:optional( input_message_content_decoder( ) ), fun( Input_message_content ) -> gleam@dynamic@decode:success( {inline_query_result_cached_gif, Type_, Id, Gif_file_id, Title, Caption, Parse_mode, Caption_entities, Show_caption_above_media, Reply_markup, Input_message_content} ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ). -file("src/telega/model.gleam", 9762). -spec inline_query_result_cached_mpeg4_gif_decoder() -> gleam@dynamic@decode:decoder(inline_query_result_cached_mpeg4_gif()). inline_query_result_cached_mpeg4_gif_decoder() -> gleam@dynamic@decode:field( <<"type"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Type_) -> gleam@dynamic@decode:field( <<"id"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Id) -> gleam@dynamic@decode:field( <<"mpeg4_file_id"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Mpeg4_file_id) -> gleam@dynamic@decode:optional_field( <<"title"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_string/1} ), fun(Title) -> gleam@dynamic@decode:optional_field( <<"caption"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_string/1} ), fun(Caption) -> gleam@dynamic@decode:optional_field( <<"parse_mode"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_string/1} ), fun(Parse_mode) -> gleam@dynamic@decode:optional_field( <<"caption_entities"/utf8>>, none, gleam@dynamic@decode:optional( gleam@dynamic@decode:list( message_entity_decoder( ) ) ), fun(Caption_entities) -> gleam@dynamic@decode:optional_field( <<"show_caption_above_media"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_bool/1} ), fun( Show_caption_above_media ) -> gleam@dynamic@decode:optional_field( <<"reply_markup"/utf8>>, none, gleam@dynamic@decode:optional( inline_keyboard_markup_decoder( ) ), fun( Reply_markup ) -> gleam@dynamic@decode:optional_field( <<"input_message_content"/utf8>>, none, gleam@dynamic@decode:optional( input_message_content_decoder( ) ), fun( Input_message_content ) -> gleam@dynamic@decode:success( {inline_query_result_cached_mpeg4_gif, Type_, Id, Mpeg4_file_id, Title, Caption, Parse_mode, Caption_entities, Show_caption_above_media, Reply_markup, Input_message_content} ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ). -file("src/telega/model.gleam", 9817). -spec inline_query_result_cached_sticker_decoder() -> gleam@dynamic@decode:decoder(inline_query_result_cached_sticker()). inline_query_result_cached_sticker_decoder() -> gleam@dynamic@decode:field( <<"type"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Type_) -> gleam@dynamic@decode:field( <<"id"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Id) -> gleam@dynamic@decode:field( <<"sticker_file_id"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Sticker_file_id) -> gleam@dynamic@decode:optional_field( <<"reply_markup"/utf8>>, none, gleam@dynamic@decode:optional( inline_keyboard_markup_decoder() ), fun(Reply_markup) -> gleam@dynamic@decode:optional_field( <<"input_message_content"/utf8>>, none, gleam@dynamic@decode:optional( input_message_content_decoder() ), fun(Input_message_content) -> gleam@dynamic@decode:success( {inline_query_result_cached_sticker, Type_, Id, Sticker_file_id, Reply_markup, Input_message_content} ) end ) end ) end ) end ) end ). -file("src/telega/model.gleam", 9842). -spec inline_query_result_cached_document_decoder() -> gleam@dynamic@decode:decoder(inline_query_result_cached_document()). inline_query_result_cached_document_decoder() -> gleam@dynamic@decode:field( <<"type"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Type_) -> gleam@dynamic@decode:field( <<"id"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Id) -> gleam@dynamic@decode:field( <<"title"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Title) -> gleam@dynamic@decode:field( <<"document_file_id"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Document_file_id) -> gleam@dynamic@decode:optional_field( <<"description"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_string/1} ), fun(Description) -> gleam@dynamic@decode:optional_field( <<"caption"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_string/1} ), fun(Caption) -> gleam@dynamic@decode:optional_field( <<"parse_mode"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_string/1} ), fun(Parse_mode) -> gleam@dynamic@decode:optional_field( <<"caption_entities"/utf8>>, none, gleam@dynamic@decode:optional( gleam@dynamic@decode:list( message_entity_decoder( ) ) ), fun( Caption_entities ) -> gleam@dynamic@decode:optional_field( <<"reply_markup"/utf8>>, none, gleam@dynamic@decode:optional( inline_keyboard_markup_decoder( ) ), fun( Reply_markup ) -> gleam@dynamic@decode:optional_field( <<"input_message_content"/utf8>>, none, gleam@dynamic@decode:optional( input_message_content_decoder( ) ), fun( Input_message_content ) -> gleam@dynamic@decode:success( {inline_query_result_cached_document, Type_, Id, Title, Document_file_id, Description, Caption, Parse_mode, Caption_entities, Reply_markup, Input_message_content} ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ). -file("src/telega/model.gleam", 9893). -spec inline_query_result_cached_video_decoder() -> gleam@dynamic@decode:decoder(inline_query_result_cached_video()). inline_query_result_cached_video_decoder() -> gleam@dynamic@decode:field( <<"type"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Type_) -> gleam@dynamic@decode:field( <<"id"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Id) -> gleam@dynamic@decode:field( <<"video_file_id"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Video_file_id) -> gleam@dynamic@decode:field( <<"title"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Title) -> gleam@dynamic@decode:optional_field( <<"description"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_string/1} ), fun(Description) -> gleam@dynamic@decode:optional_field( <<"caption"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_string/1} ), fun(Caption) -> gleam@dynamic@decode:optional_field( <<"parse_mode"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_string/1} ), fun(Parse_mode) -> gleam@dynamic@decode:optional_field( <<"caption_entities"/utf8>>, none, gleam@dynamic@decode:optional( gleam@dynamic@decode:list( message_entity_decoder( ) ) ), fun( Caption_entities ) -> gleam@dynamic@decode:optional_field( <<"show_caption_above_media"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_bool/1} ), fun( Show_caption_above_media ) -> gleam@dynamic@decode:optional_field( <<"reply_markup"/utf8>>, none, gleam@dynamic@decode:optional( inline_keyboard_markup_decoder( ) ), fun( Reply_markup ) -> gleam@dynamic@decode:optional_field( <<"input_message_content"/utf8>>, none, gleam@dynamic@decode:optional( input_message_content_decoder( ) ), fun( Input_message_content ) -> gleam@dynamic@decode:success( {inline_query_result_cached_video, Type_, Id, Video_file_id, Title, Description, Caption, Parse_mode, Caption_entities, Show_caption_above_media, Reply_markup, Input_message_content} ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ). -file("src/telega/model.gleam", 9950). -spec inline_query_result_cached_voice_decoder() -> gleam@dynamic@decode:decoder(inline_query_result_cached_voice()). inline_query_result_cached_voice_decoder() -> gleam@dynamic@decode:field( <<"type"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Type_) -> gleam@dynamic@decode:field( <<"id"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Id) -> gleam@dynamic@decode:field( <<"voice_file_id"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Voice_file_id) -> gleam@dynamic@decode:field( <<"title"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Title) -> gleam@dynamic@decode:optional_field( <<"caption"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_string/1} ), fun(Caption) -> gleam@dynamic@decode:optional_field( <<"parse_mode"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_string/1} ), fun(Parse_mode) -> gleam@dynamic@decode:optional_field( <<"caption_entities"/utf8>>, none, gleam@dynamic@decode:optional( gleam@dynamic@decode:list( message_entity_decoder( ) ) ), fun(Caption_entities) -> gleam@dynamic@decode:optional_field( <<"reply_markup"/utf8>>, none, gleam@dynamic@decode:optional( inline_keyboard_markup_decoder( ) ), fun( Reply_markup ) -> gleam@dynamic@decode:optional_field( <<"input_message_content"/utf8>>, none, gleam@dynamic@decode:optional( input_message_content_decoder( ) ), fun( Input_message_content ) -> gleam@dynamic@decode:success( {inline_query_result_cached_voice, Type_, Id, Voice_file_id, Title, Caption, Parse_mode, Caption_entities, Reply_markup, Input_message_content} ) end ) end ) end ) end ) end ) end ) end ) end ) end ). -file("src/telega/model.gleam", 9995). -spec inline_query_result_cached_audio_decoder() -> gleam@dynamic@decode:decoder(inline_query_result_cached_audio()). inline_query_result_cached_audio_decoder() -> gleam@dynamic@decode:field( <<"type"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Type_) -> gleam@dynamic@decode:field( <<"id"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Id) -> gleam@dynamic@decode:field( <<"audio_file_id"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Audio_file_id) -> gleam@dynamic@decode:optional_field( <<"caption"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_string/1} ), fun(Caption) -> gleam@dynamic@decode:optional_field( <<"parse_mode"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_string/1} ), fun(Parse_mode) -> gleam@dynamic@decode:optional_field( <<"caption_entities"/utf8>>, none, gleam@dynamic@decode:optional( gleam@dynamic@decode:list( message_entity_decoder() ) ), fun(Caption_entities) -> gleam@dynamic@decode:optional_field( <<"reply_markup"/utf8>>, none, gleam@dynamic@decode:optional( inline_keyboard_markup_decoder( ) ), fun(Reply_markup) -> gleam@dynamic@decode:optional_field( <<"input_message_content"/utf8>>, none, gleam@dynamic@decode:optional( input_message_content_decoder( ) ), fun( Input_message_content ) -> gleam@dynamic@decode:success( {inline_query_result_cached_audio, Type_, Id, Audio_file_id, Caption, Parse_mode, Caption_entities, Reply_markup, Input_message_content} ) end ) end ) end ) end ) end ) end ) end ) end ). -file("src/telega/model.gleam", 16047). -spec inline_query_result_decoder() -> gleam@dynamic@decode:decoder(inline_query_result()). inline_query_result_decoder() -> gleam@dynamic@decode:field( <<"type"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Variant) -> case Variant of <<"audio"/utf8>> -> gleam@dynamic@decode:one_of( begin gleam@dynamic@decode:then( inline_query_result_cached_audio_decoder(), fun(Value) -> gleam@dynamic@decode:success( {inline_query_result_cached_audio_inline_query_result, Value} ) end ) end, [begin gleam@dynamic@decode:then( inline_query_result_cached_audio_decoder(), fun(Value@1) -> gleam@dynamic@decode:success( {inline_query_result_cached_audio_inline_query_result, Value@1} ) end ) end] ); <<"document"/utf8>> -> gleam@dynamic@decode:one_of( begin gleam@dynamic@decode:then( inline_query_result_document_decoder(), fun(Value@2) -> gleam@dynamic@decode:success( {inline_query_result_document_inline_query_result, Value@2} ) end ) end, [begin gleam@dynamic@decode:then( inline_query_result_cached_document_decoder( ), fun(Value@3) -> gleam@dynamic@decode:success( {inline_query_result_cached_document_inline_query_result, Value@3} ) end ) end] ); <<"gif"/utf8>> -> gleam@dynamic@decode:one_of( begin gleam@dynamic@decode:then( inline_query_result_gif_decoder(), fun(Value@4) -> gleam@dynamic@decode:success( {inline_query_result_gif_inline_query_result, Value@4} ) end ) end, [begin gleam@dynamic@decode:then( inline_query_result_cached_gif_decoder(), fun(Value@5) -> gleam@dynamic@decode:success( {inline_query_result_cached_gif_inline_query_result, Value@5} ) end ) end] ); <<"mpeg4_gif"/utf8>> -> gleam@dynamic@decode:one_of( begin gleam@dynamic@decode:then( inline_query_result_mpeg4_gif_decoder(), fun(Value@6) -> gleam@dynamic@decode:success( {inline_query_result_mpeg4_gif_inline_query_result, Value@6} ) end ) end, [begin gleam@dynamic@decode:then( inline_query_result_cached_mpeg4_gif_decoder( ), fun(Value@7) -> gleam@dynamic@decode:success( {inline_query_result_cached_mpeg4_gif_inline_query_result, Value@7} ) end ) end] ); <<"photo"/utf8>> -> gleam@dynamic@decode:one_of( begin gleam@dynamic@decode:then( inline_query_result_photo_decoder(), fun(Value@8) -> gleam@dynamic@decode:success( {inline_query_result_photo_inline_query_result, Value@8} ) end ) end, [begin gleam@dynamic@decode:then( inline_query_result_cached_photo_decoder(), fun(Value@9) -> gleam@dynamic@decode:success( {inline_query_result_cached_photo_inline_query_result, Value@9} ) end ) end] ); <<"video"/utf8>> -> gleam@dynamic@decode:one_of( begin gleam@dynamic@decode:then( inline_query_result_video_decoder(), fun(Value@10) -> gleam@dynamic@decode:success( {inline_query_result_video_inline_query_result, Value@10} ) end ) end, [begin gleam@dynamic@decode:then( inline_query_result_cached_video_decoder(), fun(Value@11) -> gleam@dynamic@decode:success( {inline_query_result_cached_video_inline_query_result, Value@11} ) end ) end] ); <<"voice"/utf8>> -> gleam@dynamic@decode:one_of( begin gleam@dynamic@decode:then( inline_query_result_voice_decoder(), fun(Value@12) -> gleam@dynamic@decode:success( {inline_query_result_voice_inline_query_result, Value@12} ) end ) end, [begin gleam@dynamic@decode:then( inline_query_result_cached_voice_decoder(), fun(Value@13) -> gleam@dynamic@decode:success( {inline_query_result_cached_voice_inline_query_result, Value@13} ) end ) end] ); <<"sticker"/utf8>> -> gleam@dynamic@decode:then( inline_query_result_cached_sticker_decoder(), fun(Value@14) -> gleam@dynamic@decode:success( {inline_query_result_cached_sticker_inline_query_result, Value@14} ) end ); <<"article"/utf8>> -> gleam@dynamic@decode:then( inline_query_result_article_decoder(), fun(Value@15) -> gleam@dynamic@decode:success( {inline_query_result_article_inline_query_result, Value@15} ) end ); <<"contact"/utf8>> -> gleam@dynamic@decode:then( inline_query_result_contact_decoder(), fun(Value@16) -> gleam@dynamic@decode:success( {inline_query_result_contact_inline_query_result, Value@16} ) end ); <<"game"/utf8>> -> gleam@dynamic@decode:then( inline_query_result_game_decoder(), fun(Value@17) -> gleam@dynamic@decode:success( {inline_query_result_game_inline_query_result, Value@17} ) end ); <<"location"/utf8>> -> gleam@dynamic@decode:then( inline_query_result_location_decoder(), fun(Value@18) -> gleam@dynamic@decode:success( {inline_query_result_location_inline_query_result, Value@18} ) end ); <<"venue"/utf8>> -> gleam@dynamic@decode:then( inline_query_result_venue_decoder(), fun(Value@19) -> gleam@dynamic@decode:success( {inline_query_result_venue_inline_query_result, Value@19} ) end ); _ -> erlang:error(#{gleam_error => panic, message => <<"Invalid variant for InlineQueryResult"/utf8>>, module => <<"telega/model"/utf8>>, function => <<"inline_query_result_decoder"/utf8>>, line => 16181}) end end ). -file("src/telega/model.gleam", 16212). -spec revenue_withdrawal_state_decoder() -> gleam@dynamic@decode:decoder(revenue_withdrawal_state()). revenue_withdrawal_state_decoder() -> gleam@dynamic@decode:field( <<"type"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Variant) -> case Variant of <<"pending"/utf8>> -> gleam@dynamic@decode:then( revenue_withdrawal_state_pending_decoder(), fun(Value) -> gleam@dynamic@decode:success( {revenue_withdrawal_state_pending_revenue_withdrawal_state, Value} ) end ); <<"succeeded"/utf8>> -> gleam@dynamic@decode:then( revenue_withdrawal_state_succeeded_decoder(), fun(Value@1) -> gleam@dynamic@decode:success( {revenue_withdrawal_state_succeeded_revenue_withdrawal_state, Value@1} ) end ); <<"failed"/utf8>> -> gleam@dynamic@decode:then( revenue_withdrawal_state_failed_decoder(), fun(Value@2) -> gleam@dynamic@decode:success( {revenue_withdrawal_state_failed_revenue_withdrawal_state, Value@2} ) end ); _ -> erlang:error(#{gleam_error => panic, message => <<"Invalid variant for RevenueWithdrawalState"/utf8>>, module => <<"telega/model"/utf8>>, function => <<"revenue_withdrawal_state_decoder"/utf8>>, line => 16231}) end end ). -file("src/telega/model.gleam", 10639). -spec transaction_partner_fragment_decoder() -> gleam@dynamic@decode:decoder(transaction_partner_fragment()). transaction_partner_fragment_decoder() -> gleam@dynamic@decode:field( <<"type"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Type_) -> gleam@dynamic@decode:optional_field( <<"withdrawal_state"/utf8>>, none, gleam@dynamic@decode:optional( revenue_withdrawal_state_decoder() ), fun(Withdrawal_state) -> gleam@dynamic@decode:success( {transaction_partner_fragment, Type_, Withdrawal_state} ) end ) end ). -file("src/telega/model.gleam", 16235). -spec transaction_partner_decoder() -> gleam@dynamic@decode:decoder(transaction_partner()). transaction_partner_decoder() -> gleam@dynamic@decode:field( <<"type"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Variant) -> case Variant of <<"user"/utf8>> -> gleam@dynamic@decode:then( transaction_partner_user_decoder(), fun(Value) -> gleam@dynamic@decode:success( {transaction_partner_user_transaction_partner, Value} ) end ); <<"chat"/utf8>> -> gleam@dynamic@decode:then( transaction_partner_chat_decoder(), fun(Value@1) -> gleam@dynamic@decode:success( {transaction_partner_chat_transaction_partner, Value@1} ) end ); <<"affiliate_program"/utf8>> -> gleam@dynamic@decode:then( transaction_partner_affiliate_program_decoder(), fun(Value@2) -> gleam@dynamic@decode:success( {transaction_partner_affiliate_program_transaction_partner, Value@2} ) end ); <<"fragment"/utf8>> -> gleam@dynamic@decode:then( transaction_partner_fragment_decoder(), fun(Value@3) -> gleam@dynamic@decode:success( {transaction_partner_fragment_transaction_partner, Value@3} ) end ); <<"telegram_ads"/utf8>> -> gleam@dynamic@decode:then( transaction_partner_telegram_ads_decoder(), fun(Value@4) -> gleam@dynamic@decode:success( {transaction_partner_telegram_ads_transaction_partner, Value@4} ) end ); <<"telegram_api"/utf8>> -> gleam@dynamic@decode:then( transaction_partner_telegram_api_decoder(), fun(Value@5) -> gleam@dynamic@decode:success( {transaction_partner_telegram_api_transaction_partner, Value@5} ) end ); <<"other"/utf8>> -> gleam@dynamic@decode:then( transaction_partner_other_decoder(), fun(Value@6) -> gleam@dynamic@decode:success( {transaction_partner_other_transaction_partner, Value@6} ) end ); _ -> erlang:error(#{gleam_error => panic, message => <<"Invalid variant for TransactionPartner"/utf8>>, module => <<"telega/model"/utf8>>, function => <<"transaction_partner_decoder"/utf8>>, line => 16266}) end end ). -file("src/telega/model.gleam", 10679). -spec star_transaction_decoder() -> gleam@dynamic@decode:decoder(star_transaction()). star_transaction_decoder() -> gleam@dynamic@decode:field( <<"id"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Id) -> gleam@dynamic@decode:field( <<"amount"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_int/1}, fun(Amount) -> gleam@dynamic@decode:optional_field( <<"nanostar_amount"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_int/1} ), fun(Nanostar_amount) -> gleam@dynamic@decode:field( <<"date"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_int/1}, fun(Date) -> gleam@dynamic@decode:optional_field( <<"source"/utf8>>, none, gleam@dynamic@decode:optional( transaction_partner_decoder() ), fun(Source) -> gleam@dynamic@decode:optional_field( <<"receiver"/utf8>>, none, gleam@dynamic@decode:optional( transaction_partner_decoder( ) ), fun(Receiver) -> gleam@dynamic@decode:success( {star_transaction, Id, Amount, Nanostar_amount, Date, Source, Receiver} ) end ) end ) end ) end ) end ) end ). -file("src/telega/model.gleam", 10708). -spec star_transactions_decoder() -> gleam@dynamic@decode:decoder(star_transactions()). star_transactions_decoder() -> gleam@dynamic@decode:field( <<"transactions"/utf8>>, gleam@dynamic@decode:list(star_transaction_decoder()), fun(Transactions) -> gleam@dynamic@decode:success({star_transactions, Transactions}) end ). -file("src/telega/model.gleam", 16270). -spec passport_element_error_decoder() -> gleam@dynamic@decode:decoder(passport_element_error()). passport_element_error_decoder() -> gleam@dynamic@decode:field( <<"sourse"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Variant) -> case Variant of <<"data"/utf8>> -> gleam@dynamic@decode:then( passport_element_error_data_field_decoder(), fun(Value) -> gleam@dynamic@decode:success( {passport_element_error_data_field_passport_element_error, Value} ) end ); <<"front_side"/utf8>> -> gleam@dynamic@decode:then( passport_element_error_front_side_decoder(), fun(Value@1) -> gleam@dynamic@decode:success( {passport_element_error_front_side_passport_element_error, Value@1} ) end ); <<"reverse_side"/utf8>> -> gleam@dynamic@decode:then( passport_element_error_reverse_side_decoder(), fun(Value@2) -> gleam@dynamic@decode:success( {passport_element_error_reverse_side_passport_element_error, Value@2} ) end ); <<"selfie"/utf8>> -> gleam@dynamic@decode:then( passport_element_error_selfie_decoder(), fun(Value@3) -> gleam@dynamic@decode:success( {passport_element_error_selfie_passport_element_error, Value@3} ) end ); <<"file"/utf8>> -> gleam@dynamic@decode:then( passport_element_error_file_decoder(), fun(Value@4) -> gleam@dynamic@decode:success( {passport_element_error_file_passport_element_error, Value@4} ) end ); <<"files"/utf8>> -> gleam@dynamic@decode:then( passport_element_error_files_decoder(), fun(Value@5) -> gleam@dynamic@decode:success( {passport_element_error_files_passport_element_error, Value@5} ) end ); <<"translation_file"/utf8>> -> gleam@dynamic@decode:then( passport_element_error_translation_file_decoder(), fun(Value@6) -> gleam@dynamic@decode:success( {passport_element_error_translation_file_passport_element_error, Value@6} ) end ); <<"translation_files"/utf8>> -> gleam@dynamic@decode:then( passport_element_error_translation_files_decoder(), fun(Value@7) -> gleam@dynamic@decode:success( {passport_element_error_translation_files_passport_element_error, Value@7} ) end ); <<"unspecified"/utf8>> -> gleam@dynamic@decode:then( passport_element_error_unspecified_decoder(), fun(Value@8) -> gleam@dynamic@decode:success( {passport_element_error_unspecified_passport_element_error, Value@8} ) end ); _ -> erlang:error(#{gleam_error => panic, message => <<"Invalid variant for PassportElementError"/utf8>>, module => <<"telega/model"/utf8>>, function => <<"passport_element_error_decoder"/utf8>>, line => 16317}) end end ). -file("src/telega/model.gleam", 16670). -spec file_or_string_decoder() -> gleam@dynamic@decode:decoder(file_or_string()). file_or_string_decoder() -> gleam@dynamic@decode:field( <<"type"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Variant) -> case Variant of <<"file_v"/utf8>> -> gleam@dynamic@decode:then( file_decoder(), fun(Value) -> gleam@dynamic@decode:success({file_v, Value}) end ); <<"string"/utf8>> -> gleam@dynamic@decode:then( {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(String) -> gleam@dynamic@decode:success({string_v, String}) end ); _ -> gleam@dynamic@decode:failure( {string_v, <<""/utf8>>}, <<"FileOrString"/utf8>> ) end end ). -file("src/telega/model.gleam", 8814). -spec input_sticker_decoder() -> gleam@dynamic@decode:decoder(input_sticker()). input_sticker_decoder() -> gleam@dynamic@decode:field( <<"sticker"/utf8>>, file_or_string_decoder(), fun(Sticker) -> gleam@dynamic@decode:field( <<"format"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Format) -> gleam@dynamic@decode:field( <<"emoji_list"/utf8>>, gleam@dynamic@decode:list( {decoder, fun gleam@dynamic@decode:decode_string/1} ), fun(Emoji_list) -> gleam@dynamic@decode:optional_field( <<"mask_position"/utf8>>, none, gleam@dynamic@decode:optional( mask_position_decoder() ), fun(Mask_position) -> gleam@dynamic@decode:optional_field( <<"keywords"/utf8>>, none, gleam@dynamic@decode:optional( gleam@dynamic@decode:list( {decoder, fun gleam@dynamic@decode:decode_string/1} ) ), fun(Keywords) -> gleam@dynamic@decode:success( {input_sticker, Sticker, Format, Emoji_list, Mask_position, Keywords} ) end ) end ) end ) end ) end ). -file("src/telega/model.gleam", 16711). -spec new_answer_callback_query_parameters(binary()) -> answer_callback_query_parameters(). new_answer_callback_query_parameters(Callback_query_id) -> {answer_callback_query_parameters, Callback_query_id, none, none, none, none}. -file("src/telega/model.gleam", 16755). -spec default_bot_command_parameters() -> bot_command_parameters(). default_bot_command_parameters() -> {bot_command_parameters, none, none}. -file("src/telega/model.gleam", 16809). -spec bot_commands_from(list({binary(), binary()})) -> list(bot_command()). bot_commands_from(Commands) -> _pipe = Commands, gleam@list:map( _pipe, fun(Command) -> {Command@1, Description} = Command, {bot_command, Command@1, Description} end ). -file("src/telega/model.gleam", 18360). -spec encode_chat_action(chat_action()) -> binary(). encode_chat_action(Action) -> case Action of typing -> <<"typing"/utf8>>; upload_photo -> <<"upload_photo"/utf8>>; record_video -> <<"record_video"/utf8>>; upload_video -> <<"upload_video"/utf8>>; record_voice -> <<"record_voice"/utf8>>; upload_voice -> <<"upload_voice"/utf8>>; upload_document -> <<"upload_document"/utf8>>; choose_sticker -> <<"choose_sticker"/utf8>>; find_location -> <<"find_location"/utf8>>; record_video_note -> <<"record_video_note"/utf8>>; upload_video_note -> <<"upload_video_note"/utf8>> end. -file("src/telega/model.gleam", 21330). -spec int_or_string_decoder() -> gleam@dynamic@decode:decoder(int_or_string()). int_or_string_decoder() -> gleam@dynamic@decode:field( <<"type"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Variant) -> case Variant of <<"int"/utf8>> -> gleam@dynamic@decode:then( {decoder, fun gleam@dynamic@decode:decode_int/1}, fun(Value) -> gleam@dynamic@decode:success({int, Value}) end ); <<"str"/utf8>> -> gleam@dynamic@decode:then( {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Value@1) -> gleam@dynamic@decode:success({str, Value@1}) end ); _ -> gleam@dynamic@decode:failure( {int, 0}, <<"IntOrString"/utf8>> ) end end ). -file("src/telega/model.gleam", 5672). -spec reply_parameters_decoder() -> gleam@dynamic@decode:decoder(reply_parameters()). reply_parameters_decoder() -> gleam@dynamic@decode:field( <<"message_id"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_int/1}, fun(Message_id) -> gleam@dynamic@decode:optional_field( <<"chat_id"/utf8>>, none, gleam@dynamic@decode:optional(int_or_string_decoder()), fun(Chat_id) -> gleam@dynamic@decode:optional_field( <<"allow_sending_without_reply"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_bool/1} ), fun(Allow_sending_without_reply) -> gleam@dynamic@decode:optional_field( <<"quote"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_string/1} ), fun(Quote) -> gleam@dynamic@decode:optional_field( <<"quote_parse_mode"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_string/1} ), fun(Quote_parse_mode) -> gleam@dynamic@decode:optional_field( <<"quote_entities"/utf8>>, none, gleam@dynamic@decode:optional( gleam@dynamic@decode:list( message_entity_decoder() ) ), fun(Quote_entities) -> gleam@dynamic@decode:optional_field( <<"quote_position"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_int/1} ), fun(Quote_position) -> gleam@dynamic@decode:success( {reply_parameters, Message_id, Chat_id, Allow_sending_without_reply, Quote, Quote_parse_mode, Quote_entities, Quote_position} ) end ) end ) end ) end ) end ) end ) end ). -file("src/telega/model.gleam", 8131). -spec bot_command_scope_chat_decoder() -> gleam@dynamic@decode:decoder(bot_command_scope_chat()). bot_command_scope_chat_decoder() -> gleam@dynamic@decode:field( <<"type"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Type_) -> gleam@dynamic@decode:field( <<"chat_id"/utf8>>, int_or_string_decoder(), fun(Chat_id) -> gleam@dynamic@decode:success( {bot_command_scope_chat, Type_, Chat_id} ) end ) end ). -file("src/telega/model.gleam", 8137). -spec bot_command_scope_chat_administrators_decoder() -> gleam@dynamic@decode:decoder(bot_command_scope_chat_administrators()). bot_command_scope_chat_administrators_decoder() -> gleam@dynamic@decode:field( <<"type"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Type_) -> gleam@dynamic@decode:field( <<"chat_id"/utf8>>, int_or_string_decoder(), fun(Chat_id) -> gleam@dynamic@decode:success( {bot_command_scope_chat_administrators, Type_, Chat_id} ) end ) end ). -file("src/telega/model.gleam", 8148). -spec bot_command_scope_chat_member_decoder() -> gleam@dynamic@decode:decoder(bot_command_scope_chat_member()). bot_command_scope_chat_member_decoder() -> gleam@dynamic@decode:field( <<"type"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Type_) -> gleam@dynamic@decode:field( <<"chat_id"/utf8>>, int_or_string_decoder(), fun(Chat_id) -> gleam@dynamic@decode:field( <<"user_id"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_int/1}, fun(User_id) -> gleam@dynamic@decode:success( {bot_command_scope_chat_member, Type_, Chat_id, User_id} ) end ) end ) end ). -file("src/telega/model.gleam", 15930). -spec bot_command_scope_decoder() -> gleam@dynamic@decode:decoder(bot_command_scope()). bot_command_scope_decoder() -> gleam@dynamic@decode:field( <<"type"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Variant) -> case Variant of <<"default"/utf8>> -> gleam@dynamic@decode:then( bot_command_scope_default_decoder(), fun(Value) -> gleam@dynamic@decode:success( {bot_command_scope_default_bot_command_scope, Value} ) end ); <<"all_private_chats"/utf8>> -> gleam@dynamic@decode:then( bot_command_scope_all_private_chats_decoder(), fun(Value@1) -> gleam@dynamic@decode:success( {bot_command_scope_all_private_chats_bot_command_scope, Value@1} ) end ); <<"all_group_chats"/utf8>> -> gleam@dynamic@decode:then( bot_command_scope_all_group_chats_decoder(), fun(Value@2) -> gleam@dynamic@decode:success( {bot_command_scope_all_group_chats_bot_command_scope, Value@2} ) end ); <<"all_chat_administrators"/utf8>> -> gleam@dynamic@decode:then( bot_command_scope_all_chat_administrators_decoder(), fun(Value@3) -> gleam@dynamic@decode:success( {bot_command_scope_all_chat_administrators_bot_command_scope, Value@3} ) end ); <<"chat"/utf8>> -> gleam@dynamic@decode:then( bot_command_scope_chat_decoder(), fun(Value@4) -> gleam@dynamic@decode:success( {bot_command_scope_chat_bot_command_scope, Value@4} ) end ); <<"chat_administrators"/utf8>> -> gleam@dynamic@decode:then( bot_command_scope_chat_administrators_decoder(), fun(Value@5) -> gleam@dynamic@decode:success( {bot_command_scope_chat_administrators_bot_command_scope, Value@5} ) end ); <<"chat_member"/utf8>> -> gleam@dynamic@decode:then( bot_command_scope_chat_member_decoder(), fun(Value@6) -> gleam@dynamic@decode:success( {bot_command_scope_chat_member_bot_command_scope, Value@6} ) end ); _ -> erlang:error(#{gleam_error => panic, message => <<"Invalid variant for BotCommandScope"/utf8>>, module => <<"telega/model"/utf8>>, function => <<"bot_command_scope_decoder"/utf8>>, line => 15963}) end end ). -file("src/telega/model.gleam", 21345). -spec encode_int_or_string(int_or_string()) -> gleam@json:json(). encode_int_or_string(Value) -> case Value of {int, Value@1} -> gleam@json:int(Value@1); {str, Value@2} -> gleam@json:string(Value@2) end. -file("src/telega/model.gleam", 21352). -spec json_object_filter_nulls(list({binary(), gleam@json:json()})) -> gleam@json:json(). json_object_filter_nulls(Entries) -> Null = gleam@json:null(), _pipe = Entries, _pipe@1 = gleam@list:filter( _pipe, fun(Entry) -> {_, Value} = Entry, Value /= Null end ), gleam@json:object(_pipe@1). -file("src/telega/model.gleam", 11102). -spec encode_webhook_info(webhook_info()) -> gleam@json:json(). encode_webhook_info(Webhook_info) -> json_object_filter_nulls( [{<<"url"/utf8>>, gleam@json:string(erlang:element(2, Webhook_info))}, {<<"has_custom_certificate"/utf8>>, gleam@json:bool(erlang:element(3, Webhook_info))}, {<<"pending_update_count"/utf8>>, gleam@json:int(erlang:element(4, Webhook_info))}, {<<"ip_address"/utf8>>, gleam@json:nullable( erlang:element(5, Webhook_info), fun gleam@json:string/1 )}, {<<"last_error_date"/utf8>>, gleam@json:nullable( erlang:element(6, Webhook_info), fun gleam@json:int/1 )}, {<<"last_error_message"/utf8>>, gleam@json:nullable( erlang:element(7, Webhook_info), fun gleam@json:string/1 )}, {<<"last_synchronization_error_date"/utf8>>, gleam@json:nullable( erlang:element(8, Webhook_info), fun gleam@json:int/1 )}, {<<"max_connections"/utf8>>, gleam@json:nullable( erlang:element(9, Webhook_info), fun gleam@json:int/1 )}, {<<"allowed_updates"/utf8>>, gleam@json:nullable( erlang:element(10, Webhook_info), fun(_capture) -> gleam@json:array(_capture, fun gleam@json:string/1) end )}] ). -file("src/telega/model.gleam", 11125). -spec encode_user(user()) -> gleam@json:json(). encode_user(User) -> json_object_filter_nulls( [{<<"id"/utf8>>, gleam@json:int(erlang:element(2, User))}, {<<"is_bot"/utf8>>, gleam@json:bool(erlang:element(3, User))}, {<<"first_name"/utf8>>, gleam@json:string(erlang:element(4, User))}, {<<"last_name"/utf8>>, gleam@json:nullable( erlang:element(5, User), fun gleam@json:string/1 )}, {<<"username"/utf8>>, gleam@json:nullable( erlang:element(6, User), fun gleam@json:string/1 )}, {<<"language_code"/utf8>>, gleam@json:nullable( erlang:element(7, User), fun gleam@json:string/1 )}, {<<"is_premium"/utf8>>, gleam@json:nullable( erlang:element(8, User), fun gleam@json:bool/1 )}, {<<"added_to_attachment_menu"/utf8>>, gleam@json:nullable( erlang:element(9, User), fun gleam@json:bool/1 )}, {<<"can_join_groups"/utf8>>, gleam@json:nullable( erlang:element(10, User), fun gleam@json:bool/1 )}, {<<"can_read_all_group_messages"/utf8>>, gleam@json:nullable( erlang:element(11, User), fun gleam@json:bool/1 )}, {<<"supports_inline_queries"/utf8>>, gleam@json:nullable( erlang:element(12, User), fun gleam@json:bool/1 )}, {<<"can_connect_to_business"/utf8>>, gleam@json:nullable( erlang:element(13, User), fun gleam@json:bool/1 )}, {<<"has_main_web_app"/utf8>>, gleam@json:nullable( erlang:element(14, User), fun gleam@json:bool/1 )}] ). -file("src/telega/model.gleam", 11155). -spec encode_chat(chat()) -> gleam@json:json(). encode_chat(Chat) -> json_object_filter_nulls( [{<<"id"/utf8>>, gleam@json:int(erlang:element(2, Chat))}, {<<"type"/utf8>>, gleam@json:nullable( erlang:element(3, Chat), fun gleam@json:string/1 )}, {<<"title"/utf8>>, gleam@json:nullable( erlang:element(4, Chat), fun gleam@json:string/1 )}, {<<"username"/utf8>>, gleam@json:nullable( erlang:element(5, Chat), fun gleam@json:string/1 )}, {<<"first_name"/utf8>>, gleam@json:nullable( erlang:element(6, Chat), fun gleam@json:string/1 )}, {<<"last_name"/utf8>>, gleam@json:nullable( erlang:element(7, Chat), fun gleam@json:string/1 )}, {<<"is_forum"/utf8>>, gleam@json:nullable( erlang:element(8, Chat), fun gleam@json:bool/1 )}] ). -file("src/telega/model.gleam", 11541). -spec encode_message_id(message_id()) -> gleam@json:json(). encode_message_id(Message_id) -> json_object_filter_nulls( [{<<"message_id"/utf8>>, gleam@json:int(erlang:element(2, Message_id))}] ). -file("src/telega/model.gleam", 11545). -spec encode_inaccessible_message(inaccessible_message()) -> gleam@json:json(). encode_inaccessible_message(Inaccessible_message) -> json_object_filter_nulls( [{<<"chat"/utf8>>, encode_chat(erlang:element(2, Inaccessible_message))}, {<<"message_id"/utf8>>, gleam@json:int(erlang:element(3, Inaccessible_message))}, {<<"date"/utf8>>, gleam@json:int(erlang:element(4, Inaccessible_message))}] ). -file("src/telega/model.gleam", 11555). -spec encode_message_entity(message_entity()) -> gleam@json:json(). encode_message_entity(Message_entity) -> json_object_filter_nulls( [{<<"type"/utf8>>, gleam@json:string(erlang:element(2, Message_entity))}, {<<"offset"/utf8>>, gleam@json:int(erlang:element(3, Message_entity))}, {<<"length"/utf8>>, gleam@json:int(erlang:element(4, Message_entity))}, {<<"url"/utf8>>, gleam@json:nullable( erlang:element(5, Message_entity), fun gleam@json:string/1 )}, {<<"user"/utf8>>, gleam@json:nullable( erlang:element(6, Message_entity), fun encode_user/1 )}, {<<"language"/utf8>>, gleam@json:nullable( erlang:element(7, Message_entity), fun gleam@json:string/1 )}, {<<"custom_emoji_id"/utf8>>, gleam@json:nullable( erlang:element(8, Message_entity), fun gleam@json:string/1 )}] ). -file("src/telega/model.gleam", 11570). -spec encode_text_quote(text_quote()) -> gleam@json:json(). encode_text_quote(Text_quote) -> json_object_filter_nulls( [{<<"text"/utf8>>, gleam@json:string(erlang:element(2, Text_quote))}, {<<"entities"/utf8>>, gleam@json:nullable( erlang:element(3, Text_quote), fun(_capture) -> gleam@json:array(_capture, fun encode_message_entity/1) end )}, {<<"position"/utf8>>, gleam@json:int(erlang:element(4, Text_quote))}, {<<"is_manual"/utf8>>, gleam@json:nullable( erlang:element(5, Text_quote), fun gleam@json:bool/1 )}] ). -file("src/telega/model.gleam", 11640). -spec encode_reply_parameters(reply_parameters()) -> gleam@json:json(). encode_reply_parameters(Reply_parameters) -> json_object_filter_nulls( [{<<"message_id"/utf8>>, gleam@json:int(erlang:element(2, Reply_parameters))}, {<<"chat_id"/utf8>>, gleam@json:nullable( erlang:element(3, Reply_parameters), fun encode_int_or_string/1 )}, {<<"allow_sending_without_reply"/utf8>>, gleam@json:nullable( erlang:element(4, Reply_parameters), fun gleam@json:bool/1 )}, {<<"quote"/utf8>>, gleam@json:nullable( erlang:element(5, Reply_parameters), fun gleam@json:string/1 )}, {<<"quote_parse_mode"/utf8>>, gleam@json:nullable( erlang:element(6, Reply_parameters), fun gleam@json:string/1 )}, {<<"quote_entities"/utf8>>, gleam@json:nullable( erlang:element(7, Reply_parameters), fun(_capture) -> gleam@json:array(_capture, fun encode_message_entity/1) end )}, {<<"quote_position"/utf8>>, gleam@json:nullable( erlang:element(8, Reply_parameters), fun gleam@json:int/1 )}] ). -file("src/telega/model.gleam", 11667). -spec encode_message_origin_user(message_origin_user()) -> gleam@json:json(). encode_message_origin_user(Message_origin_user) -> json_object_filter_nulls( [{<<"type"/utf8>>, gleam@json:string(erlang:element(2, Message_origin_user))}, {<<"date"/utf8>>, gleam@json:int(erlang:element(3, Message_origin_user))}, {<<"sender_user"/utf8>>, encode_user(erlang:element(4, Message_origin_user))}] ). -file("src/telega/model.gleam", 11677). -spec encode_message_origin_hidden_user(message_origin_hidden_user()) -> gleam@json:json(). encode_message_origin_hidden_user(Message_origin_hidden_user) -> json_object_filter_nulls( [{<<"type"/utf8>>, gleam@json:string(erlang:element(2, Message_origin_hidden_user))}, {<<"date"/utf8>>, gleam@json:int(erlang:element(3, Message_origin_hidden_user))}, {<<"sender_user_name"/utf8>>, gleam@json:string(erlang:element(4, Message_origin_hidden_user))}] ). -file("src/telega/model.gleam", 11690). -spec encode_message_origin_chat(message_origin_chat()) -> gleam@json:json(). encode_message_origin_chat(Message_origin_chat) -> json_object_filter_nulls( [{<<"type"/utf8>>, gleam@json:string(erlang:element(2, Message_origin_chat))}, {<<"date"/utf8>>, gleam@json:int(erlang:element(3, Message_origin_chat))}, {<<"sender_chat"/utf8>>, encode_chat(erlang:element(4, Message_origin_chat))}, {<<"author_signature"/utf8>>, gleam@json:nullable( erlang:element(5, Message_origin_chat), fun gleam@json:string/1 )}] ). -file("src/telega/model.gleam", 11704). -spec encode_message_origin_channel(message_origin_channel()) -> gleam@json:json(). encode_message_origin_channel(Message_origin_channel) -> json_object_filter_nulls( [{<<"type"/utf8>>, gleam@json:string(erlang:element(2, Message_origin_channel))}, {<<"date"/utf8>>, gleam@json:int(erlang:element(3, Message_origin_channel))}, {<<"chat"/utf8>>, encode_chat(erlang:element(4, Message_origin_channel))}, {<<"message_id"/utf8>>, gleam@json:int(erlang:element(5, Message_origin_channel))}, {<<"author_signature"/utf8>>, gleam@json:nullable( erlang:element(6, Message_origin_channel), fun gleam@json:string/1 )}] ). -file("src/telega/model.gleam", 11719). -spec encode_photo_size(photo_size()) -> gleam@json:json(). encode_photo_size(Photo_size) -> json_object_filter_nulls( [{<<"file_id"/utf8>>, gleam@json:string(erlang:element(2, Photo_size))}, {<<"file_unique_id"/utf8>>, gleam@json:string(erlang:element(3, Photo_size))}, {<<"width"/utf8>>, gleam@json:int(erlang:element(4, Photo_size))}, {<<"height"/utf8>>, gleam@json:int(erlang:element(5, Photo_size))}, {<<"file_size"/utf8>>, gleam@json:nullable( erlang:element(6, Photo_size), fun gleam@json:int/1 )}] ). -file("src/telega/model.gleam", 11729). -spec encode_animation(animation()) -> gleam@json:json(). encode_animation(Animation) -> json_object_filter_nulls( [{<<"file_id"/utf8>>, gleam@json:string(erlang:element(2, Animation))}, {<<"file_unique_id"/utf8>>, gleam@json:string(erlang:element(3, Animation))}, {<<"width"/utf8>>, gleam@json:int(erlang:element(4, Animation))}, {<<"height"/utf8>>, gleam@json:int(erlang:element(5, Animation))}, {<<"duration"/utf8>>, gleam@json:int(erlang:element(6, Animation))}, {<<"thumbnail"/utf8>>, gleam@json:nullable( erlang:element(7, Animation), fun encode_photo_size/1 )}, {<<"file_name"/utf8>>, gleam@json:nullable( erlang:element(8, Animation), fun gleam@json:string/1 )}, {<<"mime_type"/utf8>>, gleam@json:nullable( erlang:element(9, Animation), fun gleam@json:string/1 )}, {<<"file_size"/utf8>>, gleam@json:nullable( erlang:element(10, Animation), fun gleam@json:int/1 )}] ). -file("src/telega/model.gleam", 11743). -spec encode_audio(audio()) -> gleam@json:json(). encode_audio(Audio) -> json_object_filter_nulls( [{<<"file_id"/utf8>>, gleam@json:string(erlang:element(2, Audio))}, {<<"file_unique_id"/utf8>>, gleam@json:string(erlang:element(3, Audio))}, {<<"duration"/utf8>>, gleam@json:int(erlang:element(4, Audio))}, {<<"performer"/utf8>>, gleam@json:nullable( erlang:element(5, Audio), fun gleam@json:string/1 )}, {<<"title"/utf8>>, gleam@json:nullable( erlang:element(6, Audio), fun gleam@json:string/1 )}, {<<"file_name"/utf8>>, gleam@json:nullable( erlang:element(7, Audio), fun gleam@json:string/1 )}, {<<"mime_type"/utf8>>, gleam@json:nullable( erlang:element(8, Audio), fun gleam@json:string/1 )}, {<<"file_size"/utf8>>, gleam@json:nullable( erlang:element(9, Audio), fun gleam@json:int/1 )}, {<<"thumbnail"/utf8>>, gleam@json:nullable( erlang:element(10, Audio), fun encode_photo_size/1 )}] ). -file("src/telega/model.gleam", 11757). -spec encode_document(document()) -> gleam@json:json(). encode_document(Document) -> json_object_filter_nulls( [{<<"file_id"/utf8>>, gleam@json:string(erlang:element(2, Document))}, {<<"file_unique_id"/utf8>>, gleam@json:string(erlang:element(3, Document))}, {<<"thumbnail"/utf8>>, gleam@json:nullable( erlang:element(4, Document), fun encode_photo_size/1 )}, {<<"file_name"/utf8>>, gleam@json:nullable( erlang:element(5, Document), fun gleam@json:string/1 )}, {<<"mime_type"/utf8>>, gleam@json:nullable( erlang:element(6, Document), fun gleam@json:string/1 )}, {<<"file_size"/utf8>>, gleam@json:nullable( erlang:element(7, Document), fun gleam@json:int/1 )}] ). -file("src/telega/model.gleam", 11768). -spec encode_story(story()) -> gleam@json:json(). encode_story(Story) -> json_object_filter_nulls( [{<<"chat"/utf8>>, encode_chat(erlang:element(2, Story))}, {<<"id"/utf8>>, gleam@json:int(erlang:element(3, Story))}] ). -file("src/telega/model.gleam", 11775). -spec encode_video(video()) -> gleam@json:json(). encode_video(Video) -> json_object_filter_nulls( [{<<"file_id"/utf8>>, gleam@json:string(erlang:element(2, Video))}, {<<"file_unique_id"/utf8>>, gleam@json:string(erlang:element(3, Video))}, {<<"width"/utf8>>, gleam@json:int(erlang:element(4, Video))}, {<<"height"/utf8>>, gleam@json:int(erlang:element(5, Video))}, {<<"duration"/utf8>>, gleam@json:int(erlang:element(6, Video))}, {<<"thumbnail"/utf8>>, gleam@json:nullable( erlang:element(7, Video), fun encode_photo_size/1 )}, {<<"cover"/utf8>>, gleam@json:nullable( erlang:element(8, Video), fun(_capture) -> gleam@json:array(_capture, fun encode_photo_size/1) end )}, {<<"start_timestamp"/utf8>>, gleam@json:nullable( erlang:element(9, Video), fun gleam@json:int/1 )}, {<<"file_name"/utf8>>, gleam@json:nullable( erlang:element(10, Video), fun gleam@json:string/1 )}, {<<"mime_type"/utf8>>, gleam@json:nullable( erlang:element(11, Video), fun gleam@json:string/1 )}, {<<"file_size"/utf8>>, gleam@json:nullable( erlang:element(12, Video), fun gleam@json:int/1 )}] ). -file("src/telega/model.gleam", 11791). -spec encode_video_note(video_note()) -> gleam@json:json(). encode_video_note(Video_note) -> json_object_filter_nulls( [{<<"file_id"/utf8>>, gleam@json:string(erlang:element(2, Video_note))}, {<<"file_unique_id"/utf8>>, gleam@json:string(erlang:element(3, Video_note))}, {<<"length"/utf8>>, gleam@json:int(erlang:element(4, Video_note))}, {<<"duration"/utf8>>, gleam@json:int(erlang:element(5, Video_note))}, {<<"thumbnail"/utf8>>, gleam@json:nullable( erlang:element(6, Video_note), fun encode_photo_size/1 )}, {<<"file_size"/utf8>>, gleam@json:nullable( erlang:element(7, Video_note), fun gleam@json:int/1 )}] ). -file("src/telega/model.gleam", 11802). -spec encode_voice(voice()) -> gleam@json:json(). encode_voice(Voice) -> json_object_filter_nulls( [{<<"file_id"/utf8>>, gleam@json:string(erlang:element(2, Voice))}, {<<"file_unique_id"/utf8>>, gleam@json:string(erlang:element(3, Voice))}, {<<"duration"/utf8>>, gleam@json:int(erlang:element(4, Voice))}, {<<"mime_type"/utf8>>, gleam@json:nullable( erlang:element(5, Voice), fun gleam@json:string/1 )}, {<<"file_size"/utf8>>, gleam@json:nullable( erlang:element(6, Voice), fun gleam@json:int/1 )}] ). -file("src/telega/model.gleam", 11822). -spec encode_paid_media_preview(paid_media_preview()) -> gleam@json:json(). encode_paid_media_preview(Paid_media_preview) -> json_object_filter_nulls( [{<<"type"/utf8>>, gleam@json:string(erlang:element(2, Paid_media_preview))}, {<<"width"/utf8>>, gleam@json:nullable( erlang:element(3, Paid_media_preview), fun gleam@json:int/1 )}, {<<"height"/utf8>>, gleam@json:nullable( erlang:element(4, Paid_media_preview), fun gleam@json:int/1 )}, {<<"duration"/utf8>>, gleam@json:nullable( erlang:element(5, Paid_media_preview), fun gleam@json:int/1 )}] ). -file("src/telega/model.gleam", 11831). -spec encode_paid_media_photo(paid_media_photo()) -> gleam@json:json(). encode_paid_media_photo(Paid_media_photo) -> json_object_filter_nulls( [{<<"type"/utf8>>, gleam@json:string(erlang:element(2, Paid_media_photo))}, {<<"photo"/utf8>>, gleam@json:array( erlang:element(3, Paid_media_photo), fun encode_photo_size/1 )}] ). -file("src/telega/model.gleam", 11838). -spec encode_paid_media_video(paid_media_video()) -> gleam@json:json(). encode_paid_media_video(Paid_media_video) -> json_object_filter_nulls( [{<<"type"/utf8>>, gleam@json:string(erlang:element(2, Paid_media_video))}, {<<"video"/utf8>>, encode_video(erlang:element(3, Paid_media_video))}] ). -file("src/telega/model.gleam", 11845). -spec encode_contact(contact()) -> gleam@json:json(). encode_contact(Contact) -> json_object_filter_nulls( [{<<"phone_number"/utf8>>, gleam@json:string(erlang:element(2, Contact))}, {<<"first_name"/utf8>>, gleam@json:string(erlang:element(3, Contact))}, {<<"last_name"/utf8>>, gleam@json:nullable( erlang:element(4, Contact), fun gleam@json:string/1 )}, {<<"user_id"/utf8>>, gleam@json:nullable( erlang:element(5, Contact), fun gleam@json:int/1 )}, {<<"vcard"/utf8>>, gleam@json:nullable( erlang:element(6, Contact), fun gleam@json:string/1 )}] ). -file("src/telega/model.gleam", 11855). -spec encode_dice(dice()) -> gleam@json:json(). encode_dice(Dice) -> json_object_filter_nulls( [{<<"emoji"/utf8>>, gleam@json:string(erlang:element(2, Dice))}, {<<"value"/utf8>>, gleam@json:int(erlang:element(3, Dice))}] ). -file("src/telega/model.gleam", 11862). -spec encode_poll_option(poll_option()) -> gleam@json:json(). encode_poll_option(Poll_option) -> json_object_filter_nulls( [{<<"text"/utf8>>, gleam@json:string(erlang:element(2, Poll_option))}, {<<"text_entities"/utf8>>, gleam@json:nullable( erlang:element(3, Poll_option), fun(_capture) -> gleam@json:array(_capture, fun encode_message_entity/1) end )}, {<<"voter_count"/utf8>>, gleam@json:int(erlang:element(4, Poll_option))}] ). -file("src/telega/model.gleam", 11876). -spec encode_input_poll_option(input_poll_option()) -> gleam@json:json(). encode_input_poll_option(Input_poll_option) -> json_object_filter_nulls( [{<<"text"/utf8>>, gleam@json:string(erlang:element(2, Input_poll_option))}, {<<"text_parse_mode"/utf8>>, gleam@json:nullable( erlang:element(3, Input_poll_option), fun gleam@json:string/1 )}, {<<"text_entities"/utf8>>, gleam@json:nullable( erlang:element(4, Input_poll_option), fun(_capture) -> gleam@json:array(_capture, fun encode_message_entity/1) end )}] ). -file("src/telega/model.gleam", 11893). -spec encode_poll_answer(poll_answer()) -> gleam@json:json(). encode_poll_answer(Poll_answer) -> json_object_filter_nulls( [{<<"poll_id"/utf8>>, gleam@json:string(erlang:element(2, Poll_answer))}, {<<"voter_chat"/utf8>>, gleam@json:nullable( erlang:element(3, Poll_answer), fun encode_chat/1 )}, {<<"user"/utf8>>, gleam@json:nullable( erlang:element(4, Poll_answer), fun encode_user/1 )}, {<<"option_ids"/utf8>>, gleam@json:array( erlang:element(5, Poll_answer), fun gleam@json:int/1 )}] ). -file("src/telega/model.gleam", 11902). -spec encode_poll(poll()) -> gleam@json:json(). encode_poll(Poll) -> json_object_filter_nulls( [{<<"id"/utf8>>, gleam@json:string(erlang:element(2, Poll))}, {<<"question"/utf8>>, gleam@json:string(erlang:element(3, Poll))}, {<<"question_entities"/utf8>>, gleam@json:nullable( erlang:element(4, Poll), fun(_capture) -> gleam@json:array(_capture, fun encode_message_entity/1) end )}, {<<"options"/utf8>>, gleam@json:array( erlang:element(5, Poll), fun encode_poll_option/1 )}, {<<"total_voter_count"/utf8>>, gleam@json:int(erlang:element(6, Poll))}, {<<"is_closed"/utf8>>, gleam@json:bool(erlang:element(7, Poll))}, {<<"is_anonymous"/utf8>>, gleam@json:bool(erlang:element(8, Poll))}, {<<"type"/utf8>>, gleam@json:string(erlang:element(9, Poll))}, {<<"allows_multiple_answers"/utf8>>, gleam@json:bool(erlang:element(10, Poll))}, {<<"correct_option_id"/utf8>>, gleam@json:nullable( erlang:element(11, Poll), fun gleam@json:int/1 )}, {<<"explanation"/utf8>>, gleam@json:nullable( erlang:element(12, Poll), fun gleam@json:string/1 )}, {<<"explanation_entities"/utf8>>, gleam@json:nullable( erlang:element(13, Poll), fun(_capture@1) -> gleam@json:array( _capture@1, fun encode_message_entity/1 ) end )}, {<<"open_period"/utf8>>, gleam@json:nullable( erlang:element(14, Poll), fun gleam@json:int/1 )}, {<<"close_date"/utf8>>, gleam@json:nullable( erlang:element(15, Poll), fun gleam@json:int/1 )}] ). -file("src/telega/model.gleam", 11930). -spec encode_location(location()) -> gleam@json:json(). encode_location(Location) -> json_object_filter_nulls( [{<<"latitude"/utf8>>, gleam@json:float(erlang:element(2, Location))}, {<<"longitude"/utf8>>, gleam@json:float(erlang:element(3, Location))}, {<<"horizontal_accuracy"/utf8>>, gleam@json:nullable( erlang:element(4, Location), fun gleam@json:float/1 )}, {<<"live_period"/utf8>>, gleam@json:nullable( erlang:element(5, Location), fun gleam@json:int/1 )}, {<<"heading"/utf8>>, gleam@json:nullable( erlang:element(6, Location), fun gleam@json:int/1 )}, {<<"proximity_alert_radius"/utf8>>, gleam@json:nullable( erlang:element(7, Location), fun gleam@json:int/1 )}] ). -file("src/telega/model.gleam", 11947). -spec encode_venue(venue()) -> gleam@json:json(). encode_venue(Venue) -> json_object_filter_nulls( [{<<"location"/utf8>>, encode_location(erlang:element(2, Venue))}, {<<"title"/utf8>>, gleam@json:string(erlang:element(3, Venue))}, {<<"address"/utf8>>, gleam@json:string(erlang:element(4, Venue))}, {<<"foursquare_id"/utf8>>, gleam@json:nullable( erlang:element(5, Venue), fun gleam@json:string/1 )}, {<<"foursquare_type"/utf8>>, gleam@json:nullable( erlang:element(6, Venue), fun gleam@json:string/1 )}, {<<"google_place_id"/utf8>>, gleam@json:nullable( erlang:element(7, Venue), fun gleam@json:string/1 )}, {<<"google_place_type"/utf8>>, gleam@json:nullable( erlang:element(8, Venue), fun gleam@json:string/1 )}] ). -file("src/telega/model.gleam", 11959). -spec encode_web_app_data(web_app_data()) -> gleam@json:json(). encode_web_app_data(Web_app_data) -> json_object_filter_nulls( [{<<"data"/utf8>>, gleam@json:string(erlang:element(2, Web_app_data))}, {<<"button_text"/utf8>>, gleam@json:string(erlang:element(3, Web_app_data))}] ). -file("src/telega/model.gleam", 11966). -spec encode_proximity_alert_triggered(proximity_alert_triggered()) -> gleam@json:json(). encode_proximity_alert_triggered(Proximity_alert_triggered) -> json_object_filter_nulls( [{<<"traveler"/utf8>>, encode_user(erlang:element(2, Proximity_alert_triggered))}, {<<"watcher"/utf8>>, encode_user(erlang:element(3, Proximity_alert_triggered))}, {<<"distance"/utf8>>, gleam@json:int(erlang:element(4, Proximity_alert_triggered))}] ). -file("src/telega/model.gleam", 11976). -spec encode_message_auto_delete_timer_changed( message_auto_delete_timer_changed() ) -> gleam@json:json(). encode_message_auto_delete_timer_changed(Message_auto_delete_timer_changed) -> json_object_filter_nulls( [{<<"message_auto_delete_time"/utf8>>, gleam@json:int( erlang:element(2, Message_auto_delete_timer_changed) )}] ). -file("src/telega/model.gleam", 11987). -spec encode_chat_boost_added(chat_boost_added()) -> gleam@json:json(). encode_chat_boost_added(Chat_boost_added) -> json_object_filter_nulls( [{<<"boost_count"/utf8>>, gleam@json:int(erlang:element(2, Chat_boost_added))}] ). -file("src/telega/model.gleam", 11993). -spec encode_background_fill_solid(background_fill_solid()) -> gleam@json:json(). encode_background_fill_solid(Background_fill_solid) -> json_object_filter_nulls( [{<<"type"/utf8>>, gleam@json:string(erlang:element(2, Background_fill_solid))}, {<<"color"/utf8>>, gleam@json:int(erlang:element(3, Background_fill_solid))}] ). -file("src/telega/model.gleam", 12002). -spec encode_background_fill_gradient(background_fill_gradient()) -> gleam@json:json(). encode_background_fill_gradient(Background_fill_gradient) -> json_object_filter_nulls( [{<<"type"/utf8>>, gleam@json:string(erlang:element(2, Background_fill_gradient))}, {<<"top_color"/utf8>>, gleam@json:int(erlang:element(3, Background_fill_gradient))}, {<<"bottom_color"/utf8>>, gleam@json:int(erlang:element(4, Background_fill_gradient))}, {<<"rotation_angle"/utf8>>, gleam@json:int(erlang:element(5, Background_fill_gradient))}] ). -file("src/telega/model.gleam", 12013). -spec encode_background_fill_freeform_gradient( background_fill_freeform_gradient() ) -> gleam@json:json(). encode_background_fill_freeform_gradient(Background_fill_freeform_gradient) -> json_object_filter_nulls( [{<<"type"/utf8>>, gleam@json:string( erlang:element(2, Background_fill_freeform_gradient) )}, {<<"colors"/utf8>>, gleam@json:array( erlang:element(3, Background_fill_freeform_gradient), fun gleam@json:int/1 )}] ). -file("src/telega/model.gleam", 12035). -spec encode_background_type_wallpaper(background_type_wallpaper()) -> gleam@json:json(). encode_background_type_wallpaper(Background_type_wallpaper) -> json_object_filter_nulls( [{<<"type"/utf8>>, gleam@json:string(erlang:element(2, Background_type_wallpaper))}, {<<"document"/utf8>>, encode_document(erlang:element(3, Background_type_wallpaper))}, {<<"dark_theme_dimming"/utf8>>, gleam@json:int(erlang:element(4, Background_type_wallpaper))}, {<<"is_blurred"/utf8>>, gleam@json:nullable( erlang:element(5, Background_type_wallpaper), fun gleam@json:bool/1 )}, {<<"is_moving"/utf8>>, gleam@json:nullable( erlang:element(6, Background_type_wallpaper), fun gleam@json:bool/1 )}] ). -file("src/telega/model.gleam", 12072). -spec encode_background_type_chat_theme(background_type_chat_theme()) -> gleam@json:json(). encode_background_type_chat_theme(Background_type_chat_theme) -> json_object_filter_nulls( [{<<"type"/utf8>>, gleam@json:string(erlang:element(2, Background_type_chat_theme))}, {<<"theme_name"/utf8>>, gleam@json:string(erlang:element(3, Background_type_chat_theme))}] ). -file("src/telega/model.gleam", 12087). -spec encode_forum_topic_created(forum_topic_created()) -> gleam@json:json(). encode_forum_topic_created(Forum_topic_created) -> json_object_filter_nulls( [{<<"name"/utf8>>, gleam@json:string(erlang:element(2, Forum_topic_created))}, {<<"icon_color"/utf8>>, gleam@json:int(erlang:element(3, Forum_topic_created))}, {<<"icon_custom_emoji_id"/utf8>>, gleam@json:nullable( erlang:element(4, Forum_topic_created), fun gleam@json:string/1 )}] ). -file("src/telega/model.gleam", 12100). -spec encode_forum_topic_closed(forum_topic_closed()) -> gleam@json:json(). encode_forum_topic_closed(_) -> json_object_filter_nulls([]). -file("src/telega/model.gleam", 12104). -spec encode_forum_topic_edited(forum_topic_edited()) -> gleam@json:json(). encode_forum_topic_edited(Forum_topic_edited) -> json_object_filter_nulls( [{<<"name"/utf8>>, gleam@json:nullable( erlang:element(2, Forum_topic_edited), fun gleam@json:string/1 )}, {<<"icon_custom_emoji_id"/utf8>>, gleam@json:nullable( erlang:element(3, Forum_topic_edited), fun gleam@json:string/1 )}] ). -file("src/telega/model.gleam", 12114). -spec encode_forum_topic_reopened(forum_topic_reopened()) -> gleam@json:json(). encode_forum_topic_reopened(_) -> json_object_filter_nulls([]). -file("src/telega/model.gleam", 12120). -spec encode_general_forum_topic_hidden(general_forum_topic_hidden()) -> gleam@json:json(). encode_general_forum_topic_hidden(_) -> json_object_filter_nulls([]). -file("src/telega/model.gleam", 12126). -spec encode_general_forum_topic_unhidden(general_forum_topic_unhidden()) -> gleam@json:json(). encode_general_forum_topic_unhidden(_) -> json_object_filter_nulls([]). -file("src/telega/model.gleam", 12132). -spec encode_shared_user(shared_user()) -> gleam@json:json(). encode_shared_user(Shared_user) -> json_object_filter_nulls( [{<<"user_id"/utf8>>, gleam@json:int(erlang:element(2, Shared_user))}, {<<"first_name"/utf8>>, gleam@json:nullable( erlang:element(3, Shared_user), fun gleam@json:string/1 )}, {<<"last_name"/utf8>>, gleam@json:nullable( erlang:element(4, Shared_user), fun gleam@json:string/1 )}, {<<"username"/utf8>>, gleam@json:nullable( erlang:element(5, Shared_user), fun gleam@json:string/1 )}, {<<"photo"/utf8>>, gleam@json:nullable( erlang:element(6, Shared_user), fun(_capture) -> gleam@json:array(_capture, fun encode_photo_size/1) end )}] ). -file("src/telega/model.gleam", 12145). -spec encode_users_shared(users_shared()) -> gleam@json:json(). encode_users_shared(Users_shared) -> json_object_filter_nulls( [{<<"request_id"/utf8>>, gleam@json:int(erlang:element(2, Users_shared))}, {<<"users"/utf8>>, gleam@json:array( erlang:element(3, Users_shared), fun encode_shared_user/1 )}] ). -file("src/telega/model.gleam", 12152). -spec encode_chat_shared(chat_shared()) -> gleam@json:json(). encode_chat_shared(Chat_shared) -> json_object_filter_nulls( [{<<"request_id"/utf8>>, gleam@json:int(erlang:element(2, Chat_shared))}, {<<"chat_id"/utf8>>, gleam@json:int(erlang:element(3, Chat_shared))}, {<<"title"/utf8>>, gleam@json:nullable( erlang:element(4, Chat_shared), fun gleam@json:string/1 )}, {<<"username"/utf8>>, gleam@json:nullable( erlang:element(5, Chat_shared), fun gleam@json:string/1 )}, {<<"photo"/utf8>>, gleam@json:nullable( erlang:element(6, Chat_shared), fun(_capture) -> gleam@json:array(_capture, fun encode_photo_size/1) end )}] ). -file("src/telega/model.gleam", 12165). -spec encode_write_access_allowed(write_access_allowed()) -> gleam@json:json(). encode_write_access_allowed(Write_access_allowed) -> json_object_filter_nulls( [{<<"from_request"/utf8>>, gleam@json:nullable( erlang:element(2, Write_access_allowed), fun gleam@json:bool/1 )}, {<<"web_app_name"/utf8>>, gleam@json:nullable( erlang:element(3, Write_access_allowed), fun gleam@json:string/1 )}, {<<"from_attachment_menu"/utf8>>, gleam@json:nullable( erlang:element(4, Write_access_allowed), fun gleam@json:bool/1 )}] ). -file("src/telega/model.gleam", 12184). -spec encode_video_chat_scheduled(video_chat_scheduled()) -> gleam@json:json(). encode_video_chat_scheduled(Video_chat_scheduled) -> json_object_filter_nulls( [{<<"start_date"/utf8>>, gleam@json:int(erlang:element(2, Video_chat_scheduled))}] ). -file("src/telega/model.gleam", 12192). -spec encode_video_chat_started(video_chat_started()) -> gleam@json:json(). encode_video_chat_started(_) -> json_object_filter_nulls([]). -file("src/telega/model.gleam", 12196). -spec encode_video_chat_ended(video_chat_ended()) -> gleam@json:json(). encode_video_chat_ended(Video_chat_ended) -> json_object_filter_nulls( [{<<"duration"/utf8>>, gleam@json:int(erlang:element(2, Video_chat_ended))}] ). -file("src/telega/model.gleam", 12200). -spec encode_video_chat_participants_invited(video_chat_participants_invited()) -> gleam@json:json(). encode_video_chat_participants_invited(Video_chat_participants_invited) -> json_object_filter_nulls( [{<<"users"/utf8>>, gleam@json:array( erlang:element(2, Video_chat_participants_invited), fun encode_user/1 )}] ). -file("src/telega/model.gleam", 12211). -spec encode_giveaway_created(giveaway_created()) -> gleam@json:json(). encode_giveaway_created(Giveaway_created) -> json_object_filter_nulls( [{<<"prize_star_count"/utf8>>, gleam@json:nullable( erlang:element(2, Giveaway_created), fun gleam@json:int/1 )}] ). -file("src/telega/model.gleam", 12220). -spec encode_giveaway(giveaway()) -> gleam@json:json(). encode_giveaway(Giveaway) -> json_object_filter_nulls( [{<<"chats"/utf8>>, gleam@json:array(erlang:element(2, Giveaway), fun encode_chat/1)}, {<<"winners_selection_date"/utf8>>, gleam@json:int(erlang:element(3, Giveaway))}, {<<"winner_count"/utf8>>, gleam@json:int(erlang:element(4, Giveaway))}, {<<"only_new_members"/utf8>>, gleam@json:nullable( erlang:element(5, Giveaway), fun gleam@json:bool/1 )}, {<<"has_public_winners"/utf8>>, gleam@json:nullable( erlang:element(6, Giveaway), fun gleam@json:bool/1 )}, {<<"prize_description"/utf8>>, gleam@json:nullable( erlang:element(7, Giveaway), fun gleam@json:string/1 )}, {<<"country_codes"/utf8>>, gleam@json:nullable( erlang:element(8, Giveaway), fun(_capture) -> gleam@json:array(_capture, fun gleam@json:string/1) end )}, {<<"prize_star_count"/utf8>>, gleam@json:nullable( erlang:element(9, Giveaway), fun gleam@json:int/1 )}, {<<"premium_subscription_month_count"/utf8>>, gleam@json:nullable( erlang:element(10, Giveaway), fun gleam@json:int/1 )}] ). -file("src/telega/model.gleam", 12246). -spec encode_giveaway_winners(giveaway_winners()) -> gleam@json:json(). encode_giveaway_winners(Giveaway_winners) -> json_object_filter_nulls( [{<<"chat"/utf8>>, encode_chat(erlang:element(2, Giveaway_winners))}, {<<"giveaway_message_id"/utf8>>, gleam@json:int(erlang:element(3, Giveaway_winners))}, {<<"winners_selection_date"/utf8>>, gleam@json:int(erlang:element(4, Giveaway_winners))}, {<<"winner_count"/utf8>>, gleam@json:int(erlang:element(5, Giveaway_winners))}, {<<"winners"/utf8>>, gleam@json:array( erlang:element(6, Giveaway_winners), fun encode_user/1 )}, {<<"additional_chat_count"/utf8>>, gleam@json:nullable( erlang:element(7, Giveaway_winners), fun gleam@json:int/1 )}, {<<"prize_star_count"/utf8>>, gleam@json:nullable( erlang:element(8, Giveaway_winners), fun gleam@json:int/1 )}, {<<"premium_subscription_month_count"/utf8>>, gleam@json:nullable( erlang:element(9, Giveaway_winners), fun gleam@json:int/1 )}, {<<"unclaimed_prize_count"/utf8>>, gleam@json:nullable( erlang:element(10, Giveaway_winners), fun gleam@json:int/1 )}, {<<"only_new_members"/utf8>>, gleam@json:nullable( erlang:element(11, Giveaway_winners), fun gleam@json:bool/1 )}, {<<"was_refunded"/utf8>>, gleam@json:nullable( erlang:element(12, Giveaway_winners), fun gleam@json:bool/1 )}, {<<"prize_description"/utf8>>, gleam@json:nullable( erlang:element(13, Giveaway_winners), fun gleam@json:string/1 )}] ). -file("src/telega/model.gleam", 12302). -spec encode_link_preview_options(link_preview_options()) -> gleam@json:json(). encode_link_preview_options(Link_preview_options) -> json_object_filter_nulls( [{<<"is_disabled"/utf8>>, gleam@json:nullable( erlang:element(2, Link_preview_options), fun gleam@json:bool/1 )}, {<<"url"/utf8>>, gleam@json:nullable( erlang:element(3, Link_preview_options), fun gleam@json:string/1 )}, {<<"prefer_small_media"/utf8>>, gleam@json:nullable( erlang:element(4, Link_preview_options), fun gleam@json:bool/1 )}, {<<"prefer_large_media"/utf8>>, gleam@json:nullable( erlang:element(5, Link_preview_options), fun gleam@json:bool/1 )}, {<<"show_above_text"/utf8>>, gleam@json:nullable( erlang:element(6, Link_preview_options), fun gleam@json:bool/1 )}] ). -file("src/telega/model.gleam", 12323). -spec encode_user_profile_photos(user_profile_photos()) -> gleam@json:json(). encode_user_profile_photos(User_profile_photos) -> json_object_filter_nulls( [{<<"total_count"/utf8>>, gleam@json:int(erlang:element(2, User_profile_photos))}, {<<"photos"/utf8>>, (fun(Outer_list) -> gleam@json:array( Outer_list, fun(Inner_list) -> gleam@json:array( Inner_list, fun encode_photo_size/1 ) end ) end)(erlang:element(3, User_profile_photos))}] ). -file("src/telega/model.gleam", 12339). -spec encode_file(file()) -> gleam@json:json(). encode_file(File) -> json_object_filter_nulls( [{<<"file_id"/utf8>>, gleam@json:string(erlang:element(2, File))}, {<<"file_unique_id"/utf8>>, gleam@json:string(erlang:element(3, File))}, {<<"file_size"/utf8>>, gleam@json:nullable( erlang:element(4, File), fun gleam@json:int/1 )}, {<<"file_path"/utf8>>, gleam@json:nullable( erlang:element(5, File), fun gleam@json:string/1 )}] ). -file("src/telega/model.gleam", 12348). -spec encode_web_app_info(web_app_info()) -> gleam@json:json(). encode_web_app_info(Web_app_info) -> json_object_filter_nulls( [{<<"url"/utf8>>, gleam@json:string(erlang:element(2, Web_app_info))}] ). -file("src/telega/model.gleam", 12420). -spec encode_keyboard_button_request_users(keyboard_button_request_users()) -> gleam@json:json(). encode_keyboard_button_request_users(Keyboard_button_request_users) -> json_object_filter_nulls( [{<<"request_id"/utf8>>, gleam@json:int(erlang:element(2, Keyboard_button_request_users))}, {<<"user_is_bot"/utf8>>, gleam@json:nullable( erlang:element(3, Keyboard_button_request_users), fun gleam@json:bool/1 )}, {<<"user_is_premium"/utf8>>, gleam@json:nullable( erlang:element(4, Keyboard_button_request_users), fun gleam@json:bool/1 )}, {<<"max_quantity"/utf8>>, gleam@json:nullable( erlang:element(5, Keyboard_button_request_users), fun gleam@json:int/1 )}, {<<"request_name"/utf8>>, gleam@json:nullable( erlang:element(6, Keyboard_button_request_users), fun gleam@json:bool/1 )}, {<<"request_username"/utf8>>, gleam@json:nullable( erlang:element(7, Keyboard_button_request_users), fun gleam@json:bool/1 )}, {<<"request_photo"/utf8>>, gleam@json:nullable( erlang:element(8, Keyboard_button_request_users), fun gleam@json:bool/1 )}] ). -file("src/telega/model.gleam", 12506). -spec encode_keyboard_button_poll_type(keyboard_button_poll_type()) -> gleam@json:json(). encode_keyboard_button_poll_type(Keyboard_button_poll_type) -> json_object_filter_nulls( [{<<"type"/utf8>>, gleam@json:nullable( erlang:element(2, Keyboard_button_poll_type), fun gleam@json:string/1 )}] ). -file("src/telega/model.gleam", 12514). -spec encode_reply_keyboard_remove(reply_keyboard_remove()) -> gleam@json:json(). encode_reply_keyboard_remove(Reply_keyboard_remove) -> json_object_filter_nulls( [{<<"remove_keyboard"/utf8>>, gleam@json:bool(erlang:element(2, Reply_keyboard_remove))}, {<<"selective"/utf8>>, gleam@json:nullable( erlang:element(3, Reply_keyboard_remove), fun gleam@json:bool/1 )}] ). -file("src/telega/model.gleam", 12586). -spec encode_login_url(login_url()) -> gleam@json:json(). encode_login_url(Login_url) -> json_object_filter_nulls( [{<<"url"/utf8>>, gleam@json:string(erlang:element(2, Login_url))}, {<<"forward_text"/utf8>>, gleam@json:nullable( erlang:element(3, Login_url), fun gleam@json:string/1 )}, {<<"bot_username"/utf8>>, gleam@json:nullable( erlang:element(4, Login_url), fun gleam@json:string/1 )}, {<<"request_write_access"/utf8>>, gleam@json:nullable( erlang:element(5, Login_url), fun gleam@json:bool/1 )}] ). -file("src/telega/model.gleam", 12598). -spec encode_switch_inline_query_chosen_chat(switch_inline_query_chosen_chat()) -> gleam@json:json(). encode_switch_inline_query_chosen_chat(Switch_inline_query_chosen_chat) -> json_object_filter_nulls( [{<<"query"/utf8>>, gleam@json:nullable( erlang:element(2, Switch_inline_query_chosen_chat), fun gleam@json:string/1 )}, {<<"allow_user_chats"/utf8>>, gleam@json:nullable( erlang:element(3, Switch_inline_query_chosen_chat), fun gleam@json:bool/1 )}, {<<"allow_bot_chats"/utf8>>, gleam@json:nullable( erlang:element(4, Switch_inline_query_chosen_chat), fun gleam@json:bool/1 )}, {<<"allow_group_chats"/utf8>>, gleam@json:nullable( erlang:element(5, Switch_inline_query_chosen_chat), fun gleam@json:bool/1 )}, {<<"allow_channel_chats"/utf8>>, gleam@json:nullable( erlang:element(6, Switch_inline_query_chosen_chat), fun gleam@json:bool/1 )}] ). -file("src/telega/model.gleam", 12631). -spec encode_copy_text_button(copy_text_button()) -> gleam@json:json(). encode_copy_text_button(Copy_text_button) -> json_object_filter_nulls( [{<<"text"/utf8>>, gleam@json:string(erlang:element(2, Copy_text_button))}] ). -file("src/telega/model.gleam", 12656). -spec encode_force_reply(force_reply()) -> gleam@json:json(). encode_force_reply(Force_reply) -> json_object_filter_nulls( [{<<"force_reply"/utf8>>, gleam@json:bool(erlang:element(2, Force_reply))}, {<<"input_field_placeholder"/utf8>>, gleam@json:nullable( erlang:element(3, Force_reply), fun gleam@json:string/1 )}, {<<"selective"/utf8>>, gleam@json:nullable( erlang:element(4, Force_reply), fun gleam@json:bool/1 )}] ). -file("src/telega/model.gleam", 12667). -spec encode_chat_photo(chat_photo()) -> gleam@json:json(). encode_chat_photo(Chat_photo) -> json_object_filter_nulls( [{<<"small_file_id"/utf8>>, gleam@json:string(erlang:element(2, Chat_photo))}, {<<"small_file_unique_id"/utf8>>, gleam@json:string(erlang:element(3, Chat_photo))}, {<<"big_file_id"/utf8>>, gleam@json:string(erlang:element(4, Chat_photo))}, {<<"big_file_unique_id"/utf8>>, gleam@json:string(erlang:element(5, Chat_photo))}] ). -file("src/telega/model.gleam", 12676). -spec encode_chat_invite_link(chat_invite_link()) -> gleam@json:json(). encode_chat_invite_link(Chat_invite_link) -> json_object_filter_nulls( [{<<"invite_link"/utf8>>, gleam@json:string(erlang:element(2, Chat_invite_link))}, {<<"creator"/utf8>>, encode_user(erlang:element(3, Chat_invite_link))}, {<<"creates_join_request"/utf8>>, gleam@json:bool(erlang:element(4, Chat_invite_link))}, {<<"is_primary"/utf8>>, gleam@json:bool(erlang:element(5, Chat_invite_link))}, {<<"is_revoked"/utf8>>, gleam@json:bool(erlang:element(6, Chat_invite_link))}, {<<"name"/utf8>>, gleam@json:nullable( erlang:element(7, Chat_invite_link), fun gleam@json:string/1 )}, {<<"expire_date"/utf8>>, gleam@json:nullable( erlang:element(8, Chat_invite_link), fun gleam@json:int/1 )}, {<<"member_limit"/utf8>>, gleam@json:nullable( erlang:element(9, Chat_invite_link), fun gleam@json:int/1 )}, {<<"pending_join_request_count"/utf8>>, gleam@json:nullable( erlang:element(10, Chat_invite_link), fun gleam@json:int/1 )}, {<<"subscription_period"/utf8>>, gleam@json:nullable( erlang:element(11, Chat_invite_link), fun gleam@json:int/1 )}, {<<"subscription_price"/utf8>>, gleam@json:nullable( erlang:element(12, Chat_invite_link), fun gleam@json:int/1 )}] ). -file("src/telega/model.gleam", 12701). -spec encode_chat_administrator_rights(chat_administrator_rights()) -> gleam@json:json(). encode_chat_administrator_rights(Chat_administrator_rights) -> json_object_filter_nulls( [{<<"is_anonymous"/utf8>>, gleam@json:bool(erlang:element(2, Chat_administrator_rights))}, {<<"can_manage_chat"/utf8>>, gleam@json:bool(erlang:element(3, Chat_administrator_rights))}, {<<"can_delete_messages"/utf8>>, gleam@json:bool(erlang:element(4, Chat_administrator_rights))}, {<<"can_manage_video_chats"/utf8>>, gleam@json:bool(erlang:element(5, Chat_administrator_rights))}, {<<"can_restrict_members"/utf8>>, gleam@json:bool(erlang:element(6, Chat_administrator_rights))}, {<<"can_promote_members"/utf8>>, gleam@json:bool(erlang:element(7, Chat_administrator_rights))}, {<<"can_change_info"/utf8>>, gleam@json:bool(erlang:element(8, Chat_administrator_rights))}, {<<"can_invite_users"/utf8>>, gleam@json:bool(erlang:element(9, Chat_administrator_rights))}, {<<"can_post_stories"/utf8>>, gleam@json:bool(erlang:element(10, Chat_administrator_rights))}, {<<"can_edit_stories"/utf8>>, gleam@json:bool(erlang:element(11, Chat_administrator_rights))}, {<<"can_delete_stories"/utf8>>, gleam@json:bool(erlang:element(12, Chat_administrator_rights))}, {<<"can_post_messages"/utf8>>, gleam@json:nullable( erlang:element(13, Chat_administrator_rights), fun gleam@json:bool/1 )}, {<<"can_edit_messages"/utf8>>, gleam@json:nullable( erlang:element(14, Chat_administrator_rights), fun gleam@json:bool/1 )}, {<<"can_pin_messages"/utf8>>, gleam@json:nullable( erlang:element(15, Chat_administrator_rights), fun gleam@json:bool/1 )}, {<<"can_manage_topics"/utf8>>, gleam@json:nullable( erlang:element(16, Chat_administrator_rights), fun gleam@json:bool/1 )}] ). -file("src/telega/model.gleam", 12452). -spec encode_keyboard_button_request_chat(keyboard_button_request_chat()) -> gleam@json:json(). encode_keyboard_button_request_chat(Keyboard_button_request_chat) -> json_object_filter_nulls( [{<<"request_id"/utf8>>, gleam@json:int(erlang:element(2, Keyboard_button_request_chat))}, {<<"chat_is_channel"/utf8>>, gleam@json:bool(erlang:element(3, Keyboard_button_request_chat))}, {<<"chat_is_forum"/utf8>>, gleam@json:nullable( erlang:element(4, Keyboard_button_request_chat), fun gleam@json:bool/1 )}, {<<"chat_has_username"/utf8>>, gleam@json:nullable( erlang:element(5, Keyboard_button_request_chat), fun gleam@json:bool/1 )}, {<<"chat_is_created"/utf8>>, gleam@json:nullable( erlang:element(6, Keyboard_button_request_chat), fun gleam@json:bool/1 )}, {<<"user_administrator_rights"/utf8>>, gleam@json:nullable( erlang:element(7, Keyboard_button_request_chat), fun encode_chat_administrator_rights/1 )}, {<<"bot_administrator_rights"/utf8>>, gleam@json:nullable( erlang:element(8, Keyboard_button_request_chat), fun encode_chat_administrator_rights/1 )}, {<<"bot_is_member"/utf8>>, gleam@json:nullable( erlang:element(9, Keyboard_button_request_chat), fun gleam@json:bool/1 )}, {<<"request_title"/utf8>>, gleam@json:nullable( erlang:element(10, Keyboard_button_request_chat), fun gleam@json:bool/1 )}, {<<"request_username"/utf8>>, gleam@json:nullable( erlang:element(11, Keyboard_button_request_chat), fun gleam@json:bool/1 )}, {<<"request_photo"/utf8>>, gleam@json:nullable( erlang:element(12, Keyboard_button_request_chat), fun gleam@json:bool/1 )}] ). -file("src/telega/model.gleam", 12384). -spec encode_keyboard_button(keyboard_button()) -> gleam@json:json(). encode_keyboard_button(Keyboard_button) -> json_object_filter_nulls( [{<<"text"/utf8>>, gleam@json:string(erlang:element(2, Keyboard_button))}, {<<"request_users"/utf8>>, gleam@json:nullable( erlang:element(3, Keyboard_button), fun encode_keyboard_button_request_users/1 )}, {<<"request_chat"/utf8>>, gleam@json:nullable( erlang:element(4, Keyboard_button), fun encode_keyboard_button_request_chat/1 )}, {<<"request_contact"/utf8>>, gleam@json:nullable( erlang:element(5, Keyboard_button), fun gleam@json:bool/1 )}, {<<"request_location"/utf8>>, gleam@json:nullable( erlang:element(6, Keyboard_button), fun gleam@json:bool/1 )}, {<<"request_poll"/utf8>>, gleam@json:nullable( erlang:element(7, Keyboard_button), fun encode_keyboard_button_poll_type/1 )}, {<<"web_app"/utf8>>, gleam@json:nullable( erlang:element(8, Keyboard_button), fun encode_web_app_info/1 )}] ). -file("src/telega/model.gleam", 12352). -spec encode_reply_keyboard_markup(reply_keyboard_markup()) -> gleam@json:json(). encode_reply_keyboard_markup(Reply_keyboard_markup) -> json_object_filter_nulls( [{<<"keyboard"/utf8>>, (fun(Outer_list) -> gleam@json:array( Outer_list, fun(Inner_list) -> gleam@json:array( Inner_list, fun encode_keyboard_button/1 ) end ) end)(erlang:element(2, Reply_keyboard_markup))}, {<<"is_persistent"/utf8>>, gleam@json:nullable( erlang:element(3, Reply_keyboard_markup), fun gleam@json:bool/1 )}, {<<"resize_keyboard"/utf8>>, gleam@json:nullable( erlang:element(4, Reply_keyboard_markup), fun gleam@json:bool/1 )}, {<<"one_time_keyboard"/utf8>>, gleam@json:nullable( erlang:element(5, Reply_keyboard_markup), fun gleam@json:bool/1 )}, {<<"input_field_placeholder"/utf8>>, gleam@json:nullable( erlang:element(6, Reply_keyboard_markup), fun gleam@json:string/1 )}, {<<"selective"/utf8>>, gleam@json:nullable( erlang:element(7, Reply_keyboard_markup), fun gleam@json:bool/1 )}] ). -file("src/telega/model.gleam", 12780). -spec encode_chat_member_owner(chat_member_owner()) -> gleam@json:json(). encode_chat_member_owner(Chat_member_owner) -> json_object_filter_nulls( [{<<"status"/utf8>>, gleam@json:string(erlang:element(2, Chat_member_owner))}, {<<"user"/utf8>>, encode_user(erlang:element(3, Chat_member_owner))}, {<<"is_anonymous"/utf8>>, gleam@json:bool(erlang:element(4, Chat_member_owner))}, {<<"custom_title"/utf8>>, gleam@json:nullable( erlang:element(5, Chat_member_owner), fun gleam@json:string/1 )}] ). -file("src/telega/model.gleam", 12792). -spec encode_chat_member_administrator(chat_member_administrator()) -> gleam@json:json(). encode_chat_member_administrator(Chat_member_administrator) -> json_object_filter_nulls( [{<<"status"/utf8>>, gleam@json:string(erlang:element(2, Chat_member_administrator))}, {<<"user"/utf8>>, encode_user(erlang:element(3, Chat_member_administrator))}, {<<"can_be_edited"/utf8>>, gleam@json:bool(erlang:element(4, Chat_member_administrator))}, {<<"is_anonymous"/utf8>>, gleam@json:bool(erlang:element(5, Chat_member_administrator))}, {<<"can_manage_chat"/utf8>>, gleam@json:bool(erlang:element(6, Chat_member_administrator))}, {<<"can_delete_messages"/utf8>>, gleam@json:bool(erlang:element(7, Chat_member_administrator))}, {<<"can_manage_video_chats"/utf8>>, gleam@json:bool(erlang:element(8, Chat_member_administrator))}, {<<"can_restrict_members"/utf8>>, gleam@json:bool(erlang:element(9, Chat_member_administrator))}, {<<"can_promote_members"/utf8>>, gleam@json:bool(erlang:element(10, Chat_member_administrator))}, {<<"can_change_info"/utf8>>, gleam@json:bool(erlang:element(11, Chat_member_administrator))}, {<<"can_invite_users"/utf8>>, gleam@json:bool(erlang:element(12, Chat_member_administrator))}, {<<"can_post_stories"/utf8>>, gleam@json:bool(erlang:element(13, Chat_member_administrator))}, {<<"can_edit_stories"/utf8>>, gleam@json:bool(erlang:element(14, Chat_member_administrator))}, {<<"can_delete_stories"/utf8>>, gleam@json:bool(erlang:element(15, Chat_member_administrator))}, {<<"can_post_messages"/utf8>>, gleam@json:nullable( erlang:element(16, Chat_member_administrator), fun gleam@json:bool/1 )}, {<<"can_edit_messages"/utf8>>, gleam@json:nullable( erlang:element(17, Chat_member_administrator), fun gleam@json:bool/1 )}, {<<"can_pin_messages"/utf8>>, gleam@json:nullable( erlang:element(18, Chat_member_administrator), fun gleam@json:bool/1 )}, {<<"can_manage_topics"/utf8>>, gleam@json:nullable( erlang:element(19, Chat_member_administrator), fun gleam@json:bool/1 )}, {<<"custom_title"/utf8>>, gleam@json:nullable( erlang:element(20, Chat_member_administrator), fun gleam@json:string/1 )}] ). -file("src/telega/model.gleam", 12848). -spec encode_chat_member_member(chat_member_member()) -> gleam@json:json(). encode_chat_member_member(Chat_member_member) -> json_object_filter_nulls( [{<<"status"/utf8>>, gleam@json:string(erlang:element(2, Chat_member_member))}, {<<"user"/utf8>>, encode_user(erlang:element(3, Chat_member_member))}, {<<"until_date"/utf8>>, gleam@json:nullable( erlang:element(4, Chat_member_member), fun gleam@json:int/1 )}] ). -file("src/telega/model.gleam", 12856). -spec encode_chat_member_restricted(chat_member_restricted()) -> gleam@json:json(). encode_chat_member_restricted(Chat_member_restricted) -> json_object_filter_nulls( [{<<"status"/utf8>>, gleam@json:string(erlang:element(2, Chat_member_restricted))}, {<<"user"/utf8>>, encode_user(erlang:element(3, Chat_member_restricted))}, {<<"is_member"/utf8>>, gleam@json:bool(erlang:element(4, Chat_member_restricted))}, {<<"can_send_messages"/utf8>>, gleam@json:bool(erlang:element(5, Chat_member_restricted))}, {<<"can_send_audios"/utf8>>, gleam@json:bool(erlang:element(6, Chat_member_restricted))}, {<<"can_send_documents"/utf8>>, gleam@json:bool(erlang:element(7, Chat_member_restricted))}, {<<"can_send_photos"/utf8>>, gleam@json:bool(erlang:element(8, Chat_member_restricted))}, {<<"can_send_videos"/utf8>>, gleam@json:bool(erlang:element(9, Chat_member_restricted))}, {<<"can_send_video_notes"/utf8>>, gleam@json:bool(erlang:element(10, Chat_member_restricted))}, {<<"can_send_voice_notes"/utf8>>, gleam@json:bool(erlang:element(11, Chat_member_restricted))}, {<<"can_send_polls"/utf8>>, gleam@json:bool(erlang:element(12, Chat_member_restricted))}, {<<"can_send_other_messages"/utf8>>, gleam@json:bool(erlang:element(13, Chat_member_restricted))}, {<<"can_add_web_page_previews"/utf8>>, gleam@json:bool(erlang:element(14, Chat_member_restricted))}, {<<"can_change_info"/utf8>>, gleam@json:bool(erlang:element(15, Chat_member_restricted))}, {<<"can_invite_users"/utf8>>, gleam@json:bool(erlang:element(16, Chat_member_restricted))}, {<<"can_pin_messages"/utf8>>, gleam@json:bool(erlang:element(17, Chat_member_restricted))}, {<<"can_manage_topics"/utf8>>, gleam@json:bool(erlang:element(18, Chat_member_restricted))}, {<<"until_date"/utf8>>, gleam@json:int(erlang:element(19, Chat_member_restricted))}] ). -file("src/telega/model.gleam", 12896). -spec encode_chat_member_left(chat_member_left()) -> gleam@json:json(). encode_chat_member_left(Chat_member_left) -> json_object_filter_nulls( [{<<"status"/utf8>>, gleam@json:string(erlang:element(2, Chat_member_left))}, {<<"user"/utf8>>, encode_user(erlang:element(3, Chat_member_left))}] ). -file("src/telega/model.gleam", 12903). -spec encode_chat_member_banned(chat_member_banned()) -> gleam@json:json(). encode_chat_member_banned(Chat_member_banned) -> json_object_filter_nulls( [{<<"status"/utf8>>, gleam@json:string(erlang:element(2, Chat_member_banned))}, {<<"user"/utf8>>, encode_user(erlang:element(3, Chat_member_banned))}, {<<"until_date"/utf8>>, gleam@json:int(erlang:element(4, Chat_member_banned))}] ). -file("src/telega/model.gleam", 12911). -spec encode_chat_join_request(chat_join_request()) -> gleam@json:json(). encode_chat_join_request(Chat_join_request) -> json_object_filter_nulls( [{<<"chat"/utf8>>, encode_chat(erlang:element(2, Chat_join_request))}, {<<"from"/utf8>>, encode_user(erlang:element(3, Chat_join_request))}, {<<"user_chat_id"/utf8>>, gleam@json:int(erlang:element(4, Chat_join_request))}, {<<"date"/utf8>>, gleam@json:int(erlang:element(5, Chat_join_request))}, {<<"bio"/utf8>>, gleam@json:nullable( erlang:element(6, Chat_join_request), fun gleam@json:string/1 )}, {<<"invite_link"/utf8>>, gleam@json:nullable( erlang:element(7, Chat_join_request), fun encode_chat_invite_link/1 )}] ). -file("src/telega/model.gleam", 12925). -spec encode_chat_permissions(chat_permissions()) -> gleam@json:json(). encode_chat_permissions(Chat_permissions) -> json_object_filter_nulls( [{<<"can_send_messages"/utf8>>, gleam@json:nullable( erlang:element(2, Chat_permissions), fun gleam@json:bool/1 )}, {<<"can_send_audios"/utf8>>, gleam@json:nullable( erlang:element(3, Chat_permissions), fun gleam@json:bool/1 )}, {<<"can_send_documents"/utf8>>, gleam@json:nullable( erlang:element(4, Chat_permissions), fun gleam@json:bool/1 )}, {<<"can_send_photos"/utf8>>, gleam@json:nullable( erlang:element(5, Chat_permissions), fun gleam@json:bool/1 )}, {<<"can_send_videos"/utf8>>, gleam@json:nullable( erlang:element(6, Chat_permissions), fun gleam@json:bool/1 )}, {<<"can_send_video_notes"/utf8>>, gleam@json:nullable( erlang:element(7, Chat_permissions), fun gleam@json:bool/1 )}, {<<"can_send_voice_notes"/utf8>>, gleam@json:nullable( erlang:element(8, Chat_permissions), fun gleam@json:bool/1 )}, {<<"can_send_polls"/utf8>>, gleam@json:nullable( erlang:element(9, Chat_permissions), fun gleam@json:bool/1 )}, {<<"can_send_other_messages"/utf8>>, gleam@json:nullable( erlang:element(10, Chat_permissions), fun gleam@json:bool/1 )}, {<<"can_add_web_page_previews"/utf8>>, gleam@json:nullable( erlang:element(11, Chat_permissions), fun gleam@json:bool/1 )}, {<<"can_change_info"/utf8>>, gleam@json:nullable( erlang:element(12, Chat_permissions), fun gleam@json:bool/1 )}, {<<"can_invite_users"/utf8>>, gleam@json:nullable( erlang:element(13, Chat_permissions), fun gleam@json:bool/1 )}, {<<"can_pin_messages"/utf8>>, gleam@json:nullable( erlang:element(14, Chat_permissions), fun gleam@json:bool/1 )}, {<<"can_manage_topics"/utf8>>, gleam@json:nullable( erlang:element(15, Chat_permissions), fun gleam@json:bool/1 )}] ). -file("src/telega/model.gleam", 12986). -spec encode_birthdate(birthdate()) -> gleam@json:json(). encode_birthdate(Birthdate) -> json_object_filter_nulls( [{<<"day"/utf8>>, gleam@json:int(erlang:element(2, Birthdate))}, {<<"month"/utf8>>, gleam@json:int(erlang:element(3, Birthdate))}, {<<"year"/utf8>>, gleam@json:nullable( erlang:element(4, Birthdate), fun gleam@json:int/1 )}] ). -file("src/telega/model.gleam", 13002). -spec encode_business_location(business_location()) -> gleam@json:json(). encode_business_location(Business_location) -> json_object_filter_nulls( [{<<"address"/utf8>>, gleam@json:string(erlang:element(2, Business_location))}, {<<"location"/utf8>>, gleam@json:nullable( erlang:element(3, Business_location), fun encode_location/1 )}] ). -file("src/telega/model.gleam", 13009). -spec encode_business_opening_hours_interval(business_opening_hours_interval()) -> gleam@json:json(). encode_business_opening_hours_interval(Business_opening_hours_interval) -> json_object_filter_nulls( [{<<"opening_minute"/utf8>>, gleam@json:int( erlang:element(2, Business_opening_hours_interval) )}, {<<"closing_minute"/utf8>>, gleam@json:int( erlang:element(3, Business_opening_hours_interval) )}] ). -file("src/telega/model.gleam", 13024). -spec encode_business_opening_hours(business_opening_hours()) -> gleam@json:json(). encode_business_opening_hours(Business_opening_hours) -> json_object_filter_nulls( [{<<"time_zone_name"/utf8>>, gleam@json:string(erlang:element(2, Business_opening_hours))}, {<<"opening_hours"/utf8>>, gleam@json:array( erlang:element(3, Business_opening_hours), fun encode_business_opening_hours_interval/1 )}] ). -file("src/telega/model.gleam", 13038). -spec encode_story_area_position(story_area_position()) -> gleam@json:json(). encode_story_area_position(Story_area_position) -> json_object_filter_nulls( [{<<"x_percentage"/utf8>>, gleam@json:float(erlang:element(2, Story_area_position))}, {<<"y_percentage"/utf8>>, gleam@json:float(erlang:element(3, Story_area_position))}, {<<"width_percentage"/utf8>>, gleam@json:float(erlang:element(4, Story_area_position))}, {<<"height_percentage"/utf8>>, gleam@json:float(erlang:element(5, Story_area_position))}, {<<"rotation_angle"/utf8>>, gleam@json:float(erlang:element(6, Story_area_position))}, {<<"corner_radius_percentage"/utf8>>, gleam@json:float(erlang:element(7, Story_area_position))}] ). -file("src/telega/model.gleam", 13054). -spec encode_location_address(location_address()) -> gleam@json:json(). encode_location_address(Location_address) -> json_object_filter_nulls( [{<<"country_code"/utf8>>, gleam@json:string(erlang:element(2, Location_address))}, {<<"state"/utf8>>, gleam@json:nullable( erlang:element(3, Location_address), fun gleam@json:string/1 )}, {<<"city"/utf8>>, gleam@json:nullable( erlang:element(4, Location_address), fun gleam@json:string/1 )}, {<<"street"/utf8>>, gleam@json:nullable( erlang:element(5, Location_address), fun gleam@json:string/1 )}] ). -file("src/telega/model.gleam", 13063). -spec encode_story_area_type(story_area_type()) -> gleam@json:json(). encode_story_area_type(Story_area_type) -> json_object_filter_nulls( [{<<"type"/utf8>>, gleam@json:string(erlang:element(2, Story_area_type))}, {<<"latitude"/utf8>>, gleam@json:float(erlang:element(3, Story_area_type))}, {<<"longitude"/utf8>>, gleam@json:float(erlang:element(4, Story_area_type))}, {<<"address"/utf8>>, gleam@json:nullable( erlang:element(5, Story_area_type), fun encode_location_address/1 )}] ). -file("src/telega/model.gleam", 13075). -spec encode_story_area_type_location(story_area_type_location()) -> gleam@json:json(). encode_story_area_type_location(Story_area_type_location) -> json_object_filter_nulls( [{<<"type"/utf8>>, gleam@json:string(erlang:element(2, Story_area_type_location))}, {<<"latitude"/utf8>>, gleam@json:float(erlang:element(3, Story_area_type_location))}, {<<"longitude"/utf8>>, gleam@json:float(erlang:element(4, Story_area_type_location))}, {<<"address"/utf8>>, gleam@json:nullable( erlang:element(5, Story_area_type_location), fun encode_location_address/1 )}] ). -file("src/telega/model.gleam", 13109). -spec encode_story_area_type_link(story_area_type_link()) -> gleam@json:json(). encode_story_area_type_link(Story_area_type_link) -> json_object_filter_nulls( [{<<"type"/utf8>>, gleam@json:string(erlang:element(2, Story_area_type_link))}, {<<"url"/utf8>>, gleam@json:string(erlang:element(3, Story_area_type_link))}] ). -file("src/telega/model.gleam", 13118). -spec encode_story_area_type_weather(story_area_type_weather()) -> gleam@json:json(). encode_story_area_type_weather(Story_area_type_weather) -> json_object_filter_nulls( [{<<"type"/utf8>>, gleam@json:string(erlang:element(2, Story_area_type_weather))}, {<<"temperature"/utf8>>, gleam@json:float(erlang:element(3, Story_area_type_weather))}, {<<"emoji"/utf8>>, gleam@json:string(erlang:element(4, Story_area_type_weather))}, {<<"background_color"/utf8>>, gleam@json:int(erlang:element(5, Story_area_type_weather))}] ). -file("src/telega/model.gleam", 13129). -spec encode_story_area_type_unique_gift(story_area_type_unique_gift()) -> gleam@json:json(). encode_story_area_type_unique_gift(Story_area_type_unique_gift) -> json_object_filter_nulls( [{<<"type"/utf8>>, gleam@json:string( erlang:element(2, Story_area_type_unique_gift) )}, {<<"name"/utf8>>, gleam@json:string( erlang:element(3, Story_area_type_unique_gift) )}] ). -file("src/telega/model.gleam", 13138). -spec encode_story_area(story_area()) -> gleam@json:json(). encode_story_area(Story_area) -> json_object_filter_nulls( [{<<"position"/utf8>>, encode_story_area_position(erlang:element(2, Story_area))}, {<<"type"/utf8>>, encode_story_area_type(erlang:element(3, Story_area))}] ). -file("src/telega/model.gleam", 13145). -spec encode_chat_location(chat_location()) -> gleam@json:json(). encode_chat_location(Chat_location) -> json_object_filter_nulls( [{<<"location"/utf8>>, encode_location(erlang:element(2, Chat_location))}, {<<"address"/utf8>>, gleam@json:string(erlang:element(3, Chat_location))}] ). -file("src/telega/model.gleam", 13152). -spec encode_reaction_type_emoji(reaction_type_emoji()) -> gleam@json:json(). encode_reaction_type_emoji(Reaction_type_emoji) -> json_object_filter_nulls( [{<<"type"/utf8>>, gleam@json:string(erlang:element(2, Reaction_type_emoji))}, {<<"emoji"/utf8>>, gleam@json:string(erlang:element(3, Reaction_type_emoji))}] ). -file("src/telega/model.gleam", 13161). -spec encode_reaction_type_custom_emoji(reaction_type_custom_emoji()) -> gleam@json:json(). encode_reaction_type_custom_emoji(Reaction_type_custom_emoji) -> json_object_filter_nulls( [{<<"type"/utf8>>, gleam@json:string(erlang:element(2, Reaction_type_custom_emoji))}, {<<"custom_emoji_id"/utf8>>, gleam@json:string(erlang:element(3, Reaction_type_custom_emoji))}] ). -file("src/telega/model.gleam", 13173). -spec encode_reaction_type_paid(reaction_type_paid()) -> gleam@json:json(). encode_reaction_type_paid(Reaction_type_paid) -> json_object_filter_nulls( [{<<"type"/utf8>>, gleam@json:string(erlang:element(2, Reaction_type_paid))}] ). -file("src/telega/model.gleam", 13223). -spec encode_forum_topic(forum_topic()) -> gleam@json:json(). encode_forum_topic(Forum_topic) -> json_object_filter_nulls( [{<<"message_thread_id"/utf8>>, gleam@json:int(erlang:element(2, Forum_topic))}, {<<"name"/utf8>>, gleam@json:string(erlang:element(3, Forum_topic))}, {<<"icon_color"/utf8>>, gleam@json:int(erlang:element(4, Forum_topic))}, {<<"icon_custom_emoji_id"/utf8>>, gleam@json:nullable( erlang:element(5, Forum_topic), fun gleam@json:string/1 )}] ). -file("src/telega/model.gleam", 13266). -spec encode_unique_gift_backdrop_colors(unique_gift_backdrop_colors()) -> gleam@json:json(). encode_unique_gift_backdrop_colors(Unique_gift_backdrop_colors) -> json_object_filter_nulls( [{<<"center_color"/utf8>>, gleam@json:int(erlang:element(2, Unique_gift_backdrop_colors))}, {<<"edge_color"/utf8>>, gleam@json:int(erlang:element(3, Unique_gift_backdrop_colors))}, {<<"symbol_color"/utf8>>, gleam@json:int(erlang:element(4, Unique_gift_backdrop_colors))}, {<<"text_color"/utf8>>, gleam@json:int(erlang:element(5, Unique_gift_backdrop_colors))}] ). -file("src/telega/model.gleam", 13277). -spec encode_unique_gift_backdrop(unique_gift_backdrop()) -> gleam@json:json(). encode_unique_gift_backdrop(Unique_gift_backdrop) -> json_object_filter_nulls( [{<<"name"/utf8>>, gleam@json:string(erlang:element(2, Unique_gift_backdrop))}, {<<"colors"/utf8>>, encode_unique_gift_backdrop_colors( erlang:element(3, Unique_gift_backdrop) )}, {<<"rarity_per_mille"/utf8>>, gleam@json:int(erlang:element(4, Unique_gift_backdrop))}] ). -file("src/telega/model.gleam", 13428). -spec encode_accepted_gift_types(accepted_gift_types()) -> gleam@json:json(). encode_accepted_gift_types(Accepted_gift_types) -> json_object_filter_nulls( [{<<"unlimited_gifts"/utf8>>, gleam@json:bool(erlang:element(2, Accepted_gift_types))}, {<<"limited_gifts"/utf8>>, gleam@json:bool(erlang:element(3, Accepted_gift_types))}, {<<"unique_gifts"/utf8>>, gleam@json:bool(erlang:element(4, Accepted_gift_types))}, {<<"premium_subscription"/utf8>>, gleam@json:bool(erlang:element(5, Accepted_gift_types))}] ). -file("src/telega/model.gleam", 13442). -spec encode_star_amount(star_amount()) -> gleam@json:json(). encode_star_amount(Star_amount) -> json_object_filter_nulls( [{<<"amount"/utf8>>, gleam@json:int(erlang:element(2, Star_amount))}, {<<"nanostar_amount"/utf8>>, gleam@json:nullable( erlang:element(3, Star_amount), fun gleam@json:int/1 )}] ). -file("src/telega/model.gleam", 13449). -spec encode_bot_command(bot_command()) -> gleam@json:json(). encode_bot_command(Bot_command) -> json_object_filter_nulls( [{<<"command"/utf8>>, gleam@json:string(erlang:element(2, Bot_command))}, {<<"description"/utf8>>, gleam@json:string(erlang:element(3, Bot_command))}] ). -file("src/telega/model.gleam", 13456). -spec encode_bot_command_scope_default(bot_command_scope_default()) -> gleam@json:json(). encode_bot_command_scope_default(Bot_command_scope_default) -> json_object_filter_nulls( [{<<"type"/utf8>>, gleam@json:string(erlang:element(2, Bot_command_scope_default))}] ). -file("src/telega/model.gleam", 13464). -spec encode_bot_command_scope_all_private_chats( bot_command_scope_all_private_chats() ) -> gleam@json:json(). encode_bot_command_scope_all_private_chats(Bot_command_scope_all_private_chats) -> json_object_filter_nulls( [{<<"type"/utf8>>, gleam@json:string( erlang:element(2, Bot_command_scope_all_private_chats) )}] ). -file("src/telega/model.gleam", 13472). -spec encode_bot_command_scope_all_group_chats( bot_command_scope_all_group_chats() ) -> gleam@json:json(). encode_bot_command_scope_all_group_chats(Bot_command_scope_all_group_chats) -> json_object_filter_nulls( [{<<"type"/utf8>>, gleam@json:string( erlang:element(2, Bot_command_scope_all_group_chats) )}] ). -file("src/telega/model.gleam", 13480). -spec encode_bot_command_scope_all_chat_administrators( bot_command_scope_all_chat_administrators() ) -> gleam@json:json(). encode_bot_command_scope_all_chat_administrators( Bot_command_scope_all_chat_administrators ) -> json_object_filter_nulls( [{<<"type"/utf8>>, gleam@json:string( erlang:element(2, Bot_command_scope_all_chat_administrators) )}] ). -file("src/telega/model.gleam", 13488). -spec encode_bot_command_scope_chat(bot_command_scope_chat()) -> gleam@json:json(). encode_bot_command_scope_chat(Bot_command_scope_chat) -> json_object_filter_nulls( [{<<"type"/utf8>>, gleam@json:string(erlang:element(2, Bot_command_scope_chat))}, {<<"chat_id"/utf8>>, encode_int_or_string(erlang:element(3, Bot_command_scope_chat))}] ). -file("src/telega/model.gleam", 13497). -spec encode_bot_command_scope_chat_administrators( bot_command_scope_chat_administrators() ) -> gleam@json:json(). encode_bot_command_scope_chat_administrators( Bot_command_scope_chat_administrators ) -> json_object_filter_nulls( [{<<"type"/utf8>>, gleam@json:string( erlang:element(2, Bot_command_scope_chat_administrators) )}, {<<"chat_id"/utf8>>, encode_int_or_string( erlang:element(3, Bot_command_scope_chat_administrators) )}] ). -file("src/telega/model.gleam", 13509). -spec encode_bot_command_scope_chat_member(bot_command_scope_chat_member()) -> gleam@json:json(). encode_bot_command_scope_chat_member(Bot_command_scope_chat_member) -> json_object_filter_nulls( [{<<"type"/utf8>>, gleam@json:string( erlang:element(2, Bot_command_scope_chat_member) )}, {<<"chat_id"/utf8>>, encode_int_or_string( erlang:element(3, Bot_command_scope_chat_member) )}, {<<"user_id"/utf8>>, gleam@json:int(erlang:element(4, Bot_command_scope_chat_member))}] ). -file("src/telega/model.gleam", 13519). -spec encode_bot_name(bot_name()) -> gleam@json:json(). encode_bot_name(Bot_name) -> json_object_filter_nulls( [{<<"name"/utf8>>, gleam@json:string(erlang:element(2, Bot_name))}] ). -file("src/telega/model.gleam", 13523). -spec encode_bot_description(bot_description()) -> gleam@json:json(). encode_bot_description(Bot_description) -> json_object_filter_nulls( [{<<"description"/utf8>>, gleam@json:string(erlang:element(2, Bot_description))}] ). -file("src/telega/model.gleam", 13529). -spec encode_bot_short_description(bot_short_description()) -> gleam@json:json(). encode_bot_short_description(Bot_short_description) -> json_object_filter_nulls( [{<<"short_description"/utf8>>, gleam@json:string(erlang:element(2, Bot_short_description))}] ). -file("src/telega/model.gleam", 13537). -spec encode_menu_button_commands(menu_button_commands()) -> gleam@json:json(). encode_menu_button_commands(Menu_button_commands) -> json_object_filter_nulls( [{<<"type"/utf8>>, gleam@json:string(erlang:element(2, Menu_button_commands))}] ). -file("src/telega/model.gleam", 13543). -spec encode_menu_button_web_app(menu_button_web_app()) -> gleam@json:json(). encode_menu_button_web_app(Menu_button_web_app) -> json_object_filter_nulls( [{<<"type"/utf8>>, gleam@json:string(erlang:element(2, Menu_button_web_app))}, {<<"text"/utf8>>, gleam@json:string(erlang:element(3, Menu_button_web_app))}, {<<"web_app"/utf8>>, encode_web_app_info(erlang:element(4, Menu_button_web_app))}] ). -file("src/telega/model.gleam", 13551). -spec encode_menu_button_default(menu_button_default()) -> gleam@json:json(). encode_menu_button_default(Menu_button_default) -> json_object_filter_nulls( [{<<"type"/utf8>>, gleam@json:string(erlang:element(2, Menu_button_default))}] ). -file("src/telega/model.gleam", 13557). -spec encode_chat_boost_source_premium(chat_boost_source_premium()) -> gleam@json:json(). encode_chat_boost_source_premium(Chat_boost_source_premium) -> json_object_filter_nulls( [{<<"source"/utf8>>, gleam@json:string(erlang:element(2, Chat_boost_source_premium))}, {<<"user"/utf8>>, encode_user(erlang:element(3, Chat_boost_source_premium))}] ). -file("src/telega/model.gleam", 13566). -spec encode_chat_boost_source_gift_code(chat_boost_source_gift_code()) -> gleam@json:json(). encode_chat_boost_source_gift_code(Chat_boost_source_gift_code) -> json_object_filter_nulls( [{<<"source"/utf8>>, gleam@json:string( erlang:element(2, Chat_boost_source_gift_code) )}, {<<"user"/utf8>>, encode_user(erlang:element(3, Chat_boost_source_gift_code))}] ). -file("src/telega/model.gleam", 13575). -spec encode_chat_boost_source_giveaway(chat_boost_source_giveaway()) -> gleam@json:json(). encode_chat_boost_source_giveaway(Chat_boost_source_giveaway) -> json_object_filter_nulls( [{<<"source"/utf8>>, gleam@json:string(erlang:element(2, Chat_boost_source_giveaway))}, {<<"giveaway_message_id"/utf8>>, gleam@json:int(erlang:element(3, Chat_boost_source_giveaway))}, {<<"user"/utf8>>, gleam@json:nullable( erlang:element(4, Chat_boost_source_giveaway), fun encode_user/1 )}, {<<"prize_star_count"/utf8>>, gleam@json:nullable( erlang:element(5, Chat_boost_source_giveaway), fun gleam@json:int/1 )}, {<<"is_unclaimed"/utf8>>, gleam@json:nullable( erlang:element(6, Chat_boost_source_giveaway), fun gleam@json:bool/1 )}] ). -file("src/telega/model.gleam", 13627). -spec encode_business_bot_rights(business_bot_rights()) -> gleam@json:json(). encode_business_bot_rights(Business_bot_rights) -> json_object_filter_nulls( [{<<"can_reply"/utf8>>, gleam@json:nullable( erlang:element(2, Business_bot_rights), fun gleam@json:bool/1 )}, {<<"can_read_messages"/utf8>>, gleam@json:nullable( erlang:element(3, Business_bot_rights), fun gleam@json:bool/1 )}, {<<"can_delete_outgoing_messages"/utf8>>, gleam@json:nullable( erlang:element(4, Business_bot_rights), fun gleam@json:bool/1 )}, {<<"can_delete_all_messages"/utf8>>, gleam@json:nullable( erlang:element(5, Business_bot_rights), fun gleam@json:bool/1 )}, {<<"can_edit_name"/utf8>>, gleam@json:nullable( erlang:element(6, Business_bot_rights), fun gleam@json:bool/1 )}, {<<"can_edit_bio"/utf8>>, gleam@json:nullable( erlang:element(7, Business_bot_rights), fun gleam@json:bool/1 )}, {<<"can_edit_profile_photo"/utf8>>, gleam@json:nullable( erlang:element(8, Business_bot_rights), fun gleam@json:bool/1 )}, {<<"can_edit_username"/utf8>>, gleam@json:nullable( erlang:element(9, Business_bot_rights), fun gleam@json:bool/1 )}, {<<"can_change_gift_settings"/utf8>>, gleam@json:nullable( erlang:element(10, Business_bot_rights), fun gleam@json:bool/1 )}, {<<"can_view_gifts_and_stars"/utf8>>, gleam@json:nullable( erlang:element(11, Business_bot_rights), fun gleam@json:bool/1 )}, {<<"can_convert_gifts_to_stars"/utf8>>, gleam@json:nullable( erlang:element(12, Business_bot_rights), fun gleam@json:bool/1 )}, {<<"can_transfer_and_upgrade_gifts"/utf8>>, gleam@json:nullable( erlang:element(13, Business_bot_rights), fun gleam@json:bool/1 )}, {<<"can_transfer_stars"/utf8>>, gleam@json:nullable( erlang:element(14, Business_bot_rights), fun gleam@json:bool/1 )}, {<<"can_manage_stories"/utf8>>, gleam@json:nullable( erlang:element(15, Business_bot_rights), fun gleam@json:bool/1 )}] ). -file("src/telega/model.gleam", 13690). -spec encode_business_connection(business_connection()) -> gleam@json:json(). encode_business_connection(Business_connection) -> json_object_filter_nulls( [{<<"id"/utf8>>, gleam@json:string(erlang:element(2, Business_connection))}, {<<"user"/utf8>>, encode_user(erlang:element(3, Business_connection))}, {<<"user_chat_id"/utf8>>, gleam@json:int(erlang:element(4, Business_connection))}, {<<"date"/utf8>>, gleam@json:int(erlang:element(5, Business_connection))}, {<<"rights"/utf8>>, gleam@json:nullable( erlang:element(6, Business_connection), fun encode_business_bot_rights/1 )}, {<<"is_enabled"/utf8>>, gleam@json:bool(erlang:element(7, Business_connection))}] ). -file("src/telega/model.gleam", 13706). -spec encode_business_messages_deleted(business_messages_deleted()) -> gleam@json:json(). encode_business_messages_deleted(Business_messages_deleted) -> json_object_filter_nulls( [{<<"business_connection_id"/utf8>>, gleam@json:string(erlang:element(2, Business_messages_deleted))}, {<<"chat"/utf8>>, encode_chat(erlang:element(3, Business_messages_deleted))}, {<<"message_ids"/utf8>>, gleam@json:array( erlang:element(4, Business_messages_deleted), fun gleam@json:int/1 )}] ). -file("src/telega/model.gleam", 13722). -spec encode_response_parameters(response_parameters()) -> gleam@json:json(). encode_response_parameters(Response_parameters) -> json_object_filter_nulls( [{<<"migrate_to_chat_id"/utf8>>, gleam@json:nullable( erlang:element(2, Response_parameters), fun gleam@json:int/1 )}, {<<"retry_after"/utf8>>, gleam@json:nullable( erlang:element(3, Response_parameters), fun gleam@json:int/1 )}] ). -file("src/telega/model.gleam", 13734). -spec encode_input_media_photo(input_media_photo()) -> gleam@json:json(). encode_input_media_photo(Input_media_photo) -> json_object_filter_nulls( [{<<"type"/utf8>>, gleam@json:string(erlang:element(2, Input_media_photo))}, {<<"media"/utf8>>, gleam@json:string(erlang:element(3, Input_media_photo))}, {<<"caption"/utf8>>, gleam@json:nullable( erlang:element(4, Input_media_photo), fun gleam@json:string/1 )}, {<<"parse_mode"/utf8>>, gleam@json:nullable( erlang:element(5, Input_media_photo), fun gleam@json:string/1 )}, {<<"caption_entities"/utf8>>, gleam@json:nullable( erlang:element(6, Input_media_photo), fun(_capture) -> gleam@json:array(_capture, fun encode_message_entity/1) end )}, {<<"show_caption_above_media"/utf8>>, gleam@json:nullable( erlang:element(7, Input_media_photo), fun gleam@json:bool/1 )}, {<<"has_spoiler"/utf8>>, gleam@json:nullable( erlang:element(8, Input_media_photo), fun gleam@json:bool/1 )}] ). -file("src/telega/model.gleam", 13755). -spec encode_input_media_video(input_media_video()) -> gleam@json:json(). encode_input_media_video(Input_media_video) -> json_object_filter_nulls( [{<<"type"/utf8>>, gleam@json:string(erlang:element(2, Input_media_video))}, {<<"media"/utf8>>, gleam@json:string(erlang:element(3, Input_media_video))}, {<<"thumbnail"/utf8>>, gleam@json:nullable( erlang:element(4, Input_media_video), fun gleam@json:string/1 )}, {<<"cover"/utf8>>, gleam@json:nullable( erlang:element(5, Input_media_video), fun gleam@json:string/1 )}, {<<"start_timestamp"/utf8>>, gleam@json:nullable( erlang:element(6, Input_media_video), fun gleam@json:int/1 )}, {<<"caption"/utf8>>, gleam@json:nullable( erlang:element(7, Input_media_video), fun gleam@json:string/1 )}, {<<"parse_mode"/utf8>>, gleam@json:nullable( erlang:element(8, Input_media_video), fun gleam@json:string/1 )}, {<<"caption_entities"/utf8>>, gleam@json:nullable( erlang:element(9, Input_media_video), fun(_capture) -> gleam@json:array(_capture, fun encode_message_entity/1) end )}, {<<"show_caption_above_media"/utf8>>, gleam@json:nullable( erlang:element(10, Input_media_video), fun gleam@json:bool/1 )}, {<<"width"/utf8>>, gleam@json:nullable( erlang:element(11, Input_media_video), fun gleam@json:int/1 )}, {<<"height"/utf8>>, gleam@json:nullable( erlang:element(12, Input_media_video), fun gleam@json:int/1 )}, {<<"duration"/utf8>>, gleam@json:nullable( erlang:element(13, Input_media_video), fun gleam@json:int/1 )}, {<<"supports_streaming"/utf8>>, gleam@json:nullable( erlang:element(14, Input_media_video), fun gleam@json:bool/1 )}, {<<"has_spoiler"/utf8>>, gleam@json:nullable( erlang:element(15, Input_media_video), fun gleam@json:bool/1 )}] ). -file("src/telega/model.gleam", 13789). -spec encode_input_media_animation(input_media_animation()) -> gleam@json:json(). encode_input_media_animation(Input_media_animation) -> json_object_filter_nulls( [{<<"type"/utf8>>, gleam@json:string(erlang:element(2, Input_media_animation))}, {<<"media"/utf8>>, gleam@json:string(erlang:element(3, Input_media_animation))}, {<<"thumbnail"/utf8>>, gleam@json:nullable( erlang:element(4, Input_media_animation), fun gleam@json:string/1 )}, {<<"caption"/utf8>>, gleam@json:nullable( erlang:element(5, Input_media_animation), fun gleam@json:string/1 )}, {<<"parse_mode"/utf8>>, gleam@json:nullable( erlang:element(6, Input_media_animation), fun gleam@json:string/1 )}, {<<"caption_entities"/utf8>>, gleam@json:nullable( erlang:element(7, Input_media_animation), fun(_capture) -> gleam@json:array(_capture, fun encode_message_entity/1) end )}, {<<"show_caption_above_media"/utf8>>, gleam@json:nullable( erlang:element(8, Input_media_animation), fun gleam@json:bool/1 )}, {<<"width"/utf8>>, gleam@json:nullable( erlang:element(9, Input_media_animation), fun gleam@json:int/1 )}, {<<"height"/utf8>>, gleam@json:nullable( erlang:element(10, Input_media_animation), fun gleam@json:int/1 )}, {<<"duration"/utf8>>, gleam@json:nullable( erlang:element(11, Input_media_animation), fun gleam@json:int/1 )}, {<<"has_spoiler"/utf8>>, gleam@json:nullable( erlang:element(12, Input_media_animation), fun gleam@json:bool/1 )}] ). -file("src/telega/model.gleam", 13822). -spec encode_input_media_audio(input_media_audio()) -> gleam@json:json(). encode_input_media_audio(Input_media_audio) -> json_object_filter_nulls( [{<<"type"/utf8>>, gleam@json:string(erlang:element(2, Input_media_audio))}, {<<"media"/utf8>>, gleam@json:string(erlang:element(3, Input_media_audio))}, {<<"thumbnail"/utf8>>, gleam@json:nullable( erlang:element(4, Input_media_audio), fun gleam@json:string/1 )}, {<<"caption"/utf8>>, gleam@json:nullable( erlang:element(5, Input_media_audio), fun gleam@json:string/1 )}, {<<"parse_mode"/utf8>>, gleam@json:nullable( erlang:element(6, Input_media_audio), fun gleam@json:string/1 )}, {<<"caption_entities"/utf8>>, gleam@json:nullable( erlang:element(7, Input_media_audio), fun(_capture) -> gleam@json:array(_capture, fun encode_message_entity/1) end )}, {<<"duration"/utf8>>, gleam@json:nullable( erlang:element(8, Input_media_audio), fun gleam@json:int/1 )}, {<<"performer"/utf8>>, gleam@json:nullable( erlang:element(9, Input_media_audio), fun gleam@json:string/1 )}, {<<"title"/utf8>>, gleam@json:nullable( erlang:element(10, Input_media_audio), fun gleam@json:string/1 )}] ). -file("src/telega/model.gleam", 13842). -spec encode_input_media_document(input_media_document()) -> gleam@json:json(). encode_input_media_document(Input_media_document) -> json_object_filter_nulls( [{<<"type"/utf8>>, gleam@json:string(erlang:element(2, Input_media_document))}, {<<"media"/utf8>>, gleam@json:string(erlang:element(3, Input_media_document))}, {<<"thumbnail"/utf8>>, gleam@json:nullable( erlang:element(4, Input_media_document), fun gleam@json:string/1 )}, {<<"caption"/utf8>>, gleam@json:nullable( erlang:element(5, Input_media_document), fun gleam@json:string/1 )}, {<<"parse_mode"/utf8>>, gleam@json:nullable( erlang:element(6, Input_media_document), fun gleam@json:string/1 )}, {<<"caption_entities"/utf8>>, gleam@json:nullable( erlang:element(7, Input_media_document), fun(_capture) -> gleam@json:array(_capture, fun encode_message_entity/1) end )}, {<<"disable_content_type_detection"/utf8>>, gleam@json:nullable( erlang:element(8, Input_media_document), fun gleam@json:bool/1 )}] ). -file("src/telega/model.gleam", 13868). -spec encode_input_paid_media_photo(input_paid_media_photo()) -> gleam@json:json(). encode_input_paid_media_photo(Input_paid_media_photo) -> json_object_filter_nulls( [{<<"type"/utf8>>, gleam@json:string(erlang:element(2, Input_paid_media_photo))}, {<<"media"/utf8>>, gleam@json:string(erlang:element(3, Input_paid_media_photo))}] ). -file("src/telega/model.gleam", 13877). -spec encode_input_paid_media_video(input_paid_media_video()) -> gleam@json:json(). encode_input_paid_media_video(Input_paid_media_video) -> json_object_filter_nulls( [{<<"type"/utf8>>, gleam@json:string(erlang:element(2, Input_paid_media_video))}, {<<"media"/utf8>>, gleam@json:string(erlang:element(3, Input_paid_media_video))}, {<<"thumbnail"/utf8>>, gleam@json:nullable( erlang:element(4, Input_paid_media_video), fun gleam@json:string/1 )}, {<<"cover"/utf8>>, gleam@json:nullable( erlang:element(5, Input_paid_media_video), fun gleam@json:string/1 )}, {<<"start_timestamp"/utf8>>, gleam@json:nullable( erlang:element(6, Input_paid_media_video), fun gleam@json:int/1 )}, {<<"width"/utf8>>, gleam@json:nullable( erlang:element(7, Input_paid_media_video), fun gleam@json:int/1 )}, {<<"height"/utf8>>, gleam@json:nullable( erlang:element(8, Input_paid_media_video), fun gleam@json:int/1 )}, {<<"duration"/utf8>>, gleam@json:nullable( erlang:element(9, Input_paid_media_video), fun gleam@json:int/1 )}, {<<"supports_streaming"/utf8>>, gleam@json:nullable( erlang:element(10, Input_paid_media_video), fun gleam@json:bool/1 )}] ). -file("src/telega/model.gleam", 13899). -spec encode_input_profile_photo_static(input_profile_photo_static()) -> gleam@json:json(). encode_input_profile_photo_static(Input_profile_photo_static) -> json_object_filter_nulls( [{<<"type"/utf8>>, gleam@json:string(erlang:element(2, Input_profile_photo_static))}, {<<"photo"/utf8>>, gleam@json:string(erlang:element(3, Input_profile_photo_static))}] ). -file("src/telega/model.gleam", 13908). -spec encode_input_profile_photo_animated(input_profile_photo_animated()) -> gleam@json:json(). encode_input_profile_photo_animated(Input_profile_photo_animated) -> json_object_filter_nulls( [{<<"type"/utf8>>, gleam@json:string( erlang:element(2, Input_profile_photo_animated) )}, {<<"animation"/utf8>>, gleam@json:string( erlang:element(3, Input_profile_photo_animated) )}, {<<"main_frame_timestamp"/utf8>>, gleam@json:nullable( erlang:element(4, Input_profile_photo_animated), fun gleam@json:float/1 )}] ). -file("src/telega/model.gleam", 13924). -spec encode_input_story_content(input_story_content()) -> gleam@json:json(). encode_input_story_content(Input_story_content) -> json_object_filter_nulls( [{<<"type"/utf8>>, gleam@json:string(erlang:element(2, Input_story_content))}, {<<"photo"/utf8>>, gleam@json:string(erlang:element(3, Input_story_content))}] ). -file("src/telega/model.gleam", 13933). -spec encode_input_story_content_photo(input_story_content_photo()) -> gleam@json:json(). encode_input_story_content_photo(Input_story_content_photo) -> json_object_filter_nulls( [{<<"type"/utf8>>, gleam@json:string(erlang:element(2, Input_story_content_photo))}, {<<"photo"/utf8>>, gleam@json:string(erlang:element(3, Input_story_content_photo))}] ). -file("src/telega/model.gleam", 13942). -spec encode_input_story_content_video(input_story_content_video()) -> gleam@json:json(). encode_input_story_content_video(Input_story_content_video) -> json_object_filter_nulls( [{<<"type"/utf8>>, gleam@json:string(erlang:element(2, Input_story_content_video))}, {<<"video"/utf8>>, gleam@json:string(erlang:element(3, Input_story_content_video))}, {<<"duration"/utf8>>, gleam@json:nullable( erlang:element(4, Input_story_content_video), fun gleam@json:float/1 )}, {<<"cover_frame_timestamp"/utf8>>, gleam@json:nullable( erlang:element(5, Input_story_content_video), fun gleam@json:float/1 )}, {<<"is_animation"/utf8>>, gleam@json:nullable( erlang:element(6, Input_story_content_video), fun gleam@json:bool/1 )}] ). -file("src/telega/model.gleam", 13996). -spec encode_mask_position(mask_position()) -> gleam@json:json(). encode_mask_position(Mask_position) -> json_object_filter_nulls( [{<<"point"/utf8>>, gleam@json:string(erlang:element(2, Mask_position))}, {<<"x_shift"/utf8>>, gleam@json:float(erlang:element(3, Mask_position))}, {<<"y_shift"/utf8>>, gleam@json:float(erlang:element(4, Mask_position))}, {<<"scale"/utf8>>, gleam@json:float(erlang:element(5, Mask_position))}] ). -file("src/telega/model.gleam", 13960). -spec encode_sticker(sticker()) -> gleam@json:json(). encode_sticker(Sticker) -> json_object_filter_nulls( [{<<"file_id"/utf8>>, gleam@json:string(erlang:element(2, Sticker))}, {<<"file_unique_id"/utf8>>, gleam@json:string(erlang:element(3, Sticker))}, {<<"type"/utf8>>, gleam@json:string(erlang:element(4, Sticker))}, {<<"width"/utf8>>, gleam@json:int(erlang:element(5, Sticker))}, {<<"height"/utf8>>, gleam@json:int(erlang:element(6, Sticker))}, {<<"is_animated"/utf8>>, gleam@json:bool(erlang:element(7, Sticker))}, {<<"is_video"/utf8>>, gleam@json:bool(erlang:element(8, Sticker))}, {<<"thumbnail"/utf8>>, gleam@json:nullable( erlang:element(9, Sticker), fun encode_photo_size/1 )}, {<<"emoji"/utf8>>, gleam@json:nullable( erlang:element(10, Sticker), fun gleam@json:string/1 )}, {<<"set_name"/utf8>>, gleam@json:nullable( erlang:element(11, Sticker), fun gleam@json:string/1 )}, {<<"premium_animation"/utf8>>, gleam@json:nullable( erlang:element(12, Sticker), fun encode_file/1 )}, {<<"mask_position"/utf8>>, gleam@json:nullable( erlang:element(13, Sticker), fun encode_mask_position/1 )}, {<<"custom_emoji_id"/utf8>>, gleam@json:nullable( erlang:element(14, Sticker), fun gleam@json:string/1 )}, {<<"needs_repainting"/utf8>>, gleam@json:nullable( erlang:element(15, Sticker), fun gleam@json:bool/1 )}, {<<"file_size"/utf8>>, gleam@json:nullable( erlang:element(16, Sticker), fun gleam@json:int/1 )}] ). -file("src/telega/model.gleam", 12994). -spec encode_business_intro(business_intro()) -> gleam@json:json(). encode_business_intro(Business_intro) -> json_object_filter_nulls( [{<<"title"/utf8>>, gleam@json:nullable( erlang:element(2, Business_intro), fun gleam@json:string/1 )}, {<<"message"/utf8>>, gleam@json:nullable( erlang:element(3, Business_intro), fun gleam@json:string/1 )}, {<<"sticker"/utf8>>, gleam@json:nullable( erlang:element(4, Business_intro), fun encode_sticker/1 )}] ). -file("src/telega/model.gleam", 13235). -spec encode_gift(gift()) -> gleam@json:json(). encode_gift(Gift) -> json_object_filter_nulls( [{<<"id"/utf8>>, gleam@json:string(erlang:element(2, Gift))}, {<<"sticker"/utf8>>, encode_sticker(erlang:element(3, Gift))}, {<<"star_count"/utf8>>, gleam@json:int(erlang:element(4, Gift))}, {<<"upgrade_star_count"/utf8>>, gleam@json:nullable( erlang:element(5, Gift), fun gleam@json:int/1 )}, {<<"total_count"/utf8>>, gleam@json:nullable( erlang:element(6, Gift), fun gleam@json:int/1 )}, {<<"remaining_count"/utf8>>, gleam@json:nullable( erlang:element(7, Gift), fun gleam@json:int/1 )}] ). -file("src/telega/model.gleam", 13246). -spec encode_gifts(gifts()) -> gleam@json:json(). encode_gifts(Gifts) -> json_object_filter_nulls( [{<<"gifts"/utf8>>, gleam@json:array(erlang:element(2, Gifts), fun encode_gift/1)}] ). -file("src/telega/model.gleam", 13250). -spec encode_unique_gift_model(unique_gift_model()) -> gleam@json:json(). encode_unique_gift_model(Unique_gift_model) -> json_object_filter_nulls( [{<<"name"/utf8>>, gleam@json:string(erlang:element(2, Unique_gift_model))}, {<<"sticker"/utf8>>, encode_sticker(erlang:element(3, Unique_gift_model))}, {<<"rarity_per_mille"/utf8>>, gleam@json:int(erlang:element(4, Unique_gift_model))}] ). -file("src/telega/model.gleam", 13258). -spec encode_unique_gift_symbol(unique_gift_symbol()) -> gleam@json:json(). encode_unique_gift_symbol(Unique_gift_symbol) -> json_object_filter_nulls( [{<<"name"/utf8>>, gleam@json:string(erlang:element(2, Unique_gift_symbol))}, {<<"sticker"/utf8>>, encode_sticker(erlang:element(3, Unique_gift_symbol))}, {<<"rarity_per_mille"/utf8>>, gleam@json:int(erlang:element(4, Unique_gift_symbol))}] ). -file("src/telega/model.gleam", 13287). -spec encode_unique_gift(unique_gift()) -> gleam@json:json(). encode_unique_gift(Unique_gift) -> json_object_filter_nulls( [{<<"base_name"/utf8>>, gleam@json:string(erlang:element(2, Unique_gift))}, {<<"name"/utf8>>, gleam@json:string(erlang:element(3, Unique_gift))}, {<<"number"/utf8>>, gleam@json:int(erlang:element(4, Unique_gift))}, {<<"model"/utf8>>, encode_unique_gift_model(erlang:element(5, Unique_gift))}, {<<"symbol"/utf8>>, encode_unique_gift_symbol(erlang:element(6, Unique_gift))}, {<<"backdrop"/utf8>>, encode_unique_gift_backdrop(erlang:element(7, Unique_gift))}] ). -file("src/telega/model.gleam", 13298). -spec encode_gift_info(gift_info()) -> gleam@json:json(). encode_gift_info(Gift_info) -> json_object_filter_nulls( [{<<"gift"/utf8>>, encode_gift(erlang:element(2, Gift_info))}, {<<"owned_gift_id"/utf8>>, gleam@json:nullable( erlang:element(3, Gift_info), fun gleam@json:string/1 )}, {<<"convert_star_count"/utf8>>, gleam@json:nullable( erlang:element(4, Gift_info), fun gleam@json:int/1 )}, {<<"prepaid_upgrade_star_count"/utf8>>, gleam@json:nullable( erlang:element(5, Gift_info), fun gleam@json:int/1 )}, {<<"can_be_upgraded"/utf8>>, gleam@json:nullable( erlang:element(6, Gift_info), fun gleam@json:bool/1 )}, {<<"text"/utf8>>, gleam@json:nullable( erlang:element(7, Gift_info), fun gleam@json:string/1 )}, {<<"entities"/utf8>>, gleam@json:nullable( erlang:element(8, Gift_info), fun(_capture) -> gleam@json:array(_capture, fun encode_message_entity/1) end )}, {<<"is_private"/utf8>>, gleam@json:nullable( erlang:element(9, Gift_info), fun gleam@json:bool/1 )}] ). -file("src/telega/model.gleam", 13320). -spec encode_unique_gift_info(unique_gift_info()) -> gleam@json:json(). encode_unique_gift_info(Unique_gift_info) -> json_object_filter_nulls( [{<<"gift"/utf8>>, encode_unique_gift(erlang:element(2, Unique_gift_info))}, {<<"origin"/utf8>>, gleam@json:string(erlang:element(3, Unique_gift_info))}, {<<"owned_gift_id"/utf8>>, gleam@json:nullable( erlang:element(4, Unique_gift_info), fun gleam@json:string/1 )}, {<<"transfer_star_count"/utf8>>, gleam@json:nullable( erlang:element(5, Unique_gift_info), fun gleam@json:int/1 )}] ). -file("src/telega/model.gleam", 13335). -spec encode_owned_gift(owned_gift()) -> gleam@json:json(). encode_owned_gift(Owned_gift) -> json_object_filter_nulls( [{<<"type"/utf8>>, gleam@json:string(erlang:element(2, Owned_gift))}, {<<"gift"/utf8>>, encode_gift(erlang:element(3, Owned_gift))}, {<<"owned_gift_id"/utf8>>, gleam@json:nullable( erlang:element(4, Owned_gift), fun gleam@json:string/1 )}, {<<"sender_user"/utf8>>, gleam@json:nullable( erlang:element(5, Owned_gift), fun encode_user/1 )}, {<<"send_date"/utf8>>, gleam@json:int(erlang:element(6, Owned_gift))}, {<<"text"/utf8>>, gleam@json:nullable( erlang:element(7, Owned_gift), fun gleam@json:string/1 )}, {<<"entities"/utf8>>, gleam@json:nullable( erlang:element(8, Owned_gift), fun(_capture) -> gleam@json:array(_capture, fun encode_message_entity/1) end )}, {<<"is_private"/utf8>>, gleam@json:nullable( erlang:element(9, Owned_gift), fun gleam@json:bool/1 )}, {<<"is_saved"/utf8>>, gleam@json:nullable( erlang:element(10, Owned_gift), fun gleam@json:bool/1 )}, {<<"can_be_upgraded"/utf8>>, gleam@json:nullable( erlang:element(11, Owned_gift), fun gleam@json:bool/1 )}, {<<"was_refunded"/utf8>>, gleam@json:nullable( erlang:element(12, Owned_gift), fun gleam@json:bool/1 )}, {<<"convert_star_count"/utf8>>, gleam@json:nullable( erlang:element(13, Owned_gift), fun gleam@json:int/1 )}, {<<"prepaid_upgrade_star_count"/utf8>>, gleam@json:nullable( erlang:element(14, Owned_gift), fun gleam@json:int/1 )}] ). -file("src/telega/model.gleam", 13362). -spec encode_owned_gift_regular(owned_gift_regular()) -> gleam@json:json(). encode_owned_gift_regular(Owned_gift_regular) -> json_object_filter_nulls( [{<<"type"/utf8>>, gleam@json:string(erlang:element(2, Owned_gift_regular))}, {<<"gift"/utf8>>, encode_gift(erlang:element(3, Owned_gift_regular))}, {<<"owned_gift_id"/utf8>>, gleam@json:nullable( erlang:element(4, Owned_gift_regular), fun gleam@json:string/1 )}, {<<"sender_user"/utf8>>, gleam@json:nullable( erlang:element(5, Owned_gift_regular), fun encode_user/1 )}, {<<"send_date"/utf8>>, gleam@json:int(erlang:element(6, Owned_gift_regular))}, {<<"text"/utf8>>, gleam@json:nullable( erlang:element(7, Owned_gift_regular), fun gleam@json:string/1 )}, {<<"entities"/utf8>>, gleam@json:nullable( erlang:element(8, Owned_gift_regular), fun(_capture) -> gleam@json:array(_capture, fun encode_message_entity/1) end )}, {<<"is_private"/utf8>>, gleam@json:nullable( erlang:element(9, Owned_gift_regular), fun gleam@json:bool/1 )}, {<<"is_saved"/utf8>>, gleam@json:nullable( erlang:element(10, Owned_gift_regular), fun gleam@json:bool/1 )}, {<<"can_be_upgraded"/utf8>>, gleam@json:nullable( erlang:element(11, Owned_gift_regular), fun gleam@json:bool/1 )}, {<<"was_refunded"/utf8>>, gleam@json:nullable( erlang:element(12, Owned_gift_regular), fun gleam@json:bool/1 )}, {<<"convert_star_count"/utf8>>, gleam@json:nullable( erlang:element(13, Owned_gift_regular), fun gleam@json:int/1 )}, {<<"prepaid_upgrade_star_count"/utf8>>, gleam@json:nullable( erlang:element(14, Owned_gift_regular), fun gleam@json:int/1 )}] ). -file("src/telega/model.gleam", 13398). -spec encode_owned_gift_unique(owned_gift_unique()) -> gleam@json:json(). encode_owned_gift_unique(Owned_gift_unique) -> json_object_filter_nulls( [{<<"type"/utf8>>, gleam@json:string(erlang:element(2, Owned_gift_unique))}, {<<"gift"/utf8>>, encode_unique_gift(erlang:element(3, Owned_gift_unique))}, {<<"owned_gift_id"/utf8>>, gleam@json:nullable( erlang:element(4, Owned_gift_unique), fun gleam@json:string/1 )}, {<<"sender_user"/utf8>>, gleam@json:nullable( erlang:element(5, Owned_gift_unique), fun encode_user/1 )}, {<<"send_date"/utf8>>, gleam@json:int(erlang:element(6, Owned_gift_unique))}, {<<"is_saved"/utf8>>, gleam@json:nullable( erlang:element(7, Owned_gift_unique), fun gleam@json:bool/1 )}, {<<"can_be_transferred"/utf8>>, gleam@json:nullable( erlang:element(8, Owned_gift_unique), fun gleam@json:bool/1 )}, {<<"transfer_star_count"/utf8>>, gleam@json:nullable( erlang:element(9, Owned_gift_unique), fun gleam@json:int/1 )}] ). -file("src/telega/model.gleam", 13420). -spec encode_owned_gifts(owned_gifts()) -> gleam@json:json(). encode_owned_gifts(Owned_gifts) -> json_object_filter_nulls( [{<<"total_count"/utf8>>, gleam@json:int(erlang:element(2, Owned_gifts))}, {<<"gifts"/utf8>>, gleam@json:array( erlang:element(3, Owned_gifts), fun encode_owned_gift/1 )}, {<<"next_offset"/utf8>>, gleam@json:nullable( erlang:element(4, Owned_gifts), fun gleam@json:string/1 )}] ). -file("src/telega/model.gleam", 13986). -spec encode_sticker_set(sticker_set()) -> gleam@json:json(). encode_sticker_set(Sticker_set) -> json_object_filter_nulls( [{<<"name"/utf8>>, gleam@json:string(erlang:element(2, Sticker_set))}, {<<"title"/utf8>>, gleam@json:string(erlang:element(3, Sticker_set))}, {<<"sticker_type"/utf8>>, gleam@json:string(erlang:element(4, Sticker_set))}, {<<"stickers"/utf8>>, gleam@json:array( erlang:element(5, Sticker_set), fun encode_sticker/1 )}, {<<"thumbnail"/utf8>>, gleam@json:nullable( erlang:element(6, Sticker_set), fun encode_photo_size/1 )}] ). -file("src/telega/model.gleam", 14021). -spec encode_inline_query(inline_query()) -> gleam@json:json(). encode_inline_query(Inline_query) -> json_object_filter_nulls( [{<<"id"/utf8>>, gleam@json:string(erlang:element(2, Inline_query))}, {<<"from"/utf8>>, encode_user(erlang:element(3, Inline_query))}, {<<"query"/utf8>>, gleam@json:string(erlang:element(4, Inline_query))}, {<<"offset"/utf8>>, gleam@json:string(erlang:element(5, Inline_query))}, {<<"chat_type"/utf8>>, gleam@json:nullable( erlang:element(6, Inline_query), fun gleam@json:string/1 )}, {<<"location"/utf8>>, gleam@json:nullable( erlang:element(7, Inline_query), fun encode_location/1 )}] ). -file("src/telega/model.gleam", 14032). -spec encode_inline_query_results_button(inline_query_results_button()) -> gleam@json:json(). encode_inline_query_results_button(Inline_query_results_button) -> json_object_filter_nulls( [{<<"text"/utf8>>, gleam@json:string( erlang:element(2, Inline_query_results_button) )}, {<<"web_app"/utf8>>, gleam@json:nullable( erlang:element(3, Inline_query_results_button), fun encode_web_app_info/1 )}, {<<"start_parameter"/utf8>>, gleam@json:nullable( erlang:element(4, Inline_query_results_button), fun gleam@json:string/1 )}] ). -file("src/telega/model.gleam", 15016). -spec encode_input_text_message_content(input_text_message_content()) -> gleam@json:json(). encode_input_text_message_content(Input_text_message_content) -> json_object_filter_nulls( [{<<"message_text"/utf8>>, gleam@json:string(erlang:element(2, Input_text_message_content))}, {<<"parse_mode"/utf8>>, gleam@json:nullable( erlang:element(3, Input_text_message_content), fun gleam@json:string/1 )}, {<<"entities"/utf8>>, gleam@json:nullable( erlang:element(4, Input_text_message_content), fun(_capture) -> gleam@json:array(_capture, fun encode_message_entity/1) end )}, {<<"link_preview_options"/utf8>>, gleam@json:nullable( erlang:element(5, Input_text_message_content), fun encode_link_preview_options/1 )}] ). -file("src/telega/model.gleam", 15042). -spec encode_input_location_message_content(input_location_message_content()) -> gleam@json:json(). encode_input_location_message_content(Input_location_message_content) -> json_object_filter_nulls( [{<<"latitude"/utf8>>, gleam@json:float( erlang:element(2, Input_location_message_content) )}, {<<"longitude"/utf8>>, gleam@json:float( erlang:element(3, Input_location_message_content) )}, {<<"horizontal_accuracy"/utf8>>, gleam@json:nullable( erlang:element(4, Input_location_message_content), fun gleam@json:float/1 )}, {<<"live_period"/utf8>>, gleam@json:nullable( erlang:element(5, Input_location_message_content), fun gleam@json:int/1 )}, {<<"heading"/utf8>>, gleam@json:nullable( erlang:element(6, Input_location_message_content), fun gleam@json:int/1 )}, {<<"proximity_alert_radius"/utf8>>, gleam@json:nullable( erlang:element(7, Input_location_message_content), fun gleam@json:int/1 )}] ). -file("src/telega/model.gleam", 15073). -spec encode_input_venue_message_content(input_venue_message_content()) -> gleam@json:json(). encode_input_venue_message_content(Input_venue_message_content) -> json_object_filter_nulls( [{<<"latitude"/utf8>>, gleam@json:float(erlang:element(2, Input_venue_message_content))}, {<<"longitude"/utf8>>, gleam@json:float(erlang:element(3, Input_venue_message_content))}, {<<"title"/utf8>>, gleam@json:string( erlang:element(4, Input_venue_message_content) )}, {<<"address"/utf8>>, gleam@json:string( erlang:element(5, Input_venue_message_content) )}, {<<"foursquare_id"/utf8>>, gleam@json:nullable( erlang:element(6, Input_venue_message_content), fun gleam@json:string/1 )}, {<<"foursquare_type"/utf8>>, gleam@json:nullable( erlang:element(7, Input_venue_message_content), fun gleam@json:string/1 )}, {<<"google_place_id"/utf8>>, gleam@json:nullable( erlang:element(8, Input_venue_message_content), fun gleam@json:string/1 )}, {<<"google_place_type"/utf8>>, gleam@json:nullable( erlang:element(9, Input_venue_message_content), fun gleam@json:string/1 )}] ). -file("src/telega/model.gleam", 15100). -spec encode_input_contact_message_content(input_contact_message_content()) -> gleam@json:json(). encode_input_contact_message_content(Input_contact_message_content) -> json_object_filter_nulls( [{<<"phone_number"/utf8>>, gleam@json:string( erlang:element(2, Input_contact_message_content) )}, {<<"first_name"/utf8>>, gleam@json:string( erlang:element(3, Input_contact_message_content) )}, {<<"last_name"/utf8>>, gleam@json:nullable( erlang:element(4, Input_contact_message_content), fun gleam@json:string/1 )}, {<<"vcard"/utf8>>, gleam@json:nullable( erlang:element(5, Input_contact_message_content), fun gleam@json:string/1 )}] ). -file("src/telega/model.gleam", 15201). -spec encode_chosen_inline_result(chosen_inline_result()) -> gleam@json:json(). encode_chosen_inline_result(Chosen_inline_result) -> json_object_filter_nulls( [{<<"result_id"/utf8>>, gleam@json:string(erlang:element(2, Chosen_inline_result))}, {<<"from"/utf8>>, encode_user(erlang:element(3, Chosen_inline_result))}, {<<"location"/utf8>>, gleam@json:nullable( erlang:element(4, Chosen_inline_result), fun encode_location/1 )}, {<<"inline_message_id"/utf8>>, gleam@json:nullable( erlang:element(5, Chosen_inline_result), fun gleam@json:string/1 )}, {<<"query"/utf8>>, gleam@json:string(erlang:element(6, Chosen_inline_result))}] ). -file("src/telega/model.gleam", 15216). -spec encode_sent_web_app_message(sent_web_app_message()) -> gleam@json:json(). encode_sent_web_app_message(Sent_web_app_message) -> json_object_filter_nulls( [{<<"inline_message_id"/utf8>>, gleam@json:nullable( erlang:element(2, Sent_web_app_message), fun gleam@json:string/1 )}] ). -file("src/telega/model.gleam", 15227). -spec encode_prepared_inline_message(prepared_inline_message()) -> gleam@json:json(). encode_prepared_inline_message(Prepared_inline_message) -> json_object_filter_nulls( [{<<"id"/utf8>>, gleam@json:string(erlang:element(2, Prepared_inline_message))}, {<<"expiration_date"/utf8>>, gleam@json:int(erlang:element(3, Prepared_inline_message))}] ). -file("src/telega/model.gleam", 15236). -spec encode_labeled_price(labeled_price()) -> gleam@json:json(). encode_labeled_price(Labeled_price) -> json_object_filter_nulls( [{<<"label"/utf8>>, gleam@json:string(erlang:element(2, Labeled_price))}, {<<"amount"/utf8>>, gleam@json:int(erlang:element(3, Labeled_price))}] ). -file("src/telega/model.gleam", 15114). -spec encode_input_invoice_message_content(input_invoice_message_content()) -> gleam@json:json(). encode_input_invoice_message_content(Input_invoice_message_content) -> json_object_filter_nulls( [{<<"title"/utf8>>, gleam@json:string( erlang:element(2, Input_invoice_message_content) )}, {<<"description"/utf8>>, gleam@json:string( erlang:element(3, Input_invoice_message_content) )}, {<<"payload"/utf8>>, gleam@json:string( erlang:element(4, Input_invoice_message_content) )}, {<<"provider_token"/utf8>>, gleam@json:nullable( erlang:element(5, Input_invoice_message_content), fun gleam@json:string/1 )}, {<<"currency"/utf8>>, gleam@json:string( erlang:element(6, Input_invoice_message_content) )}, {<<"prices"/utf8>>, gleam@json:array( erlang:element(7, Input_invoice_message_content), fun encode_labeled_price/1 )}, {<<"max_tip_amount"/utf8>>, gleam@json:nullable( erlang:element(8, Input_invoice_message_content), fun gleam@json:int/1 )}, {<<"suggested_tip_amounts"/utf8>>, gleam@json:nullable( erlang:element(9, Input_invoice_message_content), fun(_capture) -> gleam@json:array(_capture, fun gleam@json:int/1) end )}, {<<"provider_data"/utf8>>, gleam@json:nullable( erlang:element(10, Input_invoice_message_content), fun gleam@json:string/1 )}, {<<"photo_url"/utf8>>, gleam@json:nullable( erlang:element(11, Input_invoice_message_content), fun gleam@json:string/1 )}, {<<"photo_size"/utf8>>, gleam@json:nullable( erlang:element(12, Input_invoice_message_content), fun gleam@json:int/1 )}, {<<"photo_width"/utf8>>, gleam@json:nullable( erlang:element(13, Input_invoice_message_content), fun gleam@json:int/1 )}, {<<"photo_height"/utf8>>, gleam@json:nullable( erlang:element(14, Input_invoice_message_content), fun gleam@json:int/1 )}, {<<"need_name"/utf8>>, gleam@json:nullable( erlang:element(15, Input_invoice_message_content), fun gleam@json:bool/1 )}, {<<"need_phone_number"/utf8>>, gleam@json:nullable( erlang:element(16, Input_invoice_message_content), fun gleam@json:bool/1 )}, {<<"need_email"/utf8>>, gleam@json:nullable( erlang:element(17, Input_invoice_message_content), fun gleam@json:bool/1 )}, {<<"need_shipping_address"/utf8>>, gleam@json:nullable( erlang:element(18, Input_invoice_message_content), fun gleam@json:bool/1 )}, {<<"send_phone_number_to_provider"/utf8>>, gleam@json:nullable( erlang:element(19, Input_invoice_message_content), fun gleam@json:bool/1 )}, {<<"send_email_to_provider"/utf8>>, gleam@json:nullable( erlang:element(20, Input_invoice_message_content), fun gleam@json:bool/1 )}, {<<"is_flexible"/utf8>>, gleam@json:nullable( erlang:element(21, Input_invoice_message_content), fun gleam@json:bool/1 )}] ). -file("src/telega/model.gleam", 15243). -spec encode_invoice(invoice()) -> gleam@json:json(). encode_invoice(Invoice) -> json_object_filter_nulls( [{<<"title"/utf8>>, gleam@json:string(erlang:element(2, Invoice))}, {<<"description"/utf8>>, gleam@json:string(erlang:element(3, Invoice))}, {<<"start_parameter"/utf8>>, gleam@json:string(erlang:element(4, Invoice))}, {<<"currency"/utf8>>, gleam@json:string(erlang:element(5, Invoice))}, {<<"total_amount"/utf8>>, gleam@json:int(erlang:element(6, Invoice))}] ). -file("src/telega/model.gleam", 15253). -spec encode_shipping_address(shipping_address()) -> gleam@json:json(). encode_shipping_address(Shipping_address) -> json_object_filter_nulls( [{<<"country_code"/utf8>>, gleam@json:string(erlang:element(2, Shipping_address))}, {<<"state"/utf8>>, gleam@json:string(erlang:element(3, Shipping_address))}, {<<"city"/utf8>>, gleam@json:string(erlang:element(4, Shipping_address))}, {<<"street_line1"/utf8>>, gleam@json:string(erlang:element(5, Shipping_address))}, {<<"street_line2"/utf8>>, gleam@json:string(erlang:element(6, Shipping_address))}, {<<"post_code"/utf8>>, gleam@json:string(erlang:element(7, Shipping_address))}] ). -file("src/telega/model.gleam", 15264). -spec encode_order_info(order_info()) -> gleam@json:json(). encode_order_info(Order_info) -> json_object_filter_nulls( [{<<"name"/utf8>>, gleam@json:nullable( erlang:element(2, Order_info), fun gleam@json:string/1 )}, {<<"phone_number"/utf8>>, gleam@json:nullable( erlang:element(3, Order_info), fun gleam@json:string/1 )}, {<<"email"/utf8>>, gleam@json:nullable( erlang:element(4, Order_info), fun gleam@json:string/1 )}, {<<"shipping_address"/utf8>>, gleam@json:nullable( erlang:element(5, Order_info), fun encode_shipping_address/1 )}] ). -file("src/telega/model.gleam", 15276). -spec encode_shipping_option(shipping_option()) -> gleam@json:json(). encode_shipping_option(Shipping_option) -> json_object_filter_nulls( [{<<"id"/utf8>>, gleam@json:string(erlang:element(2, Shipping_option))}, {<<"title"/utf8>>, gleam@json:string(erlang:element(3, Shipping_option))}, {<<"prices"/utf8>>, gleam@json:array( erlang:element(4, Shipping_option), fun encode_labeled_price/1 )}] ). -file("src/telega/model.gleam", 15284). -spec encode_successful_payment(successful_payment()) -> gleam@json:json(). encode_successful_payment(Successful_payment) -> json_object_filter_nulls( [{<<"currency"/utf8>>, gleam@json:string(erlang:element(2, Successful_payment))}, {<<"total_amount"/utf8>>, gleam@json:int(erlang:element(3, Successful_payment))}, {<<"invoice_payload"/utf8>>, gleam@json:string(erlang:element(4, Successful_payment))}, {<<"subscription_expiration_date"/utf8>>, gleam@json:nullable( erlang:element(5, Successful_payment), fun gleam@json:int/1 )}, {<<"is_recurring"/utf8>>, gleam@json:nullable( erlang:element(6, Successful_payment), fun gleam@json:bool/1 )}, {<<"is_first_recurring"/utf8>>, gleam@json:nullable( erlang:element(7, Successful_payment), fun gleam@json:bool/1 )}, {<<"shipping_option_id"/utf8>>, gleam@json:nullable( erlang:element(8, Successful_payment), fun gleam@json:string/1 )}, {<<"order_info"/utf8>>, gleam@json:nullable( erlang:element(9, Successful_payment), fun encode_order_info/1 )}, {<<"telegram_payment_charge_id"/utf8>>, gleam@json:string(erlang:element(10, Successful_payment))}, {<<"provider_payment_charge_id"/utf8>>, gleam@json:string(erlang:element(11, Successful_payment))}] ). -file("src/telega/model.gleam", 15317). -spec encode_refunded_payment(refunded_payment()) -> gleam@json:json(). encode_refunded_payment(Refunded_payment) -> json_object_filter_nulls( [{<<"currency"/utf8>>, gleam@json:string(erlang:element(2, Refunded_payment))}, {<<"total_amount"/utf8>>, gleam@json:int(erlang:element(3, Refunded_payment))}, {<<"invoice_payload"/utf8>>, gleam@json:string(erlang:element(4, Refunded_payment))}, {<<"telegram_payment_charge_id"/utf8>>, gleam@json:string(erlang:element(5, Refunded_payment))}, {<<"provider_payment_charge_id"/utf8>>, gleam@json:nullable( erlang:element(6, Refunded_payment), fun gleam@json:string/1 )}] ). -file("src/telega/model.gleam", 15333). -spec encode_shipping_query(shipping_query()) -> gleam@json:json(). encode_shipping_query(Shipping_query) -> json_object_filter_nulls( [{<<"id"/utf8>>, gleam@json:string(erlang:element(2, Shipping_query))}, {<<"from"/utf8>>, encode_user(erlang:element(3, Shipping_query))}, {<<"invoice_payload"/utf8>>, gleam@json:string(erlang:element(4, Shipping_query))}, {<<"shipping_address"/utf8>>, encode_shipping_address(erlang:element(5, Shipping_query))}] ). -file("src/telega/model.gleam", 15345). -spec encode_pre_checkout_query(pre_checkout_query()) -> gleam@json:json(). encode_pre_checkout_query(Pre_checkout_query) -> json_object_filter_nulls( [{<<"id"/utf8>>, gleam@json:string(erlang:element(2, Pre_checkout_query))}, {<<"from"/utf8>>, encode_user(erlang:element(3, Pre_checkout_query))}, {<<"currency"/utf8>>, gleam@json:string(erlang:element(4, Pre_checkout_query))}, {<<"total_amount"/utf8>>, gleam@json:int(erlang:element(5, Pre_checkout_query))}, {<<"invoice_payload"/utf8>>, gleam@json:string(erlang:element(6, Pre_checkout_query))}, {<<"shipping_option_id"/utf8>>, gleam@json:nullable( erlang:element(7, Pre_checkout_query), fun gleam@json:string/1 )}, {<<"order_info"/utf8>>, gleam@json:nullable( erlang:element(8, Pre_checkout_query), fun encode_order_info/1 )}] ). -file("src/telega/model.gleam", 15363). -spec encode_paid_media_purchased(paid_media_purchased()) -> gleam@json:json(). encode_paid_media_purchased(Paid_media_purchased) -> json_object_filter_nulls( [{<<"from"/utf8>>, encode_user(erlang:element(2, Paid_media_purchased))}, {<<"paid_media_payload"/utf8>>, gleam@json:string(erlang:element(3, Paid_media_purchased))}] ). -file("src/telega/model.gleam", 15375). -spec encode_revenue_withdrawal_state_pending( revenue_withdrawal_state_pending() ) -> gleam@json:json(). encode_revenue_withdrawal_state_pending(Revenue_withdrawal_state_pending) -> json_object_filter_nulls( [{<<"type"/utf8>>, gleam@json:string( erlang:element(2, Revenue_withdrawal_state_pending) )}] ). -file("src/telega/model.gleam", 15383). -spec encode_revenue_withdrawal_state_succeeded( revenue_withdrawal_state_succeeded() ) -> gleam@json:json(). encode_revenue_withdrawal_state_succeeded(Revenue_withdrawal_state_succeeded) -> json_object_filter_nulls( [{<<"type"/utf8>>, gleam@json:string( erlang:element(2, Revenue_withdrawal_state_succeeded) )}, {<<"date"/utf8>>, gleam@json:int( erlang:element(3, Revenue_withdrawal_state_succeeded) )}, {<<"url"/utf8>>, gleam@json:string( erlang:element(4, Revenue_withdrawal_state_succeeded) )}] ). -file("src/telega/model.gleam", 15393). -spec encode_revenue_withdrawal_state_failed(revenue_withdrawal_state_failed()) -> gleam@json:json(). encode_revenue_withdrawal_state_failed(Revenue_withdrawal_state_failed) -> json_object_filter_nulls( [{<<"type"/utf8>>, gleam@json:string( erlang:element(2, Revenue_withdrawal_state_failed) )}] ). -file("src/telega/model.gleam", 15401). -spec encode_affiliate_info(affiliate_info()) -> gleam@json:json(). encode_affiliate_info(Affiliate_info) -> json_object_filter_nulls( [{<<"affiliate_user"/utf8>>, gleam@json:nullable( erlang:element(2, Affiliate_info), fun encode_user/1 )}, {<<"affiliate_chat"/utf8>>, gleam@json:nullable( erlang:element(3, Affiliate_info), fun encode_chat/1 )}, {<<"commission_per_mille"/utf8>>, gleam@json:int(erlang:element(4, Affiliate_info))}, {<<"amount"/utf8>>, gleam@json:int(erlang:element(5, Affiliate_info))}, {<<"nanostar_amount"/utf8>>, gleam@json:nullable( erlang:element(6, Affiliate_info), fun gleam@json:int/1 )}] ). -file("src/telega/model.gleam", 15453). -spec encode_transaction_partner_chat(transaction_partner_chat()) -> gleam@json:json(). encode_transaction_partner_chat(Transaction_partner_chat) -> json_object_filter_nulls( [{<<"type"/utf8>>, gleam@json:string(erlang:element(2, Transaction_partner_chat))}, {<<"chat"/utf8>>, encode_chat(erlang:element(3, Transaction_partner_chat))}, {<<"gift"/utf8>>, gleam@json:nullable( erlang:element(4, Transaction_partner_chat), fun encode_gift/1 )}] ). -file("src/telega/model.gleam", 15463). -spec encode_transaction_partner_affiliate_program( transaction_partner_affiliate_program() ) -> gleam@json:json(). encode_transaction_partner_affiliate_program( Transaction_partner_affiliate_program ) -> json_object_filter_nulls( [{<<"type"/utf8>>, gleam@json:string( erlang:element(2, Transaction_partner_affiliate_program) )}, {<<"sponsor_user"/utf8>>, gleam@json:nullable( erlang:element(3, Transaction_partner_affiliate_program), fun encode_user/1 )}, {<<"commission_per_mille"/utf8>>, gleam@json:int( erlang:element(4, Transaction_partner_affiliate_program) )}] ). -file("src/telega/model.gleam", 15497). -spec encode_transaction_partner_telegram_ads( transaction_partner_telegram_ads() ) -> gleam@json:json(). encode_transaction_partner_telegram_ads(Transaction_partner_telegram_ads) -> json_object_filter_nulls( [{<<"type"/utf8>>, gleam@json:string( erlang:element(2, Transaction_partner_telegram_ads) )}] ). -file("src/telega/model.gleam", 15505). -spec encode_transaction_partner_telegram_api( transaction_partner_telegram_api() ) -> gleam@json:json(). encode_transaction_partner_telegram_api(Transaction_partner_telegram_api) -> json_object_filter_nulls( [{<<"type"/utf8>>, gleam@json:string( erlang:element(2, Transaction_partner_telegram_api) )}, {<<"request_count"/utf8>>, gleam@json:int( erlang:element(3, Transaction_partner_telegram_api) )}] ). -file("src/telega/model.gleam", 15514). -spec encode_transaction_partner_other(transaction_partner_other()) -> gleam@json:json(). encode_transaction_partner_other(Transaction_partner_other) -> json_object_filter_nulls( [{<<"type"/utf8>>, gleam@json:string(erlang:element(2, Transaction_partner_other))}] ). -file("src/telega/model.gleam", 15561). -spec encode_passport_file(passport_file()) -> gleam@json:json(). encode_passport_file(Passport_file) -> json_object_filter_nulls( [{<<"file_id"/utf8>>, gleam@json:string(erlang:element(2, Passport_file))}, {<<"file_unique_id"/utf8>>, gleam@json:string(erlang:element(3, Passport_file))}, {<<"file_size"/utf8>>, gleam@json:int(erlang:element(4, Passport_file))}, {<<"file_date"/utf8>>, gleam@json:int(erlang:element(5, Passport_file))}] ). -file("src/telega/model.gleam", 15570). -spec encode_encrypted_passport_element(encrypted_passport_element()) -> gleam@json:json(). encode_encrypted_passport_element(Encrypted_passport_element) -> json_object_filter_nulls( [{<<"type"/utf8>>, gleam@json:string(erlang:element(2, Encrypted_passport_element))}, {<<"data"/utf8>>, gleam@json:nullable( erlang:element(3, Encrypted_passport_element), fun gleam@json:string/1 )}, {<<"phone_number"/utf8>>, gleam@json:nullable( erlang:element(4, Encrypted_passport_element), fun gleam@json:string/1 )}, {<<"email"/utf8>>, gleam@json:nullable( erlang:element(5, Encrypted_passport_element), fun gleam@json:string/1 )}, {<<"files"/utf8>>, gleam@json:nullable( erlang:element(6, Encrypted_passport_element), fun(_capture) -> gleam@json:array(_capture, fun encode_passport_file/1) end )}, {<<"front_side"/utf8>>, gleam@json:nullable( erlang:element(7, Encrypted_passport_element), fun encode_passport_file/1 )}, {<<"reverse_side"/utf8>>, gleam@json:nullable( erlang:element(8, Encrypted_passport_element), fun encode_passport_file/1 )}, {<<"selfie"/utf8>>, gleam@json:nullable( erlang:element(9, Encrypted_passport_element), fun encode_passport_file/1 )}, {<<"translation"/utf8>>, gleam@json:nullable( erlang:element(10, Encrypted_passport_element), fun(_capture@1) -> gleam@json:array(_capture@1, fun encode_passport_file/1) end )}, {<<"hash"/utf8>>, gleam@json:string( erlang:element(11, Encrypted_passport_element) )}] ). -file("src/telega/model.gleam", 15614). -spec encode_encrypted_credentials(encrypted_credentials()) -> gleam@json:json(). encode_encrypted_credentials(Encrypted_credentials) -> json_object_filter_nulls( [{<<"data"/utf8>>, gleam@json:string(erlang:element(2, Encrypted_credentials))}, {<<"hash"/utf8>>, gleam@json:string(erlang:element(3, Encrypted_credentials))}, {<<"secret"/utf8>>, gleam@json:string(erlang:element(4, Encrypted_credentials))}] ). -file("src/telega/model.gleam", 15551). -spec encode_passport_data(passport_data()) -> gleam@json:json(). encode_passport_data(Passport_data) -> json_object_filter_nulls( [{<<"data"/utf8>>, gleam@json:array( erlang:element(2, Passport_data), fun encode_encrypted_passport_element/1 )}, {<<"credentials"/utf8>>, encode_encrypted_credentials(erlang:element(3, Passport_data))}] ). -file("src/telega/model.gleam", 15624). -spec encode_passport_element_error_data_field( passport_element_error_data_field() ) -> gleam@json:json(). encode_passport_element_error_data_field(Passport_element_error_data_field) -> json_object_filter_nulls( [{<<"source"/utf8>>, gleam@json:string( erlang:element(2, Passport_element_error_data_field) )}, {<<"type"/utf8>>, gleam@json:string( erlang:element(3, Passport_element_error_data_field) )}, {<<"field_name"/utf8>>, gleam@json:string( erlang:element(4, Passport_element_error_data_field) )}, {<<"data_hash"/utf8>>, gleam@json:string( erlang:element(5, Passport_element_error_data_field) )}, {<<"message"/utf8>>, gleam@json:string( erlang:element(6, Passport_element_error_data_field) )}] ). -file("src/telega/model.gleam", 15636). -spec encode_passport_element_error_front_side( passport_element_error_front_side() ) -> gleam@json:json(). encode_passport_element_error_front_side(Passport_element_error_front_side) -> json_object_filter_nulls( [{<<"source"/utf8>>, gleam@json:string( erlang:element(2, Passport_element_error_front_side) )}, {<<"type"/utf8>>, gleam@json:string( erlang:element(3, Passport_element_error_front_side) )}, {<<"file_hash"/utf8>>, gleam@json:string( erlang:element(4, Passport_element_error_front_side) )}, {<<"message"/utf8>>, gleam@json:string( erlang:element(5, Passport_element_error_front_side) )}] ). -file("src/telega/model.gleam", 15647). -spec encode_passport_element_error_reverse_side( passport_element_error_reverse_side() ) -> gleam@json:json(). encode_passport_element_error_reverse_side(Passport_element_error_reverse_side) -> json_object_filter_nulls( [{<<"source"/utf8>>, gleam@json:string( erlang:element(2, Passport_element_error_reverse_side) )}, {<<"type"/utf8>>, gleam@json:string( erlang:element(3, Passport_element_error_reverse_side) )}, {<<"file_hash"/utf8>>, gleam@json:string( erlang:element(4, Passport_element_error_reverse_side) )}, {<<"message"/utf8>>, gleam@json:string( erlang:element(5, Passport_element_error_reverse_side) )}] ). -file("src/telega/model.gleam", 15658). -spec encode_passport_element_error_selfie(passport_element_error_selfie()) -> gleam@json:json(). encode_passport_element_error_selfie(Passport_element_error_selfie) -> json_object_filter_nulls( [{<<"source"/utf8>>, gleam@json:string( erlang:element(2, Passport_element_error_selfie) )}, {<<"type"/utf8>>, gleam@json:string( erlang:element(3, Passport_element_error_selfie) )}, {<<"file_hash"/utf8>>, gleam@json:string( erlang:element(4, Passport_element_error_selfie) )}, {<<"message"/utf8>>, gleam@json:string( erlang:element(5, Passport_element_error_selfie) )}] ). -file("src/telega/model.gleam", 15669). -spec encode_passport_element_error_file(passport_element_error_file()) -> gleam@json:json(). encode_passport_element_error_file(Passport_element_error_file) -> json_object_filter_nulls( [{<<"source"/utf8>>, gleam@json:string( erlang:element(2, Passport_element_error_file) )}, {<<"type"/utf8>>, gleam@json:string( erlang:element(3, Passport_element_error_file) )}, {<<"file_hash"/utf8>>, gleam@json:string( erlang:element(4, Passport_element_error_file) )}, {<<"message"/utf8>>, gleam@json:string( erlang:element(5, Passport_element_error_file) )}] ). -file("src/telega/model.gleam", 15680). -spec encode_passport_element_error_files(passport_element_error_files()) -> gleam@json:json(). encode_passport_element_error_files(Passport_element_error_files) -> json_object_filter_nulls( [{<<"source"/utf8>>, gleam@json:string( erlang:element(2, Passport_element_error_files) )}, {<<"type"/utf8>>, gleam@json:string( erlang:element(3, Passport_element_error_files) )}, {<<"file_hashes"/utf8>>, gleam@json:array( erlang:element(4, Passport_element_error_files), fun gleam@json:string/1 )}, {<<"message"/utf8>>, gleam@json:string( erlang:element(5, Passport_element_error_files) )}] ). -file("src/telega/model.gleam", 15694). -spec encode_passport_element_error_translation_file( passport_element_error_translation_file() ) -> gleam@json:json(). encode_passport_element_error_translation_file( Passport_element_error_translation_file ) -> json_object_filter_nulls( [{<<"source"/utf8>>, gleam@json:string( erlang:element(2, Passport_element_error_translation_file) )}, {<<"type"/utf8>>, gleam@json:string( erlang:element(3, Passport_element_error_translation_file) )}, {<<"file_hash"/utf8>>, gleam@json:string( erlang:element(4, Passport_element_error_translation_file) )}, {<<"message"/utf8>>, gleam@json:string( erlang:element(5, Passport_element_error_translation_file) )}] ). -file("src/telega/model.gleam", 15708). -spec encode_passport_element_error_translation_files( passport_element_error_translation_files() ) -> gleam@json:json(). encode_passport_element_error_translation_files( Passport_element_error_translation_files ) -> json_object_filter_nulls( [{<<"source"/utf8>>, gleam@json:string( erlang:element(2, Passport_element_error_translation_files) )}, {<<"type"/utf8>>, gleam@json:string( erlang:element(3, Passport_element_error_translation_files) )}, {<<"file_hashes"/utf8>>, gleam@json:array( erlang:element(4, Passport_element_error_translation_files), fun gleam@json:string/1 )}, {<<"message"/utf8>>, gleam@json:string( erlang:element(5, Passport_element_error_translation_files) )}] ). -file("src/telega/model.gleam", 15724). -spec encode_passport_element_error_unspecified( passport_element_error_unspecified() ) -> gleam@json:json(). encode_passport_element_error_unspecified(Passport_element_error_unspecified) -> json_object_filter_nulls( [{<<"source"/utf8>>, gleam@json:string( erlang:element(2, Passport_element_error_unspecified) )}, {<<"type"/utf8>>, gleam@json:string( erlang:element(3, Passport_element_error_unspecified) )}, {<<"element_hash"/utf8>>, gleam@json:string( erlang:element(4, Passport_element_error_unspecified) )}, {<<"message"/utf8>>, gleam@json:string( erlang:element(5, Passport_element_error_unspecified) )}] ). -file("src/telega/model.gleam", 15738). -spec encode_game(game()) -> gleam@json:json(). encode_game(Game) -> json_object_filter_nulls( [{<<"title"/utf8>>, gleam@json:string(erlang:element(2, Game))}, {<<"description"/utf8>>, gleam@json:string(erlang:element(3, Game))}, {<<"photo"/utf8>>, gleam@json:array( erlang:element(4, Game), fun encode_photo_size/1 )}, {<<"text"/utf8>>, gleam@json:nullable( erlang:element(5, Game), fun gleam@json:string/1 )}, {<<"text_entities"/utf8>>, gleam@json:nullable( erlang:element(6, Game), fun(_capture) -> gleam@json:array(_capture, fun encode_message_entity/1) end )}, {<<"animation"/utf8>>, gleam@json:nullable( erlang:element(7, Game), fun encode_animation/1 )}] ). -file("src/telega/model.gleam", 15752). -spec encode_callback_game(callback_game()) -> gleam@json:json(). encode_callback_game(Callback_game) -> json_object_filter_nulls( [{<<"user_id"/utf8>>, gleam@json:int(erlang:element(2, Callback_game))}, {<<"score"/utf8>>, gleam@json:int(erlang:element(3, Callback_game))}, {<<"force"/utf8>>, gleam@json:nullable( erlang:element(4, Callback_game), fun gleam@json:bool/1 )}, {<<"disable_edit_message"/utf8>>, gleam@json:nullable( erlang:element(5, Callback_game), fun gleam@json:bool/1 )}, {<<"chat_id"/utf8>>, gleam@json:nullable( erlang:element(6, Callback_game), fun gleam@json:int/1 )}, {<<"message_id"/utf8>>, gleam@json:nullable( erlang:element(7, Callback_game), fun gleam@json:int/1 )}, {<<"inline_message_id"/utf8>>, gleam@json:nullable( erlang:element(8, Callback_game), fun gleam@json:string/1 )}] ). -file("src/telega/model.gleam", 12538). -spec encode_inline_keyboard_button(inline_keyboard_button()) -> gleam@json:json(). encode_inline_keyboard_button(Inline_keyboard_button) -> json_object_filter_nulls( [{<<"text"/utf8>>, gleam@json:string(erlang:element(2, Inline_keyboard_button))}, {<<"url"/utf8>>, gleam@json:nullable( erlang:element(3, Inline_keyboard_button), fun gleam@json:string/1 )}, {<<"callback_data"/utf8>>, gleam@json:nullable( erlang:element(4, Inline_keyboard_button), fun gleam@json:string/1 )}, {<<"web_app"/utf8>>, gleam@json:nullable( erlang:element(5, Inline_keyboard_button), fun encode_web_app_info/1 )}, {<<"login_url"/utf8>>, gleam@json:nullable( erlang:element(6, Inline_keyboard_button), fun encode_login_url/1 )}, {<<"switch_inline_query"/utf8>>, gleam@json:nullable( erlang:element(7, Inline_keyboard_button), fun gleam@json:string/1 )}, {<<"switch_inline_query_current_chat"/utf8>>, gleam@json:nullable( erlang:element(8, Inline_keyboard_button), fun gleam@json:string/1 )}, {<<"switch_inline_query_chosen_chat"/utf8>>, gleam@json:nullable( erlang:element(9, Inline_keyboard_button), fun encode_switch_inline_query_chosen_chat/1 )}, {<<"copy_text"/utf8>>, gleam@json:nullable( erlang:element(10, Inline_keyboard_button), fun encode_copy_text_button/1 )}, {<<"callback_game"/utf8>>, gleam@json:nullable( erlang:element(11, Inline_keyboard_button), fun encode_callback_game/1 )}, {<<"pay"/utf8>>, gleam@json:nullable( erlang:element(12, Inline_keyboard_button), fun gleam@json:bool/1 )}] ). -file("src/telega/model.gleam", 12523). -spec encode_inline_keyboard_markup(inline_keyboard_markup()) -> gleam@json:json(). encode_inline_keyboard_markup(Inline_keyboard_markup) -> json_object_filter_nulls( [{<<"inline_keyboard"/utf8>>, (fun(Outer_list) -> gleam@json:array( Outer_list, fun(Inner_list) -> gleam@json:array( Inner_list, fun encode_inline_keyboard_button/1 ) end ) end)(erlang:element(2, Inline_keyboard_markup))}] ). -file("src/telega/model.gleam", 14623). -spec encode_inline_query_result_game(inline_query_result_game()) -> gleam@json:json(). encode_inline_query_result_game(Inline_query_result_game) -> json_object_filter_nulls( [{<<"type"/utf8>>, gleam@json:string(erlang:element(2, Inline_query_result_game))}, {<<"id"/utf8>>, gleam@json:string(erlang:element(3, Inline_query_result_game))}, {<<"game_short_name"/utf8>>, gleam@json:string(erlang:element(4, Inline_query_result_game))}, {<<"reply_markup"/utf8>>, gleam@json:nullable( erlang:element(5, Inline_query_result_game), fun encode_inline_keyboard_markup/1 )}] ). -file("src/telega/model.gleam", 15770). -spec encode_game_high_score(game_high_score()) -> gleam@json:json(). encode_game_high_score(Game_high_score) -> json_object_filter_nulls( [{<<"position"/utf8>>, gleam@json:int(erlang:element(2, Game_high_score))}, {<<"user"/utf8>>, encode_user(erlang:element(3, Game_high_score))}, {<<"score"/utf8>>, gleam@json:int(erlang:element(4, Game_high_score))}] ). -file("src/telega/model.gleam", 16332). -spec encode_message_origin(message_origin()) -> gleam@json:json(). encode_message_origin(Value) -> case Value of {message_origin_user_message_origin, Inner_value} -> encode_message_origin_user(Inner_value); {message_origin_hidden_user_message_origin, Inner_value@1} -> encode_message_origin_hidden_user(Inner_value@1); {message_origin_chat_message_origin, Inner_value@2} -> encode_message_origin_chat(Inner_value@2); {message_origin_channel_message_origin, Inner_value@3} -> encode_message_origin_channel(Inner_value@3) end. -file("src/telega/model.gleam", 16348). -spec encode_paid_media(paid_media()) -> gleam@json:json(). encode_paid_media(Value) -> case Value of {paid_media_preview_paid_media, Inner_value} -> encode_paid_media_preview(Inner_value); {paid_media_photo_paid_media, Inner_value@1} -> encode_paid_media_photo(Inner_value@1); {paid_media_video_paid_media, Inner_value@2} -> encode_paid_media_video(Inner_value@2) end. -file("src/telega/model.gleam", 11812). -spec encode_paid_media_info(paid_media_info()) -> gleam@json:json(). encode_paid_media_info(Paid_media_info) -> json_object_filter_nulls( [{<<"star_count"/utf8>>, gleam@json:int(erlang:element(2, Paid_media_info))}, {<<"paid_media"/utf8>>, gleam@json:array( erlang:element(3, Paid_media_info), fun encode_paid_media/1 )}] ). -file("src/telega/model.gleam", 11582). -spec encode_external_reply_info(external_reply_info()) -> gleam@json:json(). encode_external_reply_info(External_reply_info) -> json_object_filter_nulls( [{<<"origin"/utf8>>, encode_message_origin(erlang:element(2, External_reply_info))}, {<<"chat"/utf8>>, gleam@json:nullable( erlang:element(3, External_reply_info), fun encode_chat/1 )}, {<<"message_id"/utf8>>, gleam@json:nullable( erlang:element(4, External_reply_info), fun gleam@json:int/1 )}, {<<"link_preview_options"/utf8>>, gleam@json:nullable( erlang:element(5, External_reply_info), fun encode_link_preview_options/1 )}, {<<"animation"/utf8>>, gleam@json:nullable( erlang:element(6, External_reply_info), fun encode_animation/1 )}, {<<"audio"/utf8>>, gleam@json:nullable( erlang:element(7, External_reply_info), fun encode_audio/1 )}, {<<"document"/utf8>>, gleam@json:nullable( erlang:element(8, External_reply_info), fun encode_document/1 )}, {<<"paid_media"/utf8>>, gleam@json:nullable( erlang:element(9, External_reply_info), fun encode_paid_media_info/1 )}, {<<"photo"/utf8>>, gleam@json:nullable( erlang:element(10, External_reply_info), fun(_capture) -> gleam@json:array(_capture, fun encode_photo_size/1) end )}, {<<"sticker"/utf8>>, gleam@json:nullable( erlang:element(11, External_reply_info), fun encode_sticker/1 )}, {<<"story"/utf8>>, gleam@json:nullable( erlang:element(12, External_reply_info), fun encode_story/1 )}, {<<"video"/utf8>>, gleam@json:nullable( erlang:element(13, External_reply_info), fun encode_video/1 )}, {<<"video_note"/utf8>>, gleam@json:nullable( erlang:element(14, External_reply_info), fun encode_video_note/1 )}, {<<"voice"/utf8>>, gleam@json:nullable( erlang:element(15, External_reply_info), fun encode_voice/1 )}, {<<"has_media_spoiler"/utf8>>, gleam@json:nullable( erlang:element(16, External_reply_info), fun gleam@json:bool/1 )}, {<<"contact"/utf8>>, gleam@json:nullable( erlang:element(17, External_reply_info), fun encode_contact/1 )}, {<<"dice"/utf8>>, gleam@json:nullable( erlang:element(18, External_reply_info), fun encode_dice/1 )}, {<<"game"/utf8>>, gleam@json:nullable( erlang:element(19, External_reply_info), fun encode_game/1 )}, {<<"giveaway"/utf8>>, gleam@json:nullable( erlang:element(20, External_reply_info), fun encode_giveaway/1 )}, {<<"giveaway_winners"/utf8>>, gleam@json:nullable( erlang:element(21, External_reply_info), fun encode_giveaway_winners/1 )}, {<<"invoice"/utf8>>, gleam@json:nullable( erlang:element(22, External_reply_info), fun encode_invoice/1 )}, {<<"location"/utf8>>, gleam@json:nullable( erlang:element(23, External_reply_info), fun encode_location/1 )}, {<<"poll"/utf8>>, gleam@json:nullable( erlang:element(24, External_reply_info), fun encode_poll/1 )}, {<<"venue"/utf8>>, gleam@json:nullable( erlang:element(25, External_reply_info), fun encode_venue/1 )}] ). -file("src/telega/model.gleam", 15420). -spec encode_transaction_partner_user(transaction_partner_user()) -> gleam@json:json(). encode_transaction_partner_user(Transaction_partner_user) -> json_object_filter_nulls( [{<<"type"/utf8>>, gleam@json:string(erlang:element(2, Transaction_partner_user))}, {<<"user"/utf8>>, encode_user(erlang:element(3, Transaction_partner_user))}, {<<"affiliate"/utf8>>, gleam@json:nullable( erlang:element(4, Transaction_partner_user), fun encode_affiliate_info/1 )}, {<<"invoice_payload"/utf8>>, gleam@json:nullable( erlang:element(5, Transaction_partner_user), fun gleam@json:string/1 )}, {<<"subscription_period"/utf8>>, gleam@json:nullable( erlang:element(6, Transaction_partner_user), fun gleam@json:int/1 )}, {<<"paid_media"/utf8>>, gleam@json:nullable( erlang:element(7, Transaction_partner_user), fun(_capture) -> gleam@json:array(_capture, fun encode_paid_media/1) end )}, {<<"paid_media_payload"/utf8>>, gleam@json:nullable( erlang:element(8, Transaction_partner_user), fun gleam@json:string/1 )}, {<<"gift"/utf8>>, gleam@json:nullable( erlang:element(9, Transaction_partner_user), fun encode_gift/1 )}] ). -file("src/telega/model.gleam", 16359). -spec encode_background_fill(background_fill()) -> gleam@json:json(). encode_background_fill(Value) -> case Value of {background_fill_solid_background_fill, Inner_value} -> encode_background_fill_solid(Inner_value); {background_fill_gradient_background_fill, Inner_value@1} -> encode_background_fill_gradient(Inner_value@1); {background_fill_freeform_gradient_background_fill, Inner_value@2} -> encode_background_fill_freeform_gradient(Inner_value@2) end. -file("src/telega/model.gleam", 12025). -spec encode_background_type_fill(background_type_fill()) -> gleam@json:json(). encode_background_type_fill(Background_type_fill) -> json_object_filter_nulls( [{<<"type"/utf8>>, gleam@json:string(erlang:element(2, Background_type_fill))}, {<<"fill"/utf8>>, encode_background_fill(erlang:element(3, Background_type_fill))}, {<<"dark_theme_dimming"/utf8>>, gleam@json:int(erlang:element(4, Background_type_fill))}] ). -file("src/telega/model.gleam", 12056). -spec encode_background_type_pattern(background_type_pattern()) -> gleam@json:json(). encode_background_type_pattern(Background_type_pattern) -> json_object_filter_nulls( [{<<"type"/utf8>>, gleam@json:string(erlang:element(2, Background_type_pattern))}, {<<"document"/utf8>>, encode_document(erlang:element(3, Background_type_pattern))}, {<<"fill"/utf8>>, encode_background_fill( erlang:element(4, Background_type_pattern) )}, {<<"intensity"/utf8>>, gleam@json:int(erlang:element(5, Background_type_pattern))}, {<<"is_inverted"/utf8>>, gleam@json:nullable( erlang:element(6, Background_type_pattern), fun gleam@json:bool/1 )}, {<<"is_moving"/utf8>>, gleam@json:nullable( erlang:element(7, Background_type_pattern), fun gleam@json:bool/1 )}] ). -file("src/telega/model.gleam", 16372). -spec encode_background_type(background_type()) -> gleam@json:json(). encode_background_type(Value) -> case Value of {background_type_fill_background_type, Inner_value} -> encode_background_type_fill(Inner_value); {background_type_wallpaper_background_type, Inner_value@1} -> encode_background_type_wallpaper(Inner_value@1); {background_type_pattern_background_type, Inner_value@2} -> encode_background_type_pattern(Inner_value@2); {background_type_chat_theme_background_type, Inner_value@3} -> encode_background_type_chat_theme(Inner_value@3) end. -file("src/telega/model.gleam", 12081). -spec encode_chat_background(chat_background()) -> gleam@json:json(). encode_chat_background(Chat_background) -> json_object_filter_nulls( [{<<"type"/utf8>>, encode_background_type(erlang:element(2, Chat_background))}] ). -file("src/telega/model.gleam", 16388). -spec encode_chat_member(chat_member()) -> gleam@json:json(). encode_chat_member(Value) -> case Value of {chat_member_owner_chat_member, Inner_value} -> encode_chat_member_owner(Inner_value); {chat_member_administrator_chat_member, Inner_value@1} -> encode_chat_member_administrator(Inner_value@1); {chat_member_member_chat_member, Inner_value@2} -> encode_chat_member_member(Inner_value@2); {chat_member_restricted_chat_member, Inner_value@3} -> encode_chat_member_restricted(Inner_value@3); {chat_member_left_chat_member, Inner_value@4} -> encode_chat_member_left(Inner_value@4); {chat_member_banned_chat_member, Inner_value@5} -> encode_chat_member_banned(Inner_value@5) end. -file("src/telega/model.gleam", 12750). -spec encode_chat_member_updated(chat_member_updated()) -> gleam@json:json(). encode_chat_member_updated(Chat_member_updated) -> json_object_filter_nulls( [{<<"chat"/utf8>>, encode_chat(erlang:element(2, Chat_member_updated))}, {<<"from"/utf8>>, encode_user(erlang:element(3, Chat_member_updated))}, {<<"date"/utf8>>, gleam@json:int(erlang:element(4, Chat_member_updated))}, {<<"old_chat_member"/utf8>>, encode_chat_member(erlang:element(5, Chat_member_updated))}, {<<"new_chat_member"/utf8>>, encode_chat_member(erlang:element(6, Chat_member_updated))}, {<<"invite_link"/utf8>>, gleam@json:nullable( erlang:element(7, Chat_member_updated), fun encode_chat_invite_link/1 )}, {<<"via_join_request"/utf8>>, gleam@json:nullable( erlang:element(8, Chat_member_updated), fun gleam@json:bool/1 )}, {<<"via_chat_folder_invite_link"/utf8>>, gleam@json:nullable( erlang:element(9, Chat_member_updated), fun gleam@json:bool/1 )}] ). -file("src/telega/model.gleam", 16410). -spec encode_reaction_type(reaction_type()) -> gleam@json:json(). encode_reaction_type(Value) -> case Value of {reaction_type_emoji_reaction_type, Inner_value} -> encode_reaction_type_emoji(Inner_value); {reaction_type_custom_emoji_reaction_type, Inner_value@1} -> encode_reaction_type_custom_emoji(Inner_value@1); {reaction_type_paid_reaction_type, Inner_value@2} -> encode_reaction_type_paid(Inner_value@2) end. -file("src/telega/model.gleam", 13089). -spec encode_story_area_type_suggested_reaction( story_area_type_suggested_reaction() ) -> gleam@json:json(). encode_story_area_type_suggested_reaction(Story_area_type_suggested_reaction) -> json_object_filter_nulls( [{<<"type"/utf8>>, gleam@json:string( erlang:element(2, Story_area_type_suggested_reaction) )}, {<<"reaction_type"/utf8>>, encode_reaction_type( erlang:element(3, Story_area_type_suggested_reaction) )}, {<<"is_dark"/utf8>>, gleam@json:nullable( erlang:element(4, Story_area_type_suggested_reaction), fun gleam@json:bool/1 )}, {<<"is_flipped"/utf8>>, gleam@json:nullable( erlang:element(5, Story_area_type_suggested_reaction), fun gleam@json:bool/1 )}] ). -file("src/telega/model.gleam", 13177). -spec encode_reaction_count(reaction_count()) -> gleam@json:json(). encode_reaction_count(Reaction_count) -> json_object_filter_nulls( [{<<"type"/utf8>>, encode_reaction_type(erlang:element(2, Reaction_count))}, {<<"total_count"/utf8>>, gleam@json:int(erlang:element(3, Reaction_count))}] ). -file("src/telega/model.gleam", 13184). -spec encode_message_reaction_updated(message_reaction_updated()) -> gleam@json:json(). encode_message_reaction_updated(Message_reaction_updated) -> json_object_filter_nulls( [{<<"chat"/utf8>>, encode_chat(erlang:element(2, Message_reaction_updated))}, {<<"message_id"/utf8>>, gleam@json:int(erlang:element(3, Message_reaction_updated))}, {<<"user"/utf8>>, gleam@json:nullable( erlang:element(4, Message_reaction_updated), fun encode_user/1 )}, {<<"actor_chat"/utf8>>, gleam@json:nullable( erlang:element(5, Message_reaction_updated), fun encode_chat/1 )}, {<<"date"/utf8>>, gleam@json:int(erlang:element(6, Message_reaction_updated))}, {<<"old_reaction"/utf8>>, gleam@json:array( erlang:element(7, Message_reaction_updated), fun encode_reaction_type/1 )}, {<<"new_reaction"/utf8>>, gleam@json:array( erlang:element(8, Message_reaction_updated), fun encode_reaction_type/1 )}] ). -file("src/telega/model.gleam", 13207). -spec encode_message_reaction_count_updated(message_reaction_count_updated()) -> gleam@json:json(). encode_message_reaction_count_updated(Message_reaction_count_updated) -> json_object_filter_nulls( [{<<"chat"/utf8>>, encode_chat(erlang:element(2, Message_reaction_count_updated))}, {<<"message_id"/utf8>>, gleam@json:int( erlang:element(3, Message_reaction_count_updated) )}, {<<"date"/utf8>>, gleam@json:int( erlang:element(4, Message_reaction_count_updated) )}, {<<"reactions"/utf8>>, gleam@json:array( erlang:element(5, Message_reaction_count_updated), fun encode_reaction_count/1 )}] ). -file("src/telega/model.gleam", 16423). -spec encode_bot_command_scope(bot_command_scope()) -> gleam@json:json(). encode_bot_command_scope(Value) -> case Value of {bot_command_scope_default_bot_command_scope, Inner_value} -> encode_bot_command_scope_default(Inner_value); {bot_command_scope_all_private_chats_bot_command_scope, Inner_value@1} -> encode_bot_command_scope_all_private_chats(Inner_value@1); {bot_command_scope_all_group_chats_bot_command_scope, Inner_value@2} -> encode_bot_command_scope_all_group_chats(Inner_value@2); {bot_command_scope_all_chat_administrators_bot_command_scope, Inner_value@3} -> encode_bot_command_scope_all_chat_administrators(Inner_value@3); {bot_command_scope_chat_bot_command_scope, Inner_value@4} -> encode_bot_command_scope_chat(Inner_value@4); {bot_command_scope_chat_administrators_bot_command_scope, Inner_value@5} -> encode_bot_command_scope_chat_administrators(Inner_value@5); {bot_command_scope_chat_member_bot_command_scope, Inner_value@6} -> encode_bot_command_scope_chat_member(Inner_value@6) end. -file("src/telega/model.gleam", 16448). -spec encode_menu_button(menu_button()) -> gleam@json:json(). encode_menu_button(Value) -> case Value of {menu_button_commands_menu_button, Inner_value} -> encode_menu_button_commands(Inner_value); {menu_button_web_app_menu_button, Inner_value@1} -> encode_menu_button_web_app(Inner_value@1); {menu_button_default_menu_button, Inner_value@2} -> encode_menu_button_default(Inner_value@2) end. -file("src/telega/model.gleam", 16461). -spec encode_chat_boost_source(chat_boost_source()) -> gleam@json:json(). encode_chat_boost_source(Value) -> case Value of {chat_boost_source_premium_chat_boost_source, Inner_value} -> encode_chat_boost_source_premium(Inner_value); {chat_boost_source_gift_code_chat_boost_source, Inner_value@1} -> encode_chat_boost_source_gift_code(Inner_value@1); {chat_boost_source_giveaway_chat_boost_source, Inner_value@2} -> encode_chat_boost_source_giveaway(Inner_value@2) end. -file("src/telega/model.gleam", 13596). -spec encode_chat_boost(chat_boost()) -> gleam@json:json(). encode_chat_boost(Chat_boost) -> json_object_filter_nulls( [{<<"boost_id"/utf8>>, gleam@json:string(erlang:element(2, Chat_boost))}, {<<"add_date"/utf8>>, gleam@json:int(erlang:element(3, Chat_boost))}, {<<"expiration_date"/utf8>>, gleam@json:int(erlang:element(4, Chat_boost))}, {<<"source"/utf8>>, encode_chat_boost_source(erlang:element(5, Chat_boost))}] ). -file("src/telega/model.gleam", 13605). -spec encode_chat_boost_updated(chat_boost_updated()) -> gleam@json:json(). encode_chat_boost_updated(Chat_boost_updated) -> json_object_filter_nulls( [{<<"chat"/utf8>>, encode_chat(erlang:element(2, Chat_boost_updated))}, {<<"boost"/utf8>>, encode_chat_boost(erlang:element(3, Chat_boost_updated))}] ). -file("src/telega/model.gleam", 13612). -spec encode_chat_boost_removed(chat_boost_removed()) -> gleam@json:json(). encode_chat_boost_removed(Chat_boost_removed) -> json_object_filter_nulls( [{<<"chat"/utf8>>, encode_chat(erlang:element(2, Chat_boost_removed))}, {<<"boost_id"/utf8>>, gleam@json:string(erlang:element(3, Chat_boost_removed))}, {<<"remove_date"/utf8>>, gleam@json:int(erlang:element(4, Chat_boost_removed))}, {<<"source"/utf8>>, encode_chat_boost_source(erlang:element(5, Chat_boost_removed))}] ). -file("src/telega/model.gleam", 13621). -spec encode_user_chat_boosts(user_chat_boosts()) -> gleam@json:json(). encode_user_chat_boosts(User_chat_boosts) -> json_object_filter_nulls( [{<<"boosts"/utf8>>, gleam@json:array( erlang:element(2, User_chat_boosts), fun encode_chat_boost/1 )}] ). -file("src/telega/model.gleam", 16474). -spec encode_input_media(input_media()) -> gleam@json:json(). encode_input_media(Value) -> case Value of {input_media_animation_input_media, Inner_value} -> encode_input_media_animation(Inner_value); {input_media_document_input_media, Inner_value@1} -> encode_input_media_document(Inner_value@1); {input_media_audio_input_media, Inner_value@2} -> encode_input_media_audio(Inner_value@2); {input_media_photo_input_media, Inner_value@3} -> encode_input_media_photo(Inner_value@3); {input_media_video_input_media, Inner_value@4} -> encode_input_media_video(Inner_value@4) end. -file("src/telega/model.gleam", 16493). -spec encode_input_profile_photo(input_profile_photo()) -> gleam@json:json(). encode_input_profile_photo(Value) -> case Value of {input_profile_photo_static_input_profile_photo, Inner_value} -> encode_input_profile_photo_static(Inner_value); {input_profile_photo_animated_input_profile_photo, Inner_value@1} -> encode_input_profile_photo_animated(Inner_value@1) end. -file("src/telega/model.gleam", 16503). -spec encode_input_paid_media(input_paid_media()) -> gleam@json:json(). encode_input_paid_media(Value) -> case Value of {input_paid_media_photo_input_paid_media, Inner_value} -> encode_input_paid_media_photo(Inner_value); {input_paid_media_video_input_paid_media, Inner_value@1} -> encode_input_paid_media_video(Inner_value@1) end. -file("src/telega/model.gleam", 16577). -spec encode_input_message_content(input_message_content()) -> gleam@json:json(). encode_input_message_content(Value) -> case Value of {input_text_message_content_input_message_content, Inner_value} -> encode_input_text_message_content(Inner_value); {input_location_message_content_input_message_content, Inner_value@1} -> encode_input_location_message_content(Inner_value@1); {input_venue_message_content_input_message_content, Inner_value@2} -> encode_input_venue_message_content(Inner_value@2); {input_contact_message_content_input_message_content, Inner_value@3} -> encode_input_contact_message_content(Inner_value@3); {input_invoice_message_content_input_message_content, Inner_value@4} -> encode_input_invoice_message_content(Inner_value@4) end. -file("src/telega/model.gleam", 14048). -spec encode_inline_query_result_article(inline_query_result_article()) -> gleam@json:json(). encode_inline_query_result_article(Inline_query_result_article) -> json_object_filter_nulls( [{<<"type"/utf8>>, gleam@json:string( erlang:element(2, Inline_query_result_article) )}, {<<"id"/utf8>>, gleam@json:string( erlang:element(3, Inline_query_result_article) )}, {<<"title"/utf8>>, gleam@json:string( erlang:element(4, Inline_query_result_article) )}, {<<"input_message_content"/utf8>>, encode_input_message_content( erlang:element(5, Inline_query_result_article) )}, {<<"reply_markup"/utf8>>, gleam@json:nullable( erlang:element(6, Inline_query_result_article), fun encode_inline_keyboard_markup/1 )}, {<<"url"/utf8>>, gleam@json:nullable( erlang:element(7, Inline_query_result_article), fun gleam@json:string/1 )}, {<<"description"/utf8>>, gleam@json:nullable( erlang:element(8, Inline_query_result_article), fun gleam@json:string/1 )}, {<<"thumbnail_url"/utf8>>, gleam@json:nullable( erlang:element(9, Inline_query_result_article), fun gleam@json:string/1 )}, {<<"thumbnail_width"/utf8>>, gleam@json:nullable( erlang:element(10, Inline_query_result_article), fun gleam@json:int/1 )}, {<<"thumbnail_height"/utf8>>, gleam@json:nullable( erlang:element(11, Inline_query_result_article), fun gleam@json:int/1 )}] ). -file("src/telega/model.gleam", 14088). -spec encode_inline_query_result_photo(inline_query_result_photo()) -> gleam@json:json(). encode_inline_query_result_photo(Inline_query_result_photo) -> json_object_filter_nulls( [{<<"type"/utf8>>, gleam@json:string(erlang:element(2, Inline_query_result_photo))}, {<<"id"/utf8>>, gleam@json:string(erlang:element(3, Inline_query_result_photo))}, {<<"photo_url"/utf8>>, gleam@json:string(erlang:element(4, Inline_query_result_photo))}, {<<"thumbnail_url"/utf8>>, gleam@json:string(erlang:element(5, Inline_query_result_photo))}, {<<"photo_width"/utf8>>, gleam@json:nullable( erlang:element(6, Inline_query_result_photo), fun gleam@json:int/1 )}, {<<"photo_height"/utf8>>, gleam@json:nullable( erlang:element(7, Inline_query_result_photo), fun gleam@json:int/1 )}, {<<"title"/utf8>>, gleam@json:nullable( erlang:element(8, Inline_query_result_photo), fun gleam@json:string/1 )}, {<<"description"/utf8>>, gleam@json:nullable( erlang:element(9, Inline_query_result_photo), fun gleam@json:string/1 )}, {<<"caption"/utf8>>, gleam@json:nullable( erlang:element(10, Inline_query_result_photo), fun gleam@json:string/1 )}, {<<"parse_mode"/utf8>>, gleam@json:nullable( erlang:element(11, Inline_query_result_photo), fun gleam@json:string/1 )}, {<<"caption_entities"/utf8>>, gleam@json:nullable( erlang:element(12, Inline_query_result_photo), fun(_capture) -> gleam@json:array(_capture, fun encode_message_entity/1) end )}, {<<"show_caption_above_media"/utf8>>, gleam@json:nullable( erlang:element(13, Inline_query_result_photo), fun gleam@json:bool/1 )}, {<<"reply_markup"/utf8>>, gleam@json:nullable( erlang:element(14, Inline_query_result_photo), fun encode_inline_keyboard_markup/1 )}, {<<"input_message_content"/utf8>>, gleam@json:nullable( erlang:element(15, Inline_query_result_photo), fun encode_input_message_content/1 )}] ). -file("src/telega/model.gleam", 14145). -spec encode_inline_query_result_gif(inline_query_result_gif()) -> gleam@json:json(). encode_inline_query_result_gif(Inline_query_result_gif) -> json_object_filter_nulls( [{<<"type"/utf8>>, gleam@json:string(erlang:element(2, Inline_query_result_gif))}, {<<"id"/utf8>>, gleam@json:string(erlang:element(3, Inline_query_result_gif))}, {<<"gif_url"/utf8>>, gleam@json:string(erlang:element(4, Inline_query_result_gif))}, {<<"gif_width"/utf8>>, gleam@json:nullable( erlang:element(5, Inline_query_result_gif), fun gleam@json:int/1 )}, {<<"gif_height"/utf8>>, gleam@json:nullable( erlang:element(6, Inline_query_result_gif), fun gleam@json:int/1 )}, {<<"gif_duration"/utf8>>, gleam@json:nullable( erlang:element(7, Inline_query_result_gif), fun gleam@json:int/1 )}, {<<"thumbnail_url"/utf8>>, gleam@json:string(erlang:element(8, Inline_query_result_gif))}, {<<"thumbnail_mime_type"/utf8>>, gleam@json:nullable( erlang:element(9, Inline_query_result_gif), fun gleam@json:string/1 )}, {<<"title"/utf8>>, gleam@json:nullable( erlang:element(10, Inline_query_result_gif), fun gleam@json:string/1 )}, {<<"caption"/utf8>>, gleam@json:nullable( erlang:element(11, Inline_query_result_gif), fun gleam@json:string/1 )}, {<<"parse_mode"/utf8>>, gleam@json:nullable( erlang:element(12, Inline_query_result_gif), fun gleam@json:string/1 )}, {<<"caption_entities"/utf8>>, gleam@json:nullable( erlang:element(13, Inline_query_result_gif), fun(_capture) -> gleam@json:array(_capture, fun encode_message_entity/1) end )}, {<<"show_caption_above_media"/utf8>>, gleam@json:nullable( erlang:element(14, Inline_query_result_gif), fun gleam@json:bool/1 )}, {<<"reply_markup"/utf8>>, gleam@json:nullable( erlang:element(15, Inline_query_result_gif), fun encode_inline_keyboard_markup/1 )}, {<<"input_message_content"/utf8>>, gleam@json:nullable( erlang:element(16, Inline_query_result_gif), fun encode_input_message_content/1 )}] ). -file("src/telega/model.gleam", 14197). -spec encode_inline_query_result_mpeg4_gif(inline_query_result_mpeg4_gif()) -> gleam@json:json(). encode_inline_query_result_mpeg4_gif(Inline_query_result_mpeg4_gif) -> json_object_filter_nulls( [{<<"type"/utf8>>, gleam@json:string( erlang:element(2, Inline_query_result_mpeg4_gif) )}, {<<"id"/utf8>>, gleam@json:string( erlang:element(3, Inline_query_result_mpeg4_gif) )}, {<<"mpeg4_url"/utf8>>, gleam@json:string( erlang:element(4, Inline_query_result_mpeg4_gif) )}, {<<"mpeg4_width"/utf8>>, gleam@json:nullable( erlang:element(5, Inline_query_result_mpeg4_gif), fun gleam@json:int/1 )}, {<<"mpeg4_height"/utf8>>, gleam@json:nullable( erlang:element(6, Inline_query_result_mpeg4_gif), fun gleam@json:int/1 )}, {<<"mpeg4_duration"/utf8>>, gleam@json:nullable( erlang:element(7, Inline_query_result_mpeg4_gif), fun gleam@json:int/1 )}, {<<"thumbnail_url"/utf8>>, gleam@json:string( erlang:element(8, Inline_query_result_mpeg4_gif) )}, {<<"thumbnail_mime_type"/utf8>>, gleam@json:nullable( erlang:element(9, Inline_query_result_mpeg4_gif), fun gleam@json:string/1 )}, {<<"title"/utf8>>, gleam@json:nullable( erlang:element(10, Inline_query_result_mpeg4_gif), fun gleam@json:string/1 )}, {<<"caption"/utf8>>, gleam@json:nullable( erlang:element(11, Inline_query_result_mpeg4_gif), fun gleam@json:string/1 )}, {<<"parse_mode"/utf8>>, gleam@json:nullable( erlang:element(12, Inline_query_result_mpeg4_gif), fun gleam@json:string/1 )}, {<<"caption_entities"/utf8>>, gleam@json:nullable( erlang:element(13, Inline_query_result_mpeg4_gif), fun(_capture) -> gleam@json:array(_capture, fun encode_message_entity/1) end )}, {<<"show_caption_above_media"/utf8>>, gleam@json:nullable( erlang:element(14, Inline_query_result_mpeg4_gif), fun gleam@json:bool/1 )}, {<<"reply_markup"/utf8>>, gleam@json:nullable( erlang:element(15, Inline_query_result_mpeg4_gif), fun encode_inline_keyboard_markup/1 )}, {<<"input_message_content"/utf8>>, gleam@json:nullable( erlang:element(16, Inline_query_result_mpeg4_gif), fun encode_input_message_content/1 )}] ). -file("src/telega/model.gleam", 14264). -spec encode_inline_query_result_video(inline_query_result_video()) -> gleam@json:json(). encode_inline_query_result_video(Inline_query_result_video) -> json_object_filter_nulls( [{<<"type"/utf8>>, gleam@json:string(erlang:element(2, Inline_query_result_video))}, {<<"id"/utf8>>, gleam@json:string(erlang:element(3, Inline_query_result_video))}, {<<"video_url"/utf8>>, gleam@json:string(erlang:element(4, Inline_query_result_video))}, {<<"mime_type"/utf8>>, gleam@json:string(erlang:element(5, Inline_query_result_video))}, {<<"thumbnail_url"/utf8>>, gleam@json:string(erlang:element(6, Inline_query_result_video))}, {<<"title"/utf8>>, gleam@json:string(erlang:element(7, Inline_query_result_video))}, {<<"caption"/utf8>>, gleam@json:nullable( erlang:element(8, Inline_query_result_video), fun gleam@json:string/1 )}, {<<"parse_mode"/utf8>>, gleam@json:nullable( erlang:element(9, Inline_query_result_video), fun gleam@json:string/1 )}, {<<"caption_entities"/utf8>>, gleam@json:nullable( erlang:element(10, Inline_query_result_video), fun(_capture) -> gleam@json:array(_capture, fun encode_message_entity/1) end )}, {<<"show_caption_above_media"/utf8>>, gleam@json:nullable( erlang:element(11, Inline_query_result_video), fun gleam@json:bool/1 )}, {<<"video_width"/utf8>>, gleam@json:nullable( erlang:element(12, Inline_query_result_video), fun gleam@json:int/1 )}, {<<"video_height"/utf8>>, gleam@json:nullable( erlang:element(13, Inline_query_result_video), fun gleam@json:int/1 )}, {<<"video_duration"/utf8>>, gleam@json:nullable( erlang:element(14, Inline_query_result_video), fun gleam@json:int/1 )}, {<<"description"/utf8>>, gleam@json:nullable( erlang:element(15, Inline_query_result_video), fun gleam@json:string/1 )}, {<<"reply_markup"/utf8>>, gleam@json:nullable( erlang:element(16, Inline_query_result_video), fun encode_inline_keyboard_markup/1 )}, {<<"input_message_content"/utf8>>, gleam@json:nullable( erlang:element(17, Inline_query_result_video), fun encode_input_message_content/1 )}] ). -file("src/telega/model.gleam", 14326). -spec encode_inline_query_result_audio(inline_query_result_audio()) -> gleam@json:json(). encode_inline_query_result_audio(Inline_query_result_audio) -> json_object_filter_nulls( [{<<"type"/utf8>>, gleam@json:string(erlang:element(2, Inline_query_result_audio))}, {<<"id"/utf8>>, gleam@json:string(erlang:element(3, Inline_query_result_audio))}, {<<"audio_url"/utf8>>, gleam@json:string(erlang:element(4, Inline_query_result_audio))}, {<<"title"/utf8>>, gleam@json:string(erlang:element(5, Inline_query_result_audio))}, {<<"caption"/utf8>>, gleam@json:nullable( erlang:element(6, Inline_query_result_audio), fun gleam@json:string/1 )}, {<<"parse_mode"/utf8>>, gleam@json:nullable( erlang:element(7, Inline_query_result_audio), fun gleam@json:string/1 )}, {<<"caption_entities"/utf8>>, gleam@json:nullable( erlang:element(8, Inline_query_result_audio), fun(_capture) -> gleam@json:array(_capture, fun encode_message_entity/1) end )}, {<<"performer"/utf8>>, gleam@json:nullable( erlang:element(9, Inline_query_result_audio), fun gleam@json:string/1 )}, {<<"audio_duration"/utf8>>, gleam@json:nullable( erlang:element(10, Inline_query_result_audio), fun gleam@json:int/1 )}, {<<"reply_markup"/utf8>>, gleam@json:nullable( erlang:element(11, Inline_query_result_audio), fun encode_inline_keyboard_markup/1 )}, {<<"input_message_content"/utf8>>, gleam@json:nullable( erlang:element(12, Inline_query_result_audio), fun encode_input_message_content/1 )}] ). -file("src/telega/model.gleam", 14371). -spec encode_inline_query_result_voice(inline_query_result_voice()) -> gleam@json:json(). encode_inline_query_result_voice(Inline_query_result_voice) -> json_object_filter_nulls( [{<<"type"/utf8>>, gleam@json:string(erlang:element(2, Inline_query_result_voice))}, {<<"id"/utf8>>, gleam@json:string(erlang:element(3, Inline_query_result_voice))}, {<<"voice_url"/utf8>>, gleam@json:string(erlang:element(4, Inline_query_result_voice))}, {<<"title"/utf8>>, gleam@json:string(erlang:element(5, Inline_query_result_voice))}, {<<"caption"/utf8>>, gleam@json:nullable( erlang:element(6, Inline_query_result_voice), fun gleam@json:string/1 )}, {<<"parse_mode"/utf8>>, gleam@json:nullable( erlang:element(7, Inline_query_result_voice), fun gleam@json:string/1 )}, {<<"caption_entities"/utf8>>, gleam@json:nullable( erlang:element(8, Inline_query_result_voice), fun(_capture) -> gleam@json:array(_capture, fun encode_message_entity/1) end )}, {<<"voice_duration"/utf8>>, gleam@json:nullable( erlang:element(9, Inline_query_result_voice), fun gleam@json:int/1 )}, {<<"reply_markup"/utf8>>, gleam@json:nullable( erlang:element(10, Inline_query_result_voice), fun encode_inline_keyboard_markup/1 )}, {<<"input_message_content"/utf8>>, gleam@json:nullable( erlang:element(11, Inline_query_result_voice), fun encode_input_message_content/1 )}] ). -file("src/telega/model.gleam", 14412). -spec encode_inline_query_result_document(inline_query_result_document()) -> gleam@json:json(). encode_inline_query_result_document(Inline_query_result_document) -> json_object_filter_nulls( [{<<"type"/utf8>>, gleam@json:string( erlang:element(2, Inline_query_result_document) )}, {<<"id"/utf8>>, gleam@json:string( erlang:element(3, Inline_query_result_document) )}, {<<"title"/utf8>>, gleam@json:string( erlang:element(4, Inline_query_result_document) )}, {<<"caption"/utf8>>, gleam@json:nullable( erlang:element(5, Inline_query_result_document), fun gleam@json:string/1 )}, {<<"parse_mode"/utf8>>, gleam@json:nullable( erlang:element(6, Inline_query_result_document), fun gleam@json:string/1 )}, {<<"caption_entities"/utf8>>, gleam@json:nullable( erlang:element(7, Inline_query_result_document), fun(_capture) -> gleam@json:array(_capture, fun encode_message_entity/1) end )}, {<<"document_url"/utf8>>, gleam@json:string( erlang:element(8, Inline_query_result_document) )}, {<<"mime_type"/utf8>>, gleam@json:string( erlang:element(9, Inline_query_result_document) )}, {<<"description"/utf8>>, gleam@json:nullable( erlang:element(10, Inline_query_result_document), fun gleam@json:string/1 )}, {<<"reply_markup"/utf8>>, gleam@json:nullable( erlang:element(11, Inline_query_result_document), fun encode_inline_keyboard_markup/1 )}, {<<"input_message_content"/utf8>>, gleam@json:nullable( erlang:element(12, Inline_query_result_document), fun encode_input_message_content/1 )}, {<<"thumbnail_url"/utf8>>, gleam@json:nullable( erlang:element(13, Inline_query_result_document), fun gleam@json:string/1 )}, {<<"thumbnail_width"/utf8>>, gleam@json:nullable( erlang:element(14, Inline_query_result_document), fun gleam@json:int/1 )}, {<<"thumbnail_height"/utf8>>, gleam@json:nullable( erlang:element(15, Inline_query_result_document), fun gleam@json:int/1 )}] ). -file("src/telega/model.gleam", 14469). -spec encode_inline_query_result_location(inline_query_result_location()) -> gleam@json:json(). encode_inline_query_result_location(Inline_query_result_location) -> json_object_filter_nulls( [{<<"type"/utf8>>, gleam@json:string( erlang:element(2, Inline_query_result_location) )}, {<<"id"/utf8>>, gleam@json:string( erlang:element(3, Inline_query_result_location) )}, {<<"latitude"/utf8>>, gleam@json:float( erlang:element(4, Inline_query_result_location) )}, {<<"longitude"/utf8>>, gleam@json:float( erlang:element(5, Inline_query_result_location) )}, {<<"title"/utf8>>, gleam@json:string( erlang:element(6, Inline_query_result_location) )}, {<<"horizontal_accuracy"/utf8>>, gleam@json:nullable( erlang:element(7, Inline_query_result_location), fun gleam@json:float/1 )}, {<<"live_period"/utf8>>, gleam@json:nullable( erlang:element(8, Inline_query_result_location), fun gleam@json:int/1 )}, {<<"heading"/utf8>>, gleam@json:nullable( erlang:element(9, Inline_query_result_location), fun gleam@json:int/1 )}, {<<"proximity_alert_radius"/utf8>>, gleam@json:nullable( erlang:element(10, Inline_query_result_location), fun gleam@json:int/1 )}, {<<"reply_markup"/utf8>>, gleam@json:nullable( erlang:element(11, Inline_query_result_location), fun encode_inline_keyboard_markup/1 )}, {<<"input_message_content"/utf8>>, gleam@json:nullable( erlang:element(12, Inline_query_result_location), fun encode_input_message_content/1 )}, {<<"thumbnail_url"/utf8>>, gleam@json:nullable( erlang:element(13, Inline_query_result_location), fun gleam@json:string/1 )}, {<<"thumbnail_width"/utf8>>, gleam@json:nullable( erlang:element(14, Inline_query_result_location), fun gleam@json:int/1 )}, {<<"thumbnail_height"/utf8>>, gleam@json:nullable( erlang:element(15, Inline_query_result_location), fun gleam@json:int/1 )}] ). -file("src/telega/model.gleam", 14526). -spec encode_inline_query_result_venue(inline_query_result_venue()) -> gleam@json:json(). encode_inline_query_result_venue(Inline_query_result_venue) -> json_object_filter_nulls( [{<<"type"/utf8>>, gleam@json:string(erlang:element(2, Inline_query_result_venue))}, {<<"id"/utf8>>, gleam@json:string(erlang:element(3, Inline_query_result_venue))}, {<<"latitude"/utf8>>, gleam@json:float(erlang:element(4, Inline_query_result_venue))}, {<<"longitude"/utf8>>, gleam@json:float(erlang:element(5, Inline_query_result_venue))}, {<<"title"/utf8>>, gleam@json:string(erlang:element(6, Inline_query_result_venue))}, {<<"address"/utf8>>, gleam@json:string(erlang:element(7, Inline_query_result_venue))}, {<<"foursquare_id"/utf8>>, gleam@json:nullable( erlang:element(8, Inline_query_result_venue), fun gleam@json:string/1 )}, {<<"foursquare_type"/utf8>>, gleam@json:nullable( erlang:element(9, Inline_query_result_venue), fun gleam@json:string/1 )}, {<<"google_place_id"/utf8>>, gleam@json:nullable( erlang:element(10, Inline_query_result_venue), fun gleam@json:string/1 )}, {<<"google_place_type"/utf8>>, gleam@json:nullable( erlang:element(11, Inline_query_result_venue), fun gleam@json:string/1 )}, {<<"reply_markup"/utf8>>, gleam@json:nullable( erlang:element(12, Inline_query_result_venue), fun encode_inline_keyboard_markup/1 )}, {<<"input_message_content"/utf8>>, gleam@json:nullable( erlang:element(13, Inline_query_result_venue), fun encode_input_message_content/1 )}, {<<"thumbnail_url"/utf8>>, gleam@json:nullable( erlang:element(14, Inline_query_result_venue), fun gleam@json:string/1 )}, {<<"thumbnail_width"/utf8>>, gleam@json:nullable( erlang:element(15, Inline_query_result_venue), fun gleam@json:int/1 )}, {<<"thumbnail_height"/utf8>>, gleam@json:nullable( erlang:element(16, Inline_query_result_venue), fun gleam@json:int/1 )}] ). -file("src/telega/model.gleam", 14581). -spec encode_inline_query_result_contact(inline_query_result_contact()) -> gleam@json:json(). encode_inline_query_result_contact(Inline_query_result_contact) -> json_object_filter_nulls( [{<<"type"/utf8>>, gleam@json:string( erlang:element(2, Inline_query_result_contact) )}, {<<"id"/utf8>>, gleam@json:string( erlang:element(3, Inline_query_result_contact) )}, {<<"phone_number"/utf8>>, gleam@json:string( erlang:element(4, Inline_query_result_contact) )}, {<<"first_name"/utf8>>, gleam@json:string( erlang:element(5, Inline_query_result_contact) )}, {<<"last_name"/utf8>>, gleam@json:nullable( erlang:element(6, Inline_query_result_contact), fun gleam@json:string/1 )}, {<<"vcard"/utf8>>, gleam@json:nullable( erlang:element(7, Inline_query_result_contact), fun gleam@json:string/1 )}, {<<"reply_markup"/utf8>>, gleam@json:nullable( erlang:element(8, Inline_query_result_contact), fun encode_inline_keyboard_markup/1 )}, {<<"input_message_content"/utf8>>, gleam@json:nullable( erlang:element(9, Inline_query_result_contact), fun encode_input_message_content/1 )}, {<<"thumbnail_url"/utf8>>, gleam@json:nullable( erlang:element(10, Inline_query_result_contact), fun gleam@json:string/1 )}, {<<"thumbnail_width"/utf8>>, gleam@json:nullable( erlang:element(11, Inline_query_result_contact), fun gleam@json:int/1 )}, {<<"thumbnail_height"/utf8>>, gleam@json:nullable( erlang:element(12, Inline_query_result_contact), fun gleam@json:int/1 )}] ). -file("src/telega/model.gleam", 14640). -spec encode_inline_query_result_cached_photo( inline_query_result_cached_photo() ) -> gleam@json:json(). encode_inline_query_result_cached_photo(Inline_query_result_cached_photo) -> json_object_filter_nulls( [{<<"type"/utf8>>, gleam@json:string( erlang:element(2, Inline_query_result_cached_photo) )}, {<<"id"/utf8>>, gleam@json:string( erlang:element(3, Inline_query_result_cached_photo) )}, {<<"photo_file_id"/utf8>>, gleam@json:string( erlang:element(4, Inline_query_result_cached_photo) )}, {<<"title"/utf8>>, gleam@json:nullable( erlang:element(5, Inline_query_result_cached_photo), fun gleam@json:string/1 )}, {<<"description"/utf8>>, gleam@json:nullable( erlang:element(6, Inline_query_result_cached_photo), fun gleam@json:string/1 )}, {<<"caption"/utf8>>, gleam@json:nullable( erlang:element(7, Inline_query_result_cached_photo), fun gleam@json:string/1 )}, {<<"parse_mode"/utf8>>, gleam@json:nullable( erlang:element(8, Inline_query_result_cached_photo), fun gleam@json:string/1 )}, {<<"caption_entities"/utf8>>, gleam@json:nullable( erlang:element(9, Inline_query_result_cached_photo), fun(_capture) -> gleam@json:array(_capture, fun encode_message_entity/1) end )}, {<<"show_caption_above_media"/utf8>>, gleam@json:nullable( erlang:element(10, Inline_query_result_cached_photo), fun gleam@json:bool/1 )}, {<<"reply_markup"/utf8>>, gleam@json:nullable( erlang:element(11, Inline_query_result_cached_photo), fun encode_inline_keyboard_markup/1 )}, {<<"input_message_content"/utf8>>, gleam@json:nullable( erlang:element(12, Inline_query_result_cached_photo), fun encode_input_message_content/1 )}] ). -file("src/telega/model.gleam", 14697). -spec encode_inline_query_result_cached_gif(inline_query_result_cached_gif()) -> gleam@json:json(). encode_inline_query_result_cached_gif(Inline_query_result_cached_gif) -> json_object_filter_nulls( [{<<"type"/utf8>>, gleam@json:string( erlang:element(2, Inline_query_result_cached_gif) )}, {<<"id"/utf8>>, gleam@json:string( erlang:element(3, Inline_query_result_cached_gif) )}, {<<"gif_file_id"/utf8>>, gleam@json:string( erlang:element(4, Inline_query_result_cached_gif) )}, {<<"title"/utf8>>, gleam@json:nullable( erlang:element(5, Inline_query_result_cached_gif), fun gleam@json:string/1 )}, {<<"caption"/utf8>>, gleam@json:nullable( erlang:element(6, Inline_query_result_cached_gif), fun gleam@json:string/1 )}, {<<"parse_mode"/utf8>>, gleam@json:nullable( erlang:element(7, Inline_query_result_cached_gif), fun gleam@json:string/1 )}, {<<"caption_entities"/utf8>>, gleam@json:nullable( erlang:element(8, Inline_query_result_cached_gif), fun(_capture) -> gleam@json:array(_capture, fun encode_message_entity/1) end )}, {<<"show_caption_above_media"/utf8>>, gleam@json:nullable( erlang:element(9, Inline_query_result_cached_gif), fun gleam@json:bool/1 )}, {<<"reply_markup"/utf8>>, gleam@json:nullable( erlang:element(10, Inline_query_result_cached_gif), fun encode_inline_keyboard_markup/1 )}, {<<"input_message_content"/utf8>>, gleam@json:nullable( erlang:element(11, Inline_query_result_cached_gif), fun encode_input_message_content/1 )}] ). -file("src/telega/model.gleam", 14744). -spec encode_inline_query_result_cached_mpeg4_gif( inline_query_result_cached_mpeg4_gif() ) -> gleam@json:json(). encode_inline_query_result_cached_mpeg4_gif( Inline_query_result_cached_mpeg4_gif ) -> json_object_filter_nulls( [{<<"type"/utf8>>, gleam@json:string( erlang:element(2, Inline_query_result_cached_mpeg4_gif) )}, {<<"id"/utf8>>, gleam@json:string( erlang:element(3, Inline_query_result_cached_mpeg4_gif) )}, {<<"mpeg4_file_id"/utf8>>, gleam@json:string( erlang:element(4, Inline_query_result_cached_mpeg4_gif) )}, {<<"title"/utf8>>, gleam@json:nullable( erlang:element(5, Inline_query_result_cached_mpeg4_gif), fun gleam@json:string/1 )}, {<<"caption"/utf8>>, gleam@json:nullable( erlang:element(6, Inline_query_result_cached_mpeg4_gif), fun gleam@json:string/1 )}, {<<"parse_mode"/utf8>>, gleam@json:nullable( erlang:element(7, Inline_query_result_cached_mpeg4_gif), fun gleam@json:string/1 )}, {<<"caption_entities"/utf8>>, gleam@json:nullable( erlang:element(8, Inline_query_result_cached_mpeg4_gif), fun(_capture) -> gleam@json:array(_capture, fun encode_message_entity/1) end )}, {<<"show_caption_above_media"/utf8>>, gleam@json:nullable( erlang:element(9, Inline_query_result_cached_mpeg4_gif), fun gleam@json:bool/1 )}, {<<"reply_markup"/utf8>>, gleam@json:nullable( erlang:element(10, Inline_query_result_cached_mpeg4_gif), fun encode_inline_keyboard_markup/1 )}, {<<"input_message_content"/utf8>>, gleam@json:nullable( erlang:element(11, Inline_query_result_cached_mpeg4_gif), fun encode_input_message_content/1 )}] ). -file("src/telega/model.gleam", 14800). -spec encode_inline_query_result_cached_sticker( inline_query_result_cached_sticker() ) -> gleam@json:json(). encode_inline_query_result_cached_sticker(Inline_query_result_cached_sticker) -> json_object_filter_nulls( [{<<"type"/utf8>>, gleam@json:string( erlang:element(2, Inline_query_result_cached_sticker) )}, {<<"id"/utf8>>, gleam@json:string( erlang:element(3, Inline_query_result_cached_sticker) )}, {<<"sticker_file_id"/utf8>>, gleam@json:string( erlang:element(4, Inline_query_result_cached_sticker) )}, {<<"reply_markup"/utf8>>, gleam@json:nullable( erlang:element(5, Inline_query_result_cached_sticker), fun encode_inline_keyboard_markup/1 )}, {<<"input_message_content"/utf8>>, gleam@json:nullable( erlang:element(6, Inline_query_result_cached_sticker), fun encode_input_message_content/1 )}] ). -file("src/telega/model.gleam", 14827). -spec encode_inline_query_result_cached_document( inline_query_result_cached_document() ) -> gleam@json:json(). encode_inline_query_result_cached_document(Inline_query_result_cached_document) -> json_object_filter_nulls( [{<<"type"/utf8>>, gleam@json:string( erlang:element(2, Inline_query_result_cached_document) )}, {<<"id"/utf8>>, gleam@json:string( erlang:element(3, Inline_query_result_cached_document) )}, {<<"title"/utf8>>, gleam@json:string( erlang:element(4, Inline_query_result_cached_document) )}, {<<"document_file_id"/utf8>>, gleam@json:string( erlang:element(5, Inline_query_result_cached_document) )}, {<<"description"/utf8>>, gleam@json:nullable( erlang:element(6, Inline_query_result_cached_document), fun gleam@json:string/1 )}, {<<"caption"/utf8>>, gleam@json:nullable( erlang:element(7, Inline_query_result_cached_document), fun gleam@json:string/1 )}, {<<"parse_mode"/utf8>>, gleam@json:nullable( erlang:element(8, Inline_query_result_cached_document), fun gleam@json:string/1 )}, {<<"caption_entities"/utf8>>, gleam@json:nullable( erlang:element(9, Inline_query_result_cached_document), fun(_capture) -> gleam@json:array(_capture, fun encode_message_entity/1) end )}, {<<"reply_markup"/utf8>>, gleam@json:nullable( erlang:element(10, Inline_query_result_cached_document), fun encode_inline_keyboard_markup/1 )}, {<<"input_message_content"/utf8>>, gleam@json:nullable( erlang:element(11, Inline_query_result_cached_document), fun encode_input_message_content/1 )}] ). -file("src/telega/model.gleam", 14877). -spec encode_inline_query_result_cached_video( inline_query_result_cached_video() ) -> gleam@json:json(). encode_inline_query_result_cached_video(Inline_query_result_cached_video) -> json_object_filter_nulls( [{<<"type"/utf8>>, gleam@json:string( erlang:element(2, Inline_query_result_cached_video) )}, {<<"id"/utf8>>, gleam@json:string( erlang:element(3, Inline_query_result_cached_video) )}, {<<"video_file_id"/utf8>>, gleam@json:string( erlang:element(4, Inline_query_result_cached_video) )}, {<<"title"/utf8>>, gleam@json:string( erlang:element(5, Inline_query_result_cached_video) )}, {<<"description"/utf8>>, gleam@json:nullable( erlang:element(6, Inline_query_result_cached_video), fun gleam@json:string/1 )}, {<<"caption"/utf8>>, gleam@json:nullable( erlang:element(7, Inline_query_result_cached_video), fun gleam@json:string/1 )}, {<<"parse_mode"/utf8>>, gleam@json:nullable( erlang:element(8, Inline_query_result_cached_video), fun gleam@json:string/1 )}, {<<"caption_entities"/utf8>>, gleam@json:nullable( erlang:element(9, Inline_query_result_cached_video), fun(_capture) -> gleam@json:array(_capture, fun encode_message_entity/1) end )}, {<<"show_caption_above_media"/utf8>>, gleam@json:nullable( erlang:element(10, Inline_query_result_cached_video), fun gleam@json:bool/1 )}, {<<"reply_markup"/utf8>>, gleam@json:nullable( erlang:element(11, Inline_query_result_cached_video), fun encode_inline_keyboard_markup/1 )}, {<<"input_message_content"/utf8>>, gleam@json:nullable( erlang:element(12, Inline_query_result_cached_video), fun encode_input_message_content/1 )}] ). -file("src/telega/model.gleam", 14931). -spec encode_inline_query_result_cached_voice( inline_query_result_cached_voice() ) -> gleam@json:json(). encode_inline_query_result_cached_voice(Inline_query_result_cached_voice) -> json_object_filter_nulls( [{<<"type"/utf8>>, gleam@json:string( erlang:element(2, Inline_query_result_cached_voice) )}, {<<"id"/utf8>>, gleam@json:string( erlang:element(3, Inline_query_result_cached_voice) )}, {<<"voice_file_id"/utf8>>, gleam@json:string( erlang:element(4, Inline_query_result_cached_voice) )}, {<<"title"/utf8>>, gleam@json:string( erlang:element(5, Inline_query_result_cached_voice) )}, {<<"caption"/utf8>>, gleam@json:nullable( erlang:element(6, Inline_query_result_cached_voice), fun gleam@json:string/1 )}, {<<"parse_mode"/utf8>>, gleam@json:nullable( erlang:element(7, Inline_query_result_cached_voice), fun gleam@json:string/1 )}, {<<"caption_entities"/utf8>>, gleam@json:nullable( erlang:element(8, Inline_query_result_cached_voice), fun(_capture) -> gleam@json:array(_capture, fun encode_message_entity/1) end )}, {<<"reply_markup"/utf8>>, gleam@json:nullable( erlang:element(9, Inline_query_result_cached_voice), fun encode_inline_keyboard_markup/1 )}, {<<"input_message_content"/utf8>>, gleam@json:nullable( erlang:element(10, Inline_query_result_cached_voice), fun encode_input_message_content/1 )}] ). -file("src/telega/model.gleam", 14974). -spec encode_inline_query_result_cached_audio( inline_query_result_cached_audio() ) -> gleam@json:json(). encode_inline_query_result_cached_audio(Inline_query_result_cached_audio) -> json_object_filter_nulls( [{<<"type"/utf8>>, gleam@json:string( erlang:element(2, Inline_query_result_cached_audio) )}, {<<"id"/utf8>>, gleam@json:string( erlang:element(3, Inline_query_result_cached_audio) )}, {<<"audio_file_id"/utf8>>, gleam@json:string( erlang:element(4, Inline_query_result_cached_audio) )}, {<<"caption"/utf8>>, gleam@json:nullable( erlang:element(5, Inline_query_result_cached_audio), fun gleam@json:string/1 )}, {<<"parse_mode"/utf8>>, gleam@json:nullable( erlang:element(6, Inline_query_result_cached_audio), fun gleam@json:string/1 )}, {<<"caption_entities"/utf8>>, gleam@json:nullable( erlang:element(7, Inline_query_result_cached_audio), fun(_capture) -> gleam@json:array(_capture, fun encode_message_entity/1) end )}, {<<"reply_markup"/utf8>>, gleam@json:nullable( erlang:element(8, Inline_query_result_cached_audio), fun encode_inline_keyboard_markup/1 )}, {<<"input_message_content"/utf8>>, gleam@json:nullable( erlang:element(9, Inline_query_result_cached_audio), fun encode_input_message_content/1 )}] ). -file("src/telega/model.gleam", 16513). -spec encode_inline_query_result(inline_query_result()) -> gleam@json:json(). encode_inline_query_result(Value) -> case Value of {inline_query_result_cached_audio_inline_query_result, Inner_value} -> encode_inline_query_result_cached_audio(Inner_value); {inline_query_result_cached_document_inline_query_result, Inner_value@1} -> encode_inline_query_result_cached_document(Inner_value@1); {inline_query_result_cached_gif_inline_query_result, Inner_value@2} -> encode_inline_query_result_cached_gif(Inner_value@2); {inline_query_result_cached_mpeg4_gif_inline_query_result, Inner_value@3} -> encode_inline_query_result_cached_mpeg4_gif(Inner_value@3); {inline_query_result_cached_photo_inline_query_result, Inner_value@4} -> encode_inline_query_result_cached_photo(Inner_value@4); {inline_query_result_cached_sticker_inline_query_result, Inner_value@5} -> encode_inline_query_result_cached_sticker(Inner_value@5); {inline_query_result_cached_video_inline_query_result, Inner_value@6} -> encode_inline_query_result_cached_video(Inner_value@6); {inline_query_result_cached_voice_inline_query_result, Inner_value@7} -> encode_inline_query_result_cached_voice(Inner_value@7); {inline_query_result_article_inline_query_result, Inner_value@8} -> encode_inline_query_result_article(Inner_value@8); {inline_query_result_audio_inline_query_result, Inner_value@9} -> encode_inline_query_result_audio(Inner_value@9); {inline_query_result_contact_inline_query_result, Inner_value@10} -> encode_inline_query_result_contact(Inner_value@10); {inline_query_result_game_inline_query_result, Inner_value@11} -> encode_inline_query_result_game(Inner_value@11); {inline_query_result_document_inline_query_result, Inner_value@12} -> encode_inline_query_result_document(Inner_value@12); {inline_query_result_gif_inline_query_result, Inner_value@13} -> encode_inline_query_result_gif(Inner_value@13); {inline_query_result_location_inline_query_result, Inner_value@14} -> encode_inline_query_result_location(Inner_value@14); {inline_query_result_mpeg4_gif_inline_query_result, Inner_value@15} -> encode_inline_query_result_mpeg4_gif(Inner_value@15); {inline_query_result_photo_inline_query_result, Inner_value@16} -> encode_inline_query_result_photo(Inner_value@16); {inline_query_result_venue_inline_query_result, Inner_value@17} -> encode_inline_query_result_venue(Inner_value@17); {inline_query_result_video_inline_query_result, Inner_value@18} -> encode_inline_query_result_video(Inner_value@18); {inline_query_result_voice_inline_query_result, Inner_value@19} -> encode_inline_query_result_voice(Inner_value@19) end. -file("src/telega/model.gleam", 16596). -spec encode_revenue_withdrawal_state(revenue_withdrawal_state()) -> gleam@json:json(). encode_revenue_withdrawal_state(Value) -> case Value of {revenue_withdrawal_state_pending_revenue_withdrawal_state, Inner_value} -> encode_revenue_withdrawal_state_pending(Inner_value); {revenue_withdrawal_state_succeeded_revenue_withdrawal_state, Inner_value@1} -> encode_revenue_withdrawal_state_succeeded(Inner_value@1); {revenue_withdrawal_state_failed_revenue_withdrawal_state, Inner_value@2} -> encode_revenue_withdrawal_state_failed(Inner_value@2) end. -file("src/telega/model.gleam", 15482). -spec encode_transaction_partner_fragment(transaction_partner_fragment()) -> gleam@json:json(). encode_transaction_partner_fragment(Transaction_partner_fragment) -> json_object_filter_nulls( [{<<"type"/utf8>>, gleam@json:string( erlang:element(2, Transaction_partner_fragment) )}, {<<"withdrawal_state"/utf8>>, gleam@json:nullable( erlang:element(3, Transaction_partner_fragment), fun encode_revenue_withdrawal_state/1 )}] ). -file("src/telega/model.gleam", 16609). -spec encode_transaction_partner(transaction_partner()) -> gleam@json:json(). encode_transaction_partner(Value) -> case Value of {transaction_partner_user_transaction_partner, Inner_value} -> encode_transaction_partner_user(Inner_value); {transaction_partner_chat_transaction_partner, Inner_value@1} -> encode_transaction_partner_chat(Inner_value@1); {transaction_partner_affiliate_program_transaction_partner, Inner_value@2} -> encode_transaction_partner_affiliate_program(Inner_value@2); {transaction_partner_fragment_transaction_partner, Inner_value@3} -> encode_transaction_partner_fragment(Inner_value@3); {transaction_partner_telegram_ads_transaction_partner, Inner_value@4} -> encode_transaction_partner_telegram_ads(Inner_value@4); {transaction_partner_telegram_api_transaction_partner, Inner_value@5} -> encode_transaction_partner_telegram_api(Inner_value@5); {transaction_partner_other_transaction_partner, Inner_value@6} -> encode_transaction_partner_other(Inner_value@6) end. -file("src/telega/model.gleam", 15522). -spec encode_star_transaction(star_transaction()) -> gleam@json:json(). encode_star_transaction(Star_transaction) -> json_object_filter_nulls( [{<<"id"/utf8>>, gleam@json:string(erlang:element(2, Star_transaction))}, {<<"amount"/utf8>>, gleam@json:int(erlang:element(3, Star_transaction))}, {<<"nanostar_amount"/utf8>>, gleam@json:nullable( erlang:element(4, Star_transaction), fun gleam@json:int/1 )}, {<<"date"/utf8>>, gleam@json:int(erlang:element(5, Star_transaction))}, {<<"source"/utf8>>, gleam@json:nullable( erlang:element(6, Star_transaction), fun encode_transaction_partner/1 )}, {<<"receiver"/utf8>>, gleam@json:nullable( erlang:element(7, Star_transaction), fun encode_transaction_partner/1 )}] ). -file("src/telega/model.gleam", 15542). -spec encode_star_transactions(star_transactions()) -> gleam@json:json(). encode_star_transactions(Star_transactions) -> json_object_filter_nulls( [{<<"transactions"/utf8>>, gleam@json:array( erlang:element(2, Star_transactions), fun encode_star_transaction/1 )}] ). -file("src/telega/model.gleam", 16634). -spec encode_passport_element_error(passport_element_error()) -> gleam@json:json(). encode_passport_element_error(Value) -> case Value of {passport_element_error_data_field_passport_element_error, Inner_value} -> encode_passport_element_error_data_field(Inner_value); {passport_element_error_front_side_passport_element_error, Inner_value@1} -> encode_passport_element_error_front_side(Inner_value@1); {passport_element_error_reverse_side_passport_element_error, Inner_value@2} -> encode_passport_element_error_reverse_side(Inner_value@2); {passport_element_error_selfie_passport_element_error, Inner_value@3} -> encode_passport_element_error_selfie(Inner_value@3); {passport_element_error_file_passport_element_error, Inner_value@4} -> encode_passport_element_error_file(Inner_value@4); {passport_element_error_files_passport_element_error, Inner_value@5} -> encode_passport_element_error_files(Inner_value@5); {passport_element_error_translation_file_passport_element_error, Inner_value@6} -> encode_passport_element_error_translation_file(Inner_value@6); {passport_element_error_translation_files_passport_element_error, Inner_value@7} -> encode_passport_element_error_translation_files(Inner_value@7); {passport_element_error_unspecified_passport_element_error, Inner_value@8} -> encode_passport_element_error_unspecified(Inner_value@8) end. -file("src/telega/model.gleam", 16685). -spec encode_file_or_string(file_or_string()) -> gleam@json:json(). encode_file_or_string(Value) -> case Value of {file_v, Value@1} -> encode_file(Value@1); {string_v, String} -> gleam@json:string(String) end. -file("src/telega/model.gleam", 14005). -spec encode_input_sticker(input_sticker()) -> gleam@json:json(). encode_input_sticker(Input_sticker) -> json_object_filter_nulls( [{<<"sticker"/utf8>>, encode_file_or_string(erlang:element(2, Input_sticker))}, {<<"format"/utf8>>, gleam@json:string(erlang:element(3, Input_sticker))}, {<<"emoji_list"/utf8>>, gleam@json:array( erlang:element(4, Input_sticker), fun gleam@json:string/1 )}, {<<"mask_position"/utf8>>, gleam@json:nullable( erlang:element(5, Input_sticker), fun encode_mask_position/1 )}, {<<"keywords"/utf8>>, gleam@json:nullable( erlang:element(6, Input_sticker), fun(_capture) -> gleam@json:array(_capture, fun gleam@json:string/1) end )}] ). -file("src/telega/model.gleam", 16723). -spec encode_answer_callback_query_parameters( answer_callback_query_parameters() ) -> gleam@json:json(). encode_answer_callback_query_parameters(Params) -> Callback_query_id = {<<"callback_query_id"/utf8>>, gleam@json:string(erlang:element(2, Params))}, Text = {<<"text"/utf8>>, gleam@json:nullable(erlang:element(3, Params), fun gleam@json:string/1)}, Show_alert = {<<"show_alert"/utf8>>, gleam@json:nullable(erlang:element(4, Params), fun gleam@json:bool/1)}, Url = {<<"url"/utf8>>, gleam@json:nullable(erlang:element(5, Params), fun gleam@json:string/1)}, Cache_time = {<<"cache_time"/utf8>>, gleam@json:nullable(erlang:element(6, Params), fun gleam@json:int/1)}, json_object_filter_nulls( [Callback_query_id, Text, Show_alert, Url, Cache_time] ). -file("src/telega/model.gleam", 16768). -spec bot_command_scope_to_json(bot_command_scope()) -> gleam@json:json(). bot_command_scope_to_json(Scope) -> case Scope of {bot_command_scope_default_bot_command_scope, _} -> json_object_filter_nulls( [{<<"type"/utf8>>, gleam@json:string(<<"default"/utf8>>)}] ); {bot_command_scope_all_private_chats_bot_command_scope, _} -> json_object_filter_nulls( [{<<"type"/utf8>>, gleam@json:string(<<"all_private_chats"/utf8>>)}] ); {bot_command_scope_all_group_chats_bot_command_scope, _} -> json_object_filter_nulls( [{<<"type"/utf8>>, gleam@json:string(<<"all_group_chats"/utf8>>)}] ); {bot_command_scope_all_chat_administrators_bot_command_scope, _} -> json_object_filter_nulls( [{<<"type"/utf8>>, gleam@json:string(<<"all_chat_administrators"/utf8>>)}] ); {bot_command_scope_chat_bot_command_scope, {bot_command_scope_chat, _, Chat_id}} -> json_object_filter_nulls( [{<<"type"/utf8>>, gleam@json:string(<<"chat"/utf8>>)}, {<<"chat_id"/utf8>>, encode_int_or_string(Chat_id)}] ); {bot_command_scope_chat_administrators_bot_command_scope, {bot_command_scope_chat_administrators, _, Chat_id@1}} -> json_object_filter_nulls( [{<<"type"/utf8>>, gleam@json:string(<<"chat_administrators"/utf8>>)}, {<<"chat_id"/utf8>>, encode_int_or_string(Chat_id@1)}] ); {bot_command_scope_chat_member_bot_command_scope, {bot_command_scope_chat_member, _, Chat_id@2, User_id}} -> json_object_filter_nulls( [{<<"type"/utf8>>, gleam@json:string(<<"chat_member"/utf8>>)}, {<<"chat_id"/utf8>>, encode_int_or_string(Chat_id@2)}, {<<"user_id"/utf8>>, gleam@json:int(User_id)}] ) end. -file("src/telega/model.gleam", 16759). -spec encode_bot_command_parameters(bot_command_parameters()) -> list({binary(), gleam@json:json()}). encode_bot_command_parameters(Params) -> [{<<"scope"/utf8>>, gleam@json:nullable( erlang:element(2, Params), fun bot_command_scope_to_json/1 )}, {<<"language_code"/utf8>>, gleam@json:nullable( erlang:element(3, Params), fun gleam@json:string/1 )}]. -file("src/telega/model.gleam", 16841). -spec encode_edit_message_text_parameters(edit_message_text_parameters()) -> gleam@json:json(). encode_edit_message_text_parameters(Params) -> Chat_id = {<<"chat_id"/utf8>>, gleam@json:nullable( erlang:element(2, Params), fun encode_int_or_string/1 )}, Message_id = {<<"message_id"/utf8>>, gleam@json:nullable(erlang:element(3, Params), fun gleam@json:int/1)}, Inline_message_id = {<<"inline_message_id"/utf8>>, gleam@json:nullable(erlang:element(4, Params), fun gleam@json:string/1)}, Text = {<<"text"/utf8>>, gleam@json:string(erlang:element(5, Params))}, Parse_mode = {<<"parse_mode"/utf8>>, gleam@json:nullable(erlang:element(6, Params), fun gleam@json:string/1)}, Entities = {<<"entities"/utf8>>, gleam@json:nullable( erlang:element(7, Params), fun(_capture) -> gleam@json:array(_capture, fun encode_message_entity/1) end )}, Link_preview_options = {<<"link_preview_options"/utf8>>, gleam@json:nullable( erlang:element(8, Params), fun encode_link_preview_options/1 )}, Reply_markup = {<<"reply_markup"/utf8>>, gleam@json:nullable( erlang:element(9, Params), fun encode_inline_keyboard_markup/1 )}, json_object_filter_nulls( [Chat_id, Message_id, Inline_message_id, Text, Parse_mode, Entities, Link_preview_options, Reply_markup] ). -file("src/telega/model.gleam", 16902). -spec encode_forward_message_parameters(forward_message_parameters()) -> gleam@json:json(). encode_forward_message_parameters(Params) -> json_object_filter_nulls( [{<<"chat_id"/utf8>>, encode_int_or_string(erlang:element(2, Params))}, {<<"from_chat_id"/utf8>>, encode_int_or_string(erlang:element(3, Params))}, {<<"message_id"/utf8>>, gleam@json:int(erlang:element(4, Params))}, {<<"disable_notification"/utf8>>, gleam@json:nullable( erlang:element(5, Params), fun gleam@json:bool/1 )}, {<<"message_thread_id"/utf8>>, gleam@json:nullable( erlang:element(6, Params), fun gleam@json:int/1 )}, {<<"protect_content"/utf8>>, gleam@json:nullable( erlang:element(7, Params), fun gleam@json:bool/1 )}] ). -file("src/telega/model.gleam", 16937). -spec encode_forward_messages_parameters(forward_messages_parameters()) -> gleam@json:json(). encode_forward_messages_parameters(Forward_messages_parameters) -> json_object_filter_nulls( [{<<"chat_id"/utf8>>, encode_int_or_string( erlang:element(2, Forward_messages_parameters) )}, {<<"message_thread_id"/utf8>>, gleam@json:nullable( erlang:element(3, Forward_messages_parameters), fun gleam@json:int/1 )}, {<<"from_chat_id"/utf8>>, encode_int_or_string( erlang:element(4, Forward_messages_parameters) )}, {<<"message_ids"/utf8>>, gleam@json:array( erlang:element(5, Forward_messages_parameters), fun gleam@json:int/1 )}, {<<"disable_notification"/utf8>>, gleam@json:nullable( erlang:element(6, Forward_messages_parameters), fun gleam@json:bool/1 )}, {<<"protect_content"/utf8>>, gleam@json:nullable( erlang:element(7, Forward_messages_parameters), fun gleam@json:bool/1 )}] ). -file("src/telega/model.gleam", 16983). -spec encode_send_dice_parameters(send_dice_parameters()) -> gleam@json:json(). encode_send_dice_parameters(Params) -> Chat_id = {<<"chat_id"/utf8>>, encode_int_or_string(erlang:element(2, Params))}, Message_thread_id = {<<"message_thread_id"/utf8>>, gleam@json:nullable(erlang:element(3, Params), fun gleam@json:int/1)}, Emoji = {<<"emoji"/utf8>>, gleam@json:nullable(erlang:element(4, Params), fun gleam@json:string/1)}, Disable_notification = {<<"disable_notification"/utf8>>, gleam@json:nullable(erlang:element(5, Params), fun gleam@json:bool/1)}, Protect_content = {<<"protect_content"/utf8>>, gleam@json:nullable(erlang:element(6, Params), fun gleam@json:bool/1)}, Reply_parameters = {<<"reply_parameters"/utf8>>, gleam@json:nullable( erlang:element(7, Params), fun encode_reply_keyboard_markup/1 )}, json_object_filter_nulls( [Chat_id, Message_thread_id, Emoji, Disable_notification, Protect_content, Reply_parameters] ). -file("src/telega/model.gleam", 17022). -spec encode_send_message_reply_markup_parameters( send_message_reply_markup_parameters() ) -> gleam@json:json(). encode_send_message_reply_markup_parameters(Params) -> case Params of {send_message_reply_inline_keyboard_markup_parameters, Inline_keyboard} -> encode_inline_keyboard_markup(Inline_keyboard); {send_message_reply_reply_keyboard_markup_parameters, Reply_keyboard} -> encode_reply_keyboard_markup(Reply_keyboard); {send_message_reply_remove_keyboard_markup_parameters, Remove_keyboard} -> encode_reply_keyboard_remove(Remove_keyboard); {send_message_reply_force_reply_markup_parameters, Force_reply} -> encode_force_reply(Force_reply) end. -file("src/telega/model.gleam", 17069). -spec encode_send_message_parameters(send_message_parameters()) -> gleam@json:json(). encode_send_message_parameters(Send_message_parameters) -> Business_connection_id = {<<"business_connection_id"/utf8>>, gleam@json:nullable( erlang:element(2, Send_message_parameters), fun gleam@json:string/1 )}, Chat_id = {<<"chat_id"/utf8>>, encode_int_or_string(erlang:element(3, Send_message_parameters))}, Message_thread_id = {<<"message_thread_id"/utf8>>, gleam@json:nullable( erlang:element(4, Send_message_parameters), fun gleam@json:int/1 )}, Text = {<<"text"/utf8>>, gleam@json:string(erlang:element(5, Send_message_parameters))}, Parse_mode = {<<"parse_mode"/utf8>>, gleam@json:nullable( erlang:element(6, Send_message_parameters), fun gleam@json:string/1 )}, Entities = {<<"entities"/utf8>>, gleam@json:nullable( erlang:element(7, Send_message_parameters), fun(_capture) -> gleam@json:array(_capture, fun encode_message_entity/1) end )}, Link_preview_options = {<<"link_preview_options"/utf8>>, gleam@json:nullable( erlang:element(8, Send_message_parameters), fun encode_link_preview_options/1 )}, Disable_notification = {<<"disable_notification"/utf8>>, gleam@json:nullable( erlang:element(9, Send_message_parameters), fun gleam@json:bool/1 )}, Protect_content = {<<"protect_content"/utf8>>, gleam@json:nullable( erlang:element(10, Send_message_parameters), fun gleam@json:bool/1 )}, Reply_parameters = {<<"reply_parameters"/utf8>>, gleam@json:nullable( erlang:element(13, Send_message_parameters), fun encode_reply_parameters/1 )}, Reply_markup = {<<"reply_markup"/utf8>>, gleam@json:nullable( erlang:element(14, Send_message_parameters), fun encode_send_message_reply_markup_parameters/1 )}, json_object_filter_nulls( [Business_connection_id, Chat_id, Message_thread_id, Text, Parse_mode, Entities, Link_preview_options, Disable_notification, Protect_content, Reply_parameters, Reply_markup] ). -file("src/telega/model.gleam", 17153). -spec encode_set_chat_menu_button_parameters(set_chat_menu_button_parameters()) -> gleam@json:json(). encode_set_chat_menu_button_parameters(Params) -> json_object_filter_nulls( [{<<"chat_id"/utf8>>, gleam@json:nullable( erlang:element(2, Params), fun gleam@json:int/1 )}, {<<"menu_button"/utf8>>, gleam@json:nullable( erlang:element(3, Params), fun encode_menu_button/1 )}] ). -file("src/telega/model.gleam", 17186). -spec encode_set_webhook_parameters(set_webhook_parameters()) -> gleam@json:json(). encode_set_webhook_parameters(Params) -> json_object_filter_nulls( [{<<"url"/utf8>>, gleam@json:string(erlang:element(2, Params))}, {<<"max_connections"/utf8>>, gleam@json:nullable( erlang:element(4, Params), fun gleam@json:int/1 )}, {<<"ip_address"/utf8>>, gleam@json:nullable( erlang:element(5, Params), fun gleam@json:string/1 )}, {<<"allowed_updates"/utf8>>, gleam@json:nullable( erlang:element(6, Params), fun(_capture) -> gleam@json:array(_capture, fun gleam@json:string/1) end )}, {<<"drop_pending_updates"/utf8>>, gleam@json:nullable( erlang:element(7, Params), fun gleam@json:bool/1 )}, {<<"secret_token"/utf8>>, gleam@json:nullable( erlang:element(8, Params), fun gleam@json:string/1 )}] ). -file("src/telega/model.gleam", 17257). -spec encode_copy_message_parameters(copy_message_parameters()) -> gleam@json:json(). encode_copy_message_parameters(Params) -> json_object_filter_nulls( [{<<"chat_id"/utf8>>, encode_int_or_string(erlang:element(2, Params))}, {<<"message_thread_id"/utf8>>, gleam@json:nullable( erlang:element(3, Params), fun gleam@json:int/1 )}, {<<"from_chat_id"/utf8>>, encode_int_or_string(erlang:element(4, Params))}, {<<"message_id"/utf8>>, gleam@json:int(erlang:element(5, Params))}, {<<"video_start_timestamp"/utf8>>, gleam@json:nullable( erlang:element(6, Params), fun gleam@json:int/1 )}, {<<"caption"/utf8>>, gleam@json:nullable( erlang:element(7, Params), fun gleam@json:string/1 )}, {<<"parse_mode"/utf8>>, gleam@json:nullable( erlang:element(8, Params), fun gleam@json:string/1 )}, {<<"caption_entities"/utf8>>, gleam@json:nullable( erlang:element(9, Params), fun(_capture) -> gleam@json:array(_capture, fun encode_message_entity/1) end )}, {<<"show_caption_above_media"/utf8>>, gleam@json:nullable( erlang:element(10, Params), fun gleam@json:bool/1 )}, {<<"disable_notification"/utf8>>, gleam@json:nullable( erlang:element(11, Params), fun gleam@json:bool/1 )}, {<<"protect_content"/utf8>>, gleam@json:nullable( erlang:element(12, Params), fun gleam@json:bool/1 )}, {<<"allow_paid_broadcast"/utf8>>, gleam@json:nullable( erlang:element(13, Params), fun gleam@json:bool/1 )}, {<<"reply_parameters"/utf8>>, gleam@json:nullable( erlang:element(14, Params), fun encode_reply_parameters/1 )}, {<<"reply_markup"/utf8>>, gleam@json:nullable( erlang:element(15, Params), fun encode_send_message_reply_markup_parameters/1 )}] ). -file("src/telega/model.gleam", 17325). -spec encode_copy_messages_parameters(copy_messages_parameters()) -> gleam@json:json(). encode_copy_messages_parameters(Params) -> json_object_filter_nulls( [{<<"chat_id"/utf8>>, encode_int_or_string(erlang:element(2, Params))}, {<<"message_thread_id"/utf8>>, gleam@json:nullable( erlang:element(3, Params), fun gleam@json:int/1 )}, {<<"from_chat_id"/utf8>>, encode_int_or_string(erlang:element(4, Params))}, {<<"message_ids"/utf8>>, gleam@json:array( erlang:element(5, Params), fun gleam@json:int/1 )}, {<<"disable_notification"/utf8>>, gleam@json:nullable( erlang:element(6, Params), fun gleam@json:bool/1 )}, {<<"protect_content"/utf8>>, gleam@json:nullable( erlang:element(7, Params), fun gleam@json:bool/1 )}, {<<"remove_caption"/utf8>>, gleam@json:nullable( erlang:element(8, Params), fun gleam@json:bool/1 )}] ). -file("src/telega/model.gleam", 17377). -spec encode_send_photo_parameters(send_photo_parameters()) -> gleam@json:json(). encode_send_photo_parameters(Params) -> json_object_filter_nulls( [{<<"chat_id"/utf8>>, encode_int_or_string(erlang:element(2, Params))}, {<<"business_connection_id"/utf8>>, gleam@json:nullable( erlang:element(3, Params), fun gleam@json:string/1 )}, {<<"message_thread_id"/utf8>>, gleam@json:nullable( erlang:element(4, Params), fun gleam@json:int/1 )}, {<<"photo"/utf8>>, encode_file_or_string(erlang:element(5, Params))}, {<<"caption"/utf8>>, gleam@json:nullable( erlang:element(6, Params), fun gleam@json:string/1 )}, {<<"parse_mode"/utf8>>, gleam@json:nullable( erlang:element(7, Params), fun gleam@json:string/1 )}, {<<"caption_entities"/utf8>>, gleam@json:nullable( erlang:element(8, Params), fun(_capture) -> gleam@json:array(_capture, fun encode_message_entity/1) end )}, {<<"show_caption_above_media"/utf8>>, gleam@json:nullable( erlang:element(9, Params), fun gleam@json:bool/1 )}, {<<"has_spoiler"/utf8>>, gleam@json:nullable( erlang:element(10, Params), fun gleam@json:bool/1 )}, {<<"disable_notification"/utf8>>, gleam@json:nullable( erlang:element(11, Params), fun gleam@json:bool/1 )}, {<<"protect_content"/utf8>>, gleam@json:nullable( erlang:element(12, Params), fun gleam@json:bool/1 )}, {<<"allow_paid_broadcast"/utf8>>, gleam@json:nullable( erlang:element(13, Params), fun gleam@json:bool/1 )}, {<<"message_effect_id"/utf8>>, gleam@json:nullable( erlang:element(14, Params), fun gleam@json:string/1 )}, {<<"reply_parameters"/utf8>>, gleam@json:nullable( erlang:element(15, Params), fun encode_reply_parameters/1 )}, {<<"reply_markup"/utf8>>, gleam@json:nullable( erlang:element(16, Params), fun encode_send_message_reply_markup_parameters/1 )}] ). -file("src/telega/model.gleam", 17465). -spec encode_send_audio_parameters(send_audio_parameters()) -> gleam@json:json(). encode_send_audio_parameters(Params) -> json_object_filter_nulls( [{<<"chat_id"/utf8>>, encode_int_or_string(erlang:element(2, Params))}, {<<"business_connection_id"/utf8>>, gleam@json:nullable( erlang:element(3, Params), fun gleam@json:string/1 )}, {<<"message_thread_id"/utf8>>, gleam@json:nullable( erlang:element(4, Params), fun gleam@json:int/1 )}, {<<"audio"/utf8>>, encode_file_or_string(erlang:element(5, Params))}, {<<"caption"/utf8>>, gleam@json:nullable( erlang:element(6, Params), fun gleam@json:string/1 )}, {<<"parse_mode"/utf8>>, gleam@json:nullable( erlang:element(7, Params), fun gleam@json:string/1 )}, {<<"caption_entities"/utf8>>, gleam@json:nullable( erlang:element(8, Params), fun(_capture) -> gleam@json:array(_capture, fun encode_message_entity/1) end )}, {<<"duration"/utf8>>, gleam@json:nullable( erlang:element(9, Params), fun gleam@json:int/1 )}, {<<"performer"/utf8>>, gleam@json:nullable( erlang:element(10, Params), fun gleam@json:string/1 )}, {<<"title"/utf8>>, gleam@json:nullable( erlang:element(11, Params), fun gleam@json:string/1 )}, {<<"thumbnail"/utf8>>, gleam@json:nullable( erlang:element(12, Params), fun encode_file_or_string/1 )}, {<<"disable_notification"/utf8>>, gleam@json:nullable( erlang:element(13, Params), fun gleam@json:bool/1 )}, {<<"protect_content"/utf8>>, gleam@json:nullable( erlang:element(14, Params), fun gleam@json:bool/1 )}, {<<"allow_paid_broadcast"/utf8>>, gleam@json:nullable( erlang:element(15, Params), fun gleam@json:bool/1 )}, {<<"message_effect_id"/utf8>>, gleam@json:nullable( erlang:element(16, Params), fun gleam@json:string/1 )}, {<<"reply_parameters"/utf8>>, gleam@json:nullable( erlang:element(17, Params), fun encode_reply_parameters/1 )}, {<<"reply_markup"/utf8>>, gleam@json:nullable( erlang:element(18, Params), fun encode_send_message_reply_markup_parameters/1 )}] ). -file("src/telega/model.gleam", 17548). -spec encode_send_document_parameters(send_document_parameters()) -> gleam@json:json(). encode_send_document_parameters(Params) -> json_object_filter_nulls( [{<<"chat_id"/utf8>>, encode_int_or_string(erlang:element(2, Params))}, {<<"business_connection_id"/utf8>>, gleam@json:nullable( erlang:element(3, Params), fun gleam@json:string/1 )}, {<<"message_thread_id"/utf8>>, gleam@json:nullable( erlang:element(4, Params), fun gleam@json:int/1 )}, {<<"document"/utf8>>, encode_file_or_string(erlang:element(5, Params))}, {<<"thumbnail"/utf8>>, gleam@json:nullable( erlang:element(6, Params), fun encode_file_or_string/1 )}, {<<"caption"/utf8>>, gleam@json:nullable( erlang:element(7, Params), fun gleam@json:string/1 )}, {<<"parse_mode"/utf8>>, gleam@json:nullable( erlang:element(8, Params), fun gleam@json:string/1 )}, {<<"caption_entities"/utf8>>, gleam@json:nullable( erlang:element(9, Params), fun(_capture) -> gleam@json:array(_capture, fun encode_message_entity/1) end )}, {<<"disable_content_type_detection"/utf8>>, gleam@json:nullable( erlang:element(10, Params), fun gleam@json:bool/1 )}, {<<"disable_notification"/utf8>>, gleam@json:nullable( erlang:element(11, Params), fun gleam@json:bool/1 )}, {<<"protect_content"/utf8>>, gleam@json:nullable( erlang:element(12, Params), fun gleam@json:bool/1 )}, {<<"allow_paid_broadcast"/utf8>>, gleam@json:nullable( erlang:element(13, Params), fun gleam@json:bool/1 )}, {<<"message_effect_id"/utf8>>, gleam@json:nullable( erlang:element(14, Params), fun gleam@json:string/1 )}, {<<"reply_parameters"/utf8>>, gleam@json:nullable( erlang:element(15, Params), fun encode_reply_parameters/1 )}, {<<"reply_markup"/utf8>>, gleam@json:nullable( erlang:element(16, Params), fun encode_send_message_reply_markup_parameters/1 )}] ). -file("src/telega/model.gleam", 17646). -spec encode_send_video_parameters(send_video_parameters()) -> gleam@json:json(). encode_send_video_parameters(Params) -> json_object_filter_nulls( [{<<"chat_id"/utf8>>, encode_int_or_string(erlang:element(2, Params))}, {<<"business_connection_id"/utf8>>, gleam@json:nullable( erlang:element(3, Params), fun gleam@json:string/1 )}, {<<"message_thread_id"/utf8>>, gleam@json:nullable( erlang:element(4, Params), fun gleam@json:int/1 )}, {<<"video"/utf8>>, encode_file_or_string(erlang:element(5, Params))}, {<<"duration"/utf8>>, gleam@json:nullable( erlang:element(6, Params), fun gleam@json:int/1 )}, {<<"width"/utf8>>, gleam@json:nullable( erlang:element(7, Params), fun gleam@json:int/1 )}, {<<"height"/utf8>>, gleam@json:nullable( erlang:element(8, Params), fun gleam@json:int/1 )}, {<<"thumbnail"/utf8>>, gleam@json:nullable( erlang:element(9, Params), fun encode_file_or_string/1 )}, {<<"cover"/utf8>>, gleam@json:nullable( erlang:element(10, Params), fun encode_file_or_string/1 )}, {<<"start_timestamp"/utf8>>, gleam@json:nullable( erlang:element(11, Params), fun gleam@json:int/1 )}, {<<"caption"/utf8>>, gleam@json:nullable( erlang:element(12, Params), fun gleam@json:string/1 )}, {<<"parse_mode"/utf8>>, gleam@json:nullable( erlang:element(13, Params), fun gleam@json:string/1 )}, {<<"caption_entities"/utf8>>, gleam@json:nullable( erlang:element(14, Params), fun(_capture) -> gleam@json:array(_capture, fun encode_message_entity/1) end )}, {<<"show_caption_above_media"/utf8>>, gleam@json:nullable( erlang:element(15, Params), fun gleam@json:bool/1 )}, {<<"has_spoiler"/utf8>>, gleam@json:nullable( erlang:element(16, Params), fun gleam@json:bool/1 )}, {<<"supports_streaming"/utf8>>, gleam@json:nullable( erlang:element(17, Params), fun gleam@json:bool/1 )}, {<<"disable_notification"/utf8>>, gleam@json:nullable( erlang:element(18, Params), fun gleam@json:bool/1 )}, {<<"protect_content"/utf8>>, gleam@json:nullable( erlang:element(19, Params), fun gleam@json:bool/1 )}, {<<"allow_paid_broadcast"/utf8>>, gleam@json:nullable( erlang:element(20, Params), fun gleam@json:bool/1 )}, {<<"message_effect_id"/utf8>>, gleam@json:nullable( erlang:element(21, Params), fun gleam@json:string/1 )}, {<<"reply_parameters"/utf8>>, gleam@json:nullable( erlang:element(22, Params), fun encode_reply_parameters/1 )}, {<<"reply_markup"/utf8>>, gleam@json:nullable( erlang:element(23, Params), fun encode_send_message_reply_markup_parameters/1 )}] ). -file("src/telega/model.gleam", 17745). -spec encode_send_animation_parameters(send_animation_parameters()) -> gleam@json:json(). encode_send_animation_parameters(Params) -> json_object_filter_nulls( [{<<"chat_id"/utf8>>, encode_int_or_string(erlang:element(2, Params))}, {<<"business_connection_id"/utf8>>, gleam@json:nullable( erlang:element(3, Params), fun gleam@json:string/1 )}, {<<"message_thread_id"/utf8>>, gleam@json:nullable( erlang:element(4, Params), fun gleam@json:int/1 )}, {<<"animation"/utf8>>, encode_file_or_string(erlang:element(5, Params))}, {<<"duration"/utf8>>, gleam@json:nullable( erlang:element(6, Params), fun gleam@json:int/1 )}, {<<"width"/utf8>>, gleam@json:nullable( erlang:element(7, Params), fun gleam@json:int/1 )}, {<<"height"/utf8>>, gleam@json:nullable( erlang:element(8, Params), fun gleam@json:int/1 )}, {<<"thumbnail"/utf8>>, gleam@json:nullable( erlang:element(9, Params), fun encode_file_or_string/1 )}, {<<"caption"/utf8>>, gleam@json:nullable( erlang:element(10, Params), fun gleam@json:string/1 )}, {<<"parse_mode"/utf8>>, gleam@json:nullable( erlang:element(11, Params), fun gleam@json:string/1 )}, {<<"caption_entities"/utf8>>, gleam@json:nullable( erlang:element(12, Params), fun(_capture) -> gleam@json:array(_capture, fun encode_message_entity/1) end )}, {<<"show_caption_above_media"/utf8>>, gleam@json:nullable( erlang:element(13, Params), fun gleam@json:bool/1 )}, {<<"has_spoiler"/utf8>>, gleam@json:nullable( erlang:element(14, Params), fun gleam@json:bool/1 )}, {<<"disable_notification"/utf8>>, gleam@json:nullable( erlang:element(15, Params), fun gleam@json:bool/1 )}, {<<"protect_content"/utf8>>, gleam@json:nullable( erlang:element(16, Params), fun gleam@json:bool/1 )}, {<<"allow_paid_broadcast"/utf8>>, gleam@json:nullable( erlang:element(17, Params), fun gleam@json:bool/1 )}, {<<"message_effect_id"/utf8>>, gleam@json:nullable( erlang:element(18, Params), fun gleam@json:string/1 )}, {<<"reply_parameters"/utf8>>, gleam@json:nullable( erlang:element(19, Params), fun encode_reply_parameters/1 )}, {<<"reply_markup"/utf8>>, gleam@json:nullable( erlang:element(20, Params), fun encode_send_message_reply_markup_parameters/1 )}] ). -file("src/telega/model.gleam", 17831). -spec encode_send_voice_parameters(send_voice_parameters()) -> gleam@json:json(). encode_send_voice_parameters(Params) -> json_object_filter_nulls( [{<<"chat_id"/utf8>>, encode_int_or_string(erlang:element(2, Params))}, {<<"business_connection_id"/utf8>>, gleam@json:nullable( erlang:element(3, Params), fun gleam@json:string/1 )}, {<<"message_thread_id"/utf8>>, gleam@json:nullable( erlang:element(4, Params), fun gleam@json:int/1 )}, {<<"voice"/utf8>>, encode_file_or_string(erlang:element(5, Params))}, {<<"caption"/utf8>>, gleam@json:nullable( erlang:element(6, Params), fun gleam@json:string/1 )}, {<<"parse_mode"/utf8>>, gleam@json:nullable( erlang:element(7, Params), fun gleam@json:string/1 )}, {<<"caption_entities"/utf8>>, gleam@json:nullable( erlang:element(8, Params), fun(_capture) -> gleam@json:array(_capture, fun encode_message_entity/1) end )}, {<<"duration"/utf8>>, gleam@json:nullable( erlang:element(9, Params), fun gleam@json:int/1 )}, {<<"disable_notification"/utf8>>, gleam@json:nullable( erlang:element(10, Params), fun gleam@json:bool/1 )}, {<<"protect_content"/utf8>>, gleam@json:nullable( erlang:element(11, Params), fun gleam@json:bool/1 )}, {<<"allow_paid_broadcast"/utf8>>, gleam@json:nullable( erlang:element(12, Params), fun gleam@json:bool/1 )}, {<<"message_effect_id"/utf8>>, gleam@json:nullable( erlang:element(13, Params), fun gleam@json:string/1 )}, {<<"reply_parameters"/utf8>>, gleam@json:nullable( erlang:element(14, Params), fun encode_reply_parameters/1 )}, {<<"reply_markup"/utf8>>, gleam@json:nullable( erlang:element(15, Params), fun encode_send_message_reply_markup_parameters/1 )}] ). -file("src/telega/model.gleam", 17907). -spec encode_send_video_note_parameters(send_video_note_parameters()) -> gleam@json:json(). encode_send_video_note_parameters(Params) -> json_object_filter_nulls( [{<<"chat_id"/utf8>>, encode_int_or_string(erlang:element(2, Params))}, {<<"business_connection_id"/utf8>>, gleam@json:nullable( erlang:element(3, Params), fun gleam@json:string/1 )}, {<<"message_thread_id"/utf8>>, gleam@json:nullable( erlang:element(4, Params), fun gleam@json:int/1 )}, {<<"video_note"/utf8>>, encode_file_or_string(erlang:element(5, Params))}, {<<"duration"/utf8>>, gleam@json:nullable( erlang:element(6, Params), fun gleam@json:int/1 )}, {<<"length"/utf8>>, gleam@json:nullable( erlang:element(7, Params), fun gleam@json:int/1 )}, {<<"thumbnail"/utf8>>, gleam@json:nullable( erlang:element(8, Params), fun encode_file_or_string/1 )}, {<<"disable_notification"/utf8>>, gleam@json:nullable( erlang:element(9, Params), fun gleam@json:bool/1 )}, {<<"protect_content"/utf8>>, gleam@json:nullable( erlang:element(10, Params), fun gleam@json:bool/1 )}, {<<"allow_paid_broadcast"/utf8>>, gleam@json:nullable( erlang:element(11, Params), fun gleam@json:bool/1 )}, {<<"message_effect_id"/utf8>>, gleam@json:nullable( erlang:element(12, Params), fun gleam@json:string/1 )}, {<<"reply_parameters"/utf8>>, gleam@json:nullable( erlang:element(13, Params), fun encode_reply_parameters/1 )}, {<<"reply_markup"/utf8>>, gleam@json:nullable( erlang:element(14, Params), fun encode_send_message_reply_markup_parameters/1 )}] ). -file("src/telega/model.gleam", 17969). -spec encode_send_media_group_parameters(send_media_group_parameters()) -> gleam@json:json(). encode_send_media_group_parameters(Params) -> json_object_filter_nulls( [{<<"chat_id"/utf8>>, encode_int_or_string(erlang:element(2, Params))}, {<<"business_connection_id"/utf8>>, gleam@json:nullable( erlang:element(3, Params), fun gleam@json:string/1 )}, {<<"message_thread_id"/utf8>>, gleam@json:nullable( erlang:element(4, Params), fun gleam@json:int/1 )}, {<<"media"/utf8>>, gleam@json:array( erlang:element(5, Params), fun encode_input_media/1 )}, {<<"disable_notification"/utf8>>, gleam@json:nullable( erlang:element(6, Params), fun gleam@json:bool/1 )}, {<<"protect_content"/utf8>>, gleam@json:nullable( erlang:element(7, Params), fun gleam@json:bool/1 )}, {<<"allow_paid_broadcast"/utf8>>, gleam@json:nullable( erlang:element(8, Params), fun gleam@json:bool/1 )}, {<<"message_effect_id"/utf8>>, gleam@json:nullable( erlang:element(9, Params), fun gleam@json:string/1 )}, {<<"reply_parameters"/utf8>>, gleam@json:nullable( erlang:element(10, Params), fun encode_reply_parameters/1 )}] ). -file("src/telega/model.gleam", 18033). -spec encode_send_location_parameters(send_location_parameters()) -> gleam@json:json(). encode_send_location_parameters(Params) -> json_object_filter_nulls( [{<<"chat_id"/utf8>>, encode_int_or_string(erlang:element(2, Params))}, {<<"business_connection_id"/utf8>>, gleam@json:nullable( erlang:element(3, Params), fun gleam@json:string/1 )}, {<<"message_thread_id"/utf8>>, gleam@json:nullable( erlang:element(4, Params), fun gleam@json:int/1 )}, {<<"latitude"/utf8>>, gleam@json:float(erlang:element(5, Params))}, {<<"longitude"/utf8>>, gleam@json:float(erlang:element(6, Params))}, {<<"horizontal_accuracy"/utf8>>, gleam@json:nullable( erlang:element(7, Params), fun gleam@json:float/1 )}, {<<"live_period"/utf8>>, gleam@json:nullable( erlang:element(8, Params), fun gleam@json:int/1 )}, {<<"heading"/utf8>>, gleam@json:nullable( erlang:element(9, Params), fun gleam@json:int/1 )}, {<<"proximity_alert_radius"/utf8>>, gleam@json:nullable( erlang:element(10, Params), fun gleam@json:int/1 )}, {<<"disable_notification"/utf8>>, gleam@json:nullable( erlang:element(11, Params), fun gleam@json:bool/1 )}, {<<"protect_content"/utf8>>, gleam@json:nullable( erlang:element(12, Params), fun gleam@json:bool/1 )}, {<<"allow_paid_broadcast"/utf8>>, gleam@json:nullable( erlang:element(13, Params), fun gleam@json:bool/1 )}, {<<"message_effect_id"/utf8>>, gleam@json:nullable( erlang:element(14, Params), fun gleam@json:string/1 )}, {<<"reply_parameters"/utf8>>, gleam@json:nullable( erlang:element(15, Params), fun encode_reply_parameters/1 )}, {<<"reply_markup"/utf8>>, gleam@json:nullable( erlang:element(16, Params), fun encode_send_message_reply_markup_parameters/1 )}] ). -file("src/telega/model.gleam", 18117). -spec encode_send_venue_parameters(send_venue_parameters()) -> gleam@json:json(). encode_send_venue_parameters(Params) -> json_object_filter_nulls( [{<<"chat_id"/utf8>>, encode_int_or_string(erlang:element(2, Params))}, {<<"business_connection_id"/utf8>>, gleam@json:nullable( erlang:element(3, Params), fun gleam@json:string/1 )}, {<<"message_thread_id"/utf8>>, gleam@json:nullable( erlang:element(4, Params), fun gleam@json:int/1 )}, {<<"latitude"/utf8>>, gleam@json:float(erlang:element(5, Params))}, {<<"longitude"/utf8>>, gleam@json:float(erlang:element(6, Params))}, {<<"title"/utf8>>, gleam@json:string(erlang:element(7, Params))}, {<<"address"/utf8>>, gleam@json:string(erlang:element(8, Params))}, {<<"foursquare_id"/utf8>>, gleam@json:nullable( erlang:element(9, Params), fun gleam@json:string/1 )}, {<<"foursquare_type"/utf8>>, gleam@json:nullable( erlang:element(10, Params), fun gleam@json:string/1 )}, {<<"google_place_id"/utf8>>, gleam@json:nullable( erlang:element(11, Params), fun gleam@json:string/1 )}, {<<"google_place_type"/utf8>>, gleam@json:nullable( erlang:element(12, Params), fun gleam@json:string/1 )}, {<<"disable_notification"/utf8>>, gleam@json:nullable( erlang:element(13, Params), fun gleam@json:bool/1 )}, {<<"protect_content"/utf8>>, gleam@json:nullable( erlang:element(14, Params), fun gleam@json:bool/1 )}, {<<"allow_paid_broadcast"/utf8>>, gleam@json:nullable( erlang:element(15, Params), fun gleam@json:bool/1 )}, {<<"message_effect_id"/utf8>>, gleam@json:nullable( erlang:element(16, Params), fun gleam@json:string/1 )}, {<<"reply_parameters"/utf8>>, gleam@json:nullable( erlang:element(17, Params), fun encode_reply_parameters/1 )}, {<<"reply_markup"/utf8>>, gleam@json:nullable( erlang:element(18, Params), fun encode_send_message_reply_markup_parameters/1 )}] ). -file("src/telega/model.gleam", 18189). -spec encode_send_contact_parameters(send_contact_parameters()) -> gleam@json:json(). encode_send_contact_parameters(Params) -> json_object_filter_nulls( [{<<"chat_id"/utf8>>, encode_int_or_string(erlang:element(2, Params))}, {<<"business_connection_id"/utf8>>, gleam@json:nullable( erlang:element(3, Params), fun gleam@json:string/1 )}, {<<"message_thread_id"/utf8>>, gleam@json:nullable( erlang:element(4, Params), fun gleam@json:int/1 )}, {<<"phone_number"/utf8>>, gleam@json:string(erlang:element(5, Params))}, {<<"first_name"/utf8>>, gleam@json:string(erlang:element(6, Params))}, {<<"last_name"/utf8>>, gleam@json:nullable( erlang:element(7, Params), fun gleam@json:string/1 )}, {<<"vcard"/utf8>>, gleam@json:nullable( erlang:element(8, Params), fun gleam@json:string/1 )}, {<<"disable_notification"/utf8>>, gleam@json:nullable( erlang:element(9, Params), fun gleam@json:bool/1 )}, {<<"protect_content"/utf8>>, gleam@json:nullable( erlang:element(10, Params), fun gleam@json:bool/1 )}, {<<"allow_paid_broadcast"/utf8>>, gleam@json:nullable( erlang:element(11, Params), fun gleam@json:bool/1 )}, {<<"message_effect_id"/utf8>>, gleam@json:nullable( erlang:element(12, Params), fun gleam@json:string/1 )}, {<<"reply_parameters"/utf8>>, gleam@json:nullable( erlang:element(13, Params), fun encode_reply_parameters/1 )}, {<<"reply_markup"/utf8>>, gleam@json:nullable( erlang:element(14, Params), fun encode_send_message_reply_markup_parameters/1 )}] ). -file("src/telega/model.gleam", 18277). -spec encode_send_poll_parameters(send_poll_parameters()) -> gleam@json:json(). encode_send_poll_parameters(Params) -> json_object_filter_nulls( [{<<"chat_id"/utf8>>, encode_int_or_string(erlang:element(2, Params))}, {<<"business_connection_id"/utf8>>, gleam@json:nullable( erlang:element(3, Params), fun gleam@json:string/1 )}, {<<"message_thread_id"/utf8>>, gleam@json:nullable( erlang:element(4, Params), fun gleam@json:int/1 )}, {<<"question"/utf8>>, gleam@json:string(erlang:element(5, Params))}, {<<"question_parse_mode"/utf8>>, gleam@json:nullable( erlang:element(6, Params), fun gleam@json:string/1 )}, {<<"question_entities"/utf8>>, gleam@json:nullable( erlang:element(7, Params), fun(_capture) -> gleam@json:array(_capture, fun encode_message_entity/1) end )}, {<<"options"/utf8>>, gleam@json:array( erlang:element(8, Params), fun gleam@json:string/1 )}, {<<"is_anonymous"/utf8>>, gleam@json:nullable( erlang:element(9, Params), fun gleam@json:bool/1 )}, {<<"type"/utf8>>, gleam@json:nullable( erlang:element(10, Params), fun gleam@json:string/1 )}, {<<"allows_multiple_answers"/utf8>>, gleam@json:nullable( erlang:element(11, Params), fun gleam@json:bool/1 )}, {<<"correct_option_id"/utf8>>, gleam@json:nullable( erlang:element(12, Params), fun gleam@json:int/1 )}, {<<"explanation"/utf8>>, gleam@json:nullable( erlang:element(13, Params), fun gleam@json:string/1 )}, {<<"explanation_parse_mode"/utf8>>, gleam@json:nullable( erlang:element(14, Params), fun gleam@json:string/1 )}, {<<"explanation_entities"/utf8>>, gleam@json:nullable( erlang:element(15, Params), fun(_capture@1) -> gleam@json:array( _capture@1, fun encode_message_entity/1 ) end )}, {<<"open_period"/utf8>>, gleam@json:nullable( erlang:element(16, Params), fun gleam@json:int/1 )}, {<<"close_date"/utf8>>, gleam@json:nullable( erlang:element(17, Params), fun gleam@json:int/1 )}, {<<"is_closed"/utf8>>, gleam@json:nullable( erlang:element(18, Params), fun gleam@json:bool/1 )}, {<<"disable_notification"/utf8>>, gleam@json:nullable( erlang:element(19, Params), fun gleam@json:bool/1 )}, {<<"protect_content"/utf8>>, gleam@json:nullable( erlang:element(20, Params), fun gleam@json:bool/1 )}, {<<"allow_paid_broadcast"/utf8>>, gleam@json:nullable( erlang:element(21, Params), fun gleam@json:bool/1 )}, {<<"message_effect_id"/utf8>>, gleam@json:nullable( erlang:element(22, Params), fun gleam@json:string/1 )}, {<<"reply_parameters"/utf8>>, gleam@json:nullable( erlang:element(23, Params), fun encode_reply_parameters/1 )}, {<<"reply_markup"/utf8>>, gleam@json:nullable( erlang:element(24, Params), fun encode_send_message_reply_markup_parameters/1 )}] ). -file("src/telega/model.gleam", 18389). -spec encode_send_chat_action_parameters(send_chat_action_parameters()) -> gleam@json:json(). encode_send_chat_action_parameters(Params) -> json_object_filter_nulls( [{<<"chat_id"/utf8>>, encode_int_or_string(erlang:element(2, Params))}, {<<"business_connection_id"/utf8>>, gleam@json:nullable( erlang:element(3, Params), fun gleam@json:string/1 )}, {<<"message_thread_id"/utf8>>, gleam@json:nullable( erlang:element(4, Params), fun gleam@json:int/1 )}, {<<"action"/utf8>>, gleam@json:string(encode_chat_action(erlang:element(5, Params)))}] ). -file("src/telega/model.gleam", 18468). -spec encode_send_invoice_parameters(send_invoice_parameters()) -> gleam@json:json(). encode_send_invoice_parameters(Params) -> json_object_filter_nulls( [{<<"chat_id"/utf8>>, encode_int_or_string(erlang:element(2, Params))}, {<<"message_thread_id"/utf8>>, gleam@json:nullable( erlang:element(3, Params), fun gleam@json:int/1 )}, {<<"title"/utf8>>, gleam@json:string(erlang:element(4, Params))}, {<<"description"/utf8>>, gleam@json:string(erlang:element(5, Params))}, {<<"payload"/utf8>>, gleam@json:string(erlang:element(6, Params))}, {<<"provider_token"/utf8>>, gleam@json:nullable( erlang:element(7, Params), fun gleam@json:string/1 )}, {<<"currency"/utf8>>, gleam@json:string(erlang:element(8, Params))}, {<<"prices"/utf8>>, gleam@json:array( erlang:element(9, Params), fun encode_labeled_price/1 )}, {<<"max_tip_amount"/utf8>>, gleam@json:nullable( erlang:element(10, Params), fun gleam@json:int/1 )}, {<<"suggested_tip_amounts"/utf8>>, gleam@json:nullable( erlang:element(11, Params), fun(_capture) -> gleam@json:array(_capture, fun gleam@json:int/1) end )}, {<<"start_parameter"/utf8>>, gleam@json:nullable( erlang:element(12, Params), fun gleam@json:string/1 )}, {<<"provider_data"/utf8>>, gleam@json:nullable( erlang:element(13, Params), fun gleam@json:string/1 )}, {<<"photo_url"/utf8>>, gleam@json:nullable( erlang:element(14, Params), fun gleam@json:string/1 )}, {<<"photo_size"/utf8>>, gleam@json:nullable( erlang:element(15, Params), fun gleam@json:int/1 )}, {<<"photo_width"/utf8>>, gleam@json:nullable( erlang:element(16, Params), fun gleam@json:int/1 )}, {<<"photo_height"/utf8>>, gleam@json:nullable( erlang:element(17, Params), fun gleam@json:int/1 )}, {<<"need_name"/utf8>>, gleam@json:nullable( erlang:element(18, Params), fun gleam@json:bool/1 )}, {<<"need_phone_number"/utf8>>, gleam@json:nullable( erlang:element(19, Params), fun gleam@json:bool/1 )}, {<<"need_email"/utf8>>, gleam@json:nullable( erlang:element(20, Params), fun gleam@json:bool/1 )}, {<<"need_shipping_address"/utf8>>, gleam@json:nullable( erlang:element(21, Params), fun gleam@json:bool/1 )}, {<<"send_phone_number_to_provider"/utf8>>, gleam@json:nullable( erlang:element(22, Params), fun gleam@json:bool/1 )}, {<<"send_email_to_provider"/utf8>>, gleam@json:nullable( erlang:element(23, Params), fun gleam@json:bool/1 )}, {<<"is_flexible"/utf8>>, gleam@json:nullable( erlang:element(24, Params), fun gleam@json:bool/1 )}, {<<"disable_notification"/utf8>>, gleam@json:nullable( erlang:element(25, Params), fun gleam@json:bool/1 )}, {<<"protect_content"/utf8>>, gleam@json:nullable( erlang:element(26, Params), fun gleam@json:bool/1 )}, {<<"allow_paid_broadcast"/utf8>>, gleam@json:nullable( erlang:element(27, Params), fun gleam@json:bool/1 )}, {<<"message_effect_id"/utf8>>, gleam@json:nullable( erlang:element(28, Params), fun gleam@json:string/1 )}, {<<"reply_parameters"/utf8>>, gleam@json:nullable( erlang:element(29, Params), fun encode_reply_parameters/1 )}, {<<"reply_markup"/utf8>>, gleam@json:nullable( erlang:element(30, Params), fun encode_inline_keyboard_markup/1 )}] ). -file("src/telega/model.gleam", 18577). -spec encode_create_invoice_link_parameters(create_invoice_link_parameters()) -> gleam@json:json(). encode_create_invoice_link_parameters(Params) -> json_object_filter_nulls( [{<<"business_connection_id"/utf8>>, gleam@json:nullable( erlang:element(2, Params), fun gleam@json:string/1 )}, {<<"title"/utf8>>, gleam@json:string(erlang:element(3, Params))}, {<<"description"/utf8>>, gleam@json:string(erlang:element(4, Params))}, {<<"payload"/utf8>>, gleam@json:string(erlang:element(5, Params))}, {<<"provider_token"/utf8>>, gleam@json:nullable( erlang:element(6, Params), fun gleam@json:string/1 )}, {<<"currency"/utf8>>, gleam@json:string(erlang:element(7, Params))}, {<<"prices"/utf8>>, gleam@json:array( erlang:element(8, Params), fun encode_labeled_price/1 )}, {<<"subscription_period"/utf8>>, gleam@json:nullable( erlang:element(9, Params), fun gleam@json:int/1 )}, {<<"max_tip_amount"/utf8>>, gleam@json:nullable( erlang:element(10, Params), fun gleam@json:int/1 )}, {<<"suggested_tip_amounts"/utf8>>, gleam@json:nullable( erlang:element(11, Params), fun(_capture) -> gleam@json:array(_capture, fun gleam@json:int/1) end )}, {<<"provider_data"/utf8>>, gleam@json:nullable( erlang:element(12, Params), fun gleam@json:string/1 )}, {<<"photo_url"/utf8>>, gleam@json:nullable( erlang:element(13, Params), fun gleam@json:string/1 )}, {<<"photo_size"/utf8>>, gleam@json:nullable( erlang:element(14, Params), fun gleam@json:int/1 )}, {<<"photo_width"/utf8>>, gleam@json:nullable( erlang:element(15, Params), fun gleam@json:int/1 )}, {<<"photo_height"/utf8>>, gleam@json:nullable( erlang:element(16, Params), fun gleam@json:int/1 )}, {<<"need_name"/utf8>>, gleam@json:nullable( erlang:element(17, Params), fun gleam@json:bool/1 )}, {<<"need_phone_number"/utf8>>, gleam@json:nullable( erlang:element(18, Params), fun gleam@json:bool/1 )}, {<<"need_email"/utf8>>, gleam@json:nullable( erlang:element(19, Params), fun gleam@json:bool/1 )}, {<<"need_shipping_address"/utf8>>, gleam@json:nullable( erlang:element(20, Params), fun gleam@json:bool/1 )}, {<<"send_phone_number_to_provider"/utf8>>, gleam@json:nullable( erlang:element(21, Params), fun gleam@json:bool/1 )}, {<<"send_email_to_provider"/utf8>>, gleam@json:nullable( erlang:element(22, Params), fun gleam@json:bool/1 )}, {<<"is_flexible"/utf8>>, gleam@json:nullable( erlang:element(23, Params), fun gleam@json:bool/1 )}] ). -file("src/telega/model.gleam", 18653). -spec encode_send_sticker_parameters(send_sticker_parameters()) -> gleam@json:json(). encode_send_sticker_parameters(Params) -> json_object_filter_nulls( [{<<"chat_id"/utf8>>, encode_int_or_string(erlang:element(2, Params))}, {<<"business_connection_id"/utf8>>, gleam@json:nullable( erlang:element(3, Params), fun gleam@json:string/1 )}, {<<"message_thread_id"/utf8>>, gleam@json:nullable( erlang:element(4, Params), fun gleam@json:int/1 )}, {<<"sticker"/utf8>>, encode_file_or_string(erlang:element(5, Params))}, {<<"emoji"/utf8>>, gleam@json:nullable( erlang:element(6, Params), fun gleam@json:string/1 )}, {<<"disable_notification"/utf8>>, gleam@json:nullable( erlang:element(7, Params), fun gleam@json:bool/1 )}, {<<"protect_content"/utf8>>, gleam@json:nullable( erlang:element(8, Params), fun gleam@json:bool/1 )}, {<<"allow_paid_broadcast"/utf8>>, gleam@json:nullable( erlang:element(9, Params), fun gleam@json:bool/1 )}, {<<"message_effect_id"/utf8>>, gleam@json:nullable( erlang:element(10, Params), fun gleam@json:string/1 )}, {<<"reply_parameters"/utf8>>, gleam@json:nullable( erlang:element(11, Params), fun encode_reply_parameters/1 )}, {<<"reply_markup"/utf8>>, gleam@json:nullable( erlang:element(12, Params), fun encode_send_message_reply_markup_parameters/1 )}] ). -file("src/telega/model.gleam", 18696). -spec encode_get_sticker_set_parameters(get_sticker_set_parameters()) -> gleam@json:json(). encode_get_sticker_set_parameters(Params) -> json_object_filter_nulls( [{<<"name"/utf8>>, gleam@json:string(erlang:element(2, Params))}] ). -file("src/telega/model.gleam", 18717). -spec encode_set_message_reaction_parameters(set_message_reaction_parameters()) -> gleam@json:json(). encode_set_message_reaction_parameters(Params) -> json_object_filter_nulls( [{<<"chat_id"/utf8>>, encode_int_or_string(erlang:element(2, Params))}, {<<"message_id"/utf8>>, gleam@json:int(erlang:element(3, Params))}, {<<"reaction"/utf8>>, gleam@json:nullable( erlang:element(4, Params), fun(_capture) -> gleam@json:array(_capture, fun encode_reaction_type/1) end )}, {<<"is_big"/utf8>>, gleam@json:nullable( erlang:element(5, Params), fun gleam@json:bool/1 )}] ). -file("src/telega/model.gleam", 18744). -spec encode_get_user_profile_photos_parameters( get_user_profile_photos_parameters() ) -> gleam@json:json(). encode_get_user_profile_photos_parameters(Params) -> json_object_filter_nulls( [{<<"user_id"/utf8>>, gleam@json:int(erlang:element(2, Params))}, {<<"offset"/utf8>>, gleam@json:nullable( erlang:element(3, Params), fun gleam@json:int/1 )}, {<<"limit"/utf8>>, gleam@json:nullable( erlang:element(4, Params), fun gleam@json:int/1 )}] ). -file("src/telega/model.gleam", 18779). -spec encode_edit_message_caption_parameters(edit_message_caption_parameters()) -> gleam@json:json(). encode_edit_message_caption_parameters(Params) -> json_object_filter_nulls( [{<<"business_connection_id"/utf8>>, gleam@json:nullable( erlang:element(2, Params), fun gleam@json:string/1 )}, {<<"chat_id"/utf8>>, gleam@json:nullable( erlang:element(3, Params), fun encode_int_or_string/1 )}, {<<"message_id"/utf8>>, gleam@json:nullable( erlang:element(4, Params), fun gleam@json:int/1 )}, {<<"inline_message_id"/utf8>>, gleam@json:nullable( erlang:element(5, Params), fun gleam@json:string/1 )}, {<<"caption"/utf8>>, gleam@json:nullable( erlang:element(6, Params), fun gleam@json:string/1 )}, {<<"parse_mode"/utf8>>, gleam@json:nullable( erlang:element(7, Params), fun gleam@json:string/1 )}, {<<"caption_entities"/utf8>>, gleam@json:nullable( erlang:element(8, Params), fun(_capture) -> gleam@json:array(_capture, fun encode_message_entity/1) end )}, {<<"show_caption_above_media"/utf8>>, gleam@json:nullable( erlang:element(9, Params), fun gleam@json:bool/1 )}, {<<"reply_markup"/utf8>>, gleam@json:nullable( erlang:element(10, Params), fun encode_inline_keyboard_markup/1 )}] ). -file("src/telega/model.gleam", 18829). -spec encode_edit_message_media_parameters(edit_message_media_parameters()) -> gleam@json:json(). encode_edit_message_media_parameters(Params) -> json_object_filter_nulls( [{<<"business_connection_id"/utf8>>, gleam@json:nullable( erlang:element(2, Params), fun gleam@json:string/1 )}, {<<"chat_id"/utf8>>, gleam@json:nullable( erlang:element(3, Params), fun encode_int_or_string/1 )}, {<<"message_id"/utf8>>, gleam@json:nullable( erlang:element(4, Params), fun gleam@json:int/1 )}, {<<"inline_message_id"/utf8>>, gleam@json:nullable( erlang:element(5, Params), fun gleam@json:string/1 )}, {<<"media"/utf8>>, encode_input_media(erlang:element(6, Params))}, {<<"reply_markup"/utf8>>, gleam@json:nullable( erlang:element(7, Params), fun encode_inline_keyboard_markup/1 )}] ). -file("src/telega/model.gleam", 18877). -spec encode_edit_message_live_location_parameters( edit_message_live_location_parameters() ) -> gleam@json:json(). encode_edit_message_live_location_parameters(Params) -> json_object_filter_nulls( [{<<"business_connection_id"/utf8>>, gleam@json:nullable( erlang:element(2, Params), fun gleam@json:string/1 )}, {<<"chat_id"/utf8>>, gleam@json:nullable( erlang:element(3, Params), fun encode_int_or_string/1 )}, {<<"message_id"/utf8>>, gleam@json:nullable( erlang:element(4, Params), fun gleam@json:int/1 )}, {<<"inline_message_id"/utf8>>, gleam@json:nullable( erlang:element(5, Params), fun gleam@json:string/1 )}, {<<"latitude"/utf8>>, gleam@json:float(erlang:element(6, Params))}, {<<"longitude"/utf8>>, gleam@json:float(erlang:element(7, Params))}, {<<"live_period"/utf8>>, gleam@json:nullable( erlang:element(8, Params), fun gleam@json:int/1 )}, {<<"horizontal_accuracy"/utf8>>, gleam@json:nullable( erlang:element(9, Params), fun gleam@json:float/1 )}, {<<"heading"/utf8>>, gleam@json:nullable( erlang:element(10, Params), fun gleam@json:int/1 )}, {<<"proximity_alert_radius"/utf8>>, gleam@json:nullable( erlang:element(11, Params), fun gleam@json:int/1 )}, {<<"reply_markup"/utf8>>, gleam@json:nullable( erlang:element(12, Params), fun encode_inline_keyboard_markup/1 )}] ). -file("src/telega/model.gleam", 18923). -spec encode_stop_message_live_location_parameters( stop_message_live_location_parameters() ) -> gleam@json:json(). encode_stop_message_live_location_parameters(Params) -> json_object_filter_nulls( [{<<"business_connection_id"/utf8>>, gleam@json:nullable( erlang:element(2, Params), fun gleam@json:string/1 )}, {<<"chat_id"/utf8>>, gleam@json:nullable( erlang:element(3, Params), fun encode_int_or_string/1 )}, {<<"message_id"/utf8>>, gleam@json:nullable( erlang:element(4, Params), fun gleam@json:int/1 )}, {<<"inline_message_id"/utf8>>, gleam@json:nullable( erlang:element(5, Params), fun gleam@json:string/1 )}, {<<"reply_markup"/utf8>>, gleam@json:nullable( erlang:element(6, Params), fun encode_inline_keyboard_markup/1 )}] ). -file("src/telega/model.gleam", 18958). -spec encode_edit_message_reply_markup_parameters( edit_message_reply_markup_parameters() ) -> gleam@json:json(). encode_edit_message_reply_markup_parameters(Params) -> json_object_filter_nulls( [{<<"business_connection_id"/utf8>>, gleam@json:nullable( erlang:element(2, Params), fun gleam@json:string/1 )}, {<<"chat_id"/utf8>>, gleam@json:nullable( erlang:element(3, Params), fun encode_int_or_string/1 )}, {<<"message_id"/utf8>>, gleam@json:nullable( erlang:element(4, Params), fun gleam@json:int/1 )}, {<<"inline_message_id"/utf8>>, gleam@json:nullable( erlang:element(5, Params), fun gleam@json:string/1 )}, {<<"reply_markup"/utf8>>, gleam@json:nullable( erlang:element(6, Params), fun encode_inline_keyboard_markup/1 )}] ). -file("src/telega/model.gleam", 18991). -spec encode_stop_poll_parameters(stop_poll_parameters()) -> gleam@json:json(). encode_stop_poll_parameters(Params) -> json_object_filter_nulls( [{<<"business_connection_id"/utf8>>, gleam@json:nullable( erlang:element(2, Params), fun gleam@json:string/1 )}, {<<"chat_id"/utf8>>, encode_int_or_string(erlang:element(3, Params))}, {<<"message_id"/utf8>>, gleam@json:int(erlang:element(4, Params))}, {<<"reply_markup"/utf8>>, gleam@json:nullable( erlang:element(5, Params), fun encode_inline_keyboard_markup/1 )}] ). -file("src/telega/model.gleam", 19016). -spec encode_delete_message_parameters(delete_message_parameters()) -> gleam@json:json(). encode_delete_message_parameters(Params) -> json_object_filter_nulls( [{<<"chat_id"/utf8>>, encode_int_or_string(erlang:element(2, Params))}, {<<"message_id"/utf8>>, gleam@json:int(erlang:element(3, Params))}] ). -file("src/telega/model.gleam", 19034). -spec encode_delete_messages_parameters(delete_messages_parameters()) -> gleam@json:json(). encode_delete_messages_parameters(Params) -> json_object_filter_nulls( [{<<"chat_id"/utf8>>, encode_int_or_string(erlang:element(2, Params))}, {<<"message_ids"/utf8>>, gleam@json:array( erlang:element(3, Params), fun gleam@json:int/1 )}] ). -file("src/telega/model.gleam", 19058). -spec encode_ban_chat_member_parameters(ban_chat_member_parameters()) -> gleam@json:json(). encode_ban_chat_member_parameters(Params) -> json_object_filter_nulls( [{<<"chat_id"/utf8>>, encode_int_or_string(erlang:element(2, Params))}, {<<"user_id"/utf8>>, gleam@json:int(erlang:element(3, Params))}, {<<"until_date"/utf8>>, gleam@json:nullable( erlang:element(4, Params), fun gleam@json:int/1 )}, {<<"revoke_messages"/utf8>>, gleam@json:nullable( erlang:element(5, Params), fun gleam@json:bool/1 )}] ). -file("src/telega/model.gleam", 19082). -spec encode_unban_chat_member_parameters(unban_chat_member_parameters()) -> gleam@json:json(). encode_unban_chat_member_parameters(Params) -> json_object_filter_nulls( [{<<"chat_id"/utf8>>, encode_int_or_string(erlang:element(2, Params))}, {<<"user_id"/utf8>>, gleam@json:int(erlang:element(3, Params))}, {<<"only_if_banned"/utf8>>, gleam@json:nullable( erlang:element(4, Params), fun gleam@json:bool/1 )}] ). -file("src/telega/model.gleam", 19107). -spec encode_restrict_chat_member_parameters(restrict_chat_member_parameters()) -> gleam@json:json(). encode_restrict_chat_member_parameters(Params) -> json_object_filter_nulls( [{<<"chat_id"/utf8>>, encode_int_or_string(erlang:element(2, Params))}, {<<"user_id"/utf8>>, gleam@json:int(erlang:element(3, Params))}, {<<"permissions"/utf8>>, encode_chat_permissions(erlang:element(4, Params))}, {<<"until_date"/utf8>>, gleam@json:nullable( erlang:element(5, Params), fun gleam@json:int/1 )}] ). -file("src/telega/model.gleam", 19163). -spec encode_promote_chat_member_parameters(promote_chat_member_parameters()) -> gleam@json:json(). encode_promote_chat_member_parameters(Params) -> json_object_filter_nulls( [{<<"chat_id"/utf8>>, encode_int_or_string(erlang:element(2, Params))}, {<<"user_id"/utf8>>, gleam@json:int(erlang:element(3, Params))}, {<<"is_anonymous"/utf8>>, gleam@json:nullable( erlang:element(4, Params), fun gleam@json:bool/1 )}, {<<"can_manage_chat"/utf8>>, gleam@json:nullable( erlang:element(5, Params), fun gleam@json:bool/1 )}, {<<"can_delete_messages"/utf8>>, gleam@json:nullable( erlang:element(6, Params), fun gleam@json:bool/1 )}, {<<"can_manage_video_chats"/utf8>>, gleam@json:nullable( erlang:element(7, Params), fun gleam@json:bool/1 )}, {<<"can_restrict_members"/utf8>>, gleam@json:nullable( erlang:element(8, Params), fun gleam@json:bool/1 )}, {<<"can_promote_members"/utf8>>, gleam@json:nullable( erlang:element(9, Params), fun gleam@json:bool/1 )}, {<<"can_change_info"/utf8>>, gleam@json:nullable( erlang:element(10, Params), fun gleam@json:bool/1 )}, {<<"can_invite_users"/utf8>>, gleam@json:nullable( erlang:element(11, Params), fun gleam@json:bool/1 )}, {<<"can_post_stories"/utf8>>, gleam@json:nullable( erlang:element(12, Params), fun gleam@json:bool/1 )}, {<<"can_edit_stories"/utf8>>, gleam@json:nullable( erlang:element(13, Params), fun gleam@json:bool/1 )}, {<<"can_delete_stories"/utf8>>, gleam@json:nullable( erlang:element(14, Params), fun gleam@json:bool/1 )}, {<<"can_post_messages"/utf8>>, gleam@json:nullable( erlang:element(15, Params), fun gleam@json:bool/1 )}, {<<"can_edit_messages"/utf8>>, gleam@json:nullable( erlang:element(16, Params), fun gleam@json:bool/1 )}, {<<"can_pin_messages"/utf8>>, gleam@json:nullable( erlang:element(17, Params), fun gleam@json:bool/1 )}, {<<"can_manage_topics"/utf8>>, gleam@json:nullable( erlang:element(18, Params), fun gleam@json:bool/1 )}] ). -file("src/telega/model.gleam", 19212). -spec encode_set_chat_administrator_custom_title_parameters( set_chat_administrator_custom_title_parameters() ) -> gleam@json:json(). encode_set_chat_administrator_custom_title_parameters(Params) -> json_object_filter_nulls( [{<<"chat_id"/utf8>>, encode_int_or_string(erlang:element(2, Params))}, {<<"user_id"/utf8>>, gleam@json:int(erlang:element(3, Params))}, {<<"custom_title"/utf8>>, gleam@json:string(erlang:element(4, Params))}] ). -file("src/telega/model.gleam", 19233). -spec encode_ban_chat_sender_chat_parameters(ban_chat_sender_chat_parameters()) -> gleam@json:json(). encode_ban_chat_sender_chat_parameters(Params) -> json_object_filter_nulls( [{<<"chat_id"/utf8>>, encode_int_or_string(erlang:element(2, Params))}, {<<"sender_chat_id"/utf8>>, gleam@json:int(erlang:element(3, Params))}] ). -file("src/telega/model.gleam", 19253). -spec encode_unban_chat_sender_chat_parameters( unban_chat_sender_chat_parameters() ) -> gleam@json:json(). encode_unban_chat_sender_chat_parameters(Params) -> json_object_filter_nulls( [{<<"chat_id"/utf8>>, encode_int_or_string(erlang:element(2, Params))}, {<<"sender_chat_id"/utf8>>, gleam@json:int(erlang:element(3, Params))}] ). -file("src/telega/model.gleam", 19276). -spec encode_set_chat_permissions_parameters(set_chat_permissions_parameters()) -> gleam@json:json(). encode_set_chat_permissions_parameters(Params) -> json_object_filter_nulls( [{<<"chat_id"/utf8>>, encode_int_or_string(erlang:element(2, Params))}, {<<"permissions"/utf8>>, encode_chat_permissions(erlang:element(3, Params))}, {<<"use_independent_chat_permissions"/utf8>>, gleam@json:nullable( erlang:element(4, Params), fun gleam@json:bool/1 )}] ). -file("src/telega/model.gleam", 19298). -spec encode_export_chat_invite_link_parameters( export_chat_invite_link_parameters() ) -> gleam@json:json(). encode_export_chat_invite_link_parameters(Params) -> json_object_filter_nulls( [{<<"chat_id"/utf8>>, encode_int_or_string(erlang:element(2, Params))}] ). -file("src/telega/model.gleam", 19321). -spec encode_create_chat_invite_link_parameters( create_chat_invite_link_parameters() ) -> gleam@json:json(). encode_create_chat_invite_link_parameters(Params) -> json_object_filter_nulls( [{<<"chat_id"/utf8>>, encode_int_or_string(erlang:element(2, Params))}, {<<"name"/utf8>>, gleam@json:nullable( erlang:element(3, Params), fun gleam@json:string/1 )}, {<<"member_limit"/utf8>>, gleam@json:nullable( erlang:element(4, Params), fun gleam@json:int/1 )}, {<<"expire_date"/utf8>>, gleam@json:nullable( erlang:element(5, Params), fun gleam@json:int/1 )}, {<<"creates_join_request"/utf8>>, gleam@json:nullable( erlang:element(6, Params), fun gleam@json:bool/1 )}] ). -file("src/telega/model.gleam", 19355). -spec encode_edit_chat_invite_link_parameters( edit_chat_invite_link_parameters() ) -> gleam@json:json(). encode_edit_chat_invite_link_parameters(Params) -> json_object_filter_nulls( [{<<"chat_id"/utf8>>, encode_int_or_string(erlang:element(2, Params))}, {<<"invite_link"/utf8>>, gleam@json:string(erlang:element(3, Params))}, {<<"name"/utf8>>, gleam@json:nullable( erlang:element(4, Params), fun gleam@json:string/1 )}, {<<"member_limit"/utf8>>, gleam@json:nullable( erlang:element(5, Params), fun gleam@json:int/1 )}, {<<"expire_date"/utf8>>, gleam@json:nullable( erlang:element(6, Params), fun gleam@json:int/1 )}, {<<"creates_join_request"/utf8>>, gleam@json:nullable( erlang:element(7, Params), fun gleam@json:bool/1 )}] ). -file("src/telega/model.gleam", 19386). -spec encode_create_chat_subscription_invite_link_parameters( create_chat_subscription_invite_link_parameters() ) -> gleam@json:json(). encode_create_chat_subscription_invite_link_parameters(Params) -> json_object_filter_nulls( [{<<"chat_id"/utf8>>, encode_int_or_string(erlang:element(2, Params))}, {<<"name"/utf8>>, gleam@json:nullable( erlang:element(3, Params), fun gleam@json:string/1 )}, {<<"period"/utf8>>, gleam@json:int(erlang:element(4, Params))}, {<<"amount"/utf8>>, gleam@json:int(erlang:element(5, Params))}] ). -file("src/telega/model.gleam", 19410). -spec encode_edit_chat_subscription_invite_link_parameters( edit_chat_subscription_invite_link_parameters() ) -> gleam@json:json(). encode_edit_chat_subscription_invite_link_parameters(Params) -> json_object_filter_nulls( [{<<"chat_id"/utf8>>, encode_int_or_string(erlang:element(2, Params))}, {<<"invite_link"/utf8>>, gleam@json:string(erlang:element(3, Params))}, {<<"name"/utf8>>, gleam@json:nullable( erlang:element(4, Params), fun gleam@json:string/1 )}] ). -file("src/telega/model.gleam", 19431). -spec encode_revoke_chat_invite_link_parameters( revoke_chat_invite_link_parameters() ) -> gleam@json:json(). encode_revoke_chat_invite_link_parameters(Params) -> json_object_filter_nulls( [{<<"chat_id"/utf8>>, encode_int_or_string(erlang:element(2, Params))}, {<<"invite_link"/utf8>>, gleam@json:string(erlang:element(3, Params))}] ). -file("src/telega/model.gleam", 19451). -spec encode_approve_chat_join_request_parameters( approve_chat_join_request_parameters() ) -> gleam@json:json(). encode_approve_chat_join_request_parameters(Params) -> json_object_filter_nulls( [{<<"chat_id"/utf8>>, encode_int_or_string(erlang:element(2, Params))}, {<<"user_id"/utf8>>, gleam@json:int(erlang:element(3, Params))}] ). -file("src/telega/model.gleam", 19471). -spec encode_decline_chat_join_request_parameters( decline_chat_join_request_parameters() ) -> gleam@json:json(). encode_decline_chat_join_request_parameters(Params) -> json_object_filter_nulls( [{<<"chat_id"/utf8>>, encode_int_or_string(erlang:element(2, Params))}, {<<"user_id"/utf8>>, gleam@json:int(erlang:element(3, Params))}] ). -file("src/telega/model.gleam", 19491). -spec encode_set_chat_photo_parameters(set_chat_photo_parameters()) -> gleam@json:json(). encode_set_chat_photo_parameters(Params) -> json_object_filter_nulls( [{<<"chat_id"/utf8>>, encode_int_or_string(erlang:element(2, Params))}, {<<"photo"/utf8>>, encode_file(erlang:element(3, Params))}] ). -file("src/telega/model.gleam", 19507). -spec encode_delete_chat_photo_parameters(delete_chat_photo_parameters()) -> gleam@json:json(). encode_delete_chat_photo_parameters(Params) -> json_object_filter_nulls( [{<<"chat_id"/utf8>>, encode_int_or_string(erlang:element(2, Params))}] ). -file("src/telega/model.gleam", 19524). -spec encode_set_chat_title_parameters(set_chat_title_parameters()) -> gleam@json:json(). encode_set_chat_title_parameters(Params) -> json_object_filter_nulls( [{<<"chat_id"/utf8>>, encode_int_or_string(erlang:element(2, Params))}, {<<"title"/utf8>>, gleam@json:string(erlang:element(3, Params))}] ). -file("src/telega/model.gleam", 19542). -spec encode_set_chat_description_parameters(set_chat_description_parameters()) -> gleam@json:json(). encode_set_chat_description_parameters(Params) -> json_object_filter_nulls( [{<<"chat_id"/utf8>>, encode_int_or_string(erlang:element(2, Params))}, {<<"description"/utf8>>, gleam@json:nullable( erlang:element(3, Params), fun gleam@json:string/1 )}] ). -file("src/telega/model.gleam", 19566). -spec encode_pin_chat_message_parameters(pin_chat_message_parameters()) -> gleam@json:json(). encode_pin_chat_message_parameters(Params) -> json_object_filter_nulls( [{<<"chat_id"/utf8>>, encode_int_or_string(erlang:element(2, Params))}, {<<"message_id"/utf8>>, gleam@json:int(erlang:element(3, Params))}, {<<"business_connection_id"/utf8>>, gleam@json:nullable( erlang:element(4, Params), fun gleam@json:string/1 )}, {<<"disable_notification"/utf8>>, gleam@json:nullable( erlang:element(5, Params), fun gleam@json:bool/1 )}] ). -file("src/telega/model.gleam", 19596). -spec encode_unpin_chat_message_parameters(unpin_chat_message_parameters()) -> gleam@json:json(). encode_unpin_chat_message_parameters(Params) -> json_object_filter_nulls( [{<<"chat_id"/utf8>>, encode_int_or_string(erlang:element(2, Params))}, {<<"message_id"/utf8>>, gleam@json:nullable( erlang:element(3, Params), fun gleam@json:int/1 )}, {<<"business_connection_id"/utf8>>, gleam@json:nullable( erlang:element(4, Params), fun gleam@json:string/1 )}] ). -file("src/telega/model.gleam", 19618). -spec encode_unpin_all_chat_messages_parameters( unpin_all_chat_messages_parameters() ) -> gleam@json:json(). encode_unpin_all_chat_messages_parameters(Params) -> json_object_filter_nulls( [{<<"chat_id"/utf8>>, encode_int_or_string(erlang:element(2, Params))}] ). -file("src/telega/model.gleam", 19633). -spec encode_leave_chat_parameters(leave_chat_parameters()) -> gleam@json:json(). encode_leave_chat_parameters(Params) -> json_object_filter_nulls( [{<<"chat_id"/utf8>>, encode_int_or_string(erlang:element(2, Params))}] ). -file("src/telega/model.gleam", 19646). -spec encode_get_chat_administrators_parameters( get_chat_administrators_parameters() ) -> gleam@json:json(). encode_get_chat_administrators_parameters(Params) -> json_object_filter_nulls( [{<<"chat_id"/utf8>>, encode_int_or_string(erlang:element(2, Params))}] ). -file("src/telega/model.gleam", 19661). -spec encode_get_chat_member_count_parameters( get_chat_member_count_parameters() ) -> gleam@json:json(). encode_get_chat_member_count_parameters(Params) -> json_object_filter_nulls( [{<<"chat_id"/utf8>>, encode_int_or_string(erlang:element(2, Params))}] ). -file("src/telega/model.gleam", 19678). -spec encode_get_chat_member_parameters(get_chat_member_parameters()) -> gleam@json:json(). encode_get_chat_member_parameters(Params) -> json_object_filter_nulls( [{<<"chat_id"/utf8>>, encode_int_or_string(erlang:element(2, Params))}, {<<"user_id"/utf8>>, gleam@json:int(erlang:element(3, Params))}] ). -file("src/telega/model.gleam", 19698). -spec encode_set_chat_sticker_set_parameters(set_chat_sticker_set_parameters()) -> gleam@json:json(). encode_set_chat_sticker_set_parameters(Params) -> json_object_filter_nulls( [{<<"chat_id"/utf8>>, encode_int_or_string(erlang:element(2, Params))}, {<<"sticker_set_name"/utf8>>, gleam@json:string(erlang:element(3, Params))}] ). -file("src/telega/model.gleam", 19716). -spec encode_delete_chat_sticker_set_parameters( delete_chat_sticker_set_parameters() ) -> gleam@json:json(). encode_delete_chat_sticker_set_parameters(Params) -> json_object_filter_nulls( [{<<"chat_id"/utf8>>, encode_int_or_string(erlang:element(2, Params))}] ). -file("src/telega/model.gleam", 19737). -spec encode_create_forum_topic_parameters(create_forum_topic_parameters()) -> gleam@json:json(). encode_create_forum_topic_parameters(Params) -> json_object_filter_nulls( [{<<"chat_id"/utf8>>, encode_int_or_string(erlang:element(2, Params))}, {<<"name"/utf8>>, gleam@json:string(erlang:element(3, Params))}, {<<"icon_color"/utf8>>, gleam@json:nullable( erlang:element(4, Params), fun gleam@json:int/1 )}, {<<"icon_custom_emoji_id"/utf8>>, gleam@json:nullable( erlang:element(5, Params), fun gleam@json:string/1 )}] ). -file("src/telega/model.gleam", 19766). -spec encode_edit_forum_topic_parameters(edit_forum_topic_parameters()) -> gleam@json:json(). encode_edit_forum_topic_parameters(Params) -> json_object_filter_nulls( [{<<"chat_id"/utf8>>, encode_int_or_string(erlang:element(2, Params))}, {<<"message_thread_id"/utf8>>, gleam@json:int(erlang:element(3, Params))}, {<<"name"/utf8>>, gleam@json:nullable( erlang:element(4, Params), fun gleam@json:string/1 )}, {<<"icon_custom_emoji_id"/utf8>>, gleam@json:nullable( erlang:element(5, Params), fun gleam@json:string/1 )}] ). -file("src/telega/model.gleam", 19791). -spec encode_close_forum_topic_parameters(close_forum_topic_parameters()) -> gleam@json:json(). encode_close_forum_topic_parameters(Params) -> json_object_filter_nulls( [{<<"chat_id"/utf8>>, encode_int_or_string(erlang:element(2, Params))}, {<<"message_thread_id"/utf8>>, gleam@json:int(erlang:element(3, Params))}] ). -file("src/telega/model.gleam", 19811). -spec encode_reopen_forum_topic_parameters(reopen_forum_topic_parameters()) -> gleam@json:json(). encode_reopen_forum_topic_parameters(Params) -> json_object_filter_nulls( [{<<"chat_id"/utf8>>, encode_int_or_string(erlang:element(2, Params))}, {<<"message_thread_id"/utf8>>, gleam@json:int(erlang:element(3, Params))}] ). -file("src/telega/model.gleam", 19831). -spec encode_delete_forum_topic_parameters(delete_forum_topic_parameters()) -> gleam@json:json(). encode_delete_forum_topic_parameters(Params) -> json_object_filter_nulls( [{<<"chat_id"/utf8>>, encode_int_or_string(erlang:element(2, Params))}, {<<"message_thread_id"/utf8>>, gleam@json:int(erlang:element(3, Params))}] ). -file("src/telega/model.gleam", 19851). -spec encode_unpin_all_forum_topic_messages_parameters( unpin_all_forum_topic_messages_parameters() ) -> gleam@json:json(). encode_unpin_all_forum_topic_messages_parameters(Params) -> json_object_filter_nulls( [{<<"chat_id"/utf8>>, encode_int_or_string(erlang:element(2, Params))}, {<<"message_thread_id"/utf8>>, gleam@json:int(erlang:element(3, Params))}] ). -file("src/telega/model.gleam", 19869). -spec encode_unpin_all_general_forum_topic_pinned_messages_parameters( unpin_all_general_forum_topic_pinned_messages_parameters() ) -> gleam@json:json(). encode_unpin_all_general_forum_topic_pinned_messages_parameters(Params) -> json_object_filter_nulls( [{<<"chat_id"/utf8>>, encode_int_or_string(erlang:element(2, Params))}] ). -file("src/telega/model.gleam", 19886). -spec encode_edit_general_forum_topic_parameters( edit_general_forum_topic_parameters() ) -> gleam@json:json(). encode_edit_general_forum_topic_parameters(Params) -> json_object_filter_nulls( [{<<"chat_id"/utf8>>, encode_int_or_string(erlang:element(2, Params))}, {<<"name"/utf8>>, gleam@json:string(erlang:element(3, Params))}] ). -file("src/telega/model.gleam", 19904). -spec encode_close_general_forum_topic_parameters( close_general_forum_topic_parameters() ) -> gleam@json:json(). encode_close_general_forum_topic_parameters(Params) -> json_object_filter_nulls( [{<<"chat_id"/utf8>>, encode_int_or_string(erlang:element(2, Params))}] ). -file("src/telega/model.gleam", 19919). -spec encode_reopen_general_forum_topic_parameters( reopen_general_forum_topic_parameters() ) -> gleam@json:json(). encode_reopen_general_forum_topic_parameters(Params) -> json_object_filter_nulls( [{<<"chat_id"/utf8>>, encode_int_or_string(erlang:element(2, Params))}] ). -file("src/telega/model.gleam", 19934). -spec encode_hide_general_forum_topic_parameters( hide_general_forum_topic_parameters() ) -> gleam@json:json(). encode_hide_general_forum_topic_parameters(Params) -> json_object_filter_nulls( [{<<"chat_id"/utf8>>, encode_int_or_string(erlang:element(2, Params))}] ). -file("src/telega/model.gleam", 19949). -spec encode_unhide_general_forum_topic_parameters( unhide_general_forum_topic_parameters() ) -> gleam@json:json(). encode_unhide_general_forum_topic_parameters(Params) -> json_object_filter_nulls( [{<<"chat_id"/utf8>>, encode_int_or_string(erlang:element(2, Params))}] ). -file("src/telega/model.gleam", 19964). -spec encode_unpin_all_general_forum_topic_messages_parameters( unpin_all_general_forum_topic_messages_parameters() ) -> gleam@json:json(). encode_unpin_all_general_forum_topic_messages_parameters(Params) -> json_object_filter_nulls( [{<<"chat_id"/utf8>>, encode_int_or_string(erlang:element(2, Params))}] ). -file("src/telega/model.gleam", 19981). -spec encode_get_user_chat_boosts_parameters(get_user_chat_boosts_parameters()) -> gleam@json:json(). encode_get_user_chat_boosts_parameters(Params) -> json_object_filter_nulls( [{<<"chat_id"/utf8>>, encode_int_or_string(erlang:element(2, Params))}, {<<"user_id"/utf8>>, gleam@json:int(erlang:element(3, Params))}] ). -file("src/telega/model.gleam", 19999). -spec encode_get_business_connection_parameters( get_business_connection_parameters() ) -> gleam@json:json(). encode_get_business_connection_parameters(Params) -> json_object_filter_nulls( [{<<"business_connection_id"/utf8>>, gleam@json:string(erlang:element(2, Params))}] ). -file("src/telega/model.gleam", 20018). -spec encode_set_my_name_parameters(set_my_name_parameters()) -> gleam@json:json(). encode_set_my_name_parameters(Params) -> json_object_filter_nulls( [{<<"name"/utf8>>, gleam@json:nullable( erlang:element(2, Params), fun gleam@json:string/1 )}, {<<"language_code"/utf8>>, gleam@json:nullable( erlang:element(3, Params), fun gleam@json:string/1 )}] ). -file("src/telega/model.gleam", 20034). -spec encode_get_my_name_parameters(get_my_name_parameters()) -> gleam@json:json(). encode_get_my_name_parameters(Params) -> json_object_filter_nulls( [{<<"language_code"/utf8>>, gleam@json:nullable( erlang:element(2, Params), fun gleam@json:string/1 )}] ). -file("src/telega/model.gleam", 20051). -spec encode_set_my_description_parameters(set_my_description_parameters()) -> gleam@json:json(). encode_set_my_description_parameters(Params) -> json_object_filter_nulls( [{<<"description"/utf8>>, gleam@json:nullable( erlang:element(2, Params), fun gleam@json:string/1 )}, {<<"language_code"/utf8>>, gleam@json:nullable( erlang:element(3, Params), fun gleam@json:string/1 )}] ). -file("src/telega/model.gleam", 20069). -spec encode_get_my_description_parameters(get_my_description_parameters()) -> gleam@json:json(). encode_get_my_description_parameters(Params) -> json_object_filter_nulls( [{<<"language_code"/utf8>>, gleam@json:nullable( erlang:element(2, Params), fun gleam@json:string/1 )}] ). -file("src/telega/model.gleam", 20088). -spec encode_set_my_short_description_parameters( set_my_short_description_parameters() ) -> gleam@json:json(). encode_set_my_short_description_parameters(Params) -> json_object_filter_nulls( [{<<"short_description"/utf8>>, gleam@json:nullable( erlang:element(2, Params), fun gleam@json:string/1 )}, {<<"language_code"/utf8>>, gleam@json:nullable( erlang:element(3, Params), fun gleam@json:string/1 )}] ). -file("src/telega/model.gleam", 20106). -spec encode_get_my_short_description_parameters( get_my_short_description_parameters() ) -> gleam@json:json(). encode_get_my_short_description_parameters(Params) -> json_object_filter_nulls( [{<<"language_code"/utf8>>, gleam@json:nullable( erlang:element(2, Params), fun gleam@json:string/1 )}] ). -file("src/telega/model.gleam", 20123). -spec encode_get_chat_menu_button_parameters(get_chat_menu_button_parameters()) -> gleam@json:json(). encode_get_chat_menu_button_parameters(Params) -> json_object_filter_nulls( [{<<"chat_id"/utf8>>, gleam@json:nullable( erlang:element(2, Params), fun gleam@json:int/1 )}] ). -file("src/telega/model.gleam", 20142). -spec encode_set_my_default_administrator_rights_parameters( set_my_default_administrator_rights_parameters() ) -> gleam@json:json(). encode_set_my_default_administrator_rights_parameters(Params) -> json_object_filter_nulls( [{<<"rights"/utf8>>, gleam@json:nullable( erlang:element(2, Params), fun encode_chat_administrator_rights/1 )}, {<<"for_channels"/utf8>>, gleam@json:nullable( erlang:element(3, Params), fun gleam@json:bool/1 )}] ). -file("src/telega/model.gleam", 20160). -spec encode_get_my_default_administrator_rights_parameters( get_my_default_administrator_rights_parameters() ) -> gleam@json:json(). encode_get_my_default_administrator_rights_parameters(Params) -> json_object_filter_nulls( [{<<"for_channels"/utf8>>, gleam@json:nullable( erlang:element(2, Params), fun gleam@json:bool/1 )}] ). -file("src/telega/model.gleam", 20189). -spec encode_send_gift_parameters(send_gift_parameters()) -> gleam@json:json(). encode_send_gift_parameters(Params) -> json_object_filter_nulls( [{<<"user_id"/utf8>>, gleam@json:nullable( erlang:element(2, Params), fun gleam@json:int/1 )}, {<<"chat_id"/utf8>>, gleam@json:nullable( erlang:element(3, Params), fun encode_int_or_string/1 )}, {<<"gift_id"/utf8>>, gleam@json:string(erlang:element(4, Params))}, {<<"pay_for_upgrade"/utf8>>, gleam@json:nullable( erlang:element(5, Params), fun gleam@json:bool/1 )}, {<<"text"/utf8>>, gleam@json:nullable( erlang:element(6, Params), fun gleam@json:string/1 )}, {<<"text_parse_mode"/utf8>>, gleam@json:nullable( erlang:element(7, Params), fun gleam@json:string/1 )}, {<<"text_entities"/utf8>>, gleam@json:nullable( erlang:element(8, Params), fun(_capture) -> gleam@json:array(_capture, fun encode_message_entity/1) end )}] ). -file("src/telega/model.gleam", 20223). -spec encode_gift_premium_subscription_parameters( gift_premium_subscription_parameters() ) -> gleam@json:json(). encode_gift_premium_subscription_parameters(Params) -> json_object_filter_nulls( [{<<"user_id"/utf8>>, gleam@json:int(erlang:element(2, Params))}, {<<"month_count"/utf8>>, gleam@json:int(erlang:element(3, Params))}, {<<"star_count"/utf8>>, gleam@json:int(erlang:element(4, Params))}, {<<"text"/utf8>>, gleam@json:nullable( erlang:element(5, Params), fun gleam@json:string/1 )}, {<<"text_parse_mode"/utf8>>, gleam@json:nullable( erlang:element(6, Params), fun gleam@json:string/1 )}, {<<"text_entities"/utf8>>, gleam@json:nullable( erlang:element(7, Params), fun(_capture) -> gleam@json:array(_capture, fun encode_message_entity/1) end )}] ). -file("src/telega/model.gleam", 20250). -spec encode_verify_user_parameters(verify_user_parameters()) -> gleam@json:json(). encode_verify_user_parameters(Params) -> json_object_filter_nulls( [{<<"user_id"/utf8>>, gleam@json:int(erlang:element(2, Params))}, {<<"custom_description"/utf8>>, gleam@json:nullable( erlang:element(3, Params), fun gleam@json:string/1 )}] ). -file("src/telega/model.gleam", 20271). -spec encode_verify_chat_parameters(verify_chat_parameters()) -> gleam@json:json(). encode_verify_chat_parameters(Params) -> json_object_filter_nulls( [{<<"chat_id"/utf8>>, encode_int_or_string(erlang:element(2, Params))}, {<<"custom_description"/utf8>>, gleam@json:nullable( erlang:element(3, Params), fun gleam@json:string/1 )}] ). -file("src/telega/model.gleam", 20290). -spec encode_remove_user_verification_parameters( remove_user_verification_parameters() ) -> gleam@json:json(). encode_remove_user_verification_parameters(Params) -> json_object_filter_nulls( [{<<"user_id"/utf8>>, gleam@json:int(erlang:element(2, Params))}] ). -file("src/telega/model.gleam", 20305). -spec encode_remove_chat_verification_parameters( remove_chat_verification_parameters() ) -> gleam@json:json(). encode_remove_chat_verification_parameters(Params) -> json_object_filter_nulls( [{<<"chat_id"/utf8>>, encode_int_or_string(erlang:element(2, Params))}] ). -file("src/telega/model.gleam", 20320). -spec encode_get_custom_emoji_stickers_parameters( get_custom_emoji_stickers_parameters() ) -> gleam@json:json(). encode_get_custom_emoji_stickers_parameters(Params) -> json_object_filter_nulls( [{<<"custom_emoji_ids"/utf8>>, gleam@json:array( erlang:element(2, Params), fun gleam@json:string/1 )}] ). -file("src/telega/model.gleam", 20341). -spec encode_upload_sticker_file_parameters(upload_sticker_file_parameters()) -> gleam@json:json(). encode_upload_sticker_file_parameters(Params) -> json_object_filter_nulls( [{<<"user_id"/utf8>>, gleam@json:int(erlang:element(2, Params))}, {<<"sticker"/utf8>>, encode_file(erlang:element(3, Params))}, {<<"sticker_format"/utf8>>, gleam@json:string(erlang:element(4, Params))}] ). -file("src/telega/model.gleam", 20370). -spec encode_create_new_sticker_set_parameters( create_new_sticker_set_parameters() ) -> gleam@json:json(). encode_create_new_sticker_set_parameters(Params) -> json_object_filter_nulls( [{<<"user_id"/utf8>>, gleam@json:int(erlang:element(2, Params))}, {<<"name"/utf8>>, gleam@json:string(erlang:element(3, Params))}, {<<"title"/utf8>>, gleam@json:string(erlang:element(4, Params))}, {<<"stickers"/utf8>>, gleam@json:array( erlang:element(5, Params), fun encode_input_sticker/1 )}, {<<"sticker_type"/utf8>>, gleam@json:nullable( erlang:element(6, Params), fun gleam@json:string/1 )}, {<<"needs_repainting"/utf8>>, gleam@json:nullable( erlang:element(7, Params), fun gleam@json:bool/1 )}] ). -file("src/telega/model.gleam", 20396). -spec encode_add_sticker_to_set_parameters(add_sticker_to_set_parameters()) -> gleam@json:json(). encode_add_sticker_to_set_parameters(Params) -> json_object_filter_nulls( [{<<"user_id"/utf8>>, gleam@json:int(erlang:element(2, Params))}, {<<"name"/utf8>>, gleam@json:string(erlang:element(3, Params))}, {<<"sticker"/utf8>>, encode_input_sticker(erlang:element(4, Params))}] ). -file("src/telega/model.gleam", 20417). -spec encode_set_sticker_position_in_set_parameters( set_sticker_position_in_set_parameters() ) -> gleam@json:json(). encode_set_sticker_position_in_set_parameters(Params) -> json_object_filter_nulls( [{<<"sticker"/utf8>>, gleam@json:string(erlang:element(2, Params))}, {<<"position"/utf8>>, gleam@json:int(erlang:element(3, Params))}] ). -file("src/telega/model.gleam", 20435). -spec encode_delete_sticker_from_set_parameters( delete_sticker_from_set_parameters() ) -> gleam@json:json(). encode_delete_sticker_from_set_parameters(Params) -> json_object_filter_nulls( [{<<"sticker"/utf8>>, gleam@json:string(erlang:element(2, Params))}] ). -file("src/telega/model.gleam", 20456). -spec encode_replace_sticker_in_set_parameters( replace_sticker_in_set_parameters() ) -> gleam@json:json(). encode_replace_sticker_in_set_parameters(Params) -> json_object_filter_nulls( [{<<"user_id"/utf8>>, gleam@json:int(erlang:element(2, Params))}, {<<"name"/utf8>>, gleam@json:string(erlang:element(3, Params))}, {<<"old_sticker"/utf8>>, gleam@json:string(erlang:element(4, Params))}, {<<"sticker"/utf8>>, encode_input_sticker(erlang:element(5, Params))}] ). -file("src/telega/model.gleam", 20478). -spec encode_set_sticker_emoji_list_parameters( set_sticker_emoji_list_parameters() ) -> gleam@json:json(). encode_set_sticker_emoji_list_parameters(Params) -> json_object_filter_nulls( [{<<"sticker"/utf8>>, gleam@json:string(erlang:element(2, Params))}, {<<"emoji_list"/utf8>>, gleam@json:array( erlang:element(3, Params), fun gleam@json:string/1 )}] ). -file("src/telega/model.gleam", 20498). -spec encode_set_sticker_keywords_parameters(set_sticker_keywords_parameters()) -> gleam@json:json(). encode_set_sticker_keywords_parameters(Params) -> json_object_filter_nulls( [{<<"sticker"/utf8>>, gleam@json:string(erlang:element(2, Params))}, {<<"keywords"/utf8>>, gleam@json:nullable( erlang:element(3, Params), fun(Keywords) -> gleam@json:array(Keywords, fun gleam@json:string/1) end )}] ). -file("src/telega/model.gleam", 20523). -spec encode_set_sticker_mask_position_parameters( set_sticker_mask_position_parameters() ) -> gleam@json:json(). encode_set_sticker_mask_position_parameters(Params) -> json_object_filter_nulls( [{<<"sticker"/utf8>>, gleam@json:string(erlang:element(2, Params))}, {<<"mask_position"/utf8>>, gleam@json:nullable( erlang:element(3, Params), fun encode_mask_position/1 )}] ). -file("src/telega/model.gleam", 20546). -spec encode_set_sticker_set_title_parameters( set_sticker_set_title_parameters() ) -> gleam@json:json(). encode_set_sticker_set_title_parameters(Params) -> json_object_filter_nulls( [{<<"name"/utf8>>, gleam@json:string(erlang:element(2, Params))}, {<<"title"/utf8>>, gleam@json:string(erlang:element(3, Params))}] ). -file("src/telega/model.gleam", 20570). -spec encode_set_sticker_set_thumbnail_parameters( set_sticker_set_thumbnail_parameters() ) -> gleam@json:json(). encode_set_sticker_set_thumbnail_parameters(Params) -> json_object_filter_nulls( [{<<"name"/utf8>>, gleam@json:string(erlang:element(2, Params))}, {<<"user_id"/utf8>>, gleam@json:int(erlang:element(3, Params))}, {<<"thumbnail"/utf8>>, gleam@json:nullable( erlang:element(4, Params), fun encode_file_or_string/1 )}, {<<"format"/utf8>>, gleam@json:string(erlang:element(5, Params))}] ). -file("src/telega/model.gleam", 20592). -spec encode_set_custom_emoji_sticker_set_thumbnail_parameters( set_custom_emoji_sticker_set_thumbnail_parameters() ) -> gleam@json:json(). encode_set_custom_emoji_sticker_set_thumbnail_parameters(Params) -> json_object_filter_nulls( [{<<"name"/utf8>>, gleam@json:string(erlang:element(2, Params))}, {<<"custom_emoji_id"/utf8>>, gleam@json:nullable( erlang:element(3, Params), fun gleam@json:string/1 )}] ). -file("src/telega/model.gleam", 20610). -spec encode_delete_sticker_set_parameters(delete_sticker_set_parameters()) -> gleam@json:json(). encode_delete_sticker_set_parameters(Params) -> json_object_filter_nulls( [{<<"name"/utf8>>, gleam@json:string(erlang:element(2, Params))}] ). -file("src/telega/model.gleam", 20635). -spec encode_answer_inline_query_parameters(answer_inline_query_parameters()) -> gleam@json:json(). encode_answer_inline_query_parameters(Params) -> json_object_filter_nulls( [{<<"inline_query_id"/utf8>>, gleam@json:string(erlang:element(2, Params))}, {<<"results"/utf8>>, gleam@json:array( erlang:element(3, Params), fun encode_inline_query_result/1 )}, {<<"cache_time"/utf8>>, gleam@json:nullable( erlang:element(4, Params), fun gleam@json:int/1 )}, {<<"is_personal"/utf8>>, gleam@json:nullable( erlang:element(5, Params), fun gleam@json:bool/1 )}, {<<"next_offset"/utf8>>, gleam@json:nullable( erlang:element(6, Params), fun gleam@json:string/1 )}, {<<"button"/utf8>>, gleam@json:nullable( erlang:element(7, Params), fun encode_inline_query_results_button/1 )}] ). -file("src/telega/model.gleam", 20666). -spec encode_answer_shipping_query_parameters( answer_shipping_query_parameters() ) -> gleam@json:json(). encode_answer_shipping_query_parameters(Params) -> json_object_filter_nulls( [{<<"shipping_query_id"/utf8>>, gleam@json:string(erlang:element(2, Params))}, {<<"ok"/utf8>>, gleam@json:bool(erlang:element(3, Params))}, {<<"shipping_options"/utf8>>, gleam@json:nullable( erlang:element(4, Params), fun(Options) -> gleam@json:array(Options, fun encode_shipping_option/1) end )}, {<<"error_message"/utf8>>, gleam@json:nullable( erlang:element(5, Params), fun gleam@json:string/1 )}] ). -file("src/telega/model.gleam", 20695). -spec encode_answer_pre_checkout_query_parameters( answer_pre_checkout_query_parameters() ) -> gleam@json:json(). encode_answer_pre_checkout_query_parameters(Params) -> json_object_filter_nulls( [{<<"pre_checkout_query_id"/utf8>>, gleam@json:string(erlang:element(2, Params))}, {<<"ok"/utf8>>, gleam@json:bool(erlang:element(3, Params))}, {<<"error_message"/utf8>>, gleam@json:nullable( erlang:element(4, Params), fun gleam@json:string/1 )}] ). -file("src/telega/model.gleam", 20716). -spec encode_get_star_transactions_parameters( get_star_transactions_parameters() ) -> gleam@json:json(). encode_get_star_transactions_parameters(Params) -> json_object_filter_nulls( [{<<"offset"/utf8>>, gleam@json:nullable( erlang:element(2, Params), fun gleam@json:int/1 )}, {<<"limit"/utf8>>, gleam@json:nullable( erlang:element(3, Params), fun gleam@json:int/1 )}] ). -file("src/telega/model.gleam", 20736). -spec encode_refund_star_payment_parameters(refund_star_payment_parameters()) -> gleam@json:json(). encode_refund_star_payment_parameters(Params) -> json_object_filter_nulls( [{<<"user_id"/utf8>>, gleam@json:int(erlang:element(2, Params))}, {<<"telegram_payment_charge_id"/utf8>>, gleam@json:string(erlang:element(3, Params))}] ). -file("src/telega/model.gleam", 20761). -spec encode_edit_user_star_subscription_parameters( edit_user_star_subscription_parameters() ) -> gleam@json:json(). encode_edit_user_star_subscription_parameters(Params) -> json_object_filter_nulls( [{<<"user_id"/utf8>>, gleam@json:int(erlang:element(2, Params))}, {<<"telegram_payment_charge_id"/utf8>>, gleam@json:string(erlang:element(3, Params))}, {<<"is_canceled"/utf8>>, gleam@json:bool(erlang:element(4, Params))}] ). -file("src/telega/model.gleam", 20801). -spec encode_send_game_parameters(send_game_parameters()) -> gleam@json:json(). encode_send_game_parameters(Params) -> json_object_filter_nulls( [{<<"business_connection_id"/utf8>>, gleam@json:nullable( erlang:element(2, Params), fun gleam@json:string/1 )}, {<<"chat_id"/utf8>>, gleam@json:int(erlang:element(3, Params))}, {<<"message_thread_id"/utf8>>, gleam@json:nullable( erlang:element(4, Params), fun gleam@json:int/1 )}, {<<"game_short_name"/utf8>>, gleam@json:string(erlang:element(5, Params))}, {<<"disable_notification"/utf8>>, gleam@json:nullable( erlang:element(6, Params), fun gleam@json:bool/1 )}, {<<"protect_content"/utf8>>, gleam@json:nullable( erlang:element(7, Params), fun gleam@json:bool/1 )}, {<<"allow_paid_broadcast"/utf8>>, gleam@json:nullable( erlang:element(8, Params), fun gleam@json:bool/1 )}, {<<"message_effect_id"/utf8>>, gleam@json:nullable( erlang:element(9, Params), fun gleam@json:string/1 )}, {<<"reply_parameters"/utf8>>, gleam@json:nullable( erlang:element(10, Params), fun encode_reply_parameters/1 )}, {<<"reply_markup"/utf8>>, gleam@json:nullable( erlang:element(11, Params), fun encode_inline_keyboard_markup/1 )}] ). -file("src/telega/model.gleam", 20852). -spec encode_set_game_score_parameters(set_game_score_parameters()) -> gleam@json:json(). encode_set_game_score_parameters(Params) -> json_object_filter_nulls( [{<<"user_id"/utf8>>, gleam@json:int(erlang:element(2, Params))}, {<<"score"/utf8>>, gleam@json:int(erlang:element(3, Params))}, {<<"force"/utf8>>, gleam@json:nullable( erlang:element(4, Params), fun gleam@json:bool/1 )}, {<<"disable_edit_message"/utf8>>, gleam@json:nullable( erlang:element(5, Params), fun gleam@json:bool/1 )}, {<<"chat_id"/utf8>>, gleam@json:nullable( erlang:element(6, Params), fun gleam@json:int/1 )}, {<<"message_id"/utf8>>, gleam@json:nullable( erlang:element(7, Params), fun gleam@json:int/1 )}, {<<"inline_message_id"/utf8>>, gleam@json:nullable( erlang:element(8, Params), fun gleam@json:string/1 )}] ). -file("src/telega/model.gleam", 20882). -spec encode_get_game_high_scores_parameters(get_game_high_scores_parameters()) -> gleam@json:json(). encode_get_game_high_scores_parameters(Params) -> json_object_filter_nulls( [{<<"user_id"/utf8>>, gleam@json:int(erlang:element(2, Params))}, {<<"chat_id"/utf8>>, gleam@json:nullable( erlang:element(3, Params), fun gleam@json:int/1 )}, {<<"message_id"/utf8>>, gleam@json:nullable( erlang:element(4, Params), fun gleam@json:int/1 )}, {<<"inline_message_id"/utf8>>, gleam@json:nullable( erlang:element(5, Params), fun gleam@json:string/1 )}] ). -file("src/telega/model.gleam", 20906). -spec encode_read_business_message_parameters( read_business_message_parameters() ) -> gleam@json:json(). encode_read_business_message_parameters(Params) -> json_object_filter_nulls( [{<<"business_connection_id"/utf8>>, gleam@json:string(erlang:element(2, Params))}, {<<"chat_id"/utf8>>, gleam@json:int(erlang:element(3, Params))}, {<<"message_id"/utf8>>, gleam@json:int(erlang:element(4, Params))}] ). -file("src/telega/model.gleam", 20927). -spec encode_delete_business_messages_parameters( delete_business_messages_parameters() ) -> gleam@json:json(). encode_delete_business_messages_parameters(Params) -> json_object_filter_nulls( [{<<"business_connection_id"/utf8>>, gleam@json:string(erlang:element(2, Params))}, {<<"message_ids"/utf8>>, gleam@json:array( erlang:element(3, Params), fun gleam@json:int/1 )}] ). -file("src/telega/model.gleam", 20949). -spec encode_set_business_account_name_parameters( set_business_account_name_parameters() ) -> gleam@json:json(). encode_set_business_account_name_parameters(Params) -> json_object_filter_nulls( [{<<"business_connection_id"/utf8>>, gleam@json:string(erlang:element(2, Params))}, {<<"first_name"/utf8>>, gleam@json:string(erlang:element(3, Params))}, {<<"last_name"/utf8>>, gleam@json:nullable( erlang:element(4, Params), fun gleam@json:string/1 )}] ). -file("src/telega/model.gleam", 20970). -spec encode_set_business_account_username_parameters( set_business_account_username_parameters() ) -> gleam@json:json(). encode_set_business_account_username_parameters(Params) -> json_object_filter_nulls( [{<<"business_connection_id"/utf8>>, gleam@json:string(erlang:element(2, Params))}, {<<"username"/utf8>>, gleam@json:nullable( erlang:element(3, Params), fun gleam@json:string/1 )}] ). -file("src/telega/model.gleam", 20990). -spec encode_set_business_account_bio_parameters( set_business_account_bio_parameters() ) -> gleam@json:json(). encode_set_business_account_bio_parameters(Params) -> json_object_filter_nulls( [{<<"business_connection_id"/utf8>>, gleam@json:string(erlang:element(2, Params))}, {<<"bio"/utf8>>, gleam@json:nullable( erlang:element(3, Params), fun gleam@json:string/1 )}] ). -file("src/telega/model.gleam", 21012). -spec encode_set_business_account_profile_photo_parameters( set_business_account_profile_photo_parameters() ) -> gleam@json:json(). encode_set_business_account_profile_photo_parameters(Params) -> json_object_filter_nulls( [{<<"business_connection_id"/utf8>>, gleam@json:string(erlang:element(2, Params))}, {<<"photo"/utf8>>, encode_input_profile_photo(erlang:element(3, Params))}, {<<"is_public"/utf8>>, gleam@json:nullable( erlang:element(4, Params), fun gleam@json:bool/1 )}] ). -file("src/telega/model.gleam", 21033). -spec encode_remove_business_account_profile_photo_parameters( remove_business_account_profile_photo_parameters() ) -> gleam@json:json(). encode_remove_business_account_profile_photo_parameters(Params) -> json_object_filter_nulls( [{<<"business_connection_id"/utf8>>, gleam@json:string(erlang:element(2, Params))}, {<<"is_public"/utf8>>, gleam@json:nullable( erlang:element(3, Params), fun gleam@json:bool/1 )}] ). -file("src/telega/model.gleam", 21055). -spec encode_set_business_account_gift_settings_parameters( set_business_account_gift_settings_parameters() ) -> gleam@json:json(). encode_set_business_account_gift_settings_parameters(Params) -> json_object_filter_nulls( [{<<"business_connection_id"/utf8>>, gleam@json:string(erlang:element(2, Params))}, {<<"show_gift_button"/utf8>>, gleam@json:bool(erlang:element(3, Params))}, {<<"accepted_gift_types"/utf8>>, encode_accepted_gift_types(erlang:element(4, Params))}] ). -file("src/telega/model.gleam", 21077). -spec encode_get_business_account_star_balance_parameters( get_business_account_star_balance_parameters() ) -> gleam@json:json(). encode_get_business_account_star_balance_parameters(Params) -> json_object_filter_nulls( [{<<"business_connection_id"/utf8>>, gleam@json:string(erlang:element(2, Params))}] ). -file("src/telega/model.gleam", 21096). -spec encode_transfer_business_account_stars_parameters( transfer_business_account_stars_parameters() ) -> gleam@json:json(). encode_transfer_business_account_stars_parameters(Params) -> json_object_filter_nulls( [{<<"business_connection_id"/utf8>>, gleam@json:string(erlang:element(2, Params))}, {<<"star_count"/utf8>>, gleam@json:int(erlang:element(3, Params))}] ). -file("src/telega/model.gleam", 21130). -spec encode_get_business_account_gifts_parameters( get_business_account_gifts_parameters() ) -> gleam@json:json(). encode_get_business_account_gifts_parameters(Params) -> json_object_filter_nulls( [{<<"business_connection_id"/utf8>>, gleam@json:string(erlang:element(2, Params))}, {<<"exclude_unsaved"/utf8>>, gleam@json:nullable( erlang:element(3, Params), fun gleam@json:bool/1 )}, {<<"exclude_saved"/utf8>>, gleam@json:nullable( erlang:element(4, Params), fun gleam@json:bool/1 )}, {<<"exclude_unlimited"/utf8>>, gleam@json:nullable( erlang:element(5, Params), fun gleam@json:bool/1 )}, {<<"exclude_limited"/utf8>>, gleam@json:nullable( erlang:element(6, Params), fun gleam@json:bool/1 )}, {<<"exclude_unique"/utf8>>, gleam@json:nullable( erlang:element(7, Params), fun gleam@json:bool/1 )}, {<<"sort_by_price"/utf8>>, gleam@json:nullable( erlang:element(8, Params), fun gleam@json:bool/1 )}, {<<"offset"/utf8>>, gleam@json:nullable( erlang:element(9, Params), fun gleam@json:string/1 )}, {<<"limit"/utf8>>, gleam@json:nullable( erlang:element(10, Params), fun gleam@json:int/1 )}] ). -file("src/telega/model.gleam", 21157). -spec encode_convert_gift_to_stars_parameters( convert_gift_to_stars_parameters() ) -> gleam@json:json(). encode_convert_gift_to_stars_parameters(Params) -> json_object_filter_nulls( [{<<"business_connection_id"/utf8>>, gleam@json:string(erlang:element(2, Params))}, {<<"owned_gift_id"/utf8>>, gleam@json:string(erlang:element(3, Params))}] ). -file("src/telega/model.gleam", 21181). -spec encode_upgrade_gift_parameters(upgrade_gift_parameters()) -> gleam@json:json(). encode_upgrade_gift_parameters(Params) -> json_object_filter_nulls( [{<<"business_connection_id"/utf8>>, gleam@json:string(erlang:element(2, Params))}, {<<"owned_gift_id"/utf8>>, gleam@json:string(erlang:element(3, Params))}, {<<"keep_original_details"/utf8>>, gleam@json:nullable( erlang:element(4, Params), fun gleam@json:bool/1 )}, {<<"star_count"/utf8>>, gleam@json:nullable( erlang:element(5, Params), fun gleam@json:int/1 )}] ). -file("src/telega/model.gleam", 21208). -spec encode_transfer_gift_parameters(transfer_gift_parameters()) -> gleam@json:json(). encode_transfer_gift_parameters(Params) -> json_object_filter_nulls( [{<<"business_connection_id"/utf8>>, gleam@json:string(erlang:element(2, Params))}, {<<"owned_gift_id"/utf8>>, gleam@json:string(erlang:element(3, Params))}, {<<"new_owner_chat_id"/utf8>>, gleam@json:int(erlang:element(4, Params))}, {<<"star_count"/utf8>>, gleam@json:nullable( erlang:element(5, Params), fun gleam@json:int/1 )}] ). -file("src/telega/model.gleam", 21242). -spec encode_post_story_parameters(post_story_parameters()) -> gleam@json:json(). encode_post_story_parameters(Params) -> json_object_filter_nulls( [{<<"business_connection_id"/utf8>>, gleam@json:string(erlang:element(2, Params))}, {<<"content"/utf8>>, encode_input_story_content(erlang:element(3, Params))}, {<<"active_period"/utf8>>, gleam@json:int(erlang:element(4, Params))}, {<<"caption"/utf8>>, gleam@json:nullable( erlang:element(5, Params), fun gleam@json:string/1 )}, {<<"parse_mode"/utf8>>, gleam@json:nullable( erlang:element(6, Params), fun gleam@json:string/1 )}, {<<"caption_entities"/utf8>>, gleam@json:nullable( erlang:element(7, Params), fun(Entities) -> gleam@json:array(Entities, fun encode_message_entity/1) end )}, {<<"areas"/utf8>>, gleam@json:nullable( erlang:element(8, Params), fun(Areas) -> gleam@json:array(Areas, fun encode_story_area/1) end )}, {<<"post_to_chat_page"/utf8>>, gleam@json:nullable( erlang:element(9, Params), fun gleam@json:bool/1 )}, {<<"protect_content"/utf8>>, gleam@json:nullable( erlang:element(10, Params), fun gleam@json:bool/1 )}] ). -file("src/telega/model.gleam", 21287). -spec encode_edit_story_parameters(edit_story_parameters()) -> gleam@json:json(). encode_edit_story_parameters(Params) -> json_object_filter_nulls( [{<<"business_connection_id"/utf8>>, gleam@json:string(erlang:element(2, Params))}, {<<"story_id"/utf8>>, gleam@json:int(erlang:element(3, Params))}, {<<"content"/utf8>>, encode_input_story_content(erlang:element(4, Params))}, {<<"caption"/utf8>>, gleam@json:nullable( erlang:element(5, Params), fun gleam@json:string/1 )}, {<<"parse_mode"/utf8>>, gleam@json:nullable( erlang:element(6, Params), fun gleam@json:string/1 )}, {<<"caption_entities"/utf8>>, gleam@json:nullable( erlang:element(7, Params), fun(_capture) -> gleam@json:array(_capture, fun encode_message_entity/1) end )}, {<<"areas"/utf8>>, gleam@json:nullable( erlang:element(8, Params), fun(_capture@1) -> gleam@json:array(_capture@1, fun encode_story_area/1) end )}] ). -file("src/telega/model.gleam", 21316). -spec encode_delete_story_parameters(delete_story_parameters()) -> gleam@json:json(). encode_delete_story_parameters(Params) -> json_object_filter_nulls( [{<<"business_connection_id"/utf8>>, gleam@json:string(erlang:element(2, Params))}, {<<"story_id"/utf8>>, gleam@json:int(erlang:element(3, Params))}] ). -file("src/telega/model.gleam", 12284). -spec encode_giveaway_completed(giveaway_completed()) -> gleam@json:json(). encode_giveaway_completed(Giveaway_completed) -> json_object_filter_nulls( [{<<"winner_count"/utf8>>, gleam@json:int(erlang:element(2, Giveaway_completed))}, {<<"unclaimed_prize_count"/utf8>>, gleam@json:nullable( erlang:element(3, Giveaway_completed), fun gleam@json:int/1 )}, {<<"giveaway_message"/utf8>>, gleam@json:nullable( erlang:element(4, Giveaway_completed), fun encode_message/1 )}, {<<"is_star_giveaway"/utf8>>, gleam@json:nullable( erlang:element(5, Giveaway_completed), fun gleam@json:bool/1 )}] ). -file("src/telega/model.gleam", 11310). -spec encode_message(message()) -> gleam@json:json(). encode_message(Message) -> json_object_filter_nulls( [{<<"message_id"/utf8>>, gleam@json:int(erlang:element(2, Message))}, {<<"message_thread_id"/utf8>>, gleam@json:nullable( erlang:element(3, Message), fun gleam@json:int/1 )}, {<<"from"/utf8>>, gleam@json:nullable( erlang:element(4, Message), fun encode_user/1 )}, {<<"sender_chat"/utf8>>, gleam@json:nullable( erlang:element(5, Message), fun encode_chat/1 )}, {<<"sender_boost_count"/utf8>>, gleam@json:nullable( erlang:element(6, Message), fun gleam@json:int/1 )}, {<<"sender_business_bot"/utf8>>, gleam@json:nullable( erlang:element(7, Message), fun encode_user/1 )}, {<<"date"/utf8>>, gleam@json:int(erlang:element(8, Message))}, {<<"business_connection_id"/utf8>>, gleam@json:nullable( erlang:element(9, Message), fun gleam@json:string/1 )}, {<<"chat"/utf8>>, encode_chat(erlang:element(10, Message))}, {<<"forward_origin"/utf8>>, gleam@json:nullable( erlang:element(11, Message), fun encode_message_origin/1 )}, {<<"is_topic_message"/utf8>>, gleam@json:nullable( erlang:element(12, Message), fun gleam@json:bool/1 )}, {<<"is_automatic_forward"/utf8>>, gleam@json:nullable( erlang:element(13, Message), fun gleam@json:bool/1 )}, {<<"reply_to_message"/utf8>>, gleam@json:nullable( erlang:element(14, Message), fun encode_message/1 )}, {<<"external_reply"/utf8>>, gleam@json:nullable( erlang:element(15, Message), fun encode_external_reply_info/1 )}, {<<"quote"/utf8>>, gleam@json:nullable( erlang:element(16, Message), fun encode_text_quote/1 )}, {<<"reply_to_story"/utf8>>, gleam@json:nullable( erlang:element(17, Message), fun encode_story/1 )}, {<<"via_bot"/utf8>>, gleam@json:nullable( erlang:element(18, Message), fun encode_user/1 )}, {<<"edit_date"/utf8>>, gleam@json:nullable( erlang:element(19, Message), fun gleam@json:int/1 )}, {<<"has_protected_content"/utf8>>, gleam@json:nullable( erlang:element(20, Message), fun gleam@json:bool/1 )}, {<<"is_from_offline"/utf8>>, gleam@json:nullable( erlang:element(21, Message), fun gleam@json:bool/1 )}, {<<"media_group_id"/utf8>>, gleam@json:nullable( erlang:element(22, Message), fun gleam@json:string/1 )}, {<<"author_signature"/utf8>>, gleam@json:nullable( erlang:element(23, Message), fun gleam@json:string/1 )}, {<<"text"/utf8>>, gleam@json:nullable( erlang:element(24, Message), fun gleam@json:string/1 )}, {<<"entities"/utf8>>, gleam@json:nullable( erlang:element(25, Message), fun(_capture) -> gleam@json:array(_capture, fun encode_message_entity/1) end )}, {<<"link_preview_options"/utf8>>, gleam@json:nullable( erlang:element(26, Message), fun encode_link_preview_options/1 )}, {<<"effect_id"/utf8>>, gleam@json:nullable( erlang:element(27, Message), fun gleam@json:string/1 )}, {<<"animation"/utf8>>, gleam@json:nullable( erlang:element(28, Message), fun encode_animation/1 )}, {<<"audio"/utf8>>, gleam@json:nullable( erlang:element(29, Message), fun encode_audio/1 )}, {<<"document"/utf8>>, gleam@json:nullable( erlang:element(30, Message), fun encode_document/1 )}, {<<"paid_media"/utf8>>, gleam@json:nullable( erlang:element(31, Message), fun encode_paid_media_info/1 )}, {<<"photo"/utf8>>, gleam@json:nullable( erlang:element(32, Message), fun(_capture@1) -> gleam@json:array(_capture@1, fun encode_photo_size/1) end )}, {<<"sticker"/utf8>>, gleam@json:nullable( erlang:element(33, Message), fun encode_sticker/1 )}, {<<"story"/utf8>>, gleam@json:nullable( erlang:element(34, Message), fun encode_story/1 )}, {<<"video"/utf8>>, gleam@json:nullable( erlang:element(35, Message), fun encode_video/1 )}, {<<"video_note"/utf8>>, gleam@json:nullable( erlang:element(36, Message), fun encode_video_note/1 )}, {<<"voice"/utf8>>, gleam@json:nullable( erlang:element(37, Message), fun encode_voice/1 )}, {<<"caption"/utf8>>, gleam@json:nullable( erlang:element(38, Message), fun gleam@json:string/1 )}, {<<"caption_entities"/utf8>>, gleam@json:nullable( erlang:element(39, Message), fun(_capture@2) -> gleam@json:array( _capture@2, fun encode_message_entity/1 ) end )}, {<<"show_caption_above_media"/utf8>>, gleam@json:nullable( erlang:element(40, Message), fun gleam@json:bool/1 )}, {<<"has_media_spoiler"/utf8>>, gleam@json:nullable( erlang:element(41, Message), fun gleam@json:bool/1 )}, {<<"contact"/utf8>>, gleam@json:nullable( erlang:element(42, Message), fun encode_contact/1 )}, {<<"dice"/utf8>>, gleam@json:nullable( erlang:element(43, Message), fun encode_dice/1 )}, {<<"game"/utf8>>, gleam@json:nullable( erlang:element(44, Message), fun encode_game/1 )}, {<<"poll"/utf8>>, gleam@json:nullable( erlang:element(45, Message), fun encode_poll/1 )}, {<<"venue"/utf8>>, gleam@json:nullable( erlang:element(46, Message), fun encode_venue/1 )}, {<<"location"/utf8>>, gleam@json:nullable( erlang:element(47, Message), fun encode_location/1 )}, {<<"new_chat_members"/utf8>>, gleam@json:nullable( erlang:element(48, Message), fun(_capture@3) -> gleam@json:array(_capture@3, fun encode_user/1) end )}, {<<"left_chat_member"/utf8>>, gleam@json:nullable( erlang:element(49, Message), fun encode_user/1 )}, {<<"new_chat_title"/utf8>>, gleam@json:nullable( erlang:element(50, Message), fun gleam@json:string/1 )}, {<<"new_chat_photo"/utf8>>, gleam@json:nullable( erlang:element(51, Message), fun(_capture@4) -> gleam@json:array(_capture@4, fun encode_photo_size/1) end )}, {<<"delete_chat_photo"/utf8>>, gleam@json:nullable( erlang:element(52, Message), fun gleam@json:bool/1 )}, {<<"group_chat_created"/utf8>>, gleam@json:nullable( erlang:element(53, Message), fun gleam@json:bool/1 )}, {<<"supergroup_chat_created"/utf8>>, gleam@json:nullable( erlang:element(54, Message), fun gleam@json:bool/1 )}, {<<"channel_chat_created"/utf8>>, gleam@json:nullable( erlang:element(55, Message), fun gleam@json:bool/1 )}, {<<"message_auto_delete_timer_changed"/utf8>>, gleam@json:nullable( erlang:element(56, Message), fun encode_message_auto_delete_timer_changed/1 )}, {<<"migrate_to_chat_id"/utf8>>, gleam@json:nullable( erlang:element(57, Message), fun gleam@json:int/1 )}, {<<"migrate_from_chat_id"/utf8>>, gleam@json:nullable( erlang:element(58, Message), fun gleam@json:int/1 )}, {<<"pinned_message"/utf8>>, gleam@json:nullable( erlang:element(59, Message), fun encode_maybe_inaccessible_message/1 )}, {<<"invoice"/utf8>>, gleam@json:nullable( erlang:element(60, Message), fun encode_invoice/1 )}, {<<"successful_payment"/utf8>>, gleam@json:nullable( erlang:element(61, Message), fun encode_successful_payment/1 )}, {<<"refunded_payment"/utf8>>, gleam@json:nullable( erlang:element(62, Message), fun encode_refunded_payment/1 )}, {<<"users_shared"/utf8>>, gleam@json:nullable( erlang:element(63, Message), fun encode_users_shared/1 )}, {<<"chat_shared"/utf8>>, gleam@json:nullable( erlang:element(64, Message), fun encode_chat_shared/1 )}, {<<"connected_website"/utf8>>, gleam@json:nullable( erlang:element(65, Message), fun gleam@json:string/1 )}, {<<"write_access_allowed"/utf8>>, gleam@json:nullable( erlang:element(66, Message), fun encode_write_access_allowed/1 )}, {<<"passport_data"/utf8>>, gleam@json:nullable( erlang:element(67, Message), fun encode_passport_data/1 )}, {<<"proximity_alert_triggered"/utf8>>, gleam@json:nullable( erlang:element(68, Message), fun encode_proximity_alert_triggered/1 )}, {<<"boost_added"/utf8>>, gleam@json:nullable( erlang:element(69, Message), fun encode_chat_boost_added/1 )}, {<<"chat_background_set"/utf8>>, gleam@json:nullable( erlang:element(70, Message), fun encode_chat_background/1 )}, {<<"forum_topic_created"/utf8>>, gleam@json:nullable( erlang:element(71, Message), fun encode_forum_topic_created/1 )}, {<<"forum_topic_edited"/utf8>>, gleam@json:nullable( erlang:element(72, Message), fun encode_forum_topic_edited/1 )}, {<<"forum_topic_closed"/utf8>>, gleam@json:nullable( erlang:element(73, Message), fun encode_forum_topic_closed/1 )}, {<<"forum_topic_reopened"/utf8>>, gleam@json:nullable( erlang:element(74, Message), fun encode_forum_topic_reopened/1 )}, {<<"general_forum_topic_hidden"/utf8>>, gleam@json:nullable( erlang:element(75, Message), fun encode_general_forum_topic_hidden/1 )}, {<<"general_forum_topic_unhidden"/utf8>>, gleam@json:nullable( erlang:element(76, Message), fun encode_general_forum_topic_unhidden/1 )}, {<<"giveaway_created"/utf8>>, gleam@json:nullable( erlang:element(77, Message), fun encode_giveaway_created/1 )}, {<<"giveaway"/utf8>>, gleam@json:nullable( erlang:element(78, Message), fun encode_giveaway/1 )}, {<<"giveaway_winners"/utf8>>, gleam@json:nullable( erlang:element(79, Message), fun encode_giveaway_winners/1 )}, {<<"giveaway_completed"/utf8>>, gleam@json:nullable( erlang:element(80, Message), fun encode_giveaway_completed/1 )}, {<<"video_chat_scheduled"/utf8>>, gleam@json:nullable( erlang:element(81, Message), fun encode_video_chat_scheduled/1 )}, {<<"video_chat_started"/utf8>>, gleam@json:nullable( erlang:element(82, Message), fun encode_video_chat_started/1 )}, {<<"video_chat_ended"/utf8>>, gleam@json:nullable( erlang:element(83, Message), fun encode_video_chat_ended/1 )}, {<<"video_chat_participants_invited"/utf8>>, gleam@json:nullable( erlang:element(84, Message), fun encode_video_chat_participants_invited/1 )}, {<<"web_app_data"/utf8>>, gleam@json:nullable( erlang:element(85, Message), fun encode_web_app_data/1 )}, {<<"reply_markup"/utf8>>, gleam@json:nullable( erlang:element(86, Message), fun encode_inline_keyboard_markup/1 )}] ). -file("src/telega/model.gleam", 11167). -spec encode_chat_full_info(chat_full_info()) -> gleam@json:json(). encode_chat_full_info(Chat_full_info) -> json_object_filter_nulls( [{<<"id"/utf8>>, gleam@json:int(erlang:element(2, Chat_full_info))}, {<<"type"/utf8>>, gleam@json:string(erlang:element(3, Chat_full_info))}, {<<"title"/utf8>>, gleam@json:nullable( erlang:element(4, Chat_full_info), fun gleam@json:string/1 )}, {<<"username"/utf8>>, gleam@json:nullable( erlang:element(5, Chat_full_info), fun gleam@json:string/1 )}, {<<"first_name"/utf8>>, gleam@json:nullable( erlang:element(6, Chat_full_info), fun gleam@json:string/1 )}, {<<"last_name"/utf8>>, gleam@json:nullable( erlang:element(7, Chat_full_info), fun gleam@json:string/1 )}, {<<"is_forum"/utf8>>, gleam@json:nullable( erlang:element(8, Chat_full_info), fun gleam@json:bool/1 )}, {<<"accent_color_id"/utf8>>, gleam@json:int(erlang:element(9, Chat_full_info))}, {<<"max_reaction_count"/utf8>>, gleam@json:int(erlang:element(10, Chat_full_info))}, {<<"photo"/utf8>>, gleam@json:nullable( erlang:element(11, Chat_full_info), fun encode_chat_photo/1 )}, {<<"active_usernames"/utf8>>, gleam@json:nullable( erlang:element(12, Chat_full_info), fun(_capture) -> gleam@json:array(_capture, fun gleam@json:string/1) end )}, {<<"birthdate"/utf8>>, gleam@json:nullable( erlang:element(13, Chat_full_info), fun encode_birthdate/1 )}, {<<"business_intro"/utf8>>, gleam@json:nullable( erlang:element(14, Chat_full_info), fun encode_business_intro/1 )}, {<<"business_location"/utf8>>, gleam@json:nullable( erlang:element(15, Chat_full_info), fun encode_business_location/1 )}, {<<"business_opening_hours"/utf8>>, gleam@json:nullable( erlang:element(16, Chat_full_info), fun encode_business_opening_hours/1 )}, {<<"personal_chat"/utf8>>, gleam@json:nullable( erlang:element(17, Chat_full_info), fun encode_chat/1 )}, {<<"available_reactions"/utf8>>, gleam@json:nullable( erlang:element(18, Chat_full_info), fun(_capture@1) -> gleam@json:array(_capture@1, fun encode_reaction_type/1) end )}, {<<"background_custom_emoji_id"/utf8>>, gleam@json:nullable( erlang:element(19, Chat_full_info), fun gleam@json:string/1 )}, {<<"profile_accent_color_id"/utf8>>, gleam@json:nullable( erlang:element(20, Chat_full_info), fun gleam@json:int/1 )}, {<<"profile_background_custom_emoji_id"/utf8>>, gleam@json:nullable( erlang:element(21, Chat_full_info), fun gleam@json:string/1 )}, {<<"emoji_status_custom_emoji_id"/utf8>>, gleam@json:nullable( erlang:element(22, Chat_full_info), fun gleam@json:string/1 )}, {<<"emoji_status_expiration_date"/utf8>>, gleam@json:nullable( erlang:element(23, Chat_full_info), fun gleam@json:int/1 )}, {<<"bio"/utf8>>, gleam@json:nullable( erlang:element(24, Chat_full_info), fun gleam@json:string/1 )}, {<<"has_private_forwards"/utf8>>, gleam@json:nullable( erlang:element(25, Chat_full_info), fun gleam@json:bool/1 )}, {<<"has_restricted_voice_and_video_messages"/utf8>>, gleam@json:nullable( erlang:element(26, Chat_full_info), fun gleam@json:bool/1 )}, {<<"join_to_send_messages"/utf8>>, gleam@json:nullable( erlang:element(27, Chat_full_info), fun gleam@json:bool/1 )}, {<<"join_by_request"/utf8>>, gleam@json:nullable( erlang:element(28, Chat_full_info), fun gleam@json:bool/1 )}, {<<"description"/utf8>>, gleam@json:nullable( erlang:element(29, Chat_full_info), fun gleam@json:string/1 )}, {<<"invite_link"/utf8>>, gleam@json:nullable( erlang:element(30, Chat_full_info), fun gleam@json:string/1 )}, {<<"pinned_message"/utf8>>, gleam@json:nullable( erlang:element(31, Chat_full_info), fun encode_message/1 )}, {<<"permissions"/utf8>>, gleam@json:nullable( erlang:element(32, Chat_full_info), fun encode_chat_permissions/1 )}, {<<"can_send_gift"/utf8>>, gleam@json:nullable( erlang:element(33, Chat_full_info), fun gleam@json:bool/1 )}, {<<"can_send_paid_media"/utf8>>, gleam@json:nullable( erlang:element(34, Chat_full_info), fun gleam@json:bool/1 )}, {<<"slow_mode_delay"/utf8>>, gleam@json:nullable( erlang:element(35, Chat_full_info), fun gleam@json:int/1 )}, {<<"unrestrict_boost_count"/utf8>>, gleam@json:nullable( erlang:element(36, Chat_full_info), fun gleam@json:int/1 )}, {<<"message_auto_delete_time"/utf8>>, gleam@json:nullable( erlang:element(37, Chat_full_info), fun gleam@json:int/1 )}, {<<"has_aggressive_anti_spam_enabled"/utf8>>, gleam@json:nullable( erlang:element(38, Chat_full_info), fun gleam@json:bool/1 )}, {<<"has_hidden_members"/utf8>>, gleam@json:nullable( erlang:element(39, Chat_full_info), fun gleam@json:bool/1 )}, {<<"has_protected_content"/utf8>>, gleam@json:nullable( erlang:element(40, Chat_full_info), fun gleam@json:bool/1 )}, {<<"has_visible_history"/utf8>>, gleam@json:nullable( erlang:element(41, Chat_full_info), fun gleam@json:bool/1 )}, {<<"sticker_set_name"/utf8>>, gleam@json:nullable( erlang:element(42, Chat_full_info), fun gleam@json:string/1 )}, {<<"can_set_sticker_set"/utf8>>, gleam@json:nullable( erlang:element(43, Chat_full_info), fun gleam@json:bool/1 )}, {<<"custom_emoji_sticker_set_name"/utf8>>, gleam@json:nullable( erlang:element(44, Chat_full_info), fun gleam@json:string/1 )}, {<<"linked_chat_id"/utf8>>, gleam@json:nullable( erlang:element(45, Chat_full_info), fun gleam@json:int/1 )}, {<<"location"/utf8>>, gleam@json:nullable( erlang:element(46, Chat_full_info), fun encode_chat_location/1 )}] ). -file("src/telega/model.gleam", 16321). -spec encode_maybe_inaccessible_message(maybe_inaccessible_message()) -> gleam@json:json(). encode_maybe_inaccessible_message(Value) -> case Value of {message_maybe_inaccessible_message, Inner_value} -> encode_message(Inner_value); {inaccessible_message_maybe_inaccessible_message, Inner_value@1} -> encode_inaccessible_message(Inner_value@1) end. -file("src/telega/model.gleam", 12635). -spec encode_callback_query(callback_query()) -> gleam@json:json(). encode_callback_query(Callback_query) -> json_object_filter_nulls( [{<<"id"/utf8>>, gleam@json:string(erlang:element(2, Callback_query))}, {<<"from"/utf8>>, encode_user(erlang:element(3, Callback_query))}, {<<"message"/utf8>>, gleam@json:nullable( erlang:element(4, Callback_query), fun encode_maybe_inaccessible_message/1 )}, {<<"inline_message_id"/utf8>>, gleam@json:nullable( erlang:element(5, Callback_query), fun gleam@json:string/1 )}, {<<"chat_instance"/utf8>>, gleam@json:string(erlang:element(6, Callback_query))}, {<<"data"/utf8>>, gleam@json:nullable( erlang:element(7, Callback_query), fun gleam@json:string/1 )}, {<<"game_short_name"/utf8>>, gleam@json:nullable( erlang:element(8, Callback_query), fun gleam@json:string/1 )}] ). -file("src/telega/model.gleam", 11019). -spec encode_update(update()) -> gleam@json:json(). encode_update(Update) -> json_object_filter_nulls( [{<<"update_id"/utf8>>, gleam@json:int(erlang:element(2, Update))}, {<<"message"/utf8>>, gleam@json:nullable( erlang:element(3, Update), fun encode_message/1 )}, {<<"edited_message"/utf8>>, gleam@json:nullable( erlang:element(4, Update), fun encode_message/1 )}, {<<"channel_post"/utf8>>, gleam@json:nullable( erlang:element(5, Update), fun encode_message/1 )}, {<<"edited_channel_post"/utf8>>, gleam@json:nullable( erlang:element(6, Update), fun encode_message/1 )}, {<<"business_connection"/utf8>>, gleam@json:nullable( erlang:element(7, Update), fun encode_business_connection/1 )}, {<<"business_message"/utf8>>, gleam@json:nullable( erlang:element(8, Update), fun encode_message/1 )}, {<<"edited_business_message"/utf8>>, gleam@json:nullable( erlang:element(9, Update), fun encode_message/1 )}, {<<"deleted_business_messages"/utf8>>, gleam@json:nullable( erlang:element(10, Update), fun encode_business_messages_deleted/1 )}, {<<"message_reaction"/utf8>>, gleam@json:nullable( erlang:element(11, Update), fun encode_message_reaction_updated/1 )}, {<<"message_reaction_count"/utf8>>, gleam@json:nullable( erlang:element(12, Update), fun encode_message_reaction_count_updated/1 )}, {<<"inline_query"/utf8>>, gleam@json:nullable( erlang:element(13, Update), fun encode_inline_query/1 )}, {<<"chosen_inline_result"/utf8>>, gleam@json:nullable( erlang:element(14, Update), fun encode_chosen_inline_result/1 )}, {<<"callback_query"/utf8>>, gleam@json:nullable( erlang:element(15, Update), fun encode_callback_query/1 )}, {<<"shipping_query"/utf8>>, gleam@json:nullable( erlang:element(16, Update), fun encode_shipping_query/1 )}, {<<"pre_checkout_query"/utf8>>, gleam@json:nullable( erlang:element(17, Update), fun encode_pre_checkout_query/1 )}, {<<"purchased_paid_media"/utf8>>, gleam@json:nullable( erlang:element(18, Update), fun encode_paid_media_purchased/1 )}, {<<"poll"/utf8>>, gleam@json:nullable( erlang:element(19, Update), fun encode_poll/1 )}, {<<"poll_answer"/utf8>>, gleam@json:nullable( erlang:element(20, Update), fun encode_poll_answer/1 )}, {<<"my_chat_member"/utf8>>, gleam@json:nullable( erlang:element(21, Update), fun encode_chat_member_updated/1 )}, {<<"chat_member"/utf8>>, gleam@json:nullable( erlang:element(22, Update), fun encode_chat_member_updated/1 )}, {<<"chat_join_request"/utf8>>, gleam@json:nullable( erlang:element(23, Update), fun encode_chat_join_request/1 )}, {<<"chat_boost"/utf8>>, gleam@json:nullable( erlang:element(24, Update), fun encode_chat_boost_updated/1 )}, {<<"removed_chat_boost"/utf8>>, gleam@json:nullable( erlang:element(25, Update), fun encode_chat_boost_removed/1 )}] ). -file("src/telega/model.gleam", 6696). -spec giveaway_completed_decoder() -> gleam@dynamic@decode:decoder(giveaway_completed()). giveaway_completed_decoder() -> gleam@dynamic@decode:field( <<"winner_count"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_int/1}, fun(Winner_count) -> gleam@dynamic@decode:optional_field( <<"unclaimed_prize_count"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_int/1} ), fun(Unclaimed_prize_count) -> gleam@dynamic@decode:optional_field( <<"giveaway_message"/utf8>>, none, gleam@dynamic@decode:optional(message_decoder()), fun(Giveaway_message) -> gleam@dynamic@decode:optional_field( <<"is_star_giveaway"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_bool/1} ), fun(Is_star_giveaway) -> gleam@dynamic@decode:success( {giveaway_completed, Winner_count, Unclaimed_prize_count, Giveaway_message, Is_star_giveaway} ) end ) end ) end ) end ). -file("src/telega/model.gleam", 4956). -spec message_decoder() -> gleam@dynamic@decode:decoder(message()). message_decoder() -> gleam@dynamic@decode:field( <<"message_id"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_int/1}, fun(Message_id) -> gleam@dynamic@decode:optional_field( <<"message_thread_id"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_int/1} ), fun(Message_thread_id) -> gleam@dynamic@decode:optional_field( <<"from"/utf8>>, none, gleam@dynamic@decode:optional(user_decoder()), fun(From) -> gleam@dynamic@decode:optional_field( <<"sender_chat"/utf8>>, none, gleam@dynamic@decode:optional(chat_decoder()), fun(Sender_chat) -> gleam@dynamic@decode:optional_field( <<"sender_boost_count"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_int/1} ), fun(Sender_boost_count) -> gleam@dynamic@decode:optional_field( <<"sender_business_bot"/utf8>>, none, gleam@dynamic@decode:optional( user_decoder() ), fun(Sender_business_bot) -> gleam@dynamic@decode:field( <<"date"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_int/1}, fun(Date) -> gleam@dynamic@decode:optional_field( <<"business_connection_id"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_string/1} ), fun( Business_connection_id ) -> gleam@dynamic@decode:field( <<"chat"/utf8>>, chat_decoder( ), fun( Chat ) -> gleam@dynamic@decode:optional_field( <<"forward_origin"/utf8>>, none, gleam@dynamic@decode:optional( message_origin_decoder( ) ), fun( Forward_origin ) -> gleam@dynamic@decode:optional_field( <<"is_topic_message"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_bool/1} ), fun( Is_topic_message ) -> gleam@dynamic@decode:optional_field( <<"is_automatic_forward"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_bool/1} ), fun( Is_automatic_forward ) -> gleam@dynamic@decode:optional_field( <<"reply_to_message"/utf8>>, none, gleam@dynamic@decode:optional( message_decoder( ) ), fun( Reply_to_message ) -> gleam@dynamic@decode:optional_field( <<"external_reply"/utf8>>, none, gleam@dynamic@decode:optional( external_reply_info_decoder( ) ), fun( External_reply ) -> gleam@dynamic@decode:optional_field( <<"quote"/utf8>>, none, gleam@dynamic@decode:optional( text_quote_decoder( ) ), fun( Quote ) -> gleam@dynamic@decode:optional_field( <<"reply_to_story"/utf8>>, none, gleam@dynamic@decode:optional( story_decoder( ) ), fun( Reply_to_story ) -> gleam@dynamic@decode:optional_field( <<"via_bot"/utf8>>, none, gleam@dynamic@decode:optional( user_decoder( ) ), fun( Via_bot ) -> gleam@dynamic@decode:optional_field( <<"edit_date"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_int/1} ), fun( Edit_date ) -> gleam@dynamic@decode:optional_field( <<"has_protected_content"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_bool/1} ), fun( Has_protected_content ) -> gleam@dynamic@decode:optional_field( <<"is_from_offline"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_bool/1} ), fun( Is_from_offline ) -> gleam@dynamic@decode:optional_field( <<"media_group_id"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_string/1} ), fun( Media_group_id ) -> gleam@dynamic@decode:optional_field( <<"author_signature"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_string/1} ), fun( Author_signature ) -> gleam@dynamic@decode:optional_field( <<"text"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_string/1} ), fun( Text ) -> gleam@dynamic@decode:optional_field( <<"entities"/utf8>>, none, gleam@dynamic@decode:optional( gleam@dynamic@decode:list( message_entity_decoder( ) ) ), fun( Entities ) -> gleam@dynamic@decode:optional_field( <<"link_preview_options"/utf8>>, none, gleam@dynamic@decode:optional( link_preview_options_decoder( ) ), fun( Link_preview_options ) -> gleam@dynamic@decode:optional_field( <<"effect_id"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_string/1} ), fun( Effect_id ) -> gleam@dynamic@decode:optional_field( <<"animation"/utf8>>, none, gleam@dynamic@decode:optional( animation_decoder( ) ), fun( Animation ) -> gleam@dynamic@decode:optional_field( <<"audio"/utf8>>, none, gleam@dynamic@decode:optional( audio_decoder( ) ), fun( Audio ) -> gleam@dynamic@decode:optional_field( <<"document"/utf8>>, none, gleam@dynamic@decode:optional( document_decoder( ) ), fun( Document ) -> gleam@dynamic@decode:optional_field( <<"paid_media"/utf8>>, none, gleam@dynamic@decode:optional( paid_media_info_decoder( ) ), fun( Paid_media ) -> gleam@dynamic@decode:optional_field( <<"photo"/utf8>>, none, gleam@dynamic@decode:optional( gleam@dynamic@decode:list( photo_size_decoder( ) ) ), fun( Photo ) -> gleam@dynamic@decode:optional_field( <<"sticker"/utf8>>, none, gleam@dynamic@decode:optional( sticker_decoder( ) ), fun( Sticker ) -> gleam@dynamic@decode:optional_field( <<"story"/utf8>>, none, gleam@dynamic@decode:optional( story_decoder( ) ), fun( Story ) -> gleam@dynamic@decode:optional_field( <<"video"/utf8>>, none, gleam@dynamic@decode:optional( video_decoder( ) ), fun( Video ) -> gleam@dynamic@decode:optional_field( <<"video_note"/utf8>>, none, gleam@dynamic@decode:optional( video_note_decoder( ) ), fun( Video_note ) -> gleam@dynamic@decode:optional_field( <<"voice"/utf8>>, none, gleam@dynamic@decode:optional( voice_decoder( ) ), fun( Voice ) -> gleam@dynamic@decode:optional_field( <<"caption"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_string/1} ), fun( Caption ) -> gleam@dynamic@decode:optional_field( <<"caption_entities"/utf8>>, none, gleam@dynamic@decode:optional( gleam@dynamic@decode:list( message_entity_decoder( ) ) ), fun( Caption_entities ) -> gleam@dynamic@decode:optional_field( <<"show_caption_above_media"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_bool/1} ), fun( Show_caption_above_media ) -> gleam@dynamic@decode:optional_field( <<"has_media_spoiler"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_bool/1} ), fun( Has_media_spoiler ) -> gleam@dynamic@decode:optional_field( <<"contact"/utf8>>, none, gleam@dynamic@decode:optional( contact_decoder( ) ), fun( Contact ) -> gleam@dynamic@decode:optional_field( <<"dice"/utf8>>, none, gleam@dynamic@decode:optional( dice_decoder( ) ), fun( Dice ) -> gleam@dynamic@decode:optional_field( <<"game"/utf8>>, none, gleam@dynamic@decode:optional( game_decoder( ) ), fun( Game ) -> gleam@dynamic@decode:optional_field( <<"poll"/utf8>>, none, gleam@dynamic@decode:optional( poll_decoder( ) ), fun( Poll ) -> gleam@dynamic@decode:optional_field( <<"venue"/utf8>>, none, gleam@dynamic@decode:optional( venue_decoder( ) ), fun( Venue ) -> gleam@dynamic@decode:optional_field( <<"location"/utf8>>, none, gleam@dynamic@decode:optional( location_decoder( ) ), fun( Location ) -> gleam@dynamic@decode:optional_field( <<"new_chat_members"/utf8>>, none, gleam@dynamic@decode:optional( gleam@dynamic@decode:list( user_decoder( ) ) ), fun( New_chat_members ) -> gleam@dynamic@decode:optional_field( <<"left_chat_member"/utf8>>, none, gleam@dynamic@decode:optional( user_decoder( ) ), fun( Left_chat_member ) -> gleam@dynamic@decode:optional_field( <<"new_chat_title"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_string/1} ), fun( New_chat_title ) -> gleam@dynamic@decode:optional_field( <<"new_chat_photo"/utf8>>, none, gleam@dynamic@decode:optional( gleam@dynamic@decode:list( photo_size_decoder( ) ) ), fun( New_chat_photo ) -> gleam@dynamic@decode:optional_field( <<"delete_chat_photo"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_bool/1} ), fun( Delete_chat_photo ) -> gleam@dynamic@decode:optional_field( <<"group_chat_created"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_bool/1} ), fun( Group_chat_created ) -> gleam@dynamic@decode:optional_field( <<"supergroup_chat_created"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_bool/1} ), fun( Supergroup_chat_created ) -> gleam@dynamic@decode:optional_field( <<"channel_chat_created"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_bool/1} ), fun( Channel_chat_created ) -> gleam@dynamic@decode:optional_field( <<"message_auto_delete_timer_changed"/utf8>>, none, gleam@dynamic@decode:optional( message_auto_delete_timer_changed_decoder( ) ), fun( Message_auto_delete_timer_changed ) -> gleam@dynamic@decode:optional_field( <<"migrate_to_chat_id"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_int/1} ), fun( Migrate_to_chat_id ) -> gleam@dynamic@decode:optional_field( <<"migrate_from_chat_id"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_int/1} ), fun( Migrate_from_chat_id ) -> gleam@dynamic@decode:optional_field( <<"pinned_message"/utf8>>, none, gleam@dynamic@decode:optional( maybe_inaccessible_message_decoder( ) ), fun( Pinned_message ) -> gleam@dynamic@decode:optional_field( <<"invoice"/utf8>>, none, gleam@dynamic@decode:optional( invoice_decoder( ) ), fun( Invoice ) -> gleam@dynamic@decode:optional_field( <<"successful_payment"/utf8>>, none, gleam@dynamic@decode:optional( successful_payment_decoder( ) ), fun( Successful_payment ) -> gleam@dynamic@decode:optional_field( <<"refunded_payment"/utf8>>, none, gleam@dynamic@decode:optional( refunded_payment_decoder( ) ), fun( Refunded_payment ) -> gleam@dynamic@decode:optional_field( <<"users_shared"/utf8>>, none, gleam@dynamic@decode:optional( users_shared_decoder( ) ), fun( Users_shared ) -> gleam@dynamic@decode:optional_field( <<"chat_shared"/utf8>>, none, gleam@dynamic@decode:optional( chat_shared_decoder( ) ), fun( Chat_shared ) -> gleam@dynamic@decode:optional_field( <<"connected_website"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_string/1} ), fun( Connected_website ) -> gleam@dynamic@decode:optional_field( <<"write_access_allowed"/utf8>>, none, gleam@dynamic@decode:optional( write_access_allowed_decoder( ) ), fun( Write_access_allowed ) -> gleam@dynamic@decode:optional_field( <<"passport_data"/utf8>>, none, gleam@dynamic@decode:optional( passport_data_decoder( ) ), fun( Passport_data ) -> gleam@dynamic@decode:optional_field( <<"proximity_alert_triggered"/utf8>>, none, gleam@dynamic@decode:optional( proximity_alert_triggered_decoder( ) ), fun( Proximity_alert_triggered ) -> gleam@dynamic@decode:optional_field( <<"boost_added"/utf8>>, none, gleam@dynamic@decode:optional( chat_boost_added_decoder( ) ), fun( Boost_added ) -> gleam@dynamic@decode:optional_field( <<"chat_background_set"/utf8>>, none, gleam@dynamic@decode:optional( chat_background_decoder( ) ), fun( Chat_background_set ) -> gleam@dynamic@decode:optional_field( <<"forum_topic_created"/utf8>>, none, gleam@dynamic@decode:optional( forum_topic_created_decoder( ) ), fun( Forum_topic_created ) -> gleam@dynamic@decode:optional_field( <<"forum_topic_edited"/utf8>>, none, gleam@dynamic@decode:optional( forum_topic_edited_decoder( ) ), fun( Forum_topic_edited ) -> gleam@dynamic@decode:optional_field( <<"forum_topic_closed"/utf8>>, none, gleam@dynamic@decode:optional( forum_topic_closed_decoder( ) ), fun( Forum_topic_closed ) -> gleam@dynamic@decode:optional_field( <<"forum_topic_reopened"/utf8>>, none, gleam@dynamic@decode:optional( forum_topic_reopened_decoder( ) ), fun( Forum_topic_reopened ) -> gleam@dynamic@decode:optional_field( <<"general_forum_topic_hidden"/utf8>>, none, gleam@dynamic@decode:optional( general_forum_topic_hidden_decoder( ) ), fun( General_forum_topic_hidden ) -> gleam@dynamic@decode:optional_field( <<"general_forum_topic_unhidden"/utf8>>, none, gleam@dynamic@decode:optional( general_forum_topic_unhidden_decoder( ) ), fun( General_forum_topic_unhidden ) -> gleam@dynamic@decode:optional_field( <<"giveaway_created"/utf8>>, none, gleam@dynamic@decode:optional( giveaway_created_decoder( ) ), fun( Giveaway_created ) -> gleam@dynamic@decode:optional_field( <<"giveaway"/utf8>>, none, gleam@dynamic@decode:optional( giveaway_decoder( ) ), fun( Giveaway ) -> gleam@dynamic@decode:optional_field( <<"giveaway_winners"/utf8>>, none, gleam@dynamic@decode:optional( giveaway_winners_decoder( ) ), fun( Giveaway_winners ) -> gleam@dynamic@decode:optional_field( <<"giveaway_completed"/utf8>>, none, gleam@dynamic@decode:optional( giveaway_completed_decoder( ) ), fun( Giveaway_completed ) -> gleam@dynamic@decode:optional_field( <<"video_chat_scheduled"/utf8>>, none, gleam@dynamic@decode:optional( video_chat_scheduled_decoder( ) ), fun( Video_chat_scheduled ) -> gleam@dynamic@decode:optional_field( <<"video_chat_started"/utf8>>, none, gleam@dynamic@decode:optional( video_chat_started_decoder( ) ), fun( Video_chat_started ) -> gleam@dynamic@decode:optional_field( <<"video_chat_ended"/utf8>>, none, gleam@dynamic@decode:optional( video_chat_ended_decoder( ) ), fun( Video_chat_ended ) -> gleam@dynamic@decode:optional_field( <<"video_chat_participants_invited"/utf8>>, none, gleam@dynamic@decode:optional( video_chat_participants_invited_decoder( ) ), fun( Video_chat_participants_invited ) -> gleam@dynamic@decode:optional_field( <<"web_app_data"/utf8>>, none, gleam@dynamic@decode:optional( web_app_data_decoder( ) ), fun( Web_app_data ) -> gleam@dynamic@decode:optional_field( <<"reply_markup"/utf8>>, none, gleam@dynamic@decode:optional( inline_keyboard_markup_decoder( ) ), fun( Reply_markup ) -> gleam@dynamic@decode:success( {message, Message_id, Message_thread_id, From, Sender_chat, Sender_boost_count, Sender_business_bot, Date, Business_connection_id, Chat, Forward_origin, Is_topic_message, Is_automatic_forward, Reply_to_message, External_reply, Quote, Reply_to_story, Via_bot, Edit_date, Has_protected_content, Is_from_offline, Media_group_id, Author_signature, Text, Entities, Link_preview_options, Effect_id, Animation, Audio, Document, Paid_media, Photo, Sticker, Story, Video, Video_note, Voice, Caption, Caption_entities, Show_caption_above_media, Has_media_spoiler, Contact, Dice, Game, Poll, Venue, Location, New_chat_members, Left_chat_member, New_chat_title, New_chat_photo, Delete_chat_photo, Group_chat_created, Supergroup_chat_created, Channel_chat_created, Message_auto_delete_timer_changed, Migrate_to_chat_id, Migrate_from_chat_id, Pinned_message, Invoice, Successful_payment, Refunded_payment, Users_shared, Chat_shared, Connected_website, Write_access_allowed, Passport_data, Proximity_alert_triggered, Boost_added, Chat_background_set, Forum_topic_created, Forum_topic_edited, Forum_topic_closed, Forum_topic_reopened, General_forum_topic_hidden, General_forum_topic_unhidden, Giveaway_created, Giveaway, Giveaway_winners, Giveaway_completed, Video_chat_scheduled, Video_chat_started, Video_chat_ended, Video_chat_participants_invited, Web_app_data, Reply_markup} ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ). -file("src/telega/model.gleam", 4701). -spec chat_full_info_decoder() -> gleam@dynamic@decode:decoder(chat_full_info()). chat_full_info_decoder() -> gleam@dynamic@decode:field( <<"id"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_int/1}, fun(Id) -> gleam@dynamic@decode:field( <<"type"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Type_) -> gleam@dynamic@decode:optional_field( <<"title"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_string/1} ), fun(Title) -> gleam@dynamic@decode:optional_field( <<"username"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_string/1} ), fun(Username) -> gleam@dynamic@decode:optional_field( <<"first_name"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_string/1} ), fun(First_name) -> gleam@dynamic@decode:optional_field( <<"last_name"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_string/1} ), fun(Last_name) -> gleam@dynamic@decode:optional_field( <<"is_forum"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_bool/1} ), fun(Is_forum) -> gleam@dynamic@decode:field( <<"accent_color_id"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_int/1}, fun( Accent_color_id ) -> gleam@dynamic@decode:field( <<"max_reaction_count"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_int/1}, fun( Max_reaction_count ) -> gleam@dynamic@decode:optional_field( <<"photo"/utf8>>, none, gleam@dynamic@decode:optional( chat_photo_decoder( ) ), fun( Photo ) -> gleam@dynamic@decode:optional_field( <<"active_usernames"/utf8>>, none, gleam@dynamic@decode:optional( gleam@dynamic@decode:list( {decoder, fun gleam@dynamic@decode:decode_string/1} ) ), fun( Active_usernames ) -> gleam@dynamic@decode:optional_field( <<"birthdate"/utf8>>, none, gleam@dynamic@decode:optional( birthdate_decoder( ) ), fun( Birthdate ) -> gleam@dynamic@decode:optional_field( <<"business_intro"/utf8>>, none, gleam@dynamic@decode:optional( business_intro_decoder( ) ), fun( Business_intro ) -> gleam@dynamic@decode:optional_field( <<"business_location"/utf8>>, none, gleam@dynamic@decode:optional( business_location_decoder( ) ), fun( Business_location ) -> gleam@dynamic@decode:optional_field( <<"business_opening_hours"/utf8>>, none, gleam@dynamic@decode:optional( business_opening_hours_decoder( ) ), fun( Business_opening_hours ) -> gleam@dynamic@decode:optional_field( <<"personal_chat"/utf8>>, none, gleam@dynamic@decode:optional( chat_decoder( ) ), fun( Personal_chat ) -> gleam@dynamic@decode:optional_field( <<"available_reactions"/utf8>>, none, gleam@dynamic@decode:optional( gleam@dynamic@decode:list( reaction_type_decoder( ) ) ), fun( Available_reactions ) -> gleam@dynamic@decode:optional_field( <<"background_custom_emoji_id"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_string/1} ), fun( Background_custom_emoji_id ) -> gleam@dynamic@decode:optional_field( <<"profile_accent_color_id"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_int/1} ), fun( Profile_accent_color_id ) -> gleam@dynamic@decode:optional_field( <<"profile_background_custom_emoji_id"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_string/1} ), fun( Profile_background_custom_emoji_id ) -> gleam@dynamic@decode:optional_field( <<"emoji_status_custom_emoji_id"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_string/1} ), fun( Emoji_status_custom_emoji_id ) -> gleam@dynamic@decode:optional_field( <<"emoji_status_expiration_date"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_int/1} ), fun( Emoji_status_expiration_date ) -> gleam@dynamic@decode:optional_field( <<"bio"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_string/1} ), fun( Bio ) -> gleam@dynamic@decode:optional_field( <<"has_private_forwards"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_bool/1} ), fun( Has_private_forwards ) -> gleam@dynamic@decode:optional_field( <<"has_restricted_voice_and_video_messages"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_bool/1} ), fun( Has_restricted_voice_and_video_messages ) -> gleam@dynamic@decode:optional_field( <<"join_to_send_messages"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_bool/1} ), fun( Join_to_send_messages ) -> gleam@dynamic@decode:optional_field( <<"join_by_request"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_bool/1} ), fun( Join_by_request ) -> gleam@dynamic@decode:optional_field( <<"description"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_string/1} ), fun( Description ) -> gleam@dynamic@decode:optional_field( <<"invite_link"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_string/1} ), fun( Invite_link ) -> gleam@dynamic@decode:optional_field( <<"pinned_message"/utf8>>, none, gleam@dynamic@decode:optional( message_decoder( ) ), fun( Pinned_message ) -> gleam@dynamic@decode:optional_field( <<"permissions"/utf8>>, none, gleam@dynamic@decode:optional( chat_permissions_decoder( ) ), fun( Permissions ) -> gleam@dynamic@decode:optional_field( <<"can_send_gift"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_bool/1} ), fun( Can_send_gift ) -> gleam@dynamic@decode:optional_field( <<"can_send_paid_media"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_bool/1} ), fun( Can_send_paid_media ) -> gleam@dynamic@decode:optional_field( <<"slow_mode_delay"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_int/1} ), fun( Slow_mode_delay ) -> gleam@dynamic@decode:optional_field( <<"unrestrict_boost_count"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_int/1} ), fun( Unrestrict_boost_count ) -> gleam@dynamic@decode:optional_field( <<"message_auto_delete_time"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_int/1} ), fun( Message_auto_delete_time ) -> gleam@dynamic@decode:optional_field( <<"has_aggressive_anti_spam_enabled"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_bool/1} ), fun( Has_aggressive_anti_spam_enabled ) -> gleam@dynamic@decode:optional_field( <<"has_hidden_members"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_bool/1} ), fun( Has_hidden_members ) -> gleam@dynamic@decode:optional_field( <<"has_protected_content"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_bool/1} ), fun( Has_protected_content ) -> gleam@dynamic@decode:optional_field( <<"has_visible_history"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_bool/1} ), fun( Has_visible_history ) -> gleam@dynamic@decode:optional_field( <<"sticker_set_name"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_string/1} ), fun( Sticker_set_name ) -> gleam@dynamic@decode:optional_field( <<"can_set_sticker_set"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_bool/1} ), fun( Can_set_sticker_set ) -> gleam@dynamic@decode:optional_field( <<"custom_emoji_sticker_set_name"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_string/1} ), fun( Custom_emoji_sticker_set_name ) -> gleam@dynamic@decode:optional_field( <<"linked_chat_id"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_int/1} ), fun( Linked_chat_id ) -> gleam@dynamic@decode:optional_field( <<"location"/utf8>>, none, gleam@dynamic@decode:optional( chat_location_decoder( ) ), fun( Location ) -> gleam@dynamic@decode:success( {chat_full_info, Id, Type_, Title, Username, First_name, Last_name, Is_forum, Accent_color_id, Max_reaction_count, Photo, Active_usernames, Birthdate, Business_intro, Business_location, Business_opening_hours, Personal_chat, Available_reactions, Background_custom_emoji_id, Profile_accent_color_id, Profile_background_custom_emoji_id, Emoji_status_custom_emoji_id, Emoji_status_expiration_date, Bio, Has_private_forwards, Has_restricted_voice_and_video_messages, Join_to_send_messages, Join_by_request, Description, Invite_link, Pinned_message, Permissions, Can_send_gift, Can_send_paid_media, Slow_mode_delay, Unrestrict_boost_count, Message_auto_delete_time, Has_aggressive_anti_spam_enabled, Has_hidden_members, Has_protected_content, Has_visible_history, Sticker_set_name, Can_set_sticker_set, Custom_emoji_sticker_set_name, Linked_chat_id, Location} ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ). -file("src/telega/model.gleam", 15778). -spec maybe_inaccessible_message_message_decoder() -> gleam@dynamic@decode:decoder(maybe_inaccessible_message()). maybe_inaccessible_message_message_decoder() -> gleam@dynamic@decode:then( message_decoder(), fun(Message) -> gleam@dynamic@decode:success( {message_maybe_inaccessible_message, Message} ) end ). -file("src/telega/model.gleam", 15788). -spec maybe_inaccessible_message_decoder() -> gleam@dynamic@decode:decoder(maybe_inaccessible_message()). maybe_inaccessible_message_decoder() -> gleam@dynamic@decode:one_of( maybe_inaccessible_message_message_decoder(), [maybe_inaccessible_message_inaccessible_message_decoder()] ). -file("src/telega/model.gleam", 7138). -spec callback_query_decoder() -> gleam@dynamic@decode:decoder(callback_query()). callback_query_decoder() -> gleam@dynamic@decode:field( <<"id"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Id) -> gleam@dynamic@decode:field( <<"from"/utf8>>, user_decoder(), fun(From) -> gleam@dynamic@decode:optional_field( <<"message"/utf8>>, none, gleam@dynamic@decode:optional( maybe_inaccessible_message_decoder() ), fun(Message) -> gleam@dynamic@decode:optional_field( <<"inline_message_id"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_string/1} ), fun(Inline_message_id) -> gleam@dynamic@decode:field( <<"chat_instance"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_string/1}, fun(Chat_instance) -> gleam@dynamic@decode:optional_field( <<"data"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_string/1} ), fun(Data) -> gleam@dynamic@decode:optional_field( <<"game_short_name"/utf8>>, none, gleam@dynamic@decode:optional( {decoder, fun gleam@dynamic@decode:decode_string/1} ), fun(Game_short_name) -> gleam@dynamic@decode:success( {callback_query, Id, From, Message, Inline_message_id, Chat_instance, Data, Game_short_name} ) end ) end ) end ) end ) end ) end ) end ). -file("src/telega/model.gleam", 4392). -spec update_decoder() -> gleam@dynamic@decode:decoder(update()). update_decoder() -> gleam@dynamic@decode:field( <<"update_id"/utf8>>, {decoder, fun gleam@dynamic@decode:decode_int/1}, fun(Update_id) -> gleam@dynamic@decode:optional_field( <<"message"/utf8>>, none, gleam@dynamic@decode:optional(message_decoder()), fun(Message) -> gleam@dynamic@decode:optional_field( <<"edited_message"/utf8>>, none, gleam@dynamic@decode:optional(message_decoder()), fun(Edited_message) -> gleam@dynamic@decode:optional_field( <<"channel_post"/utf8>>, none, gleam@dynamic@decode:optional(message_decoder()), fun(Channel_post) -> gleam@dynamic@decode:optional_field( <<"edited_channel_post"/utf8>>, none, gleam@dynamic@decode:optional( message_decoder() ), fun(Edited_channel_post) -> gleam@dynamic@decode:optional_field( <<"business_connection"/utf8>>, none, gleam@dynamic@decode:optional( business_connection_decoder( ) ), fun(Business_connection) -> gleam@dynamic@decode:optional_field( <<"business_message"/utf8>>, none, gleam@dynamic@decode:optional( message_decoder() ), fun(Business_message) -> gleam@dynamic@decode:optional_field( <<"edited_business_message"/utf8>>, none, gleam@dynamic@decode:optional( message_decoder( ) ), fun( Edited_business_message ) -> gleam@dynamic@decode:optional_field( <<"deleted_business_messages"/utf8>>, none, gleam@dynamic@decode:optional( business_messages_deleted_decoder( ) ), fun( Deleted_business_messages ) -> gleam@dynamic@decode:optional_field( <<"message_reaction"/utf8>>, none, gleam@dynamic@decode:optional( message_reaction_updated_decoder( ) ), fun( Message_reaction ) -> gleam@dynamic@decode:optional_field( <<"message_reaction_count"/utf8>>, none, gleam@dynamic@decode:optional( message_reaction_count_updated_decoder( ) ), fun( Message_reaction_count ) -> gleam@dynamic@decode:optional_field( <<"inline_query"/utf8>>, none, gleam@dynamic@decode:optional( inline_query_decoder( ) ), fun( Inline_query ) -> gleam@dynamic@decode:optional_field( <<"chosen_inline_result"/utf8>>, none, gleam@dynamic@decode:optional( chosen_inline_result_decoder( ) ), fun( Chosen_inline_result ) -> gleam@dynamic@decode:optional_field( <<"callback_query"/utf8>>, none, gleam@dynamic@decode:optional( callback_query_decoder( ) ), fun( Callback_query ) -> gleam@dynamic@decode:optional_field( <<"shipping_query"/utf8>>, none, gleam@dynamic@decode:optional( shipping_query_decoder( ) ), fun( Shipping_query ) -> gleam@dynamic@decode:optional_field( <<"pre_checkout_query"/utf8>>, none, gleam@dynamic@decode:optional( pre_checkout_query_decoder( ) ), fun( Pre_checkout_query ) -> gleam@dynamic@decode:optional_field( <<"purchased_paid_media"/utf8>>, none, gleam@dynamic@decode:optional( paid_media_purchased_decoder( ) ), fun( Purchased_paid_media ) -> gleam@dynamic@decode:optional_field( <<"poll"/utf8>>, none, gleam@dynamic@decode:optional( poll_decoder( ) ), fun( Poll ) -> gleam@dynamic@decode:optional_field( <<"poll_answer"/utf8>>, none, gleam@dynamic@decode:optional( poll_answer_decoder( ) ), fun( Poll_answer ) -> gleam@dynamic@decode:optional_field( <<"my_chat_member"/utf8>>, none, gleam@dynamic@decode:optional( chat_member_updated_decoder( ) ), fun( My_chat_member ) -> gleam@dynamic@decode:optional_field( <<"chat_member"/utf8>>, none, gleam@dynamic@decode:optional( chat_member_updated_decoder( ) ), fun( Chat_member ) -> gleam@dynamic@decode:optional_field( <<"chat_join_request"/utf8>>, none, gleam@dynamic@decode:optional( chat_join_request_decoder( ) ), fun( Chat_join_request ) -> gleam@dynamic@decode:optional_field( <<"chat_boost"/utf8>>, none, gleam@dynamic@decode:optional( chat_boost_updated_decoder( ) ), fun( Chat_boost ) -> gleam@dynamic@decode:optional_field( <<"removed_chat_boost"/utf8>>, none, gleam@dynamic@decode:optional( chat_boost_removed_decoder( ) ), fun( Removed_chat_boost ) -> gleam@dynamic@decode:success( {update, Update_id, Message, Edited_message, Channel_post, Edited_channel_post, Business_connection, Business_message, Edited_business_message, Deleted_business_messages, Message_reaction, Message_reaction_count, Inline_query, Chosen_inline_result, Callback_query, Shipping_query, Pre_checkout_query, Purchased_paid_media, Poll, Poll_answer, My_chat_member, Chat_member, Chat_join_request, Chat_boost, Removed_chat_boost} ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ) end ).