code: public function jsonSerialize()
      {
          $json = [];
  
          if (null !== $this->type) {
              $json['type'] = $this->type;
          }
          if (null !== $this->speed) {
              $json['speed'] = $this->speed;
          }
          if (null !== $this->advanceAfterTime) {
              $json['advanceAfterTime'] = $this->advanceAfterTime;
          }
          if (null !== $this->advanceOnClick) {
              $json['advanceOnClick'] = $this->advanceOnClick;
          }
          if (null !== $this->orientation) {
              $json['orientation'] = $this->orientation;
          }
          if (null !== $this->direction) {
              $json['direction'] = $this->direction;
          }
          if (null !== $this->pattern) {
              $json['pattern'] = $this->pattern;
          }
          if (null !== $this->bounce) {
              $json['bounce'] = $this->bounce;
          }
          if (null !== $this->fromBlack) {
              $json['fromBlack'] = $this->fromBlack;
          }
  
          return $json;
      }
docs: Gets all data that should be available in a json representation.
  
  @return array an associative array of the available variables