{@inheritdoc}

CloneableInstantiable
ExtendsGoogle\ApiCore\LongRunning\Gapic\OperationsGapicClient
Constants
public Google\ApiCore\LongRunning\Gapic\OperationsGapicClient::CODEGEN_NAME = 'gapic'
 
The name of the code generator, to be included in the agent header.

public Google\ApiCore\LongRunning\Gapic\OperationsGapicClient::DEFAULT_SERVICE_PORT = 443
 
The default port of the service.

public Google\ApiCore\LongRunning\Gapic\OperationsGapicClient::SERVICE_NAME = 'google.longrunning.Operations'
 
The name of the service.

Methods
public Google\ApiCore\LongRunning\Gapic\OperationsGapicClient::__construct( $options = [])
 
Constructor.

  • experimental
public Google\ApiCore\LongRunning\Gapic\OperationsGapicClient::cancelOperation( $name, $optionalArgs = [])
 
Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use [Operations.GetOperation][google.longrunning.Operations.GetOperation] or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an [Operation.error][google.longrunning.Operation.error] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to `Code.CANCELLED`.

Sample code:

$options = [
    'apiEndpoint' => 'my-service-address',
    'scopes' => ['my-service-scope'],
];
$operationsClient = new OperationsClient($options);
try {
    $name = '';
    $operationsClient->cancelOperation($name);
} finally {
    if (isset($operationsClient)) {
        $operationsClient->close();
    }
}
  • throws ApiException if the remote call fails
  • experimental
public Google\ApiCore\LongRunning\Gapic\OperationsGapicClient::close()
 
Initiates an orderly shutdown in which preexisting calls continue but new calls are immediately cancelled.

  • experimental
public Google\ApiCore\LongRunning\Gapic\OperationsGapicClient::deleteOperation( $name, $optionalArgs = [])
 
Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.

Sample code:

$options = [
    'apiEndpoint' => 'my-service-address',
    'scopes' => ['my-service-scope'],
];
$operationsClient = new OperationsClient($options);
try {
    $name = '';
    $operationsClient->deleteOperation($name);
} finally {
    if (isset($operationsClient)) {
        $operationsClient->close();
    }
}
  • throws ApiException if the remote call fails
  • experimental
public Google\ApiCore\LongRunning\Gapic\OperationsGapicClient::getOperation( $name, $optionalArgs = [])
 
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 = [
    'apiEndpoint' => 'my-service-address',
    'scopes' => ['my-service-scope'],
];
$operationsClient = new OperationsClient($options);
try {
    $name = '';
    $response = $operationsClient->getOperation($name);
} finally {
    if (isset($operationsClient)) {
        $operationsClient->close();
    }
}
public Google\ApiCore\LongRunning\Gapic\OperationsGapicClient::listOperations( $name, $filter, $optionalArgs = [])
 
Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.

