Skip to content

Commit

Permalink
Add additional request name headers (#1751)
Browse files Browse the repository at this point in the history
  • Loading branch information
yoshi-automation authored and dwsupplee committed Mar 28, 2019
1 parent b68c159 commit e94f038
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 5 deletions.
15 changes: 15 additions & 0 deletions Asset/src/V1/Gapic/AssetServiceGapicClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
use Google\ApiCore\LongRunning\OperationsClient;
use Google\ApiCore\OperationResponse;
use Google\ApiCore\PathTemplate;
use Google\ApiCore\RequestParamsHeaderDescriptor;
use Google\ApiCore\RetrySettings;
use Google\ApiCore\Transport\TransportInterface;
use Google\ApiCore\ValidationException;
Expand Down Expand Up @@ -420,6 +421,13 @@ public function exportAssets($parent, $outputConfig, array $optionalArgs = [])
$request->setContentType($optionalArgs['contentType']);
}

$requestParams = new RequestParamsHeaderDescriptor([
'parent' => $request->getParent(),
]);
$optionalArgs['headers'] = isset($optionalArgs['headers'])
? array_merge($requestParams->getHeader(), $optionalArgs['headers'])
: $requestParams->getHeader();

return $this->startOperationsCall(
'ExportAssets',
$optionalArgs,
Expand Down Expand Up @@ -496,6 +504,13 @@ public function batchGetAssetsHistory($parent, $contentType, $readTimeWindow, ar
$request->setAssetNames($optionalArgs['assetNames']);
}

$requestParams = new RequestParamsHeaderDescriptor([
'parent' => $request->getParent(),
]);
$optionalArgs['headers'] = isset($optionalArgs['headers'])
? array_merge($requestParams->getHeader(), $optionalArgs['headers'])
: $requestParams->getHeader();

return $this->startCall(
'BatchGetAssetsHistory',
BatchGetAssetsHistoryResponse::class,
Expand Down
15 changes: 15 additions & 0 deletions Asset/src/V1beta1/Gapic/AssetServiceGapicClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
use Google\ApiCore\LongRunning\OperationsClient;
use Google\ApiCore\OperationResponse;
use Google\ApiCore\PathTemplate;
use Google\ApiCore\RequestParamsHeaderDescriptor;
use Google\ApiCore\RetrySettings;
use Google\ApiCore\Transport\TransportInterface;
use Google\ApiCore\ValidationException;
Expand Down Expand Up @@ -421,6 +422,13 @@ public function exportAssets($parent, $outputConfig, array $optionalArgs = [])
$request->setContentType($optionalArgs['contentType']);
}

$requestParams = new RequestParamsHeaderDescriptor([
'parent' => $request->getParent(),
]);
$optionalArgs['headers'] = isset($optionalArgs['headers'])
? array_merge($requestParams->getHeader(), $optionalArgs['headers'])
: $requestParams->getHeader();

return $this->startOperationsCall(
'ExportAssets',
$optionalArgs,
Expand Down Expand Up @@ -494,6 +502,13 @@ public function batchGetAssetsHistory($parent, $contentType, $readTimeWindow, ar
$request->setAssetNames($optionalArgs['assetNames']);
}

$requestParams = new RequestParamsHeaderDescriptor([
'parent' => $request->getParent(),
]);
$optionalArgs['headers'] = isset($optionalArgs['headers'])
? array_merge($requestParams->getHeader(), $optionalArgs['headers'])
: $requestParams->getHeader();

return $this->startCall(
'BatchGetAssetsHistory',
BatchGetAssetsHistoryResponse::class,
Expand Down
10 changes: 5 additions & 5 deletions Asset/synth.metadata
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
{
"updateTime": "2019-03-19T18:58:50.535446Z",
"updateTime": "2019-03-28T09:58:36.230681Z",
"sources": [
{
"generator": {
"name": "artman",
"version": "0.16.18",
"dockerImage": "googleapis/artman@sha256:e8ac9200640e76d54643f370db71a1556bf254f565ce46b45a467bbcbacbdb37"
"version": "0.16.20",
"dockerImage": "googleapis/artman@sha256:e3c054a2fb85a12481c722af616c7fb6f1d02d862248385eecbec3e4240ebd1e"
}
},
{
"git": {
"name": "googleapis",
"remote": "https://github.com/googleapis/googleapis.git",
"sha": "6e18ed1d4a28db4bd0f6f5fbc4cfda90b50432b2",
"internalRef": "239208730"
"sha": "6a84b3267b0a95e922608b9891219075047eee29",
"internalRef": "240640999"
}
}
],
Expand Down

0 comments on commit e94f038

Please sign in to comment.