Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add additional request name headers #1751

Merged
merged 1 commit into from
Mar 28, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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