NOTE: the name binding below allows API services to override the binding
to use different resource name schemes, such as users/*/operations.

Sample code:

$options = [
    'apiEndpoint' => 'my-service-address',
    'scopes' => ['my-service-scope'],
];
$operationsClient = new OperationsClient($options);
try {
    $name = '';
    $filter = '';
    // Iterate through all elements
    $pagedResponse = $operationsClient->listOperations($name, $filter);
    foreach ($pagedResponse->iterateAllElements() as $element) {
        // doSomethingWith($element);
    }

    // OR iterate over pages of elements
    $pagedResponse = $operationsClient->listOperations($name, $filter);
    foreach ($pagedResponse->iteratePages() as $page) {
        foreach ($page as $element) {
            // doSomethingWith($element);
        }
    }
} finally {
    if (isset($operationsClient)) {
        $operationsClient->close();
    }
}
public static Google\ApiCore\LongRunning\Gapic\OperationsGapicClient::validate( $arr, $requiredKeys)
 


  • return array Returns $arr for fluent use
public static Google\ApiCore\LongRunning\Gapic\OperationsGapicClient::validateNotNull( $arr, $requiredKeys)
 


  • return array Returns $arr for fluent use
Methods
protected Google\ApiCore\LongRunning\Gapic\OperationsGapicClient::getCredentialsWrapper()
 
Get the credentials for the client. This method is protected to support use by customized clients.

  • access private
  • return CredentialsWrapper
protected Google\ApiCore\LongRunning\Gapic\OperationsGapicClient::getTransport()
 
Get the transport for the client. This method is protected to support use by customized clients.

  • access private
  • return TransportInterface
protected Google\ApiCore\LongRunning\Gapic\OperationsGapicClient::modifyClientOptions(array $options)
 
Modify options passed to the client before calling setClientOptions.

  • access private
protected Google\ApiCore\LongRunning\Gapic\OperationsGapicClient::modifyStreamingCallable(callable $callable)
 
Modify the streaming callable.

  • access private
protected Google\ApiCore\LongRunning\Gapic\OperationsGapicClient::modifyUnaryCallable(callable $callable)
 
Modify the unary callable.

  • access private
Methods
private Google\ApiCore\LongRunning\Gapic\OperationsGapicClient::arrayFilterRemoveNull(array $arr)
 
Just like array_filter(), but preserves falsey values except null.

  • return array
private Google\ApiCore\LongRunning\Gapic\OperationsGapicClient::buildClientOptions(array $options)
private Google\ApiCore\LongRunning\Gapic\OperationsGapicClient::buildMethod( $interfaceName, $methodName)
 


  • return string
private Google\ApiCore\LongRunning\Gapic\OperationsGapicClient::configureCallConstructionOptions( $methodName, array $optionalArgs)
 


  • return array
private Google\ApiCore\LongRunning\Gapic\OperationsGapicClient::createCallStack(array $callConstructionOptions)
 


  • return callable
private Google\ApiCore\LongRunning\Gapic\OperationsGapicClient::createCredentialsWrapper( $credentials, array $credentialsConfig)
 


  • return CredentialsWrapper
  • throws ValidationException
private Google\ApiCore\LongRunning\Gapic\OperationsGapicClient::createOperationsClient(array $options)
private Google\ApiCore\LongRunning\Gapic\OperationsGapicClient::createTransport( $apiEndpoint, $transport, array $transportConfig)
 


  • return TransportInterface
  • throws ValidationException
private static Google\ApiCore\LongRunning\Gapic\OperationsGapicClient::defaultTransport()
 


  • return string
private static Google\ApiCore\LongRunning\Gapic\OperationsGapicClient::getClientDefaults()
private static Google\ApiCore\LongRunning\Gapic\OperationsGapicClient::getGapicVersion(array $options)
private static Google\ApiCore\LongRunning\Gapic\OperationsGapicClient::getGrpcDependencyStatus()
 


  • return bool
private Google\ApiCore\LongRunning\Gapic\OperationsGapicClient::getPagedListResponse( $methodName, array $optionalArgs, $decodeType, Google\Protobuf\Internal\Message $request, $interfaceName = NULL)
 


  • return PagedListResponse
private static Google\ApiCore\LongRunning\Gapic\OperationsGapicClient::initGrpcGcpConfig( $hostName, $confPath)
private Google\ApiCore\LongRunning\Gapic\OperationsGapicClient::isAssoc(array $arr)
 
Determine whether given array is associative.

  • return bool
private Google\ApiCore\LongRunning\Gapic\OperationsGapicClient::pluck( $key, array $arr, $isRequired = true)
 
Pluck a value out of an array.

  • return mixed|null
  • throws InvalidArgumentException
private Google\ApiCore\LongRunning\Gapic\OperationsGapicClient::pluckArray(array $keys, $arr)
 
Pluck a subset of an array.

  • return array
private Google\ApiCore\LongRunning\Gapic\OperationsGapicClient::setClientOptions(array $options)
 
Configures the GAPIC client based on an array of options.

  • throws ValidationException
private Google\ApiCore\LongRunning\Gapic\OperationsGapicClient::startCall( $methodName, $decodeType, array $optionalArgs = [], ?Google\Protobuf\Internal\Message $request = NULL, $callType = 0, $interfaceName = NULL)
 


  • return PromiseInterface|\BidiStream|\ClientStream|\ServerStream
private Google\ApiCore\LongRunning\Gapic\OperationsGapicClient::startOperationsCall( $methodName, array $optionalArgs, Google\Protobuf\Internal\Message $request, Google\ApiCore\LongRunning\OperationsClient $client, $interfaceName = NULL)
 


  • return PromiseInterface
private Google\ApiCore\LongRunning\Gapic\OperationsGapicClient::subsetArray(array $keys, $arr)
 
Return a subset of an array, like pluckArray, without modifying the original array.

  • return array
private static Google\ApiCore\LongRunning\Gapic\OperationsGapicClient::validateFileExists( $filePath)
 


  • throws ValidationException
private static Google\ApiCore\LongRunning\Gapic\OperationsGapicClient::validateGrpcSupport()
 


  • throws ValidationException
private static Google\ApiCore\LongRunning\Gapic\OperationsGapicClient::validateImpl( $arr, $requiredKeys, $allowNull)
Methods
private static Google\ApiCore\LongRunning\Gapic\OperationsGapicClient::defaultTransport()
 


  • return string
private static Google\ApiCore\LongRunning\Gapic\OperationsGapicClient::getClientDefaults()
private static Google\ApiCore\LongRunning\Gapic\OperationsGapicClient::getGapicVersion(array $options)
private static Google\ApiCore\LongRunning\Gapic\OperationsGapicClient::getGrpcDependencyStatus()
 


  • return bool
private static Google\ApiCore\LongRunning\Gapic\OperationsGapicClient::initGrpcGcpConfig( $hostName, $confPath)
public static Google\ApiCore\LongRunning\Gapic\OperationsGapicClient::validate( $arr, $requiredKeys)
 


  • return array Returns $arr for fluent use
private static Google\ApiCore\LongRunning\Gapic\OperationsGapicClient::validateFileExists( $filePath)
 


  • throws ValidationException
private static Google\ApiCore\LongRunning\Gapic\OperationsGapicClient::validateGrpcSupport()
 


  • throws ValidationException
private static Google\ApiCore\LongRunning\Gapic\OperationsGapicClient::validateImpl( $arr, $requiredKeys, $allowNull)
public static Google\ApiCore\LongRunning\Gapic\OperationsGapicClient::validateNotNull( $arr, $requiredKeys)
 


  • return array Returns $arr for fluent use
© 2020 Bruce Wells
Search Namespaces \ Classes
ConfigurationNumbers (0-9.) only