public function toArray()

in php/src/Models/OpenApiRequest.php [56:99]


  public function toArray($noStream = false)
  {
    $res = [];
    if (null !== $this->headers) {
      if(is_array($this->headers)) {
        $res['headers'] = [];
        foreach($this->headers as $key1 => $value1) {
          $res['headers'][$key1] = $value1;
        }
      }
    }

    if (null !== $this->query) {
      if(is_array($this->query)) {
        $res['query'] = [];
        foreach($this->query as $key1 => $value1) {
          $res['query'][$key1] = $value1;
        }
      }
    }

    if (null !== $this->body) {
      $res['body'] = $this->body;
    }

    if (null !== $this->stream) {
      $res['stream'] = $this->stream;
    }

    if (null !== $this->hostMap) {
      if(is_array($this->hostMap)) {
        $res['hostMap'] = [];
        foreach($this->hostMap as $key1 => $value1) {
          $res['hostMap'][$key1] = $value1;
        }
      }
    }

    if (null !== $this->endpointOverride) {
      $res['endpointOverride'] = $this->endpointOverride;
    }

    return $res;
  }