code: public function jsonSerialize()
      {
          $json = [];
  
          if (null !== $this->id) {
              $json['id'] = $this->id;
          }
          if (null !== $this->title) {
              $json['title'] = $this->title;
          }
          if (null !== $this->mediaIds && !empty($this->mediaIds)) {
              $json['mediaIds'] = $this->mediaIds;
          }
          if (null !== $this->filterItems && !empty($this->filterItems)) {
              $json['filterItems'] = $this->filterItems;
          }
  
          return $json;
      }
docs: Gets all data that should be available in a json representation.
  
  @return array an associative array of the available variables