src/LongRunning/Gapic/OperationsGapicClient.php
public function getOperation($name, $optionalArgs = [])
    {
        $request = new GetOperationRequest();
        $request->setName($name);

        return $this->startCall(
            'GetOperation',
            Operation::class,
            $optionalArgs,
            $request
        )->wait();
    }
public function getOperation($name, $optionalArgs = [])
    {
        $request = new GetOperationRequest();
        $request->setName($name);

        return $this->startCall(
            'GetOperation',
            Operation::class,
            $optionalArgs,
            $request
        )->wait();
    }
public function getOperation ( $ name , $ optionalArgs = [ ] ) { $ request = new GetOperationRequest ( ) ; $ request -> setName ( $ name ) ; return $ this -> startCall ( 'GetOperation' , Operation :: class , $ optionalArgs , $ request ) -> wait ( ) ; }
Gets the latest state of a long-running operation.  Clients can use this
method to poll the operation result at intervals as recommended by the API
service.

Sample code:
```
$options = [
'serviceAddress' => 'my-service-address',
'scopes' => ['my-service-scope'],
];
$operationsClient = new OperationsClient($options);
try {
$name = '';
$response = $operationsClient->getOperation($name);
} finally {
if (isset($operationsClient)) {
$operationsClient->close();
}
}
```

@param string $name         The name of the operation resource.
@param array  $optionalArgs {
Optional.

@type RetrySettings|array $retrySettings
Retry settings to use for this call. Can be a
{@see Google\ApiCore\RetrySettings} object, or an associative array
of retry settings parameters. See the documentation on
{@see Google\ApiCore\RetrySettings} for example usage.
}

@return \Google\LongRunning\Operation

@throws ApiException if the remote call fails
@experimental
Gets the latest state of a long - running operation . Clients can use this method to poll the operation result at intervals as recommended by the API service .