Skip to content

Commit

Permalink
Add additional request name headers (#1754)
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 a85ee78 commit fecec7e
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 5 deletions.
8 changes: 8 additions & 0 deletions src/V2/Gapic/Controller2GapicClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
use Google\ApiCore\ApiException;
use Google\ApiCore\CredentialsWrapper;
use Google\ApiCore\GapicClientTrait;
use Google\ApiCore\RequestParamsHeaderDescriptor;
use Google\ApiCore\RetrySettings;
use Google\ApiCore\Transport\TransportInterface;
use Google\ApiCore\ValidationException;
Expand Down Expand Up @@ -307,6 +308,13 @@ public function listActiveBreakpoints($debuggeeId, array $optionalArgs = [])
$request->setSuccessOnTimeout($optionalArgs['successOnTimeout']);
}

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

return $this->startCall(
'ListActiveBreakpoints',
ListActiveBreakpointsResponse::class,
Expand Down
15 changes: 15 additions & 0 deletions src/V2/Gapic/Debugger2GapicClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
use Google\ApiCore\ApiException;
use Google\ApiCore\CredentialsWrapper;
use Google\ApiCore\GapicClientTrait;
use Google\ApiCore\RequestParamsHeaderDescriptor;
use Google\ApiCore\RetrySettings;
use Google\ApiCore\Transport\TransportInterface;
use Google\ApiCore\ValidationException;
Expand Down Expand Up @@ -229,6 +230,13 @@ public function setBreakpoint($debuggeeId, $breakpoint, $clientVersion, array $o
$request->setBreakpoint($breakpoint);
$request->setClientVersion($clientVersion);

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

return $this->startCall(
'SetBreakpoint',
SetBreakpointResponse::class,
Expand Down Expand Up @@ -406,6 +414,13 @@ public function listBreakpoints($debuggeeId, $clientVersion, array $optionalArgs
$request->setWaitToken($optionalArgs['waitToken']);
}

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

return $this->startCall(
'ListBreakpoints',
ListBreakpointsResponse::class,
Expand Down
10 changes: 5 additions & 5 deletions synth.metadata
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
{
"updateTime": "2018-12-18T11:00:03.624475Z",
"updateTime": "2019-03-28T09:59:59.062664Z",
"sources": [
{
"generator": {
"name": "artman",
"version": "0.16.3",
"dockerImage": "googleapis/artman@sha256:bfb92654b4a77368471f70e2808eaf4e60f263b9559f27bb3284097322787bf1"
"version": "0.16.20",
"dockerImage": "googleapis/artman@sha256:e3c054a2fb85a12481c722af616c7fb6f1d02d862248385eecbec3e4240ebd1e"
}
},
{
"git": {
"name": "googleapis",
"remote": "https://github.com/googleapis/googleapis.git",
"sha": "c04bc0dc0a9164d924a9ab923fd6845b4ae6a7ab",
"internalRef": "225851467"
"sha": "6a84b3267b0a95e922608b9891219075047eee29",
"internalRef": "240640999"
}
}
],
Expand Down

0 comments on commit fecec7e

Please sign in to comment.