code: public function setPayload($payload)
      {
          $model = new Payload();
  
          if (!empty($payload['url'])) {
              $model->setUrl($payload['url']);
          }
  
          if (!empty($payload['is_reusable'])) {
              $model->setIsReusable($payload['is_reusable']);
          }
  
          if (!empty($payload['template_type'])) {
              $model->setTemplateType($payload['template_type']);
          }
  
          if (!empty($payload['text'])) {
              $model->setText($payload['text']);
          }
  
          if (!empty($payload['attachment_id'])) {
              $model->setAttachmentId($payload['attachment_id']);
          }
  
          if (!empty($payload['buttons'])) {
              foreach ($payload['buttons'] as $button) {
                  $model->setButton($button);
              }
          }
  
          $this->payload = $model;
      }
docs: Set payload
  
  @param Payload $payload