public function setType($type)
    {
        if ($this->type() === $type) {
            return $type;
        }

        // Catch any API Request Exceptions here
        // so we can replace exception message
        // with more informative one.

        try {
            $this->setMeta(['Type' => $type]);
        } catch (ApiRequestFailedException $e) {
            throw new ApiRequestFailedException('Unable to set container type to "'.$type.'".', $e->getCode());
        }

        return $this->data['type'] = $type;
    }