"""File auto-generated by tglib TL generator. Do not edit manually."""
from ..tlobject import TLObject
from typing import Optional, List, Union
import os
import struct
from datetime import datetime


class SuggestedShortName(TLObject):
    """TL type: stickers.suggestedShortName"""
    CONSTRUCTOR_ID = 0x85fea03f
    SUBCLASS_OF_ID = 0xc44a4b21

    def __init__(self, short_name: str):
        self.short_name = short_name

    def to_dict(self):
        return {
            '_': 'SuggestedShortName',
            'short_name': self.short_name,
        }

    def _bytes(self) -> bytes:
        import io
        buf = io.BytesIO()
        buf.write(struct.pack('<I', self.CONSTRUCTOR_ID))
        buf.write(TLObject.serialize_bytes(self.short_name))
        return buf.getvalue()

    @classmethod
    def from_reader(cls, reader):
        _args = {}
        _val_short_name = reader.tgread_string()
        _args['short_name'] = _val_short_name
        return cls(**_args)

