public static function fromMap()

in alibabacloud-gateway-spi/php/src/Models/InterceptorContext/request.php [88:148]


    public static function fromMap($map = []) {
        $model = new self();
        if(isset($map['headers'])){
            $model->headers = $map['headers'];
        }
        if(isset($map['query'])){
            $model->query = $map['query'];
        }
        if(isset($map['body'])){
            $model->body = $map['body'];
        }
        if(isset($map['stream'])){
            $model->stream = $map['stream'];
        }
        if(isset($map['hostMap'])){
            $model->hostMap = $map['hostMap'];
        }
        if(isset($map['pathname'])){
            $model->pathname = $map['pathname'];
        }
        if(isset($map['productId'])){
            $model->productId = $map['productId'];
        }
        if(isset($map['action'])){
            $model->action = $map['action'];
        }
        if(isset($map['version'])){
            $model->version = $map['version'];
        }
        if(isset($map['protocol'])){
            $model->protocol = $map['protocol'];
        }
        if(isset($map['method'])){
            $model->method = $map['method'];
        }
        if(isset($map['authType'])){
            $model->authType = $map['authType'];
        }
        if(isset($map['bodyType'])){
            $model->bodyType = $map['bodyType'];
        }
        if(isset($map['reqBodyType'])){
            $model->reqBodyType = $map['reqBodyType'];
        }
        if(isset($map['style'])){
            $model->style = $map['style'];
        }
        if(isset($map['credential'])){
            $model->credential = Credential::fromMap($map['credential']);
        }
        if(isset($map['signatureVersion'])){
            $model->signatureVersion = $map['signatureVersion'];
        }
        if(isset($map['signatureAlgorithm'])){
            $model->signatureAlgorithm = $map['signatureAlgorithm'];
        }
        if(isset($map['userAgent'])){
            $model->userAgent = $map['userAgent'];
        }
        return $model;
    }