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