# Class AsyncResponse

The AsyncResponse class encapsulates the data returned by a Cloud DNS asynchronous response.

  OpenCloud\Common\Base
  OpenCloud\Common\Resource\BaseResource
  OpenCloud\Common\Resource\PersistentResource
  OpenCloud\Common\PersistentObject
  OpenCloud\DNS\Resource\AsyncResponse

Namespace: OpenCloud\DNS\Resource
Located at OpenCloud/DNS/Resource/AsyncResponse.php

Methods summary
`public` | # `__construct( `OpenCloud\Common\Service\ServiceInterface` $service, string $object = null )` constructs a new AsyncResponse object from a JSON string constructs a new AsyncResponse object from a JSON string #### Parameters $service `OpenCloud\Service` $service the calling service $object `string` $json the json response from the initial request #### Overrides `OpenCloud\Common\Resource\BaseResource::__construct()`
`public string` | # `getUrl( null $path = null, array $query = array() )` URL for status URL for status We always show details #### Parameters $path `null` $path URI path to add on $query `array` $query Query to add on #### Returns `string` #### Overrides `OpenCloud\Common\Resource\BaseResource::getUrl()`
`public string` | # `name( )` returns the Name of the request (the job ID) returns the Name of the request (the job ID) #### Returns `string` #### Throws `NameError` #### Overrides `OpenCloud\Common\Resource\PersistentResource::name()`
`public Guzzle\Http\Message\Response` | # `create( array $params = array() )` overrides for methods overrides for methods #### Parameters $params `array` $params #### Returns `Guzzle\Http\Message\Response` #### Overrides `OpenCloud\Common\Resource\PersistentResource::create()`
`public Guzzle\Http\Message\Response` | # `update( array $params = array() )` Update a resource Update a resource #### Parameters $params `array` $params #### Returns `Guzzle\Http\Message\Response` #### Overrides `OpenCloud\Common\Resource\PersistentResource::update()`
`public Guzzle\Http\Message\Response` | # `delete( )` Delete this resource Delete this resource #### Returns `Guzzle\Http\Message\Response` #### Overrides `OpenCloud\Common\Resource\PersistentResource::delete()`
`public string` | # `primaryKeyField( )` Returns the primary key field for the object Returns the primary key field for the object #### Returns `string` #### Overrides `OpenCloud\Common\Resource\BaseResource::primaryKeyField()`
`public` | # `waitFor( null $state = null, null $timeout = null, null $callback = null, null $interval = null )` A method to repeatedly poll the API resource, waiting for an eventual state change A method to repeatedly poll the API resource, waiting for an eventual state change #### Parameters $state `null` $state The expected state of the resource $timeout `null` $timeout The maximum timeout to wait $callback `null` $callback The callback to use to check the state $interval `null` $interval How long between each refresh request #### Overrides `OpenCloud\Common\Resource\PersistentResource::waitFor()`

Methods inherited from OpenCloud\Common\Resource\PersistentResource
`checkExtension(), createJson(), getAlias(), noCreate(), noDelete(), noUpdate(), refresh(), refreshFromLocationUrl(), updateJson()`

Methods inherited from OpenCloud\Common\Resource\BaseResource
`findLink(), getClient(), getMetadata(), getParent(), getService(), jsonCollectionElement(), jsonCollectionName(), jsonName(), parseResponse(), resourceName(), setMetadata(), setParent(), setService()`

Methods inherited from OpenCloud\Common\Base
`__call(), checkJsonError(), generateUuid(), getInstance(), getJsonHeader(), getLogger(), getProperty(), makeResourceIteratorOptions(), populate(), propertyExists(), setLogger(), setProperty(), stripNamespace(), toCamel(), toUnderscores()`

Constants summary
`integer` | `DEFAULT_INTERVAL` | `2` | #

Properties summary
`public mixed` | $jobId | `` | #
`public mixed` | $callbackUrl | `` | #
`public mixed` | $status | `` | #
`public mixed` | $requestUrl | `` | #
`public mixed` | $verb | `` | #
`public mixed` | $request | `` | #
`public mixed` | $response | `` | #
`public mixed` | $error | `` | #
`public mixed` | $domains | `` | #
`protected static boolean` | $json_name | `false` | #

Properties inherited from OpenCloud\Common\Resource\BaseResource
`$metadata, $parent, $service`

Properties inherited from OpenCloud\Common\Base
`$aliases`