@@ -35,12 +35,13 @@ class REST
3535     * Executes a Psr\Http\Message\RequestInterface and (if applicable) automatically retries 
3636     * when errors occur. 
3737     * 
38+      * @template T 
3839     * @param ClientInterface $client 
3940     * @param RequestInterface $request 
40-      * @param string $expectedClass 
41+      * @param class- string<T>|false|null  $expectedClass 
4142     * @param array $config 
4243     * @param array $retryMap 
43-      * @return mixed decoded result  
44+      * @return mixed|T|null  
4445     * @throws \Google\Service\Exception on server side error (ie: not authenticated, 
4546     *  invalid or malformed post body, invalid url) 
4647     */ 
@@ -68,10 +69,11 @@ public static function execute(
6869    /** 
6970     * Executes a Psr\Http\Message\RequestInterface 
7071     * 
72+      * @template T 
7173     * @param ClientInterface $client 
7274     * @param RequestInterface $request 
73-      * @param string $expectedClass 
74-      * @return array decoded result  
75+      * @param class- string<T>|false|null  $expectedClass 
76+      * @return mixed|T|null  
7577     * @throws \Google\Service\Exception on server side error (ie: not authenticated, 
7678     *  invalid or malformed post body, invalid url) 
7779     */ 
@@ -108,11 +110,13 @@ interface_exists('\GuzzleHttp\Message\ResponseInterface')
108110    /** 
109111     * Decode an HTTP Response. 
110112     * @static 
111-      * @throws \Google\Service\Exception 
113+      * 
114+      * @template T 
112115     * @param RequestInterface $response The http response to be decoded. 
113116     * @param ResponseInterface $response 
114-      * @param string $expectedClass 
115-      * @return mixed|null 
117+      * @param class-string<T>|false|null $expectedClass 
118+      * @return mixed|T|null 
119+      * @throws \Google\Service\Exception 
116120     */ 
117121    public  static  function  decodeHttpResponse (
118122        ResponseInterface $ response
0 commit comments