Before this pull request, the following would raise lang.IllegalArgumentException (Cannot represent instances of util.Date):
use com\amazon\aws\ServiceEndpoint;
use util\Date;
$endpoint= new ServiceEndpoint(...);
$status= $endpoint->resource('/messages')
->transmit(['content' => 'Test', 'date' => Date::now()])
->status()
;
Unmarshalling response payloads
We can now add a result type to value(), result() and error() to which we want the response payload unmarshalled:
use com\amazon\aws\ServiceEndpoint;
use com\example\InvocationResponse;
$endpoint= new ServiceEndpoint(...);
$invocation= $endpoint->resource('/functions/greet/invoations')
->transmit(['name' => getenv('USER')])
->result(InvocationResponse::class)
;
Marshalling request payloads
Before this pull request, the following would raise lang.IllegalArgumentException (Cannot represent instances of util.Date):
Unmarshalling response payloads
We can now add a result type to
value()
,result()
anderror()
to which we want the response payload unmarshalled: