# Google Cloud License Manager V1 Client - Class LicenseManagerClient (0.3.0)

0.3.0 (latest) 0.2.2 0.1.0 Reference documentation and code samples for the Google Cloud License Manager V1 Client class LicenseManagerClient.

Service Description: Service describing handlers for resources

This class provides the ability to make remote calls to the backing service through method
calls that map to API methods.

Many parameters require resource names to be formatted in a particular way. To
assist with these names, this class includes a format method for each type of
name, and additionally a parseName method to extract the individual identifiers
contained within formatted names that are returned by the API.

## Namespace

Google \\ Cloud \\ LicenseManager \\ V1 \\ Client

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `options` | `array|https://docs.cloud.google.com/php/docs/reference/gax/latest/Options.ClientOptions.html` Optional. Options for configuring the service API wrapper. |
| `↳ apiEndpoint` | `string` The address of the API remote host. May optionally include the port, formatted as " |
| `↳ credentials` | `https://docs.cloud.google.com/php/docs/reference/auth/latest/FetchAuthTokenInterface.html|https://docs.cloud.google.com/php/docs/reference/gax/latest/CredentialsWrapper.html` This option should only be used with a pre-constructed [Google\\Auth\\FetchAuthTokenInterface](https://docs.cloud.google.com/php/docs/reference/auth/latest/FetchAuthTokenInterface.html) or [Google\\ApiCore\\CredentialsWrapper](https://docs.cloud.google.com/php/docs/reference/gax/latest/CredentialsWrapper.html) object. Note that when one of these objects are provided, any settings in $credentialsConfig will be ignored. **Important** : If you are providing a path to a credentials file, or a decoded credentials file as a PHP array, this usage is now DEPRECATED. Providing an unvalidated credential configuration to Google APIs can compromise the security of your systems and data. It is recommended to create the credentials explicitly `use Google\Auth\Credentials\ServiceAccountCredentials; use Google\Cloud\LicenseManager\V1\LicenseManagerClient; $creds = new ServiceAccountCredentials($scopes, $json); $options = new LicenseManagerClient(['credentials' => $creds]);` <https://cloud.google.com/docs/authentication/external/externally-sourced-credentials> |
| `↳ credentialsConfig` | `array` Options used to configure credentials, including auth token caching, for the client. For a full list of supporting configuration options, see [Google\\ApiCore\\CredentialsWrapper::build()](https://docs.cloud.google.com/php/docs/reference/gax/latest/CredentialsWrapper.html#_Google_ApiCore_CredentialsWrapper__build__) . |
| `↳ disableRetries` | `bool` Determines whether or not retries defined by the client configuration should be disabled. Defaults to `false`. |
| `↳ clientConfig` | `string|array` Client method configuration, including retry settings. This option can be either a path to a JSON file, or a PHP array containing the decoded JSON data. By default this settings points to the default client config file, which is provided in the resources folder. |
| `↳ transport` | `string|https://docs.cloud.google.com/php/docs/reference/gax/latest/Transport.TransportInterface.html` The transport used for executing network requests. May be either the string `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. *Advanced usage* : Additionally, it is possible to pass in an already instantiated [Google\\ApiCore\\Transport\\TransportInterface](https://docs.cloud.google.com/php/docs/reference/gax/latest/Transport.TransportInterface.html) object. Note that when this object is provided, any settings in $transportConfig, and any $apiEndpoint setting, will be ignored. |
| `↳ transportConfig` | `array` Configuration options that will be used to construct the transport. Options for each supported transport type should be passed in a key for that transport. For example: $transportConfig = \[ 'grpc' =\> \[...\], 'rest' =\> \[...\], \]; See the [Google\\ApiCore\\Transport\\GrpcTransport::build()](https://docs.cloud.google.com/php/docs/reference/gax/latest/Transport.GrpcTransport.html#_Google_ApiCore_Transport_GrpcTransport__build__) and [Google\\ApiCore\\Transport\\RestTransport::build()](https://docs.cloud.google.com/php/docs/reference/gax/latest/Transport.RestTransport.html#_Google_ApiCore_Transport_RestTransport__build__) methods for the supported options. |
| `↳ clientCertSource` | `callable` A callable which returns the client cert as a string. This can be used to provide a certificate and private key to the transport layer for mTLS. |
| `↳ logger` | `false|Psr\Log\LoggerInterface` A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the 'GOOGLE_SDK_PHP_LOGGING' environment flag |
| `↳ universeDomain` | `string` The service domain for the client. Defaults to 'googleapis.com'. |

### aggregateUsage

Aggregates Usage per Instance for a Configuration.

The async variant is [LicenseManagerClient::aggregateUsageAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-licensemanager/latest/V1.Client.LicenseManagerClient#_Google_Cloud_LicenseManager_V1_Client_LicenseManagerClient__aggregateUsageAsync__) .

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-licensemanager/latest/V1.AggregateUsageRequest` A request to house fields associated with the call. |
| `callOptions` | `array` Optional. |
| `↳ retrySettings` | `https://docs.cloud.google.com/php/docs/reference/gax/latest/RetrySettings.html|array` Retry settings to use for this call. Can be a [Google\\ApiCore\\RetrySettings](https://docs.cloud.google.com/php/docs/reference/gax/latest/RetrySettings.html) object, or an associative array of retry settings parameters. See the documentation on [Google\\ApiCore\\RetrySettings](https://docs.cloud.google.com/php/docs/reference/gax/latest/RetrySettings.html) for example usage. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/gax/latest/PagedListResponse.html` |   |

**Example**

    use Google\ApiCore\ApiException;
    use Google\ApiCore\PagedListResponse;
    use Google\Cloud\LicenseManager\V1\AggregateUsageRequest;
    use Google\Cloud\LicenseManager\V1\Client\LicenseManagerClient;
    use Google\Cloud\LicenseManager\V1\Usage;
    use Google\Protobuf\Timestamp;

    /**
     * @param string $formattedName Parent value for AggregateUsageRequest
     *                              Please see {@see LicenseManagerClient::configurationName()} for help formatting this field.
     */
    function aggregate_usage_sample(string $formattedName): void
    {
        // Create a client.
        $licenseManagerClient = new LicenseManagerClient();

        // Prepare the request message.
        $startTime = new Timestamp();
        $endTime = new Timestamp();
        $request = (new AggregateUsageRequest())
            ->setName($formattedName)
            ->setStartTime($startTime)
            ->setEndTime($endTime);

        // Call the API and handle any network failures.
        try {
            /** @var PagedListResponse $response */
            $response = $licenseManagerClient->aggregateUsage($request);

            /** @var Usage $element */
            foreach ($response as $element) {
                printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString());
            }
        } catch (ApiException $ex) {
            printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
        }
    }

    /**
     * Helper to execute the sample.
     *
     * This sample has been automatically generated and should be regarded as a code
     * template only. It will require modifications to work:
     *  - It may require correct/in-range values for request initialization.
     *  - It may require specifying regional endpoints when creating the service client,
     *    please see the apiEndpoint client configuration option for more details.
     */
    function callSample(): void
    {
        $formattedName = LicenseManagerClient::configurationName(
            '[PROJECT]',
            '[LOCATION]',
            '[CONFIGURATION]'
        );

        aggregate_usage_sample($formattedName);
    }

### createConfiguration

Creates a new Configuration in a given project and location.

The async variant is [LicenseManagerClient::createConfigurationAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-licensemanager/latest/V1.Client.LicenseManagerClient#_Google_Cloud_LicenseManager_V1_Client_LicenseManagerClient__createConfigurationAsync__) .

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-licensemanager/latest/V1.CreateConfigurationRequest` A request to house fields associated with the call. |
| `callOptions` | `array` Optional. |
| `↳ retrySettings` | `https://docs.cloud.google.com/php/docs/reference/gax/latest/RetrySettings.html|array` Retry settings to use for this call. Can be a [Google\\ApiCore\\RetrySettings](https://docs.cloud.google.com/php/docs/reference/gax/latest/RetrySettings.html) object, or an associative array of retry settings parameters. See the documentation on [Google\\ApiCore\\RetrySettings](https://docs.cloud.google.com/php/docs/reference/gax/latest/RetrySettings.html) for example usage. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/gax/latest/OperationResponse.html<https://docs.cloud.google.com/php/docs/reference/cloud-licensemanager/latest/V1.Configuration>` |   |

**Example**

    use Google\ApiCore\ApiException;
    use Google\ApiCore\OperationResponse;
    use Google\Cloud\LicenseManager\V1\BillingInfo;
    use Google\Cloud\LicenseManager\V1\Client\LicenseManagerClient;
    use Google\Cloud\LicenseManager\V1\Configuration;
    use Google\Cloud\LicenseManager\V1\CreateConfigurationRequest;
    use Google\Cloud\LicenseManager\V1\LicenseType;
    use Google\Cloud\LicenseManager\V1\UserCountBillingInfo;
    use Google\Rpc\Status;

    /**
     * @param string $formattedParent                                          Value for parent. Please see
     *                                                                         {@see LicenseManagerClient::locationName()} for help formatting this field.
     * @param string $configurationId                                          Id of the requesting object
     * @param string $configurationDisplayName                                 User given name.
     * @param string $formattedConfigurationProduct                            Name field (with URL) of the Product offered for SPLA. Please see
     *                                                                         {@see LicenseManagerClient::productName()} for help formatting this field.
     * @param int    $configurationLicenseType                                 LicenseType to be applied for billing
     * @param int    $configurationCurrentBillingInfoUserCountBillingUserCount Number of users to bill for.
     * @param int    $configurationNextBillingInfoUserCountBillingUserCount    Number of users to bill for.
     */
    function create_configuration_sample(
        string $formattedParent,
        string $configurationId,
        string $configurationDisplayName,
        string $formattedConfigurationProduct,
        int $configurationLicenseType,
        int $configurationCurrentBillingInfoUserCountBillingUserCount,
        int $configurationNextBillingInfoUserCountBillingUserCount
    ): void {
        // Create a client.
        $licenseManagerClient = new LicenseManagerClient();

        // Prepare the request message.
        $configurationCurrentBillingInfoUserCountBilling = (new UserCountBillingInfo())
            ->setUserCount($configurationCurrentBillingInfoUserCountBillingUserCount);
        $configurationCurrentBillingInfo = (new BillingInfo())
            ->setUserCountBilling($configurationCurrentBillingInfoUserCountBilling);
        $configurationNextBillingInfoUserCountBilling = (new UserCountBillingInfo())
            ->setUserCount($configurationNextBillingInfoUserCountBillingUserCount);
        $configurationNextBillingInfo = (new BillingInfo())
            ->setUserCountBilling($configurationNextBillingInfoUserCountBilling);
        $configuration = (new Configuration())
            ->setDisplayName($configurationDisplayName)
            ->setProduct($formattedConfigurationProduct)
            ->setLicenseType($configurationLicenseType)
            ->setCurrentBillingInfo($configurationCurrentBillingInfo)
            ->setNextBillingInfo($configurationNextBillingInfo);
        $request = (new CreateConfigurationRequest())
            ->setParent($formattedParent)
            ->setConfigurationId($configurationId)
            ->setConfiguration($configuration);

        // Call the API and handle any network failures.
        try {
            /** @var OperationResponse $response */
            $response = $licenseManagerClient->createConfiguration($request);
            $response->pollUntilComplete();

            if ($response->operationSucceeded()) {
                /** @var Configuration $result */
                $result = $response->getResult();
                printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString());
            } else {
                /** @var Status $error */
                $error = $response->getError();
                printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString());
            }
        } catch (ApiException $ex) {
            printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
        }
    }

    /**
     * Helper to execute the sample.
     *
     * This sample has been automatically generated and should be regarded as a code
     * template only. It will require modifications to work:
     *  - It may require correct/in-range values for request initialization.
     *  - It may require specifying regional endpoints when creating the service client,
     *    please see the apiEndpoint client configuration option for more details.
     */
    function callSample(): void
    {
        $formattedParent = LicenseManagerClient::locationName('[PROJECT]', '[LOCATION]');
        $configurationId = '[CONFIGURATION_ID]';
        $configurationDisplayName = '[DISPLAY_NAME]';
        $formattedConfigurationProduct = LicenseManagerClient::productName(
            '[PROJECT]',
            '[LOCATION]',
            '[PRODUCT]'
        );
        $configurationLicenseType = LicenseType::LICENSE_TYPE_UNSPECIFIED;
        $configurationCurrentBillingInfoUserCountBillingUserCount = 0;
        $configurationNextBillingInfoUserCountBillingUserCount = 0;

        create_configuration_sample(
            $formattedParent,
            $configurationId,
            $configurationDisplayName,
            $formattedConfigurationProduct,
            $configurationLicenseType,
            $configurationCurrentBillingInfoUserCountBillingUserCount,
            $configurationNextBillingInfoUserCountBillingUserCount
        );
    }

### deactivateConfiguration

Deactivates the given configuration.

The async variant is [LicenseManagerClient::deactivateConfigurationAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-licensemanager/latest/V1.Client.LicenseManagerClient#_Google_Cloud_LicenseManager_V1_Client_LicenseManagerClient__deactivateConfigurationAsync__)
.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-licensemanager/latest/V1.DeactivateConfigurationRequest` A request to house fields associated with the call. |
| `callOptions` | `array` Optional. |
| `↳ retrySettings` | `https://docs.cloud.google.com/php/docs/reference/gax/latest/RetrySettings.html|array` Retry settings to use for this call. Can be a [Google\\ApiCore\\RetrySettings](https://docs.cloud.google.com/php/docs/reference/gax/latest/RetrySettings.html) object, or an associative array of retry settings parameters. See the documentation on [Google\\ApiCore\\RetrySettings](https://docs.cloud.google.com/php/docs/reference/gax/latest/RetrySettings.html) for example usage. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/gax/latest/OperationResponse.html<https://docs.cloud.google.com/php/docs/reference/cloud-licensemanager/latest/V1.Configuration>` |   |

**Example**

    use Google\ApiCore\ApiException;
    use Google\ApiCore\OperationResponse;
    use Google\Cloud\LicenseManager\V1\Client\LicenseManagerClient;
    use Google\Cloud\LicenseManager\V1\Configuration;
    use Google\Cloud\LicenseManager\V1\DeactivateConfigurationRequest;
    use Google\Rpc\Status;

    /**
     * @param string $formattedName Name of the resource. Please see
     *                              {@see LicenseManagerClient::configurationName()} for help formatting this field.
     */
    function deactivate_configuration_sample(string $formattedName): void
    {
        // Create a client.
        $licenseManagerClient = new LicenseManagerClient();

        // Prepare the request message.
        $request = (new DeactivateConfigurationRequest())
            ->setName($formattedName);

        // Call the API and handle any network failures.
        try {
            /** @var OperationResponse $response */
            $response = $licenseManagerClient->deactivateConfiguration($request);
            $response->pollUntilComplete();

            if ($response->operationSucceeded()) {
                /** @var Configuration $result */
                $result = $response->getResult();
                printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString());
            } else {
                /** @var Status $error */
                $error = $response->getError();
                printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString());
            }
        } catch (ApiException $ex) {
            printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
        }
    }

    /**
     * Helper to execute the sample.
     *
     * This sample has been automatically generated and should be regarded as a code
     * template only. It will require modifications to work:
     *  - It may require correct/in-range values for request initialization.
     *  - It may require specifying regional endpoints when creating the service client,
     *    please see the apiEndpoint client configuration option for more details.
     */
    function callSample(): void
    {
        $formattedName = LicenseManagerClient::configurationName(
            '[PROJECT]',
            '[LOCATION]',
            '[CONFIGURATION]'
        );

        deactivate_configuration_sample($formattedName);
    }

### deleteConfiguration

Deletes a single Configuration.

The async variant is [LicenseManagerClient::deleteConfigurationAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-licensemanager/latest/V1.Client.LicenseManagerClient#_Google_Cloud_LicenseManager_V1_Client_LicenseManagerClient__deleteConfigurationAsync__) .

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-licensemanager/latest/V1.DeleteConfigurationRequest` A request to house fields associated with the call. |
| `callOptions` | `array` Optional. |
| `↳ retrySettings` | `https://docs.cloud.google.com/php/docs/reference/gax/latest/RetrySettings.html|array` Retry settings to use for this call. Can be a [Google\\ApiCore\\RetrySettings](https://docs.cloud.google.com/php/docs/reference/gax/latest/RetrySettings.html) object, or an associative array of retry settings parameters. See the documentation on [Google\\ApiCore\\RetrySettings](https://docs.cloud.google.com/php/docs/reference/gax/latest/RetrySettings.html) for example usage. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/gax/latest/OperationResponse.html<null>` |   |

**Example**

    use Google\ApiCore\ApiException;
    use Google\ApiCore\OperationResponse;
    use Google\Cloud\LicenseManager\V1\Client\LicenseManagerClient;
    use Google\Cloud\LicenseManager\V1\DeleteConfigurationRequest;
    use Google\Rpc\Status;

    /**
     * @param string $formattedName Name of the resource
     *                              Please see {@see LicenseManagerClient::configurationName()} for help formatting this field.
     */
    function delete_configuration_sample(string $formattedName): void
    {
        // Create a client.
        $licenseManagerClient = new LicenseManagerClient();

        // Prepare the request message.
        $request = (new DeleteConfigurationRequest())
            ->setName($formattedName);

        // Call the API and handle any network failures.
        try {
            /** @var OperationResponse $response */
            $response = $licenseManagerClient->deleteConfiguration($request);
            $response->pollUntilComplete();

            if ($response->operationSucceeded()) {
                printf('Operation completed successfully.' . PHP_EOL);
            } else {
                /** @var Status $error */
                $error = $response->getError();
                printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString());
            }
        } catch (ApiException $ex) {
            printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
        }
    }

    /**
     * Helper to execute the sample.
     *
     * This sample has been automatically generated and should be regarded as a code
     * template only. It will require modifications to work:
     *  - It may require correct/in-range values for request initialization.
     *  - It may require specifying regional endpoints when creating the service client,
     *    please see the apiEndpoint client configuration option for more details.
     */
    function callSample(): void
    {
        $formattedName = LicenseManagerClient::configurationName(
            '[PROJECT]',
            '[LOCATION]',
            '[CONFIGURATION]'
        );

        delete_configuration_sample($formattedName);
    }

### getConfiguration

Gets details of a single Configuration.

The async variant is [LicenseManagerClient::getConfigurationAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-licensemanager/latest/V1.Client.LicenseManagerClient#_Google_Cloud_LicenseManager_V1_Client_LicenseManagerClient__getConfigurationAsync__) .

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-licensemanager/latest/V1.GetConfigurationRequest` A request to house fields associated with the call. |
| `callOptions` | `array` Optional. |
| `↳ retrySettings` | `https://docs.cloud.google.com/php/docs/reference/gax/latest/RetrySettings.html|array` Retry settings to use for this call. Can be a [Google\\ApiCore\\RetrySettings](https://docs.cloud.google.com/php/docs/reference/gax/latest/RetrySettings.html) object, or an associative array of retry settings parameters. See the documentation on [Google\\ApiCore\\RetrySettings](https://docs.cloud.google.com/php/docs/reference/gax/latest/RetrySettings.html) for example usage. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-licensemanager/latest/V1.Configuration` |   |

**Example**

    use Google\ApiCore\ApiException;
    use Google\Cloud\LicenseManager\V1\Client\LicenseManagerClient;
    use Google\Cloud\LicenseManager\V1\Configuration;
    use Google\Cloud\LicenseManager\V1\GetConfigurationRequest;

    /**
     * @param string $formattedName Name of the resource
     *                              Please see {@see LicenseManagerClient::configurationName()} for help formatting this field.
     */
    function get_configuration_sample(string $formattedName): void
    {
        // Create a client.
        $licenseManagerClient = new LicenseManagerClient();

        // Prepare the request message.
        $request = (new GetConfigurationRequest())
            ->setName($formattedName);

        // Call the API and handle any network failures.
        try {
            /** @var Configuration $response */
            $response = $licenseManagerClient->getConfiguration($request);
            printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString());
        } catch (ApiException $ex) {
            printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
        }
    }

    /**
     * Helper to execute the sample.
     *
     * This sample has been automatically generated and should be regarded as a code
     * template only. It will require modifications to work:
     *  - It may require correct/in-range values for request initialization.
     *  - It may require specifying regional endpoints when creating the service client,
     *    please see the apiEndpoint client configuration option for more details.
     */
    function callSample(): void
    {
        $formattedName = LicenseManagerClient::configurationName(
            '[PROJECT]',
            '[LOCATION]',
            '[CONFIGURATION]'
        );

        get_configuration_sample($formattedName);
    }

### getInstance

Gets details of a single Instance.

The async variant is [LicenseManagerClient::getInstanceAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-licensemanager/latest/V1.Client.LicenseManagerClient#_Google_Cloud_LicenseManager_V1_Client_LicenseManagerClient__getInstanceAsync__) .

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-licensemanager/latest/V1.GetInstanceRequest` A request to house fields associated with the call. |
| `callOptions` | `array` Optional. |
| `↳ retrySettings` | `https://docs.cloud.google.com/php/docs/reference/gax/latest/RetrySettings.html|array` Retry settings to use for this call. Can be a [Google\\ApiCore\\RetrySettings](https://docs.cloud.google.com/php/docs/reference/gax/latest/RetrySettings.html) object, or an associative array of retry settings parameters. See the documentation on [Google\\ApiCore\\RetrySettings](https://docs.cloud.google.com/php/docs/reference/gax/latest/RetrySettings.html) for example usage. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-licensemanager/latest/V1.Instance` |   |

**Example**

    use Google\ApiCore\ApiException;
    use Google\Cloud\LicenseManager\V1\Client\LicenseManagerClient;
    use Google\Cloud\LicenseManager\V1\GetInstanceRequest;
    use Google\Cloud\LicenseManager\V1\Instance;

    /**
     * @param string $formattedName Name of the resource
     *                              Please see {@see LicenseManagerClient::instanceName()} for help formatting this field.
     */
    function get_instance_sample(string $formattedName): void
    {
        // Create a client.
        $licenseManagerClient = new LicenseManagerClient();

        // Prepare the request message.
        $request = (new GetInstanceRequest())
            ->setName($formattedName);

        // Call the API and handle any network failures.
        try {
            /** @var Instance $response */
            $response = $licenseManagerClient->getInstance($request);
            printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString());
        } catch (ApiException $ex) {
            printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
        }
    }

    /**
     * Helper to execute the sample.
     *
     * This sample has been automatically generated and should be regarded as a code
     * template only. It will require modifications to work:
     *  - It may require correct/in-range values for request initialization.
     *  - It may require specifying regional endpoints when creating the service client,
     *    please see the apiEndpoint client configuration option for more details.
     */
    function callSample(): void
    {
        $formattedName = LicenseManagerClient::instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]');

        get_instance_sample($formattedName);
    }

### getProduct

Gets details of a single Product.

The async variant is [LicenseManagerClient::getProductAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-licensemanager/latest/V1.Client.LicenseManagerClient#_Google_Cloud_LicenseManager_V1_Client_LicenseManagerClient__getProductAsync__) .

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-licensemanager/latest/V1.GetProductRequest` A request to house fields associated with the call. |
| `callOptions` | `array` Optional. |
| `↳ retrySettings` | `https://docs.cloud.google.com/php/docs/reference/gax/latest/RetrySettings.html|array` Retry settings to use for this call. Can be a [Google\\ApiCore\\RetrySettings](https://docs.cloud.google.com/php/docs/reference/gax/latest/RetrySettings.html) object, or an associative array of retry settings parameters. See the documentation on [Google\\ApiCore\\RetrySettings](https://docs.cloud.google.com/php/docs/reference/gax/latest/RetrySettings.html) for example usage. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-licensemanager/latest/V1.Product` |   |

**Example**

    use Google\ApiCore\ApiException;
    use Google\Cloud\LicenseManager\V1\Client\LicenseManagerClient;
    use Google\Cloud\LicenseManager\V1\GetProductRequest;
    use Google\Cloud\LicenseManager\V1\Product;

    /**
     * @param string $formattedName Name of the resource
     *                              Please see {@see LicenseManagerClient::productName()} for help formatting this field.
     */
    function get_product_sample(string $formattedName): void
    {
        // Create a client.
        $licenseManagerClient = new LicenseManagerClient();

        // Prepare the request message.
        $request = (new GetProductRequest())
            ->setName($formattedName);

        // Call the API and handle any network failures.
        try {
            /** @var Product $response */
            $response = $licenseManagerClient->getProduct($request);
            printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString());
        } catch (ApiException $ex) {
            printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
        }
    }

    /**
     * Helper to execute the sample.
     *
     * This sample has been automatically generated and should be regarded as a code
     * template only. It will require modifications to work:
     *  - It may require correct/in-range values for request initialization.
     *  - It may require specifying regional endpoints when creating the service client,
     *    please see the apiEndpoint client configuration option for more details.
     */
    function callSample(): void
    {
        $formattedName = LicenseManagerClient::productName('[PROJECT]', '[LOCATION]', '[PRODUCT]');

        get_product_sample($formattedName);
    }

### listConfigurations

Lists Configurations in a given project and location.

The async variant is [LicenseManagerClient::listConfigurationsAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-licensemanager/latest/V1.Client.LicenseManagerClient#_Google_Cloud_LicenseManager_V1_Client_LicenseManagerClient__listConfigurationsAsync__) .

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-licensemanager/latest/V1.ListConfigurationsRequest` A request to house fields associated with the call. |
| `callOptions` | `array` Optional. |
| `↳ retrySettings` | `https://docs.cloud.google.com/php/docs/reference/gax/latest/RetrySettings.html|array` Retry settings to use for this call. Can be a [Google\\ApiCore\\RetrySettings](https://docs.cloud.google.com/php/docs/reference/gax/latest/RetrySettings.html) object, or an associative array of retry settings parameters. See the documentation on [Google\\ApiCore\\RetrySettings](https://docs.cloud.google.com/php/docs/reference/gax/latest/RetrySettings.html) for example usage. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/gax/latest/PagedListResponse.html` |   |

**Example**

    use Google\ApiCore\ApiException;
    use Google\ApiCore\PagedListResponse;
    use Google\Cloud\LicenseManager\V1\Client\LicenseManagerClient;
    use Google\Cloud\LicenseManager\V1\Configuration;
    use Google\Cloud\LicenseManager\V1\ListConfigurationsRequest;

    /**
     * @param string $formattedParent Parent value for ListConfigurationsRequest
     *                                Please see {@see LicenseManagerClient::locationName()} for help formatting this field.
     */
    function list_configurations_sample(string $formattedParent): void
    {
        // Create a client.
        $licenseManagerClient = new LicenseManagerClient();

        // Prepare the request message.
        $request = (new ListConfigurationsRequest())
            ->setParent($formattedParent);

        // Call the API and handle any network failures.
        try {
            /** @var PagedListResponse $response */
            $response = $licenseManagerClient->listConfigurations($request);

            /** @var Configuration $element */
            foreach ($response as $element) {
                printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString());
            }
        } catch (ApiException $ex) {
            printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
        }
    }

    /**
     * Helper to execute the sample.
     *
     * This sample has been automatically generated and should be regarded as a code
     * template only. It will require modifications to work:
     *  - It may require correct/in-range values for request initialization.
     *  - It may require specifying regional endpoints when creating the service client,
     *    please see the apiEndpoint client configuration option for more details.
     */
    function callSample(): void
    {
        $formattedParent = LicenseManagerClient::locationName('[PROJECT]', '[LOCATION]');

        list_configurations_sample($formattedParent);
    }

### listInstances

Lists Instances in a given project and location.

The async variant is [LicenseManagerClient::listInstancesAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-licensemanager/latest/V1.Client.LicenseManagerClient#_Google_Cloud_LicenseManager_V1_Client_LicenseManagerClient__listInstancesAsync__) .

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-licensemanager/latest/V1.ListInstancesRequest` A request to house fields associated with the call. |
| `callOptions` | `array` Optional. |
| `↳ retrySettings` | `https://docs.cloud.google.com/php/docs/reference/gax/latest/RetrySettings.html|array` Retry settings to use for this call. Can be a [Google\\ApiCore\\RetrySettings](https://docs.cloud.google.com/php/docs/reference/gax/latest/RetrySettings.html) object, or an associative array of retry settings parameters. See the documentation on [Google\\ApiCore\\RetrySettings](https://docs.cloud.google.com/php/docs/reference/gax/latest/RetrySettings.html) for example usage. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/gax/latest/PagedListResponse.html` |   |

**Example**

    use Google\ApiCore\ApiException;
    use Google\ApiCore\PagedListResponse;
    use Google\Cloud\LicenseManager\V1\Client\LicenseManagerClient;
    use Google\Cloud\LicenseManager\V1\Instance;
    use Google\Cloud\LicenseManager\V1\ListInstancesRequest;

    /**
     * @param string $formattedParent Parent value for ListInstancesRequest
     *                                Please see {@see LicenseManagerClient::locationName()} for help formatting this field.
     */
    function list_instances_sample(string $formattedParent): void
    {
        // Create a client.
        $licenseManagerClient = new LicenseManagerClient();

        // Prepare the request message.
        $request = (new ListInstancesRequest())
            ->setParent($formattedParent);

        // Call the API and handle any network failures.
        try {
            /** @var PagedListResponse $response */
            $response = $licenseManagerClient->listInstances($request);

            /** @var Instance $element */
            foreach ($response as $element) {
                printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString());
            }
        } catch (ApiException $ex) {
            printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
        }
    }

    /**
     * Helper to execute the sample.
     *
     * This sample has been automatically generated and should be regarded as a code
     * template only. It will require modifications to work:
     *  - It may require correct/in-range values for request initialization.
     *  - It may require specifying regional endpoints when creating the service client,
     *    please see the apiEndpoint client configuration option for more details.
     */
    function callSample(): void
    {
        $formattedParent = LicenseManagerClient::locationName('[PROJECT]', '[LOCATION]');

        list_instances_sample($formattedParent);
    }

### listProducts

Lists Products in a given project and location.

The async variant is [LicenseManagerClient::listProductsAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-licensemanager/latest/V1.Client.LicenseManagerClient#_Google_Cloud_LicenseManager_V1_Client_LicenseManagerClient__listProductsAsync__) .

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-licensemanager/latest/V1.ListProductsRequest` A request to house fields associated with the call. |
| `callOptions` | `array` Optional. |
| `↳ retrySettings` | `https://docs.cloud.google.com/php/docs/reference/gax/latest/RetrySettings.html|array` Retry settings to use for this call. Can be a [Google\\ApiCore\\RetrySettings](https://docs.cloud.google.com/php/docs/reference/gax/latest/RetrySettings.html) object, or an associative array of retry settings parameters. See the documentation on [Google\\ApiCore\\RetrySettings](https://docs.cloud.google.com/php/docs/reference/gax/latest/RetrySettings.html) for example usage. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/gax/latest/PagedListResponse.html` |   |

**Example**

    use Google\ApiCore\ApiException;
    use Google\ApiCore\PagedListResponse;
    use Google\Cloud\LicenseManager\V1\Client\LicenseManagerClient;
    use Google\Cloud\LicenseManager\V1\ListProductsRequest;
    use Google\Cloud\LicenseManager\V1\Product;

    /**
     * @param string $formattedParent Parent value for ListProductsRequest
     *                                Please see {@see LicenseManagerClient::locationName()} for help formatting this field.
     */
    function list_products_sample(string $formattedParent): void
    {
        // Create a client.
        $licenseManagerClient = new LicenseManagerClient();

        // Prepare the request message.
        $request = (new ListProductsRequest())
            ->setParent($formattedParent);

        // Call the API and handle any network failures.
        try {
            /** @var PagedListResponse $response */
            $response = $licenseManagerClient->listProducts($request);

            /** @var Product $element */
            foreach ($response as $element) {
                printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString());
            }
        } catch (ApiException $ex) {
            printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
        }
    }

    /**
     * Helper to execute the sample.
     *
     * This sample has been automatically generated and should be regarded as a code
     * template only. It will require modifications to work:
     *  - It may require correct/in-range values for request initialization.
     *  - It may require specifying regional endpoints when creating the service client,
     *    please see the apiEndpoint client configuration option for more details.
     */
    function callSample(): void
    {
        $formattedParent = LicenseManagerClient::locationName('[PROJECT]', '[LOCATION]');

        list_products_sample($formattedParent);
    }

### queryConfigurationLicenseUsage

License Usage information for a Configuration.

The async variant is
[LicenseManagerClient::queryConfigurationLicenseUsageAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-licensemanager/latest/V1.Client.LicenseManagerClient#_Google_Cloud_LicenseManager_V1_Client_LicenseManagerClient__queryConfigurationLicenseUsageAsync__) .

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-licensemanager/latest/V1.QueryConfigurationLicenseUsageRequest` A request to house fields associated with the call. |
| `callOptions` | `array` Optional. |
| `↳ retrySettings` | `https://docs.cloud.google.com/php/docs/reference/gax/latest/RetrySettings.html|array` Retry settings to use for this call. Can be a [Google\\ApiCore\\RetrySettings](https://docs.cloud.google.com/php/docs/reference/gax/latest/RetrySettings.html) object, or an associative array of retry settings parameters. See the documentation on [Google\\ApiCore\\RetrySettings](https://docs.cloud.google.com/php/docs/reference/gax/latest/RetrySettings.html) for example usage. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-licensemanager/latest/V1.QueryConfigurationLicenseUsageResponse` |   |

**Example**

    use Google\ApiCore\ApiException;
    use Google\Cloud\LicenseManager\V1\Client\LicenseManagerClient;
    use Google\Cloud\LicenseManager\V1\QueryConfigurationLicenseUsageRequest;
    use Google\Cloud\LicenseManager\V1\QueryConfigurationLicenseUsageResponse;
    use Google\Protobuf\Timestamp;

    /**
     * @param string $formattedName The resource path of the Configuration. Please see
     *                              {@see LicenseManagerClient::configurationName()} for help formatting this field.
     */
    function query_configuration_license_usage_sample(string $formattedName): void
    {
        // Create a client.
        $licenseManagerClient = new LicenseManagerClient();

        // Prepare the request message.
        $startTime = new Timestamp();
        $endTime = new Timestamp();
        $request = (new QueryConfigurationLicenseUsageRequest())
            ->setName($formattedName)
            ->setStartTime($startTime)
            ->setEndTime($endTime);

        // Call the API and handle any network failures.
        try {
            /** @var QueryConfigurationLicenseUsageResponse $response */
            $response = $licenseManagerClient->queryConfigurationLicenseUsage($request);
            printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString());
        } catch (ApiException $ex) {
            printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
        }
    }

    /**
     * Helper to execute the sample.
     *
     * This sample has been automatically generated and should be regarded as a code
     * template only. It will require modifications to work:
     *  - It may require correct/in-range values for request initialization.
     *  - It may require specifying regional endpoints when creating the service client,
     *    please see the apiEndpoint client configuration option for more details.
     */
    function callSample(): void
    {
        $formattedName = LicenseManagerClient::configurationName(
            '[PROJECT]',
            '[LOCATION]',
            '[CONFIGURATION]'
        );

        query_configuration_license_usage_sample($formattedName);
    }

### reactivateConfiguration

Reactivates the given configuration.

The async variant is [LicenseManagerClient::reactivateConfigurationAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-licensemanager/latest/V1.Client.LicenseManagerClient#_Google_Cloud_LicenseManager_V1_Client_LicenseManagerClient__reactivateConfigurationAsync__)
.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-licensemanager/latest/V1.ReactivateConfigurationRequest` A request to house fields associated with the call. |
| `callOptions` | `array` Optional. |
| `↳ retrySettings` | `https://docs.cloud.google.com/php/docs/reference/gax/latest/RetrySettings.html|array` Retry settings to use for this call. Can be a [Google\\ApiCore\\RetrySettings](https://docs.cloud.google.com/php/docs/reference/gax/latest/RetrySettings.html) object, or an associative array of retry settings parameters. See the documentation on [Google\\ApiCore\\RetrySettings](https://docs.cloud.google.com/php/docs/reference/gax/latest/RetrySettings.html) for example usage. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/gax/latest/OperationResponse.html<https://docs.cloud.google.com/php/docs/reference/cloud-licensemanager/latest/V1.Configuration>` |   |

**Example**

    use Google\ApiCore\ApiException;
    use Google\ApiCore\OperationResponse;
    use Google\Cloud\LicenseManager\V1\Client\LicenseManagerClient;
    use Google\Cloud\LicenseManager\V1\Configuration;
    use Google\Cloud\LicenseManager\V1\ReactivateConfigurationRequest;
    use Google\Rpc\Status;

    /**
     * @param string $formattedName Name of the resource. Please see
     *                              {@see LicenseManagerClient::configurationName()} for help formatting this field.
     */
    function reactivate_configuration_sample(string $formattedName): void
    {
        // Create a client.
        $licenseManagerClient = new LicenseManagerClient();

        // Prepare the request message.
        $request = (new ReactivateConfigurationRequest())
            ->setName($formattedName);

        // Call the API and handle any network failures.
        try {
            /** @var OperationResponse $response */
            $response = $licenseManagerClient->reactivateConfiguration($request);
            $response->pollUntilComplete();

            if ($response->operationSucceeded()) {
                /** @var Configuration $result */
                $result = $response->getResult();
                printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString());
            } else {
                /** @var Status $error */
                $error = $response->getError();
                printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString());
            }
        } catch (ApiException $ex) {
            printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
        }
    }

    /**
     * Helper to execute the sample.
     *
     * This sample has been automatically generated and should be regarded as a code
     * template only. It will require modifications to work:
     *  - It may require correct/in-range values for request initialization.
     *  - It may require specifying regional endpoints when creating the service client,
     *    please see the apiEndpoint client configuration option for more details.
     */
    function callSample(): void
    {
        $formattedName = LicenseManagerClient::configurationName(
            '[PROJECT]',
            '[LOCATION]',
            '[CONFIGURATION]'
        );

        reactivate_configuration_sample($formattedName);
    }

### updateConfiguration

Updates the parameters of a single Configuration.

