public function __construct(array $config = [])
{
$emulatorHost = getenv('PUBSUB_EMULATOR_HOST');
$baseUri = $this->getEmulatorBaseUri(self::BASE_URI, $emulatorHost);
if ($emulatorHost) {
$config['shouldSignRequest'] = false;
}
$config += ['serviceDefinitionPath' => __DIR__ . '/ServiceDefinition/pubsub-v1.json'];
$this->setRequestWrapper(new RequestWrapper($config));
$this->setRequestBuilder(new RequestBuilder($config['serviceDefinitionPath'], $baseUri, ['resources', 'projects']));
}