0.17.0 (latest) 0.16.0 0.15.1 0.14.1 0.8.0 0.7.0 0.6.2 0.5.0 0.4.1 0.3.1 0.2.0 0.1.3 Reference documentation and code samples for the Google Ads Ad Manager V1 Client class ForecastAdjustmentServiceClient.

Service Description: Provides methods for handling `ForecastAdjustment` objects.

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 \\ Ads \\ AdManager \\ V1 \\ Client

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `options` | `array|Google\ApiCore\Options\ClientOptions` 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` | `Google\Auth\FetchAuthTokenInterface|Google\ApiCore\CredentialsWrapper` This option should only be used with a pre-constructed [Google\\Auth\\FetchAuthTokenInterface](https://docs.cloud.google.com/php/docs/reference/auth/latest/FetchAuthTokenInterface.md.txt) or [Google\\ApiCore\\CredentialsWrapper](https://docs.cloud.google.com/php/docs/reference/gax/latest/CredentialsWrapper.md.txt) 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\Ads\AdManager\V1\ForecastAdjustmentServiceClient; $creds = new ServiceAccountCredentials($scopes, $json); $options = new ForecastAdjustmentServiceClient(['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.md.txt#_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|Google\ApiCore\Transport\TransportInterface` The transport used for executing network requests. At the moment, supports only `rest`. *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.md.txt) 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 = \[ 'rest' =\> \[...\], \]; See the [Google\\ApiCore\\Transport\\RestTransport::build()](https://docs.cloud.google.com/php/docs/reference/gax/latest/Transport.RestTransport.md.txt#_Google_ApiCore_Transport_RestTransport__build__) method 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'. |

### batchActivateForecastAdjustments

Activates a list of `ForecastAdjustment` objects.

The async variant is
[ForecastAdjustmentServiceClient::batchActivateForecastAdjustmentsAsync()](https://docs.cloud.google.com/php/docs/reference/ad-manager/latest/V1.Client.ForecastAdjustmentServiceClient.md.txt#_Google_Ads_AdManager_V1_Client_ForecastAdjustmentServiceClient__batchActivateForecastAdjustmentsAsync__)
.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `Google\Ads\AdManager\V1\BatchActivateForecastAdjustmentsRequest` A request to house fields associated with the call. |
| `callOptions` | `array` Optional. |
| `↳ retrySettings` | `Google\ApiCore\RetrySettings|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.md.txt) 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.md.txt) for example usage. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `Google\Ads\AdManager\V1\BatchActivateForecastAdjustmentsResponse` |   |

**Example**

```php
use Google\Ads\AdManager\V1\BatchActivateForecastAdjustmentsRequest;
use Google\Ads\AdManager\V1\BatchActivateForecastAdjustmentsResponse;
use Google\Ads\AdManager\V1\Client\ForecastAdjustmentServiceClient;
use Google\ApiCore\ApiException;

/**
 * @param string $formattedParent Format: `networks/{network_code}`
 *                                Please see {@see ForecastAdjustmentServiceClient::networkName()} for help formatting this field.
 * @param string $namesElement    The resource names of the `ForecastAdjustment` objects to
 *                                activate.
 */
function batch_activate_forecast_adjustments_sample(
    string $formattedParent,
    string $namesElement
): void {
    // Create a client.
    $forecastAdjustmentServiceClient = new ForecastAdjustmentServiceClient();

    // Prepare the request message.
    $names = [$namesElement];
    $request = (new BatchActivateForecastAdjustmentsRequest())
        ->setParent($formattedParent)
        ->setNames($names);

    // Call the API and handle any network failures.
    try {
        /** @var BatchActivateForecastAdjustmentsResponse $response */
        $response = $forecastAdjustmentServiceClient->batchActivateForecastAdjustments($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
{
    $formattedParent = ForecastAdjustmentServiceClient::networkName('[NETWORK_CODE]');
    $namesElement = '[NAMES]';

    batch_activate_forecast_adjustments_sample($formattedParent, $namesElement);
}
```

### batchCreateForecastAdjustments

Creates `ForecastAdjustment` objects.

The async variant is
[ForecastAdjustmentServiceClient::batchCreateForecastAdjustmentsAsync()](https://docs.cloud.google.com/php/docs/reference/ad-manager/latest/V1.Client.ForecastAdjustmentServiceClient.md.txt#_Google_Ads_AdManager_V1_Client_ForecastAdjustmentServiceClient__batchCreateForecastAdjustmentsAsync__) .

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `Google\Ads\AdManager\V1\BatchCreateForecastAdjustmentsRequest` A request to house fields associated with the call. |
| `callOptions` | `array` Optional. |
| `↳ retrySettings` | `Google\ApiCore\RetrySettings|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.md.txt) 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.md.txt) for example usage. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `Google\Ads\AdManager\V1\BatchCreateForecastAdjustmentsResponse` |   |

**Example**

```php
use Google\Ads\AdManager\V1\BatchCreateForecastAdjustmentsRequest;
use Google\Ads\AdManager\V1\BatchCreateForecastAdjustmentsResponse;
use Google\Ads\AdManager\V1\Client\ForecastAdjustmentServiceClient;
use Google\Ads\AdManager\V1\CreateForecastAdjustmentRequest;
use Google\Ads\AdManager\V1\DateRange;
use Google\Ads\AdManager\V1\ForecastAdjustment;
use Google\Ads\AdManager\V1\ForecastAdjustmentVolumeTypeEnum\ForecastAdjustmentVolumeType;
use Google\ApiCore\ApiException;

/**
 * @param string $formattedParent                                           The parent resource where `ForecastAdjustments` will be created.
 *                                                                          Format: `networks/{network_code}`
 *                                                                          The parent field in the CreateForecastAdjustmentRequest must match this
 *                                                                          field. Please see
 *                                                                          {@see ForecastAdjustmentServiceClient::networkName()} for help formatting this field.
 * @param string $formattedRequestsParent                                   The parent resource where this `ForecastAdjustment` will be
 *                                                                          created. Format: `networks/{network_code}`
 *                                                                          Please see {@see ForecastAdjustmentServiceClient::networkName()} for help formatting this field.
 * @param string $formattedRequestsForecastAdjustmentTrafficForecastSegment Immutable. The resource name of the `TrafficForecastSegment` that
 *                                                                          this adjustment is associated with. Format:
 *                                                                          `networks/{network_code}/trafficForecastSegments/{trafficForecastSegmentId}`
 *                                                                          Please see {@see ForecastAdjustmentServiceClient::trafficForecastSegmentName()} for help formatting this field.
 * @param string $requestsForecastAdjustmentDisplayName                     Display name of the ForecastAdjustment.
 * @param int    $requestsForecastAdjustmentVolumeType                      The volume type of the adjustment.
 */
function batch_create_forecast_adjustments_sample(
    string $formattedParent,
    string $formattedRequestsParent,
    string $formattedRequestsForecastAdjustmentTrafficForecastSegment,
    string $requestsForecastAdjustmentDisplayName,
    int $requestsForecastAdjustmentVolumeType
): void {
    // Create a client.
    $forecastAdjustmentServiceClient = new ForecastAdjustmentServiceClient();

    // Prepare the request message.
    $requestsForecastAdjustmentDateRange = new DateRange();
    $requestsForecastAdjustment = (new ForecastAdjustment())
        ->setTrafficForecastSegment($formattedRequestsForecastAdjustmentTrafficForecastSegment)
        ->setDisplayName($requestsForecastAdjustmentDisplayName)
        ->setDateRange($requestsForecastAdjustmentDateRange)
        ->setVolumeType($requestsForecastAdjustmentVolumeType);
    $createForecastAdjustmentRequest = (new CreateForecastAdjustmentRequest())
        ->setParent($formattedRequestsParent)
        ->setForecastAdjustment($requestsForecastAdjustment);
    $requests = [$createForecastAdjustmentRequest];
    $request = (new BatchCreateForecastAdjustmentsRequest())
        ->setParent($formattedParent)
        ->setRequests($requests);

    // Call the API and handle any network failures.
    try {
        /** @var BatchCreateForecastAdjustmentsResponse $response */
        $response = $forecastAdjustmentServiceClient->batchCreateForecastAdjustments($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
{
    $formattedParent = ForecastAdjustmentServiceClient::networkName('[NETWORK_CODE]');
    $formattedRequestsParent = ForecastAdjustmentServiceClient::networkName('[NETWORK_CODE]');
    $formattedRequestsForecastAdjustmentTrafficForecastSegment = ForecastAdjustmentServiceClient::trafficForecastSegmentName(
        '[NETWORK_CODE]',
        '[TRAFFIC_FORECAST_SEGMENT]'
    );
    $requestsForecastAdjustmentDisplayName = '[DISPLAY_NAME]';
    $requestsForecastAdjustmentVolumeType = ForecastAdjustmentVolumeType::FORECAST_ADJUSTMENT_VOLUME_TYPE_UNSPECIFIED;

    batch_create_forecast_adjustments_sample(
        $formattedParent,
        $formattedRequestsParent,
        $formattedRequestsForecastAdjustmentTrafficForecastSegment,
        $requestsForecastAdjustmentDisplayName,
        $requestsForecastAdjustmentVolumeType
    );
}
```

### batchDeactivateForecastAdjustments

Deactivates a list of `ForecastAdjustment` objects.

The async variant is
[ForecastAdjustmentServiceClient::batchDeactivateForecastAdjustmentsAsync()](https://docs.cloud.google.com/php/docs/reference/ad-manager/latest/V1.Client.ForecastAdjustmentServiceClient.md.txt#_Google_Ads_AdManager_V1_Client_ForecastAdjustmentServiceClient__batchDeactivateForecastAdjustmentsAsync__)
.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `Google\Ads\AdManager\V1\BatchDeactivateForecastAdjustmentsRequest` A request to house fields associated with the call. |
| `callOptions` | `array` Optional. |
| `↳ retrySettings` | `Google\ApiCore\RetrySettings|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.md.txt) 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.md.txt) for example usage. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `Google\Ads\AdManager\V1\BatchDeactivateForecastAdjustmentsResponse` |   |

**Example**

```php
use Google\Ads\AdManager\V1\BatchDeactivateForecastAdjustmentsRequest;
use Google\Ads\AdManager\V1\BatchDeactivateForecastAdjustmentsResponse;
use Google\Ads\AdManager\V1\Client\ForecastAdjustmentServiceClient;
use Google\ApiCore\ApiException;

/**
 * @param string $formattedParent Format: `networks/{network_code}`
 *                                Please see {@see ForecastAdjustmentServiceClient::networkName()} for help formatting this field.
 * @param string $namesElement    The resource names of the `ForecastAdjustment` objects to
 *                                deactivate.
 */
function batch_deactivate_forecast_adjustments_sample(
    string $formattedParent,
    string $namesElement
): void {
    // Create a client.
    $forecastAdjustmentServiceClient = new ForecastAdjustmentServiceClient();

    // Prepare the request message.
    $names = [$namesElement];
    $request = (new BatchDeactivateForecastAdjustmentsRequest())
        ->setParent($formattedParent)
        ->setNames($names);

    // Call the API and handle any network failures.
    try {
        /** @var BatchDeactivateForecastAdjustmentsResponse $response */
        $response = $forecastAdjustmentServiceClient->batchDeactivateForecastAdjustments($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
{
    $formattedParent = ForecastAdjustmentServiceClient::networkName('[NETWORK_CODE]');
    $namesElement = '[NAMES]';

    batch_deactivate_forecast_adjustments_sample($formattedParent, $namesElement);
}
```

### batchUpdateForecastAdjustments

Batch updates `ForecastAdjustment` objects.

The async variant is
[ForecastAdjustmentServiceClient::batchUpdateForecastAdjustmentsAsync()](https://docs.cloud.google.com/php/docs/reference/ad-manager/latest/V1.Client.ForecastAdjustmentServiceClient.md.txt#_Google_Ads_AdManager_V1_Client_ForecastAdjustmentServiceClient__batchUpdateForecastAdjustmentsAsync__) .

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `Google\Ads\AdManager\V1\BatchUpdateForecastAdjustmentsRequest` A request to house fields associated with the call. |
| `callOptions` | `array` Optional. |
| `↳ retrySettings` | `Google\ApiCore\RetrySettings|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.md.txt) 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.md.txt) for example usage. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `Google\Ads\AdManager\V1\BatchUpdateForecastAdjustmentsResponse` |   |

**Example**

```php
use Google\Ads\AdManager\V1\BatchUpdateForecastAdjustmentsRequest;
use Google\Ads\AdManager\V1\BatchUpdateForecastAdjustmentsResponse;
use Google\Ads\AdManager\V1\Client\ForecastAdjustmentServiceClient;
use Google\Ads\AdManager\V1\DateRange;
use Google\Ads\AdManager\V1\ForecastAdjustment;
use Google\Ads\AdManager\V1\ForecastAdjustmentVolumeTypeEnum\ForecastAdjustmentVolumeType;
use Google\Ads\AdManager\V1\UpdateForecastAdjustmentRequest;
use Google\ApiCore\ApiException;

/**
 * @param string $formattedParent                                           The parent resource where `ForecastAdjustments` will be updated.
 *                                                                          Format: `networks/{network_code}`
 *                                                                          The parent field in the UpdateForecastAdjustmentRequest must match this
 *                                                                          field. Please see
 *                                                                          {@see ForecastAdjustmentServiceClient::networkName()} for help formatting this field.
 * @param string $formattedRequestsForecastAdjustmentTrafficForecastSegment Immutable. The resource name of the `TrafficForecastSegment` that
 *                                                                          this adjustment is associated with. Format:
 *                                                                          `networks/{network_code}/trafficForecastSegments/{trafficForecastSegmentId}`
 *                                                                          Please see {@see ForecastAdjustmentServiceClient::trafficForecastSegmentName()} for help formatting this field.
 * @param string $requestsForecastAdjustmentDisplayName                     Display name of the ForecastAdjustment.
 * @param int    $requestsForecastAdjustmentVolumeType                      The volume type of the adjustment.
 */
function batch_update_forecast_adjustments_sample(
    string $formattedParent,
    string $formattedRequestsForecastAdjustmentTrafficForecastSegment,
    string $requestsForecastAdjustmentDisplayName,
    int $requestsForecastAdjustmentVolumeType
): void {
    // Create a client.
    $forecastAdjustmentServiceClient = new ForecastAdjustmentServiceClient();

    // Prepare the request message.
    $requestsForecastAdjustmentDateRange = new DateRange();
    $requestsForecastAdjustment = (new ForecastAdjustment())
        ->setTrafficForecastSegment($formattedRequestsForecastAdjustmentTrafficForecastSegment)
        ->setDisplayName($requestsForecastAdjustmentDisplayName)
        ->setDateRange($requestsForecastAdjustmentDateRange)
        ->setVolumeType($requestsForecastAdjustmentVolumeType);
    $updateForecastAdjustmentRequest = (new UpdateForecastAdjustmentRequest())
        ->setForecastAdjustment($requestsForecastAdjustment);
    $requests = [$updateForecastAdjustmentRequest];
    $request = (new BatchUpdateForecastAdjustmentsRequest())
        ->setParent($formattedParent)
        ->setRequests($requests);

    // Call the API and handle any network failures.
    try {
        /** @var BatchUpdateForecastAdjustmentsResponse $response */
        $response = $forecastAdjustmentServiceClient->batchUpdateForecastAdjustments($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
{
    $formattedParent = ForecastAdjustmentServiceClient::networkName('[NETWORK_CODE]');
    $formattedRequestsForecastAdjustmentTrafficForecastSegment = ForecastAdjustmentServiceClient::trafficForecastSegmentName(
        '[NETWORK_CODE]',
        '[TRAFFIC_FORECAST_SEGMENT]'
    );
    $requestsForecastAdjustmentDisplayName = '[DISPLAY_NAME]';
    $requestsForecastAdjustmentVolumeType = ForecastAdjustmentVolumeType::FORECAST_ADJUSTMENT_VOLUME_TYPE_UNSPECIFIED;

    batch_update_forecast_adjustments_sample(
        $formattedParent,
        $formattedRequestsForecastAdjustmentTrafficForecastSegment,
        $requestsForecastAdjustmentDisplayName,
        $requestsForecastAdjustmentVolumeType
    );
}
```

### calculateDailyAdOpportunityCounts

Calculates daily ad opportunity counts for a prospective
`ForecastAdjustment` object.

The async variant is
[ForecastAdjustmentServiceClient::calculateDailyAdOpportunityCountsAsync()](https://docs.cloud.google.com/php/docs/reference/ad-manager/latest/V1.Client.ForecastAdjustmentServiceClient.md.txt#_Google_Ads_AdManager_V1_Client_ForecastAdjustmentServiceClient__calculateDailyAdOpportunityCountsAsync__)
.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `Google\Ads\AdManager\V1\CalculateDailyAdOpportunityCountsRequest` A request to house fields associated with the call. |
| `callOptions` | `array` Optional. |
| `↳ retrySettings` | `Google\ApiCore\RetrySettings|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.md.txt) 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.md.txt) for example usage. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `Google\Ads\AdManager\V1\CalculateDailyAdOpportunityCountsResponse` |   |

**Example**

```php
use Google\Ads\AdManager\V1\CalculateDailyAdOpportunityCountsRequest;
use Google\Ads\AdManager\V1\CalculateDailyAdOpportunityCountsResponse;
use Google\Ads\AdManager\V1\Client\ForecastAdjustmentServiceClient;
use Google\Ads\AdManager\V1\DateRange;
use Google\Ads\AdManager\V1\ForecastAdjustment;
use Google\Ads\AdManager\V1\ForecastAdjustmentVolumeTypeEnum\ForecastAdjustmentVolumeType;
use Google\ApiCore\ApiException;

/**
 * @param string $formattedParent                                   The parent resource where this `ForecastAdjustment` will be
 *                                                                  calculated. Format: `networks/{network_code}`
 *                                                                  Please see {@see ForecastAdjustmentServiceClient::networkName()} for help formatting this field.
 * @param string $formattedForecastAdjustmentTrafficForecastSegment Immutable. The resource name of the `TrafficForecastSegment` that
 *                                                                  this adjustment is associated with. Format:
 *                                                                  `networks/{network_code}/trafficForecastSegments/{trafficForecastSegmentId}`
 *                                                                  Please see {@see ForecastAdjustmentServiceClient::trafficForecastSegmentName()} for help formatting this field.
 * @param string $forecastAdjustmentDisplayName                     Display name of the ForecastAdjustment.
 * @param int    $forecastAdjustmentVolumeType                      The volume type of the adjustment.
 */
function calculate_daily_ad_opportunity_counts_sample(
    string $formattedParent,
    string $formattedForecastAdjustmentTrafficForecastSegment,
    string $forecastAdjustmentDisplayName,
    int $forecastAdjustmentVolumeType
): void {
    // Create a client.
    $forecastAdjustmentServiceClient = new ForecastAdjustmentServiceClient();

    // Prepare the request message.
    $forecastAdjustmentDateRange = new DateRange();
    $forecastAdjustment = (new ForecastAdjustment())
        ->setTrafficForecastSegment($formattedForecastAdjustmentTrafficForecastSegment)
        ->setDisplayName($forecastAdjustmentDisplayName)
        ->setDateRange($forecastAdjustmentDateRange)
        ->setVolumeType($forecastAdjustmentVolumeType);
    $request = (new CalculateDailyAdOpportunityCountsRequest())
        ->setParent($formattedParent)
        ->setForecastAdjustment($forecastAdjustment);

    // Call the API and handle any network failures.
    try {
        /** @var CalculateDailyAdOpportunityCountsResponse $response */
        $response = $forecastAdjustmentServiceClient->calculateDailyAdOpportunityCounts($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
{
    $formattedParent = ForecastAdjustmentServiceClient::networkName('[NETWORK_CODE]');
    $formattedForecastAdjustmentTrafficForecastSegment = ForecastAdjustmentServiceClient::trafficForecastSegmentName(
        '[NETWORK_CODE]',
        '[TRAFFIC_FORECAST_SEGMENT]'
    );
    $forecastAdjustmentDisplayName = '[DISPLAY_NAME]';
    $forecastAdjustmentVolumeType = ForecastAdjustmentVolumeType::FORECAST_ADJUSTMENT_VOLUME_TYPE_UNSPECIFIED;

    calculate_daily_ad_opportunity_counts_sample(
        $formattedParent,
        $formattedForecastAdjustmentTrafficForecastSegment,
        $forecastAdjustmentDisplayName,
        $forecastAdjustmentVolumeType
    );
}
```

### createForecastAdjustment

Creates a `ForecastAdjustment` object.

The async variant is
[ForecastAdjustmentServiceClient::createForecastAdjustmentAsync()](https://docs.cloud.google.com/php/docs/reference/ad-manager/latest/V1.Client.ForecastAdjustmentServiceClient.md.txt#_Google_Ads_AdManager_V1_Client_ForecastAdjustmentServiceClient__createForecastAdjustmentAsync__) .

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `Google\Ads\AdManager\V1\CreateForecastAdjustmentRequest` A request to house fields associated with the call. |
| `callOptions` | `array` Optional. |
| `↳ retrySettings` | `Google\ApiCore\RetrySettings|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.md.txt) 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.md.txt) for example usage. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `Google\Ads\AdManager\V1\ForecastAdjustment` |   |

**Example**

```php
use Google\Ads\AdManager\V1\Client\ForecastAdjustmentServiceClient;
use Google\Ads\AdManager\V1\CreateForecastAdjustmentRequest;
use Google\Ads\AdManager\V1\DateRange;
use Google\Ads\AdManager\V1\ForecastAdjustment;
use Google\Ads\AdManager\V1\ForecastAdjustmentVolumeTypeEnum\ForecastAdjustmentVolumeType;
use Google\ApiCore\ApiException;

/**
 * @param string $formattedParent                                   The parent resource where this `ForecastAdjustment` will be
 *                                                                  created. Format: `networks/{network_code}`
 *                                                                  Please see {@see ForecastAdjustmentServiceClient::networkName()} for help formatting this field.
 * @param string $formattedForecastAdjustmentTrafficForecastSegment Immutable. The resource name of the `TrafficForecastSegment` that
 *                                                                  this adjustment is associated with. Format:
 *                                                                  `networks/{network_code}/trafficForecastSegments/{trafficForecastSegmentId}`
 *                                                                  Please see {@see ForecastAdjustmentServiceClient::trafficForecastSegmentName()} for help formatting this field.
 * @param string $forecastAdjustmentDisplayName                     Display name of the ForecastAdjustment.
 * @param int    $forecastAdjustmentVolumeType                      The volume type of the adjustment.
 */
function create_forecast_adjustment_sample(
    string $formattedParent,
    string $formattedForecastAdjustmentTrafficForecastSegment,
    string $forecastAdjustmentDisplayName,
    int $forecastAdjustmentVolumeType
): void {
    // Create a client.
    $forecastAdjustmentServiceClient = new ForecastAdjustmentServiceClient();

    // Prepare the request message.
    $forecastAdjustmentDateRange = new DateRange();
    $forecastAdjustment = (new ForecastAdjustment())
        ->setTrafficForecastSegment($formattedForecastAdjustmentTrafficForecastSegment)
        ->setDisplayName($forecastAdjustmentDisplayName)
        ->setDateRange($forecastAdjustmentDateRange)
        ->setVolumeType($forecastAdjustmentVolumeType);
    $request = (new CreateForecastAdjustmentRequest())
        ->setParent($formattedParent)
        ->setForecastAdjustment($forecastAdjustment);

    // Call the API and handle any network failures.
    try {
        /** @var ForecastAdjustment $response */
        $response = $forecastAdjustmentServiceClient->createForecastAdjustment($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
{
    $formattedParent = ForecastAdjustmentServiceClient::networkName('[NETWORK_CODE]');
    $formattedForecastAdjustmentTrafficForecastSegment = ForecastAdjustmentServiceClient::trafficForecastSegmentName(
        '[NETWORK_CODE]',
        '[TRAFFIC_FORECAST_SEGMENT]'
    );
    $forecastAdjustmentDisplayName = '[DISPLAY_NAME]';
    $forecastAdjustmentVolumeType = ForecastAdjustmentVolumeType::FORECAST_ADJUSTMENT_VOLUME_TYPE_UNSPECIFIED;

    create_forecast_adjustment_sample(
        $formattedParent,
        $formattedForecastAdjustmentTrafficForecastSegment,
        $forecastAdjustmentDisplayName,
        $forecastAdjustmentVolumeType
    );
}
```

### getForecastAdjustment

Retrieves a `ForecastAdjustment` object.

The async variant is
[ForecastAdjustmentServiceClient::getForecastAdjustmentAsync()](https://docs.cloud.google.com/php/docs/reference/ad-manager/latest/V1.Client.ForecastAdjustmentServiceClient.md.txt#_Google_Ads_AdManager_V1_Client_ForecastAdjustmentServiceClient__getForecastAdjustmentAsync__) .

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `Google\Ads\AdManager\V1\GetForecastAdjustmentRequest` A request to house fields associated with the call. |
| `callOptions` | `array` Optional. |
| `↳ retrySettings` | `Google\ApiCore\RetrySettings|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.md.txt) 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.md.txt) for example usage. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `Google\Ads\AdManager\V1\ForecastAdjustment` |   |

**Example**

```php
use Google\Ads\AdManager\V1\Client\ForecastAdjustmentServiceClient;
use Google\Ads\AdManager\V1\ForecastAdjustment;
use Google\Ads\AdManager\V1\GetForecastAdjustmentRequest;
use Google\ApiCore\ApiException;

/**
 * @param string $formattedName The resource name of the ForecastAdjustment.
 *                              Format:
 *                              `networks/{network_code}/forecastAdjustments/{forecastAdjustmentId}`
 *                              Please see {@see ForecastAdjustmentServiceClient::forecastAdjustmentName()} for help formatting this field.
 */
function get_forecast_adjustment_sample(string $formattedName): void
{
    // Create a client.
    $forecastAdjustmentServiceClient = new ForecastAdjustmentServiceClient();

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

    // Call the API and handle any network failures.
    try {
        /** @var ForecastAdjustment $response */
        $response = $forecastAdjustmentServiceClient->getForecastAdjustment($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 = ForecastAdjustmentServiceClient::forecastAdjustmentName(
        '[NETWORK_CODE]',
        '[FORECAST_ADJUSTMENT]'
    );

    get_forecast_adjustment_sample($formattedName);
}
```

### listForecastAdjustments

Lists `ForecastAdjustment` objects.

The async variant is
[ForecastAdjustmentServiceClient::listForecastAdjustmentsAsync()](https://docs.cloud.google.com/php/docs/reference/ad-manager/latest/V1.Client.ForecastAdjustmentServiceClient.md.txt#_Google_Ads_AdManager_V1_Client_ForecastAdjustmentServiceClient__listForecastAdjustmentsAsync__) .

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `Google\Ads\AdManager\V1\ListForecastAdjustmentsRequest` A request to house fields associated with the call. |
| `callOptions` | `array` Optional. |
| `↳ retrySettings` | `Google\ApiCore\RetrySettings|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.md.txt) 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.md.txt) for example usage. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `Google\ApiCore\PagedListResponse` |   |

**Example**

```php
use Google\Ads\AdManager\V1\Client\ForecastAdjustmentServiceClient;
use Google\Ads\AdManager\V1\ListForecastAdjustmentsRequest;
use Google\ApiCore\ApiException;
use Google\ApiCore\PagedListResponse;

/**
 * @param string $formattedParent The parent, which owns this collection of ForecastAdjustments.
 *                                Format: `networks/{network_code}`
 *                                Please see {@see ForecastAdjustmentServiceClient::networkName()} for help formatting this field.
 */
function list_forecast_adjustments_sample(string $formattedParent): void
{
    // Create a client.
    $forecastAdjustmentServiceClient = new ForecastAdjustmentServiceClient();

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

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

        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 = ForecastAdjustmentServiceClient::networkName('[NETWORK_CODE]');

    list_forecast_adjustments_sample($formattedParent);
}
```

### updateForecastAdjustment

Updates a `ForecastAdjustment` object.

The async variant is
[ForecastAdjustmentServiceClient::updateForecastAdjustmentAsync()](https://docs.cloud.google.com/php/docs/reference/ad-manager/latest/V1.Client.ForecastAdjustmentServiceClient.md.txt#_Google_Ads_AdManager_V1_Client_ForecastAdjustmentServiceClient__updateForecastAdjustmentAsync__) .

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `Google\Ads\AdManager\V1\UpdateForecastAdjustmentRequest` A request to house fields associated with the call. |
| `callOptions` | `array` Optional. |
| `↳ retrySettings` | `Google\ApiCore\RetrySettings|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.md.txt) 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.md.txt) for example usage. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `Google\Ads\AdManager\V1\ForecastAdjustment` |   |

**Example**

```php
use Google\Ads\AdManager\V1\Client\ForecastAdjustmentServiceClient;
use Google\Ads\AdManager\V1\DateRange;
use Google\Ads\AdManager\V1\ForecastAdjustment;
use Google\Ads\AdManager\V1\ForecastAdjustmentVolumeTypeEnum\ForecastAdjustmentVolumeType;
use Google\Ads\AdManager\V1\UpdateForecastAdjustmentRequest;
use Google\ApiCore\ApiException;

/**
 * @param string $formattedForecastAdjustmentTrafficForecastSegment Immutable. The resource name of the `TrafficForecastSegment` that
 *                                                                  this adjustment is associated with. Format:
 *                                                                  `networks/{network_code}/trafficForecastSegments/{trafficForecastSegmentId}`
 *                                                                  Please see {@see ForecastAdjustmentServiceClient::trafficForecastSegmentName()} for help formatting this field.
 * @param string $forecastAdjustmentDisplayName                     Display name of the ForecastAdjustment.
 * @param int    $forecastAdjustmentVolumeType                      The volume type of the adjustment.
 */
function update_forecast_adjustment_sample(
    string $formattedForecastAdjustmentTrafficForecastSegment,
    string $forecastAdjustmentDisplayName,
    int $forecastAdjustmentVolumeType
): void {
    // Create a client.
    $forecastAdjustmentServiceClient = new ForecastAdjustmentServiceClient();

    // Prepare the request message.
    $forecastAdjustmentDateRange = new DateRange();
    $forecastAdjustment = (new ForecastAdjustment())
        ->setTrafficForecastSegment($formattedForecastAdjustmentTrafficForecastSegment)
        ->setDisplayName($forecastAdjustmentDisplayName)
        ->setDateRange($forecastAdjustmentDateRange)
        ->setVolumeType($forecastAdjustmentVolumeType);
    $request = (new UpdateForecastAdjustmentRequest())
        ->setForecastAdjustment($forecastAdjustment);

    // Call the API and handle any network failures.
    try {
        /** @var ForecastAdjustment $response */
        $response = $forecastAdjustmentServiceClient->updateForecastAdjustment($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
{
    $formattedForecastAdjustmentTrafficForecastSegment = ForecastAdjustmentServiceClient::trafficForecastSegmentName(
        '[NETWORK_CODE]',
        '[TRAFFIC_FORECAST_SEGMENT]'
    );
    $forecastAdjustmentDisplayName = '[DISPLAY_NAME]';
    $forecastAdjustmentVolumeType = ForecastAdjustmentVolumeType::FORECAST_ADJUSTMENT_VOLUME_TYPE_UNSPECIFIED;

    update_forecast_adjustment_sample(
        $formattedForecastAdjustmentTrafficForecastSegment,
        $forecastAdjustmentDisplayName,
        $forecastAdjustmentVolumeType
    );
}
```

### batchActivateForecastAdjustmentsAsync

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `Google\Ads\AdManager\V1\BatchActivateForecastAdjustmentsRequest` |
| `optionalArgs` | `array` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `GuzzleHttp\Promise\PromiseInterface<Google\Ads\AdManager\V1\BatchActivateForecastAdjustmentsResponse>` |   |

### batchCreateForecastAdjustmentsAsync

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `Google\Ads\AdManager\V1\BatchCreateForecastAdjustmentsRequest` |
| `optionalArgs` | `array` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `GuzzleHttp\Promise\PromiseInterface<Google\Ads\AdManager\V1\BatchCreateForecastAdjustmentsResponse>` |   |

### batchDeactivateForecastAdjustmentsAsync

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `Google\Ads\AdManager\V1\BatchDeactivateForecastAdjustmentsRequest` |
| `optionalArgs` | `array` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `GuzzleHttp\Promise\PromiseInterface<Google\Ads\AdManager\V1\BatchDeactivateForecastAdjustmentsResponse>` |   |

### batchUpdateForecastAdjustmentsAsync

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `Google\Ads\AdManager\V1\BatchUpdateForecastAdjustmentsRequest` |
| `optionalArgs` | `array` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `GuzzleHttp\Promise\PromiseInterface<Google\Ads\AdManager\V1\BatchUpdateForecastAdjustmentsResponse>` |   |

### calculateDailyAdOpportunityCountsAsync

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `Google\Ads\AdManager\V1\CalculateDailyAdOpportunityCountsRequest` |
| `optionalArgs` | `array` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `GuzzleHttp\Promise\PromiseInterface<Google\Ads\AdManager\V1\CalculateDailyAdOpportunityCountsResponse>` |   |

### createForecastAdjustmentAsync

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `Google\Ads\AdManager\V1\CreateForecastAdjustmentRequest` |
| `optionalArgs` | `array` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `GuzzleHttp\Promise\PromiseInterface<Google\Ads\AdManager\V1\ForecastAdjustment>` |   |

### getForecastAdjustmentAsync

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `Google\Ads\AdManager\V1\GetForecastAdjustmentRequest` |
| `optionalArgs` | `array` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `GuzzleHttp\Promise\PromiseInterface<Google\Ads\AdManager\V1\ForecastAdjustment>` |   |

### listForecastAdjustmentsAsync

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `Google\Ads\AdManager\V1\ListForecastAdjustmentsRequest` |
| `optionalArgs` | `array` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `GuzzleHttp\Promise\PromiseInterface<Google\ApiCore\PagedListResponse>` |   |

### updateForecastAdjustmentAsync

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `Google\Ads\AdManager\V1\UpdateForecastAdjustmentRequest` |
| `optionalArgs` | `array` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `GuzzleHttp\Promise\PromiseInterface<Google\Ads\AdManager\V1\ForecastAdjustment>` |   |

### static::adCategoryName

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

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `networkCode` | `string` |
| `adCategory` | `string` |

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

### static::adSpotName

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

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `networkCode` | `string` |
| `adSpot` | `string` |

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

### static::adUnitName

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

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `networkCode` | `string` |
| `adUnit` | `string` |

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

### static::applicationName

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

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `networkCode` | `string` |
| `application` | `string` |

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

### static::audienceSegmentName

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

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `networkCode` | `string` |
| `audienceSegment` | `string` |

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

### static::bandwidthGroupName

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

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `networkCode` | `string` |
| `bandwidthGroup` | `string` |

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

### static::browserName

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

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `networkCode` | `string` |
| `browser` | `string` |

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

### static::browserLanguageName

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

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `networkCode` | `string` |
| `browserLanguage` | `string` |

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

### static::cmsMetadataValueName

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

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `networkCode` | `string` |
| `cmsMetadataValue` | `string` |

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

### static::contentName

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

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `networkCode` | `string` |
| `content` | `string` |

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

### static::contentBundleName

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

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `networkCode` | `string` |
| `contentBundle` | `string` |

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

### static::contentLabelName

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

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `networkCode` | `string` |
| `contentLabel` | `string` |

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

### static::customTargetingKeyName

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

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `networkCode` | `string` |
| `customTargetingKey` | `string` |

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

### static::customTargetingValueName

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

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `networkCode` | `string` |
| `customTargetingValue` | `string` |

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

### static::deviceCapabilityName

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

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `networkCode` | `string` |
| `deviceCapability` | `string` |

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

### static::deviceCategoryName

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

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `networkCode` | `string` |
| `deviceCategory` | `string` |

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

### static::deviceManufacturerName

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

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `networkCode` | `string` |
| `deviceManufacturer` | `string` |

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

### static::forecastAdjustmentName

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

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `networkCode` | `string` |
| `forecastAdjustment` | `string` |

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

### static::geoTargetName

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

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `networkCode` | `string` |
| `geoTarget` | `string` |

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

### static::inventoryUrlName

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

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `networkCode` | `string` |
| `inventoryUrl` | `string` |

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

### static::mobileCarrierName

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

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `networkCode` | `string` |
| `mobileCarrier` | `string` |

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

### static::mobileDeviceName

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

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `networkCode` | `string` |
| `mobileDevice` | `string` |

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

### static::mobileDeviceSubmodelName

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

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `networkCode` | `string` |
| `mobileDeviceSubmodel` | `string` |

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

### static::networkName

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

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `networkCode` | `string` |

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

### static::operatingSystemName

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

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `networkCode` | `string` |
| `operatingSystem` | `string` |

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

### static::operatingSystemVersionName

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

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `networkCode` | `string` |
| `operatingSystemVersion` | `string` |

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

### static::placementName

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

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `networkCode` | `string` |
| `placement` | `string` |

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

### static::taxonomyCategoryName

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

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `networkCode` | `string` |
| `taxonomyCategory` | `string` |

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

### static::trafficForecastSegmentName

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

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `networkCode` | `string` |
| `trafficForecastSegment` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` | The formatted traffic_forecast_segment 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

- adCategory: networks/{network_code}/adCategories/{ad_category}
- adSpot: networks/{network_code}/adSpots/{ad_spot}
- adUnit: networks/{network_code}/adUnits/{ad_unit}
- application: networks/{network_code}/applications/{application}
- audienceSegment: networks/{network_code}/audienceSegments/{audience_segment}
- bandwidthGroup: networks/{network_code}/bandwidthGroups/{bandwidth_group}
- browser: networks/{network_code}/browsers/{browser}
- browserLanguage: networks/{network_code}/browserLanguages/{browser_language}
- cmsMetadataValue: networks/{network_code}/cmsMetadataValues/{cms_metadata_value}
- content: networks/{network_code}/content/{content}
- contentBundle: networks/{network_code}/contentBundles/{content_bundle}
- contentLabel: networks/{network_code}/contentLabels/{content_label}
- customTargetingKey: networks/{network_code}/customTargetingKeys/{custom_targeting_key}
- customTargetingValue: networks/{network_code}/customTargetingValues/{custom_targeting_value}
- deviceCapability: networks/{network_code}/deviceCapabilities/{device_capability}
- deviceCategory: networks/{network_code}/deviceCategories/{device_category}
- deviceManufacturer: networks/{network_code}/deviceManufacturers/{device_manufacturer}
- forecastAdjustment: networks/{network_code}/forecastAdjustments/{forecast_adjustment}
- geoTarget: networks/{network_code}/geoTargets/{geo_target}
- inventoryUrl: networks/{network_code}/inventoryUrls/{inventory_url}
- mobileCarrier: networks/{network_code}/mobileCarriers/{mobile_carrier}
- mobileDevice: networks/{network_code}/mobileDevices/{mobile_device}
- mobileDeviceSubmodel: networks/{network_code}/mobileDeviceSubmodels/{mobile_device_submodel}
- network: networks/{network_code}
- operatingSystem: networks/{network_code}/operatingSystems/{operating_system}
- operatingSystemVersion: networks/{network_code}/operatingSystemVersions/{operating_system_version}
- placement: networks/{network_code}/placements/{placement}
- taxonomyCategory: networks/{network_code}/taxonomyCategories/{taxonomy_category}
- trafficForecastSegment: networks/{network_code}/trafficForecastSegments/{traffic_forecast_segment}

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. |