public function __construct(array $data)
 {
     parent::__construct($data);
     $this->type = 'venue';
     $this->latitude = isset($data['latitude']) ? $data['latitude'] : null;
     if (empty($this->latitude)) {
         throw new TelegramException('latitude is empty!');
     }
     $this->longitude = isset($data['longitude']) ? $data['longitude'] : null;
     if (empty($this->longitude)) {
         throw new TelegramException('longitude is empty!');
     }
     $this->title = isset($data['title']) ? $data['title'] : null;
     if (empty($this->title)) {
         throw new TelegramException('title is empty!');
     }
     $this->address = isset($data['address']) ? $data['address'] : null;
     if (empty($this->address)) {
         throw new TelegramException('address is empty!');
     }
     $this->foursquare_id = isset($data['foursquare_id']) ? $data['foursquare_id'] : null;
     $this->thumb_url = isset($data['thumb_url']) ? $data['thumb_url'] : null;
     $this->thumb_width = isset($data['thumb_width']) ? $data['thumb_width'] : null;
     $this->thumb_height = isset($data['thumb_height']) ? $data['thumb_height'] : null;
 }
 /**
  * InlineQueryResultCachedAudio constructor.
  *
  * @param array $data
  */
 public function __construct(array $data)
 {
     parent::__construct($data);
     $this->type = 'audio';
     $this->audio_file_id = isset($data['audio_file_id']) ? $data['audio_file_id'] : null;
     if (empty($this->audio_file_id)) {
         throw new TelegramException('audio_file_id is empty!');
     }
 }
 /**
  * InlineQueryResultCachedGif constructor.
  *
  * @param array $data
  */
 public function __construct(array $data)
 {
     parent::__construct($data);
     $this->type = 'gif';
     $this->gif_file_id = isset($data['gif_file_id']) ? $data['gif_file_id'] : null;
     if (empty($this->gif_file_id)) {
         throw new TelegramException('gif_file_id is empty!');
     }
     $this->title = isset($data['title']) ? $data['title'] : null;
     $this->caption = isset($data['caption']) ? $data['caption'] : null;
 }
 public function __construct(array $data)
 {
     parent::__construct($data);
     $this->type = 'voice';
     $this->voice_url = isset($data['voice_url']) ? $data['voice_url'] : null;
     if (empty($this->voice_url)) {
         throw new TelegramException('voice_url is empty!');
     }
     $this->title = isset($data['title']) ? $data['title'] : null;
     if (empty($this->title)) {
         throw new TelegramException('title is empty!');
     }
     $this->voice_duration = isset($data['voice_duration']) ? $data['voice_duration'] : null;
 }
 public function __construct(array $data)
 {
     parent::__construct($data);
     $this->type = 'article';
     $this->message_text = isset($data['message_text']) ? $data['message_text'] : null;
     if (empty($this->message_text)) {
         throw new TelegramException('message_text is empty!');
     }
     $this->url = isset($data['url']) ? $data['url'] : null;
     $this->hide_url = isset($data['hide_url']) ? $data['hide_url'] : null;
     $this->description = isset($data['description']) ? $data['description'] : null;
     $this->thumb_url = isset($data['thumb_url']) ? $data['thumb_url'] : null;
     $this->thumb_width = isset($data['thumb_width']) ? $data['thumb_width'] : null;
     $this->thumb_height = isset($data['thumb_height']) ? $data['thumb_height'] : null;
 }
 /**
  * InlineQueryResultAudio constructor.
  *
  * @param array $data
  */
 public function __construct(array $data)
 {
     parent::__construct($data);
     $this->type = 'audio';
     $this->audio_url = isset($data['audio_url']) ? $data['audio_url'] : null;
     if (empty($this->audio_url)) {
         throw new TelegramException('audio_url is empty!');
     }
     $this->title = isset($data['title']) ? $data['title'] : null;
     if (empty($this->title)) {
         throw new TelegramException('title is empty!');
     }
     $this->performer = isset($data['performer']) ? $data['performer'] : null;
     $this->audio_duration = isset($data['audio_duration']) ? $data['audio_duration'] : null;
 }
 /**
  * InlineQueryResultCachedVideo constructor.
  *
  * @param array $data
  */
 public function __construct(array $data)
 {
     parent::__construct($data);
     $this->type = 'photo';
     $this->video_file_id = isset($data['video_file_id']) ? $data['video_file_id'] : null;
     if (empty($this->video_file_id)) {
         throw new TelegramException('video_file_id is empty!');
     }
     $this->title = isset($data['title']) ? $data['title'] : null;
     if (empty($this->title)) {
         throw new TelegramException('title is empty!');
     }
     $this->description = isset($data['description']) ? $data['description'] : null;
     $this->caption = isset($data['caption']) ? $data['caption'] : null;
 }
 public function __construct(array $data)
 {
     parent::__construct($data);
     $this->type = 'mpeg4_gif';
     $this->mpeg4_url = isset($data['mpeg4_url']) ? $data['mpeg4_url'] : null;
     if (empty($this->mpeg4_url)) {
         throw new TelegramException('mpeg4_url is empty!');
     }
     $this->mpeg4_width = isset($data['mpeg4_width']) ? $data['mpeg4_width'] : null;
     $this->mpeg4_height = isset($data['mpeg4_height']) ? $data['mpeg4_height'] : null;
     $this->thumb_url = isset($data['thumb_url']) ? $data['thumb_url'] : null;
     if (empty($this->thumb_url)) {
         throw new TelegramException('thumb_url is empty!');
     }
     $this->caption = isset($data['caption']) ? $data['caption'] : null;
     $this->message_text = isset($data['message_text']) ? $data['message_text'] : null;
 }
 /**
  * InlineQueryResultGif constructor.
  *
  * @param array $data
  */
 public function __construct(array $data)
 {
     parent::__construct($data);
     $this->type = 'gif';
     $this->gif_url = isset($data['gif_url']) ? $data['gif_url'] : null;
     if (empty($this->gif_url)) {
         throw new TelegramException('gif_url is empty!');
     }
     $this->gif_width = isset($data['gif_width']) ? $data['gif_width'] : null;
     $this->gif_height = isset($data['gif_height']) ? $data['gif_height'] : null;
     $this->thumb_url = isset($data['thumb_url']) ? $data['thumb_url'] : null;
     if (empty($this->thumb_url)) {
         throw new TelegramException('thumb_url is empty!');
     }
     $this->title = isset($data['title']) ? $data['title'] : null;
     $this->caption = isset($data['caption']) ? $data['caption'] : null;
 }
 public function __construct(array $data)
 {
     parent::__construct($data);
     $this->type = 'contact';
     $this->phone_number = isset($data['phone_number']) ? $data['phone_number'] : null;
     if (empty($this->phone_number)) {
         throw new TelegramException('phone_number is empty!');
     }
     $this->first_name = isset($data['first_name']) ? $data['first_name'] : null;
     if (empty($this->first_name)) {
         throw new TelegramException('first_name is empty!');
     }
     $this->last_name = isset($data['last_name']) ? $data['last_name'] : null;
     $this->thumb_url = isset($data['thumb_url']) ? $data['thumb_url'] : null;
     $this->thumb_width = isset($data['thumb_width']) ? $data['thumb_width'] : null;
     $this->thumb_height = isset($data['thumb_height']) ? $data['thumb_height'] : null;
 }
 public function __construct(array $data)
 {
     parent::__construct($data);
     $this->type = 'video';
     $this->video_url = isset($data['video_url']) ? $data['video_url'] : null;
     if (empty($this->video_url)) {
         throw new TelegramException('video_url is empty!');
     }
     $this->mime_type = isset($data['mime_type']) ? $data['mime_type'] : null;
     if (empty($this->mime_type)) {
         throw new TelegramException('mime_type is empty!');
     }
     $this->message_text = isset($data['message_text']) ? $data['message_text'] : null;
     if (empty($this->message_text)) {
         throw new TelegramException('message_text is empty!');
     }
     $this->video_width = isset($data['video_width']) ? $data['video_width'] : null;
     $this->video_height = isset($data['video_height']) ? $data['video_height'] : null;
     $this->video_duration = isset($data['video_duration']) ? $data['video_duration'] : null;
 }
 public function __construct(array $data)
 {
     parent::__construct($data);
     $this->type = 'location';
     $this->latitude = isset($data['latitude']) ? $data['latitude'] : null;
     if (empty($this->latitude)) {
         throw new TelegramException('latitude is empty!');
     }
     $this->longitude = isset($data['longitude']) ? $data['longitude'] : null;
     if (empty($this->longitude)) {
         throw new TelegramException('longitude is empty!');
     }
     $this->title = isset($data['title']) ? $data['title'] : null;
     if (empty($this->title)) {
         throw new TelegramException('title is empty!');
     }
     $this->thumb_url = isset($data['thumb_url']) ? $data['thumb_url'] : null;
     $this->thumb_width = isset($data['thumb_width']) ? $data['thumb_width'] : null;
     $this->thumb_height = isset($data['thumb_height']) ? $data['thumb_height'] : null;
 }
 public function __construct(array $data)
 {
     parent::__construct($data);
     $this->type = 'document';
     $this->title = isset($data['title']) ? $data['title'] : null;
     if (empty($this->title)) {
         throw new TelegramException('title is empty!');
     }
     $this->caption = isset($data['caption']) ? $data['caption'] : null;
     $this->document_url = isset($data['document_url']) ? $data['document_url'] : null;
     if (empty($this->document_url)) {
         throw new TelegramException('document_url is empty!');
     }
     $this->mime_type = isset($data['mime_type']) ? $data['mime_type'] : null;
     if (empty($this->mime_type)) {
         throw new TelegramException('mime_type is empty!');
     }
     $this->description = isset($data['description']) ? $data['description'] : null;
     $this->thumb_url = isset($data['thumb_url']) ? $data['thumb_url'] : null;
     $this->thumb_width = isset($data['thumb_width']) ? $data['thumb_width'] : null;
     $this->thumb_height = isset($data['thumb_height']) ? $data['thumb_height'] : null;
 }