The async variant is [LicenseManagerClient::updateConfigurationAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-licensemanager/latest/V1.Client.LicenseManagerClient#_Google_Cloud_LicenseManager_V1_Client_LicenseManagerClient__updateConfigurationAsync__) .

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-licensemanager/latest/V1.UpdateConfigurationRequest` A request to house fields associated with the call. |
| `callOptions` | `array` Optional. |
| `↳ retrySettings` | `https://docs.cloud.google.com/php/docs/reference/gax/latest/RetrySettings.html|array` Retry settings to use for this call. Can be a [Google\\ApiCore\\RetrySettings](https://docs.cloud.google.com/php/docs/reference/gax/latest/RetrySettings.html) object, or an associative array of retry settings parameters. See the documentation on [Google\\ApiCore\\RetrySettings](https://docs.cloud.google.com/php/docs/reference/gax/latest/RetrySettings.html) for example usage. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/gax/latest/OperationResponse.html<https://docs.cloud.google.com/php/docs/reference/cloud-licensemanager/latest/V1.Configuration>` |   |

**Example**

    use Google\ApiCore\ApiException;
    use Google\ApiCore\OperationResponse;
    use Google\Cloud\LicenseManager\V1\BillingInfo;
    use Google\Cloud\LicenseManager\V1\Client\LicenseManagerClient;
    use Google\Cloud\LicenseManager\V1\Configuration;
    use Google\Cloud\LicenseManager\V1\LicenseType;
    use Google\Cloud\LicenseManager\V1\UpdateConfigurationRequest;
    use Google\Cloud\LicenseManager\V1\UserCountBillingInfo;
    use Google\Rpc\Status;

    /**
     * @param string $configurationDisplayName                                 User given name.
     * @param string $formattedConfigurationProduct                            Name field (with URL) of the Product offered for SPLA. Please see
     *                                                                         {@see LicenseManagerClient::productName()} for help formatting this field.
     * @param int    $configurationLicenseType                                 LicenseType to be applied for billing
     * @param int    $configurationCurrentBillingInfoUserCountBillingUserCount Number of users to bill for.
     * @param int    $configurationNextBillingInfoUserCountBillingUserCount    Number of users to bill for.
     */
    function update_configuration_sample(
        string $configurationDisplayName,
        string $formattedConfigurationProduct,
        int $configurationLicenseType,
        int $configurationCurrentBillingInfoUserCountBillingUserCount,
        int $configurationNextBillingInfoUserCountBillingUserCount
    ): void {
        // Create a client.
        $licenseManagerClient = new LicenseManagerClient();

        // Prepare the request message.
        $configurationCurrentBillingInfoUserCountBilling = (new UserCountBillingInfo())
            ->setUserCount($configurationCurrentBillingInfoUserCountBillingUserCount);
        $configurationCurrentBillingInfo = (new BillingInfo())
            ->setUserCountBilling($configurationCurrentBillingInfoUserCountBilling);
        $configurationNextBillingInfoUserCountBilling = (new UserCountBillingInfo())
            ->setUserCount($configurationNextBillingInfoUserCountBillingUserCount);
        $configurationNextBillingInfo = (new BillingInfo())
            ->setUserCountBilling($configurationNextBillingInfoUserCountBilling);
        $configuration = (new Configuration())
            ->setDisplayName($configurationDisplayName)
            ->setProduct($formattedConfigurationProduct)
            ->setLicenseType($configurationLicenseType)
            ->setCurrentBillingInfo($configurationCurrentBillingInfo)
            ->setNextBillingInfo($configurationNextBillingInfo);
        $request = (new UpdateConfigurationRequest())
            ->setConfiguration($configuration);

        // Call the API and handle any network failures.
        try {
            /** @var OperationResponse $response */
            $response = $licenseManagerClient->updateConfiguration($request);
            $response->pollUntilComplete();

            if ($response->operationSucceeded()) {
                /** @var Configuration $result */
                $result = $response->getResult();
                printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString());
            } else {
                /** @var Status $error */
                $error = $response->getError();
                printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString());
            }
        } catch (ApiException $ex) {
            printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
        }
    }

    /**
     * Helper to execute the sample.
     *
     * This sample has been automatically generated and should be regarded as a code
     * template only. It will require modifications to work:
     *  - It may require correct/in-range values for request initialization.
     *  - It may require specifying regional endpoints when creating the service client,
     *    please see the apiEndpoint client configuration option for more details.
     */
    function callSample(): void
    {
        $configurationDisplayName = '[DISPLAY_NAME]';
        $formattedConfigurationProduct = LicenseManagerClient::productName(
            '[PROJECT]',
            '[LOCATION]',
            '[PRODUCT]'
        );
        $configurationLicenseType = LicenseType::LICENSE_TYPE_UNSPECIFIED;
        $configurationCurrentBillingInfoUserCountBillingUserCount = 0;
        $configurationNextBillingInfoUserCountBillingUserCount = 0;

        update_configuration_sample(
            $configurationDisplayName,
            $formattedConfigurationProduct,
            $configurationLicenseType,
            $configurationCurrentBillingInfoUserCountBillingUserCount,
            $configurationNextBillingInfoUserCountBillingUserCount
        );
    }

### getLocation

Gets information about a location.

The async variant is [LicenseManagerClient::getLocationAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-licensemanager/latest/V1.Client.LicenseManagerClient#_Google_Cloud_LicenseManager_V1_Client_LicenseManagerClient__getLocationAsync__) .

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/common-protos/latest/Cloud.Location.GetLocationRequest.html` A request to house fields associated with the call. |
| `callOptions` | `array` Optional. |
| `↳ retrySettings` | `https://docs.cloud.google.com/php/docs/reference/gax/latest/RetrySettings.html|array` Retry settings to use for this call. Can be a [Google\\ApiCore\\RetrySettings](https://docs.cloud.google.com/php/docs/reference/gax/latest/RetrySettings.html) object, or an associative array of retry settings parameters. See the documentation on [Google\\ApiCore\\RetrySettings](https://docs.cloud.google.com/php/docs/reference/gax/latest/RetrySettings.html) for example usage. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/common-protos/latest/Cloud.Location.Location.html` |   |

**Example**

    use Google\ApiCore\ApiException;
    use Google\Cloud\LicenseManager\V1\Client\LicenseManagerClient;
    use Google\Cloud\Location\GetLocationRequest;
    use Google\Cloud\Location\Location;

    /**
     * This sample has been automatically generated and should be regarded as a code
     * template only. It will require modifications to work:
     *  - It may require correct/in-range values for request initialization.
     *  - It may require specifying regional endpoints when creating the service client,
     *    please see the apiEndpoint client configuration option for more details.
     */
    function get_location_sample(): void
    {
        // Create a client.
        $licenseManagerClient = new LicenseManagerClient();

        // Prepare the request message.
        $request = new GetLocationRequest();

        // Call the API and handle any network failures.
        try {
            /** @var Location $response */
            $response = $licenseManagerClient->getLocation($request);
            printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString());
        } catch (ApiException $ex) {
            printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
        }
    }

### listLocations

Lists information about the supported locations for this service.

The async variant is [LicenseManagerClient::listLocationsAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-licensemanager/latest/V1.Client.LicenseManagerClient#_Google_Cloud_LicenseManager_V1_Client_LicenseManagerClient__listLocationsAsync__) .

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/common-protos/latest/Cloud.Location.ListLocationsRequest.html` A request to house fields associated with the call. |
| `callOptions` | `array` Optional. |
| `↳ retrySettings` | `https://docs.cloud.google.com/php/docs/reference/gax/latest/RetrySettings.html|array` Retry settings to use for this call. Can be a [Google\\ApiCore\\RetrySettings](https://docs.cloud.google.com/php/docs/reference/gax/latest/RetrySettings.html) object, or an associative array of retry settings parameters. See the documentation on [Google\\ApiCore\\RetrySettings](https://docs.cloud.google.com/php/docs/reference/gax/latest/RetrySettings.html) for example usage. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/gax/latest/PagedListResponse.html` |   |

**Example**

    use Google\ApiCore\ApiException;
    use Google\ApiCore\PagedListResponse;
    use Google\Cloud\LicenseManager\V1\Client\LicenseManagerClient;
    use Google\Cloud\Location\ListLocationsRequest;
    use Google\Cloud\Location\Location;

    /**
     * This sample has been automatically generated and should be regarded as a code
     * template only. It will require modifications to work:
     *  - It may require correct/in-range values for request initialization.
     *  - It may require specifying regional endpoints when creating the service client,
     *    please see the apiEndpoint client configuration option for more details.
     */
    function list_locations_sample(): void
    {
        // Create a client.
        $licenseManagerClient = new LicenseManagerClient();

        // Prepare the request message.
        $request = new ListLocationsRequest();

        // Call the API and handle any network failures.
        try {
            /** @var PagedListResponse $response */
            $response = $licenseManagerClient->listLocations($request);

            /** @var Location $element */
            foreach ($response as $element) {
                printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString());
            }
        } catch (ApiException $ex) {
            printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
        }
    }

### aggregateUsageAsync

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-licensemanager/latest/V1.AggregateUsageRequest` |
| `optionalArgs` | `array` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.aws.amazon.com/aws-sdk-php/v3/api/class-GuzzleHttp.Promise.Promise.html<https://docs.cloud.google.com/php/docs/reference/gax/latest/PagedListResponse.html>` |   |

