(cls, json_string)
| 7857 | """ |
| 7858 | @classmethod |
| 7859 | def de_json(cls, json_string): |
| 7860 | if json_string is None: return None |
| 7861 | obj = cls.check_json(json_string) |
| 7862 | obj['poll_id'] = obj.pop('id') |
| 7863 | options = [] |
| 7864 | for opt in obj['options']: |
| 7865 | options.append(PollOption.de_json(opt)) |
| 7866 | obj['options'] = options or None |
| 7867 | if 'explanation_entities' in obj: |
| 7868 | obj['explanation_entities'] = Message.parse_entities(obj['explanation_entities']) |
| 7869 | if 'question_entities' in obj: |
| 7870 | obj['question_entities'] = Message.parse_entities(obj['question_entities']) |
| 7871 | if 'description_entities' in obj: |
| 7872 | obj['description_entities'] = Message.parse_entities(obj['description_entities']) |
| 7873 | if 'media' in obj: |
| 7874 | obj['media'] = PollMedia.de_json(obj['media']) |
| 7875 | if 'explanation_media' in obj: |
| 7876 | obj['explanation_media'] = PollMedia.de_json(obj['explanation_media']) |
| 7877 | |
| 7878 | return cls(**obj) |
| 7879 | |
| 7880 | def __init__( |
| 7881 | self, |
nothing calls this directly
no test coverage detected