public function toMap()

in alibabacloud-gateway-spi/php/src/Models/InterceptorContext/request.php [23:83]


    public function toMap() {
        $res = [];
        if (null !== $this->headers) {
            $res['headers'] = $this->headers;
        }
        if (null !== $this->query) {
            $res['query'] = $this->query;
        }
        if (null !== $this->body) {
            $res['body'] = $this->body;
        }
        if (null !== $this->stream) {
            $res['stream'] = $this->stream;
        }
        if (null !== $this->hostMap) {
            $res['hostMap'] = $this->hostMap;
        }
        if (null !== $this->pathname) {
            $res['pathname'] = $this->pathname;
        }
        if (null !== $this->productId) {
            $res['productId'] = $this->productId;
        }
        if (null !== $this->action) {
            $res['action'] = $this->action;
        }
        if (null !== $this->version) {
            $res['version'] = $this->version;
        }
        if (null !== $this->protocol) {
            $res['protocol'] = $this->protocol;
        }
        if (null !== $this->method) {
            $res['method'] = $this->method;
        }
        if (null !== $this->authType) {
            $res['authType'] = $this->authType;
        }
        if (null !== $this->bodyType) {
            $res['bodyType'] = $this->bodyType;
        }
        if (null !== $this->reqBodyType) {
            $res['reqBodyType'] = $this->reqBodyType;
        }
        if (null !== $this->style) {
            $res['style'] = $this->style;
        }
        if (null !== $this->credential) {
            $res['credential'] = null !== $this->credential ? $this->credential->toMap() : null;
        }
        if (null !== $this->signatureVersion) {
            $res['signatureVersion'] = $this->signatureVersion;
        }
        if (null !== $this->signatureAlgorithm) {
            $res['signatureAlgorithm'] = $this->signatureAlgorithm;
        }
        if (null !== $this->userAgent) {
            $res['userAgent'] = $this->userAgent;
        }
        return $res;
    }