### createConfigurationAsync

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-licensemanager/latest/V1.CreateConfigurationRequest` |
| `optionalArgs` | `array` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.aws.amazon.com/aws-sdk-php/v3/api/class-GuzzleHttp.Promise.Promise.html<https://docs.cloud.google.com/php/docs/reference/gax/latest/OperationResponse.html>` |   |

### deactivateConfigurationAsync

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-licensemanager/latest/V1.DeactivateConfigurationRequest` |
| `optionalArgs` | `array` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.aws.amazon.com/aws-sdk-php/v3/api/class-GuzzleHttp.Promise.Promise.html<https://docs.cloud.google.com/php/docs/reference/gax/latest/OperationResponse.html>` |   |

### deleteConfigurationAsync

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-licensemanager/latest/V1.DeleteConfigurationRequest` |
| `optionalArgs` | `array` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.aws.amazon.com/aws-sdk-php/v3/api/class-GuzzleHttp.Promise.Promise.html<https://docs.cloud.google.com/php/docs/reference/gax/latest/OperationResponse.html>` |   |

### getConfigurationAsync

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-licensemanager/latest/V1.GetConfigurationRequest` |
| `optionalArgs` | `array` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.aws.amazon.com/aws-sdk-php/v3/api/class-GuzzleHttp.Promise.Promise.html<https://docs.cloud.google.com/php/docs/reference/cloud-licensemanager/latest/V1.Configuration>` |   |

### getInstanceAsync

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-licensemanager/latest/V1.GetInstanceRequest` |
| `optionalArgs` | `array` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.aws.amazon.com/aws-sdk-php/v3/api/class-GuzzleHttp.Promise.Promise.html<https://docs.cloud.google.com/php/docs/reference/cloud-licensemanager/latest/V1.Instance>` |   |

### getProductAsync

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-licensemanager/latest/V1.GetProductRequest` |
| `optionalArgs` | `array` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.aws.amazon.com/aws-sdk-php/v3/api/class-GuzzleHttp.Promise.Promise.html<https://docs.cloud.google.com/php/docs/reference/cloud-licensemanager/latest/V1.Product>` |   |

### listConfigurationsAsync

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-licensemanager/latest/V1.ListConfigurationsRequest` |
| `optionalArgs` | `array` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.aws.amazon.com/aws-sdk-php/v3/api/class-GuzzleHttp.Promise.Promise.html<https://docs.cloud.google.com/php/docs/reference/gax/latest/PagedListResponse.html>` |   |

### listInstancesAsync

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-licensemanager/latest/V1.ListInstancesRequest` |
| `optionalArgs` | `array` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.aws.amazon.com/aws-sdk-php/v3/api/class-GuzzleHttp.Promise.Promise.html<https://docs.cloud.google.com/php/docs/reference/gax/latest/PagedListResponse.html>` |   |

### listProductsAsync

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-licensemanager/latest/V1.ListProductsRequest` |
| `optionalArgs` | `array` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.aws.amazon.com/aws-sdk-php/v3/api/class-GuzzleHttp.Promise.Promise.html<https://docs.cloud.google.com/php/docs/reference/gax/latest/PagedListResponse.html>` |   |

### queryConfigurationLicenseUsageAsync

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-licensemanager/latest/V1.QueryConfigurationLicenseUsageRequest` |
| `optionalArgs` | `array` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.aws.amazon.com/aws-sdk-php/v3/api/class-GuzzleHttp.Promise.Promise.html<https://docs.cloud.google.com/php/docs/reference/cloud-licensemanager/latest/V1.QueryConfigurationLicenseUsageResponse>` |   |

### reactivateConfigurationAsync

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-licensemanager/latest/V1.ReactivateConfigurationRequest` |
| `optionalArgs` | `array` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.aws.amazon.com/aws-sdk-php/v3/api/class-GuzzleHttp.Promise.Promise.html<https://docs.cloud.google.com/php/docs/reference/gax/latest/OperationResponse.html>` |   |

### updateConfigurationAsync

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-licensemanager/latest/V1.UpdateConfigurationRequest` |
| `optionalArgs` | `array` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.aws.amazon.com/aws-sdk-php/v3/api/class-GuzzleHttp.Promise.Promise.html<https://docs.cloud.google.com/php/docs/reference/gax/latest/OperationResponse.html>` |   |

### getLocationAsync

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/common-protos/latest/Cloud.Location.GetLocationRequest.html` |
| `optionalArgs` | `array` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.aws.amazon.com/aws-sdk-php/v3/api/class-GuzzleHttp.Promise.Promise.html<https://docs.cloud.google.com/php/docs/reference/common-protos/latest/Cloud.Location.Location.html>` |   |

### listLocationsAsync

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/common-protos/latest/Cloud.Location.ListLocationsRequest.html` |
| `optionalArgs` | `array` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.aws.amazon.com/aws-sdk-php/v3/api/class-GuzzleHttp.Promise.Promise.html<https://docs.cloud.google.com/php/docs/reference/gax/latest/PagedListResponse.html>` |   |

### getOperationsClient

Return an OperationsClient object with the same endpoint as $this.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `Google\LongRunning\Client\OperationsClient` |   |

### resumeOperation

Resume an existing long running operation that was previously started by a long
running API method. If $methodName is not provided, or does not match a long
running API method, then the operation can still be resumed, but the
OperationResponse object will not deserialize the final response.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `operationName` | `string` The name of the long running operation |
| `methodName` | `string` The name of the method used to start the operation |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/gax/latest/OperationResponse.html` |   |

### static::configurationName

Formats a string containing the fully-qualified path to represent a
configuration resource.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `project` | `string` |
| `location` | `string` |
| `configuration` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` | The formatted configuration resource. |

### static::instanceName

Formats a string containing the fully-qualified path to represent a instance
resource.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `project` | `string` |
| `location` | `string` |
| `instance` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` | The formatted instance resource. |

### static::locationName

Formats a string containing the fully-qualified path to represent a location
resource.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `project` | `string` |
| `location` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` | The formatted location resource. |

### static::productName

Formats a string containing the fully-qualified path to represent a product
resource.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `project` | `string` |
| `location` | `string` |
| `product` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` | The formatted product resource. |

### static::parseName

Parses a formatted name string and returns an associative array of the components in the name.

The following name formats are supported:
Template: Pattern

- configuration: projects/{project}/locations/{location}/configurations/{configuration}
- instance: projects/{project}/locations/{location}/instances/{instance}
- location: projects/{project}/locations/{location}
- product: projects/{project}/locations/{location}/products/{product}

The optional $template argument can be supplied to specify a particular pattern,
and must match one of the templates listed above. If no $template argument is
provided, or if the $template argument does not match one of the templates
listed, then parseName will check each of the supported templates, and return
the first match.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `formattedName` | `string` The formatted name string |
| `template` | `?string` Optional name of template to match |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `array` | An associative array from name component IDs to component values. |