# Google Cloud Network Security V1 Client - Class InterceptClient (1.4.0)

1.4.0 (latest) 1.3.0 1.2.3 1.1.0 1.0.4 0.6.5 0.5.2 0.4.1 0.3.7 Reference documentation and code samples for the Google Cloud Network Security V1 Client class InterceptClient.

Service Description: Service for Third-Party Packet Intercept (TPPI).

TPPI is the "in-band" flavor of the Network Security Integrations product.

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 \\ NetworkSecurity \\ 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\NetworkSecurity\V1\InterceptClient; $creds = new ServiceAccountCredentials($scopes, $json); $options = new InterceptClient(['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'. |

### createInterceptDeployment

Creates a deployment in a given project and location.

See <https://google.aip.dev/133>.

The async variant is [InterceptClient::createInterceptDeploymentAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-network-security/latest/V1.Client.InterceptClient#_Google_Cloud_NetworkSecurity_V1_Client_InterceptClient__createInterceptDeploymentAsync__) .

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-network-security/latest/V1.CreateInterceptDeploymentRequest` 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-network-security/latest/V1.InterceptDeployment>` |   |

**Example**

    use Google\ApiCore\ApiException;
    use Google\ApiCore\OperationResponse;
    use Google\Cloud\NetworkSecurity\V1\Client\InterceptClient;
    use Google\Cloud\NetworkSecurity\V1\CreateInterceptDeploymentRequest;
    use Google\Cloud\NetworkSecurity\V1\InterceptDeployment;
    use Google\Rpc\Status;

    /**
     * @param string $formattedParent                                      The parent resource where this deployment will be created.
     *                                                                     Format: projects/{project}/locations/{location}
     *                                                                     Please see {@see InterceptClient::locationName()} for help formatting this field.
     * @param string $interceptDeploymentId                                The ID to use for the new deployment, which will become the final
     *                                                                     component of the deployment's resource name.
     * @param string $formattedInterceptDeploymentForwardingRule           Immutable. The regional forwarding rule that fronts the
     *                                                                     interceptors, for example:
     *                                                                     `projects/123456789/regions/us-central1/forwardingRules/my-rule`.
     *                                                                     See https://google.aip.dev/124. Please see
     *                                                                     {@see InterceptClient::forwardingRuleName()} for help formatting this field.
     * @param string $formattedInterceptDeploymentInterceptDeploymentGroup Immutable. The deployment group that this deployment is a part
     *                                                                     of, for example:
     *                                                                     `projects/123456789/locations/global/interceptDeploymentGroups/my-dg`.
     *                                                                     See https://google.aip.dev/124. Please see
     *                                                                     {@see InterceptClient::interceptDeploymentGroupName()} for help formatting this field.
     */
    function create_intercept_deployment_sample(
        string $formattedParent,
        string $interceptDeploymentId,
        string $formattedInterceptDeploymentForwardingRule,
        string $formattedInterceptDeploymentInterceptDeploymentGroup
    ): void {
        // Create a client.
        $interceptClient = new InterceptClient();

        // Prepare the request message.
        $interceptDeployment = (new InterceptDeployment())
            ->setForwardingRule($formattedInterceptDeploymentForwardingRule)
            ->setInterceptDeploymentGroup($formattedInterceptDeploymentInterceptDeploymentGroup);
        $request = (new CreateInterceptDeploymentRequest())
            ->setParent($formattedParent)
            ->setInterceptDeploymentId($interceptDeploymentId)
            ->setInterceptDeployment($interceptDeployment);

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

            if ($response->operationSucceeded()) {
                /** @var InterceptDeployment $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 = InterceptClient::locationName('[PROJECT]', '[LOCATION]');
        $interceptDeploymentId = '[INTERCEPT_DEPLOYMENT_ID]';
        $formattedInterceptDeploymentForwardingRule = InterceptClient::forwardingRuleName(
            '[PROJECT]',
            '[FORWARDING_RULE]'
        );
        $formattedInterceptDeploymentInterceptDeploymentGroup = InterceptClient::interceptDeploymentGroupName(
            '[PROJECT]',
            '[LOCATION]',
            '[INTERCEPT_DEPLOYMENT_GROUP]'
        );

        create_intercept_deployment_sample(
            $formattedParent,
            $interceptDeploymentId,
            $formattedInterceptDeploymentForwardingRule,
            $formattedInterceptDeploymentInterceptDeploymentGroup
        );
    }

### createInterceptDeploymentGroup

Creates a deployment group in a given project and location.

See <https://google.aip.dev/133>.

The async variant is
[InterceptClient::createInterceptDeploymentGroupAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-network-security/latest/V1.Client.InterceptClient#_Google_Cloud_NetworkSecurity_V1_Client_InterceptClient__createInterceptDeploymentGroupAsync__) .

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-network-security/latest/V1.CreateInterceptDeploymentGroupRequest` 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-network-security/latest/V1.InterceptDeploymentGroup>` |   |

**Example**

    use Google\ApiCore\ApiException;
    use Google\ApiCore\OperationResponse;
    use Google\Cloud\NetworkSecurity\V1\Client\InterceptClient;
    use Google\Cloud\NetworkSecurity\V1\CreateInterceptDeploymentGroupRequest;
    use Google\Cloud\NetworkSecurity\V1\InterceptDeploymentGroup;
    use Google\Rpc\Status;

    /**
     * @param string $formattedParent                          The parent resource where this deployment group will be created.
     *                                                         Format: projects/{project}/locations/{location}
     *                                                         Please see {@see InterceptClient::locationName()} for help formatting this field.
     * @param string $interceptDeploymentGroupId               The ID to use for the new deployment group, which will become the
     *                                                         final component of the deployment group's resource name.
     * @param string $formattedInterceptDeploymentGroupNetwork Immutable. The network that will be used for all child
     *                                                         deployments, for example: `projects/{project}/global/networks/{network}`.
     *                                                         See https://google.aip.dev/124. Please see
     *                                                         {@see InterceptClient::networkName()} for help formatting this field.
     */
    function create_intercept_deployment_group_sample(
        string $formattedParent,
        string $interceptDeploymentGroupId,
        string $formattedInterceptDeploymentGroupNetwork
    ): void {
        // Create a client.
        $interceptClient = new InterceptClient();

        // Prepare the request message.
        $interceptDeploymentGroup = (new InterceptDeploymentGroup())
            ->setNetwork($formattedInterceptDeploymentGroupNetwork);
        $request = (new CreateInterceptDeploymentGroupRequest())
            ->setParent($formattedParent)
            ->setInterceptDeploymentGroupId($interceptDeploymentGroupId)
            ->setInterceptDeploymentGroup($interceptDeploymentGroup);

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

            if ($response->operationSucceeded()) {
                /** @var InterceptDeploymentGroup $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 = InterceptClient::locationName('[PROJECT]', '[LOCATION]');
        $interceptDeploymentGroupId = '[INTERCEPT_DEPLOYMENT_GROUP_ID]';
        $formattedInterceptDeploymentGroupNetwork = InterceptClient::networkName('[PROJECT]', '[NETWORK]');

        create_intercept_deployment_group_sample(
            $formattedParent,
            $interceptDeploymentGroupId,
            $formattedInterceptDeploymentGroupNetwork
        );
    }

### createInterceptEndpointGroup

Creates an endpoint group in a given project and location.

See <https://google.aip.dev/133>.

The async variant is [InterceptClient::createInterceptEndpointGroupAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-network-security/latest/V1.Client.InterceptClient#_Google_Cloud_NetworkSecurity_V1_Client_InterceptClient__createInterceptEndpointGroupAsync__)
.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-network-security/latest/V1.CreateInterceptEndpointGroupRequest` 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-network-security/latest/V1.InterceptEndpointGroup>` |   |

**Example**

    use Google\ApiCore\ApiException;
    use Google\ApiCore\OperationResponse;
    use Google\Cloud\NetworkSecurity\V1\Client\InterceptClient;
    use Google\Cloud\NetworkSecurity\V1\CreateInterceptEndpointGroupRequest;
    use Google\Cloud\NetworkSecurity\V1\InterceptEndpointGroup;
    use Google\Rpc\Status;

    /**
     * @param string $formattedParent                                         The parent resource where this endpoint group will be created.
     *                                                                        Format: projects/{project}/locations/{location}
     *                                                                        Please see {@see InterceptClient::locationName()} for help formatting this field.
     * @param string $interceptEndpointGroupId                                The ID to use for the endpoint group, which will become the final
     *                                                                        component of the endpoint group's resource name.
     * @param string $formattedInterceptEndpointGroupInterceptDeploymentGroup Immutable. The deployment group that this endpoint group is
     *                                                                        connected to, for example:
     *                                                                        `projects/123456789/locations/global/interceptDeploymentGroups/my-dg`.
     *                                                                        See https://google.aip.dev/124. Please see
     *                                                                        {@see InterceptClient::interceptDeploymentGroupName()} for help formatting this field.
     */
    function create_intercept_endpoint_group_sample(
        string $formattedParent,
        string $interceptEndpointGroupId,
        string $formattedInterceptEndpointGroupInterceptDeploymentGroup
    ): void {
        // Create a client.
        $interceptClient = new InterceptClient();

        // Prepare the request message.
        $interceptEndpointGroup = (new InterceptEndpointGroup())
            ->setInterceptDeploymentGroup($formattedInterceptEndpointGroupInterceptDeploymentGroup);
        $request = (new CreateInterceptEndpointGroupRequest())
            ->setParent($formattedParent)
            ->setInterceptEndpointGroupId($interceptEndpointGroupId)
            ->setInterceptEndpointGroup($interceptEndpointGroup);

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

            if ($response->operationSucceeded()) {
                /** @var InterceptEndpointGroup $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 = InterceptClient::locationName('[PROJECT]', '[LOCATION]');
        $interceptEndpointGroupId = '[INTERCEPT_ENDPOINT_GROUP_ID]';
        $formattedInterceptEndpointGroupInterceptDeploymentGroup = InterceptClient::interceptDeploymentGroupName(
            '[PROJECT]',
            '[LOCATION]',
            '[INTERCEPT_DEPLOYMENT_GROUP]'
        );

        create_intercept_endpoint_group_sample(
            $formattedParent,
            $interceptEndpointGroupId,
            $formattedInterceptEndpointGroupInterceptDeploymentGroup
        );
    }

### createInterceptEndpointGroupAssociation

Creates an association in a given project and location.

See <https://google.aip.dev/133>.

The async variant is
[InterceptClient::createInterceptEndpointGroupAssociationAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-network-security/latest/V1.Client.InterceptClient#_Google_Cloud_NetworkSecurity_V1_Client_InterceptClient__createInterceptEndpointGroupAssociationAsync__) .

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-network-security/latest/V1.CreateInterceptEndpointGroupAssociationRequest` 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-network-security/latest/V1.InterceptEndpointGroupAssociation>` |   |

**Example**

    use Google\ApiCore\ApiException;
    use Google\ApiCore\OperationResponse;
    use Google\Cloud\NetworkSecurity\V1\Client\InterceptClient;
    use Google\Cloud\NetworkSecurity\V1\CreateInterceptEndpointGroupAssociationRequest;
    use Google\Cloud\NetworkSecurity\V1\InterceptEndpointGroupAssociation;
    use Google\Rpc\Status;

    /**
     * @param string $formattedParent                                                  The parent resource where this association will be created.
     *                                                                                 Format: projects/{project}/locations/{location}
     *                                                                                 Please see {@see InterceptClient::locationName()} for help formatting this field.
     * @param string $formattedInterceptEndpointGroupAssociationInterceptEndpointGroup Immutable. The endpoint group that this association is connected
     *                                                                                 to, for example:
     *                                                                                 `projects/123456789/locations/global/interceptEndpointGroups/my-eg`.
     *                                                                                 See https://google.aip.dev/124. Please see
     *                                                                                 {@see InterceptClient::interceptEndpointGroupName()} for help formatting this field.
     * @param string $formattedInterceptEndpointGroupAssociationNetwork                Immutable. The VPC network that is associated. for example:
     *                                                                                 `projects/123456789/global/networks/my-network`.
     *                                                                                 See https://google.aip.dev/124. Please see
     *                                                                                 {@see InterceptClient::networkName()} for help formatting this field.
     */
    function create_intercept_endpoint_group_association_sample(
        string $formattedParent,
        string $formattedInterceptEndpointGroupAssociationInterceptEndpointGroup,
        string $formattedInterceptEndpointGroupAssociationNetwork
    ): void {
        // Create a client.
        $interceptClient = new InterceptClient();

        // Prepare the request message.
        $interceptEndpointGroupAssociation = (new InterceptEndpointGroupAssociation())
            ->setInterceptEndpointGroup($formattedInterceptEndpointGroupAssociationInterceptEndpointGroup)
            ->setNetwork($formattedInterceptEndpointGroupAssociationNetwork);
        $request = (new CreateInterceptEndpointGroupAssociationRequest())
            ->setParent($formattedParent)
            ->setInterceptEndpointGroupAssociation($interceptEndpointGroupAssociation);

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

            if ($response->operationSucceeded()) {
                /** @var InterceptEndpointGroupAssociation $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 = InterceptClient::locationName('[PROJECT]', '[LOCATION]');
        $formattedInterceptEndpointGroupAssociationInterceptEndpointGroup = InterceptClient::interceptEndpointGroupName(
            '[PROJECT]',
            '[LOCATION]',
            '[INTERCEPT_ENDPOINT_GROUP]'
        );
        $formattedInterceptEndpointGroupAssociationNetwork = InterceptClient::networkName(
            '[PROJECT]',
            '[NETWORK]'
        );

        create_intercept_endpoint_group_association_sample(
            $formattedParent,
            $formattedInterceptEndpointGroupAssociationInterceptEndpointGroup,
            $formattedInterceptEndpointGroupAssociationNetwork
        );
    }

### deleteInterceptDeployment

Deletes a deployment.

See <https://google.aip.dev/135>.

The async variant is [InterceptClient::deleteInterceptDeploymentAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-network-security/latest/V1.Client.InterceptClient#_Google_Cloud_NetworkSecurity_V1_Client_InterceptClient__deleteInterceptDeploymentAsync__) .

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-network-security/latest/V1.DeleteInterceptDeploymentRequest` 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\NetworkSecurity\V1\Client\InterceptClient;
    use Google\Cloud\NetworkSecurity\V1\DeleteInterceptDeploymentRequest;
    use Google\Rpc\Status;

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

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

        // Call the API and handle any network failures.
        try {
            /** @var OperationResponse $response */
            $response = $interceptClient->deleteInterceptDeployment($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 = InterceptClient::interceptDeploymentName(
            '[PROJECT]',
            '[LOCATION]',
            '[INTERCEPT_DEPLOYMENT]'
        );

        delete_intercept_deployment_sample($formattedName);
    }

### deleteInterceptDeploymentGroup

Deletes a deployment group.

See <https://google.aip.dev/135>.

The async variant is
[InterceptClient::deleteInterceptDeploymentGroupAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-network-security/latest/V1.Client.InterceptClient#_Google_Cloud_NetworkSecurity_V1_Client_InterceptClient__deleteInterceptDeploymentGroupAsync__) .

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-network-security/latest/V1.DeleteInterceptDeploymentGroupRequest` 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\NetworkSecurity\V1\Client\InterceptClient;
    use Google\Cloud\NetworkSecurity\V1\DeleteInterceptDeploymentGroupRequest;
    use Google\Rpc\Status;

    /**
     * @param string $formattedName The deployment group to delete. Please see
     *                              {@see InterceptClient::interceptDeploymentGroupName()} for help formatting this field.
     */
    function delete_intercept_deployment_group_sample(string $formattedName): void
    {
        // Create a client.
        $interceptClient = new InterceptClient();

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

        // Call the API and handle any network failures.
        try {
            /** @var OperationResponse $response */
            $response = $interceptClient->deleteInterceptDeploymentGroup($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 = InterceptClient::interceptDeploymentGroupName(
            '[PROJECT]',
            '[LOCATION]',
            '[INTERCEPT_DEPLOYMENT_GROUP]'
        );

        delete_intercept_deployment_group_sample($formattedName);
    }

### deleteInterceptEndpointGroup

Deletes an endpoint group.

See <https://google.aip.dev/135>.

The async variant is [InterceptClient::deleteInterceptEndpointGroupAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-network-security/latest/V1.Client.InterceptClient#_Google_Cloud_NetworkSecurity_V1_Client_InterceptClient__deleteInterceptEndpointGroupAsync__)
.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-network-security/latest/V1.DeleteInterceptEndpointGroupRequest` 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\NetworkSecurity\V1\Client\InterceptClient;
    use Google\Cloud\NetworkSecurity\V1\DeleteInterceptEndpointGroupRequest;
    use Google\Rpc\Status;

    /**
     * @param string $formattedName The endpoint group to delete. Please see
     *                              {@see InterceptClient::interceptEndpointGroupName()} for help formatting this field.
     */
    function delete_intercept_endpoint_group_sample(string $formattedName): void
    {
        // Create a client.
        $interceptClient = new InterceptClient();

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

        // Call the API and handle any network failures.
        try {
            /** @var OperationResponse $response */
            $response = $interceptClient->deleteInterceptEndpointGroup($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 = InterceptClient::interceptEndpointGroupName(
            '[PROJECT]',
            '[LOCATION]',
            '[INTERCEPT_ENDPOINT_GROUP]'
        );

        delete_intercept_endpoint_group_sample($formattedName);
    }

### deleteInterceptEndpointGroupAssociation

Deletes an association.

See <https://google.aip.dev/135>.

The async variant is
[InterceptClient::deleteInterceptEndpointGroupAssociationAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-network-security/latest/V1.Client.InterceptClient#_Google_Cloud_NetworkSecurity_V1_Client_InterceptClient__deleteInterceptEndpointGroupAssociationAsync__) .

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-network-security/latest/V1.DeleteInterceptEndpointGroupAssociationRequest` 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\NetworkSecurity\V1\Client\InterceptClient;
    use Google\Cloud\NetworkSecurity\V1\DeleteInterceptEndpointGroupAssociationRequest;
    use Google\Rpc\Status;

    /**
     * @param string $formattedName The association to delete. Please see
     *                              {@see InterceptClient::interceptEndpointGroupAssociationName()} for help formatting this field.
     */
    function delete_intercept_endpoint_group_association_sample(string $formattedName): void
    {
        // Create a client.
        $interceptClient = new InterceptClient();

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

        // Call the API and handle any network failures.
        try {
            /** @var OperationResponse $response */
            $response = $interceptClient->deleteInterceptEndpointGroupAssociation($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 = InterceptClient::interceptEndpointGroupAssociationName(
            '[PROJECT]',
            '[LOCATION]',
            '[INTERCEPT_ENDPOINT_GROUP_ASSOCIATION]'
        );

        delete_intercept_endpoint_group_association_sample($formattedName);
    }

### getInterceptDeployment

Gets a specific deployment.

See <https://google.aip.dev/131>.

The async variant is [InterceptClient::getInterceptDeploymentAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-network-security/latest/V1.Client.InterceptClient#_Google_Cloud_NetworkSecurity_V1_Client_InterceptClient__getInterceptDeploymentAsync__) .

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-network-security/latest/V1.GetInterceptDeploymentRequest` 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-network-security/latest/V1.InterceptDeployment` |   |

**Example**

    use Google\ApiCore\ApiException;
    use Google\Cloud\NetworkSecurity\V1\Client\InterceptClient;
    use Google\Cloud\NetworkSecurity\V1\GetInterceptDeploymentRequest;
    use Google\Cloud\NetworkSecurity\V1\InterceptDeployment;

    /**
     * @param string $formattedName The name of the deployment to retrieve.
     *                              Format:
     *                              projects/{project}/locations/{location}/interceptDeployments/{intercept_deployment}
     *                              Please see {@see InterceptClient::interceptDeploymentName()} for help formatting this field.
     */
    function get_intercept_deployment_sample(string $formattedName): void
    {
        // Create a client.
        $interceptClient = new InterceptClient();

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

        // Call the API and handle any network failures.
        try {
            /** @var InterceptDeployment $response */
            $response = $interceptClient->getInterceptDeployment($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 = InterceptClient::interceptDeploymentName(
            '[PROJECT]',
            '[LOCATION]',
            '[INTERCEPT_DEPLOYMENT]'
        );

        get_intercept_deployment_sample($formattedName);
    }

### getInterceptDeploymentGroup

Gets a specific deployment group.

See <https://google.aip.dev/131>.

The async variant is [InterceptClient::getInterceptDeploymentGroupAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-network-security/latest/V1.Client.InterceptClient#_Google_Cloud_NetworkSecurity_V1_Client_InterceptClient__getInterceptDeploymentGroupAsync__)
.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-network-security/latest/V1.GetInterceptDeploymentGroupRequest` 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-network-security/latest/V1.InterceptDeploymentGroup` |   |

**Example**

    use Google\ApiCore\ApiException;
    use Google\Cloud\NetworkSecurity\V1\Client\InterceptClient;
    use Google\Cloud\NetworkSecurity\V1\GetInterceptDeploymentGroupRequest;
    use Google\Cloud\NetworkSecurity\V1\InterceptDeploymentGroup;

    /**
     * @param string $formattedName The name of the deployment group to retrieve.
     *                              Format:
     *                              projects/{project}/locations/{location}/interceptDeploymentGroups/{intercept_deployment_group}
     *                              Please see {@see InterceptClient::interceptDeploymentGroupName()} for help formatting this field.
     */
    function get_intercept_deployment_group_sample(string $formattedName): void
    {
        // Create a client.
        $interceptClient = new InterceptClient();

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

        // Call the API and handle any network failures.
        try {
            /** @var InterceptDeploymentGroup $response */
            $response = $interceptClient->getInterceptDeploymentGroup($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 = InterceptClient::interceptDeploymentGroupName(
            '[PROJECT]',
            '[LOCATION]',
            '[INTERCEPT_DEPLOYMENT_GROUP]'
        );

        get_intercept_deployment_group_sample($formattedName);
    }

### getInterceptEndpointGroup

Gets a specific endpoint group.

See <https://google.aip.dev/131>.

The async variant is [InterceptClient::getInterceptEndpointGroupAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-network-security/latest/V1.Client.InterceptClient#_Google_Cloud_NetworkSecurity_V1_Client_InterceptClient__getInterceptEndpointGroupAsync__) .

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-network-security/latest/V1.GetInterceptEndpointGroupRequest` 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-network-security/latest/V1.InterceptEndpointGroup` |   |

**Example**

    use Google\ApiCore\ApiException;
    use Google\Cloud\NetworkSecurity\V1\Client\InterceptClient;
    use Google\Cloud\NetworkSecurity\V1\GetInterceptEndpointGroupRequest;
    use Google\Cloud\NetworkSecurity\V1\InterceptEndpointGroup;

    /**
     * @param string $formattedName The name of the endpoint group to retrieve.
     *                              Format:
     *                              projects/{project}/locations/{location}/interceptEndpointGroups/{intercept_endpoint_group}
     *                              Please see {@see InterceptClient::interceptEndpointGroupName()} for help formatting this field.
     */
    function get_intercept_endpoint_group_sample(string $formattedName): void
    {
        // Create a client.
        $interceptClient = new InterceptClient();

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

        // Call the API and handle any network failures.
        try {
            /** @var InterceptEndpointGroup $response */
            $response = $interceptClient->getInterceptEndpointGroup($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 = InterceptClient::interceptEndpointGroupName(
            '[PROJECT]',
            '[LOCATION]',
            '[INTERCEPT_ENDPOINT_GROUP]'
        );

        get_intercept_endpoint_group_sample($formattedName);
    }

### getInterceptEndpointGroupAssociation

Gets a specific association.

See <https://google.aip.dev/131>.

The async variant is
[InterceptClient::getInterceptEndpointGroupAssociationAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-network-security/latest/V1.Client.InterceptClient#_Google_Cloud_NetworkSecurity_V1_Client_InterceptClient__getInterceptEndpointGroupAssociationAsync__) .

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-network-security/latest/V1.GetInterceptEndpointGroupAssociationRequest` 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-network-security/latest/V1.InterceptEndpointGroupAssociation` |   |

**Example**

    use Google\ApiCore\ApiException;
    use Google\Cloud\NetworkSecurity\V1\Client\InterceptClient;
    use Google\Cloud\NetworkSecurity\V1\GetInterceptEndpointGroupAssociationRequest;
    use Google\Cloud\NetworkSecurity\V1\InterceptEndpointGroupAssociation;

    /**
     * @param string $formattedName The name of the association to retrieve.
     *                              Format:
     *                              projects/{project}/locations/{location}/interceptEndpointGroupAssociations/{intercept_endpoint_group_association}
     *                              Please see {@see InterceptClient::interceptEndpointGroupAssociationName()} for help formatting this field.
     */
    function get_intercept_endpoint_group_association_sample(string $formattedName): void
    {
        // Create a client.
        $interceptClient = new InterceptClient();

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

        // Call the API and handle any network failures.
        try {
            /** @var InterceptEndpointGroupAssociation $response */
            $response = $interceptClient->getInterceptEndpointGroupAssociation($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 = InterceptClient::interceptEndpointGroupAssociationName(
            '[PROJECT]',
            '[LOCATION]',
            '[INTERCEPT_ENDPOINT_GROUP_ASSOCIATION]'
        );

        get_intercept_endpoint_group_association_sample($formattedName);
    }

### listInterceptDeploymentGroups

Lists deployment groups in a given project and location.

See <https://google.aip.dev/132>.

The async variant is
[InterceptClient::listInterceptDeploymentGroupsAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-network-security/latest/V1.Client.InterceptClient#_Google_Cloud_NetworkSecurity_V1_Client_InterceptClient__listInterceptDeploymentGroupsAsync__) .

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-network-security/latest/V1.ListInterceptDeploymentGroupsRequest` 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\NetworkSecurity\V1\Client\InterceptClient;
    use Google\Cloud\NetworkSecurity\V1\InterceptDeploymentGroup;
    use Google\Cloud\NetworkSecurity\V1\ListInterceptDeploymentGroupsRequest;

    /**
     * @param string $formattedParent The parent, which owns this collection of deployment groups.
     *                                Example: `projects/123456789/locations/global`.
     *                                See https://google.aip.dev/132 for more details. Please see
     *                                {@see InterceptClient::locationName()} for help formatting this field.
     */
    function list_intercept_deployment_groups_sample(string $formattedParent): void
    {
        // Create a client.
        $interceptClient = new InterceptClient();

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

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

            /** @var InterceptDeploymentGroup $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 = InterceptClient::locationName('[PROJECT]', '[LOCATION]');

        list_intercept_deployment_groups_sample($formattedParent);
    }

### listInterceptDeployments

Lists deployments in a given project and location.

See <https://google.aip.dev/132>.

The async variant is [InterceptClient::listInterceptDeploymentsAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-network-security/latest/V1.Client.InterceptClient#_Google_Cloud_NetworkSecurity_V1_Client_InterceptClient__listInterceptDeploymentsAsync__) .

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-network-security/latest/V1.ListInterceptDeploymentsRequest` 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\NetworkSecurity\V1\Client\InterceptClient;
    use Google\Cloud\NetworkSecurity\V1\InterceptDeployment;
    use Google\Cloud\NetworkSecurity\V1\ListInterceptDeploymentsRequest;

    /**
     * @param string $formattedParent The parent, which owns this collection of deployments.
     *                                Example: `projects/123456789/locations/us-central1-a`.
     *                                See https://google.aip.dev/132 for more details. Please see
     *                                {@see InterceptClient::locationName()} for help formatting this field.
     */
    function list_intercept_deployments_sample(string $formattedParent): void
    {
        // Create a client.
        $interceptClient = new InterceptClient();

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

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

            /** @var InterceptDeployment $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 = InterceptClient::locationName('[PROJECT]', '[LOCATION]');

        list_intercept_deployments_sample($formattedParent);
    }

### listInterceptEndpointGroupAssociations

Lists associations in a given project and location.

See <https://google.aip.dev/132>.

The async variant is
[InterceptClient::listInterceptEndpointGroupAssociationsAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-network-security/latest/V1.Client.InterceptClient#_Google_Cloud_NetworkSecurity_V1_Client_InterceptClient__listInterceptEndpointGroupAssociationsAsync__) .

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-network-security/latest/V1.ListInterceptEndpointGroupAssociationsRequest` 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\NetworkSecurity\V1\Client\InterceptClient;
    use Google\Cloud\NetworkSecurity\V1\InterceptEndpointGroupAssociation;
    use Google\Cloud\NetworkSecurity\V1\ListInterceptEndpointGroupAssociationsRequest;

    /**
     * @param string $formattedParent The parent, which owns this collection of associations.
     *                                Example: `projects/123456789/locations/global`.
     *                                See https://google.aip.dev/132 for more details. Please see
     *                                {@see InterceptClient::locationName()} for help formatting this field.
     */
    function list_intercept_endpoint_group_associations_sample(string $formattedParent): void
    {
        // Create a client.
        $interceptClient = new InterceptClient();

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

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

            /** @var InterceptEndpointGroupAssociation $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 = InterceptClient::locationName('[PROJECT]', '[LOCATION]');

        list_intercept_endpoint_group_associations_sample($formattedParent);
    }

### listInterceptEndpointGroups

Lists endpoint groups in a given project and location.

See <https://google.aip.dev/132>.

The async variant is [InterceptClient::listInterceptEndpointGroupsAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-network-security/latest/V1.Client.InterceptClient#_Google_Cloud_NetworkSecurity_V1_Client_InterceptClient__listInterceptEndpointGroupsAsync__)
.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-network-security/latest/V1.ListInterceptEndpointGroupsRequest` 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\NetworkSecurity\V1\Client\InterceptClient;
    use Google\Cloud\NetworkSecurity\V1\InterceptEndpointGroup;
    use Google\Cloud\NetworkSecurity\V1\ListInterceptEndpointGroupsRequest;

    /**
     * @param string $formattedParent The parent, which owns this collection of endpoint groups.
     *                                Example: `projects/123456789/locations/global`.
     *                                See https://google.aip.dev/132 for more details. Please see
     *                                {@see InterceptClient::locationName()} for help formatting this field.
     */
    function list_intercept_endpoint_groups_sample(string $formattedParent): void
    {
        // Create a client.
        $interceptClient = new InterceptClient();

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

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

            /** @var InterceptEndpointGroup $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 = InterceptClient::locationName('[PROJECT]', '[LOCATION]');

        list_intercept_endpoint_groups_sample($formattedParent);
    }

### updateInterceptDeployment

Updates a deployment.

See <https://google.aip.dev/134>.

The async variant is [InterceptClient::updateInterceptDeploymentAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-network-security/latest/V1.Client.InterceptClient#_Google_Cloud_NetworkSecurity_V1_Client_InterceptClient__updateInterceptDeploymentAsync__) .

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-network-security/latest/V1.UpdateInterceptDeploymentRequest` 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-network-security/latest/V1.InterceptDeployment>` |   |

**Example**

    use Google\ApiCore\ApiException;
    use Google\ApiCore\OperationResponse;
    use Google\Cloud\NetworkSecurity\V1\Client\InterceptClient;
    use Google\Cloud\NetworkSecurity\V1\InterceptDeployment;
    use Google\Cloud\NetworkSecurity\V1\UpdateInterceptDeploymentRequest;
    use Google\Rpc\Status;

    /**
     * @param string $formattedInterceptDeploymentForwardingRule           Immutable. The regional forwarding rule that fronts the
     *                                                                     interceptors, for example:
     *                                                                     `projects/123456789/regions/us-central1/forwardingRules/my-rule`.
     *                                                                     See https://google.aip.dev/124. Please see
     *                                                                     {@see InterceptClient::forwardingRuleName()} for help formatting this field.
     * @param string $formattedInterceptDeploymentInterceptDeploymentGroup Immutable. The deployment group that this deployment is a part
     *                                                                     of, for example:
     *                                                                     `projects/123456789/locations/global/interceptDeploymentGroups/my-dg`.
     *                                                                     See https://google.aip.dev/124. Please see
     *                                                                     {@see InterceptClient::interceptDeploymentGroupName()} for help formatting this field.
     */
    function update_intercept_deployment_sample(
        string $formattedInterceptDeploymentForwardingRule,
        string $formattedInterceptDeploymentInterceptDeploymentGroup
    ): void {
        // Create a client.
        $interceptClient = new InterceptClient();

        // Prepare the request message.
        $interceptDeployment = (new InterceptDeployment())
            ->setForwardingRule($formattedInterceptDeploymentForwardingRule)
            ->setInterceptDeploymentGroup($formattedInterceptDeploymentInterceptDeploymentGroup);
        $request = (new UpdateInterceptDeploymentRequest())
            ->setInterceptDeployment($interceptDeployment);

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

            if ($response->operationSucceeded()) {
                /** @var InterceptDeployment $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
    {
        $formattedInterceptDeploymentForwardingRule = InterceptClient::forwardingRuleName(
            '[PROJECT]',
            '[FORWARDING_RULE]'
        );
        $formattedInterceptDeploymentInterceptDeploymentGroup = InterceptClient::interceptDeploymentGroupName(
            '[PROJECT]',
            '[LOCATION]',
            '[INTERCEPT_DEPLOYMENT_GROUP]'
        );

        update_intercept_deployment_sample(
            $formattedInterceptDeploymentForwardingRule,
            $formattedInterceptDeploymentInterceptDeploymentGroup
        );
    }

### updateInterceptDeploymentGroup

Updates a deployment group.

See <https://google.aip.dev/134>.

The async variant is
[InterceptClient::updateInterceptDeploymentGroupAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-network-security/latest/V1.Client.InterceptClient#_Google_Cloud_NetworkSecurity_V1_Client_InterceptClient__updateInterceptDeploymentGroupAsync__) .

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-network-security/latest/V1.UpdateInterceptDeploymentGroupRequest` 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-network-security/latest/V1.InterceptDeploymentGroup>` |   |

**Example**

    use Google\ApiCore\ApiException;
    use Google\ApiCore\OperationResponse;
    use Google\Cloud\NetworkSecurity\V1\Client\InterceptClient;
    use Google\Cloud\NetworkSecurity\V1\InterceptDeploymentGroup;
    use Google\Cloud\NetworkSecurity\V1\UpdateInterceptDeploymentGroupRequest;
    use Google\Rpc\Status;

    /**
     * @param string $formattedInterceptDeploymentGroupNetwork Immutable. The network that will be used for all child
     *                                                         deployments, for example: `projects/{project}/global/networks/{network}`.
     *                                                         See https://google.aip.dev/124. Please see
     *                                                         {@see InterceptClient::networkName()} for help formatting this field.
     */
    function update_intercept_deployment_group_sample(
        string $formattedInterceptDeploymentGroupNetwork
    ): void {
        // Create a client.
        $interceptClient = new InterceptClient();

        // Prepare the request message.
        $interceptDeploymentGroup = (new InterceptDeploymentGroup())
            ->setNetwork($formattedInterceptDeploymentGroupNetwork);
        $request = (new UpdateInterceptDeploymentGroupRequest())
            ->setInterceptDeploymentGroup($interceptDeploymentGroup);

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

            if ($response->operationSucceeded()) {
                /** @var InterceptDeploymentGroup $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
    {
        $formattedInterceptDeploymentGroupNetwork = InterceptClient::networkName('[PROJECT]', '[NETWORK]');

        update_intercept_deployment_group_sample($formattedInterceptDeploymentGroupNetwork);
    }

### updateInterceptEndpointGroup

Updates an endpoint group.

See <https://google.aip.dev/134>.

The async variant is [InterceptClient::updateInterceptEndpointGroupAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-network-security/latest/V1.Client.InterceptClient#_Google_Cloud_NetworkSecurity_V1_Client_InterceptClient__updateInterceptEndpointGroupAsync__)
.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-network-security/latest/V1.UpdateInterceptEndpointGroupRequest` 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-network-security/latest/V1.InterceptEndpointGroup>` |   |

**Example**

    use Google\ApiCore\ApiException;
    use Google\ApiCore\OperationResponse;
    use Google\Cloud\NetworkSecurity\V1\Client\InterceptClient;
    use Google\Cloud\NetworkSecurity\V1\InterceptEndpointGroup;
    use Google\Cloud\NetworkSecurity\V1\UpdateInterceptEndpointGroupRequest;
    use Google\Rpc\Status;

    /**
     * @param string $formattedInterceptEndpointGroupInterceptDeploymentGroup Immutable. The deployment group that this endpoint group is
     *                                                                        connected to, for example:
     *                                                                        `projects/123456789/locations/global/interceptDeploymentGroups/my-dg`.
     *                                                                        See https://google.aip.dev/124. Please see
     *                                                                        {@see InterceptClient::interceptDeploymentGroupName()} for help formatting this field.
     */
    function update_intercept_endpoint_group_sample(
        string $formattedInterceptEndpointGroupInterceptDeploymentGroup
    ): void {
        // Create a client.
        $interceptClient = new InterceptClient();

        // Prepare the request message.
        $interceptEndpointGroup = (new InterceptEndpointGroup())
            ->setInterceptDeploymentGroup($formattedInterceptEndpointGroupInterceptDeploymentGroup);
        $request = (new UpdateInterceptEndpointGroupRequest())
            ->setInterceptEndpointGroup($interceptEndpointGroup);

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

            if ($response->operationSucceeded()) {
                /** @var InterceptEndpointGroup $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
    {
        $formattedInterceptEndpointGroupInterceptDeploymentGroup = InterceptClient::interceptDeploymentGroupName(
            '[PROJECT]',
            '[LOCATION]',
            '[INTERCEPT_DEPLOYMENT_GROUP]'
        );

        update_intercept_endpoint_group_sample($formattedInterceptEndpointGroupInterceptDeploymentGroup);
    }

### updateInterceptEndpointGroupAssociation

Updates an association.

See <https://google.aip.dev/134>.

The async variant is
[InterceptClient::updateInterceptEndpointGroupAssociationAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-network-security/latest/V1.Client.InterceptClient#_Google_Cloud_NetworkSecurity_V1_Client_InterceptClient__updateInterceptEndpointGroupAssociationAsync__) .

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-network-security/latest/V1.UpdateInterceptEndpointGroupAssociationRequest` 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-network-security/latest/V1.InterceptEndpointGroupAssociation>` |   |

**Example**

    use Google\ApiCore\ApiException;
    use Google\ApiCore\OperationResponse;
    use Google\Cloud\NetworkSecurity\V1\Client\InterceptClient;
    use Google\Cloud\NetworkSecurity\V1\InterceptEndpointGroupAssociation;
    use Google\Cloud\NetworkSecurity\V1\UpdateInterceptEndpointGroupAssociationRequest;
    use Google\Rpc\Status;

    /**
     * @param string $formattedInterceptEndpointGroupAssociationInterceptEndpointGroup Immutable. The endpoint group that this association is connected
     *                                                                                 to, for example:
     *                                                                                 `projects/123456789/locations/global/interceptEndpointGroups/my-eg`.
     *                                                                                 See https://google.aip.dev/124. Please see
     *                                                                                 {@see InterceptClient::interceptEndpointGroupName()} for help formatting this field.
     * @param string $formattedInterceptEndpointGroupAssociationNetwork                Immutable. The VPC network that is associated. for example:
     *                                                                                 `projects/123456789/global/networks/my-network`.
     *                                                                                 See https://google.aip.dev/124. Please see
     *                                                                                 {@see InterceptClient::networkName()} for help formatting this field.
     */
    function update_intercept_endpoint_group_association_sample(
        string $formattedInterceptEndpointGroupAssociationInterceptEndpointGroup,
        string $formattedInterceptEndpointGroupAssociationNetwork
    ): void {
        // Create a client.
        $interceptClient = new InterceptClient();

        // Prepare the request message.
        $interceptEndpointGroupAssociation = (new InterceptEndpointGroupAssociation())
            ->setInterceptEndpointGroup($formattedInterceptEndpointGroupAssociationInterceptEndpointGroup)
            ->setNetwork($formattedInterceptEndpointGroupAssociationNetwork);
        $request = (new UpdateInterceptEndpointGroupAssociationRequest())
            ->setInterceptEndpointGroupAssociation($interceptEndpointGroupAssociation);

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

            if ($response->operationSucceeded()) {
                /** @var InterceptEndpointGroupAssociation $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
    {
        $formattedInterceptEndpointGroupAssociationInterceptEndpointGroup = InterceptClient::interceptEndpointGroupName(
            '[PROJECT]',
            '[LOCATION]',
            '[INTERCEPT_ENDPOINT_GROUP]'
        );
        $formattedInterceptEndpointGroupAssociationNetwork = InterceptClient::networkName(
            '[PROJECT]',
            '[NETWORK]'
        );

        update_intercept_endpoint_group_association_sample(
            $formattedInterceptEndpointGroupAssociationInterceptEndpointGroup,
            $formattedInterceptEndpointGroupAssociationNetwork
        );
    }

### getLocation

Gets information about a location.

The async variant is [InterceptClient::getLocationAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-network-security/latest/V1.Client.InterceptClient#_Google_Cloud_NetworkSecurity_V1_Client_InterceptClient__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\Location\GetLocationRequest;
    use Google\Cloud\Location\Location;
    use Google\Cloud\NetworkSecurity\V1\Client\InterceptClient;

    /**
     * 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.
        $interceptClient = new InterceptClient();

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

        // Call the API and handle any network failures.
        try {
            /** @var Location $response */
            $response = $interceptClient->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.

This method lists locations based on the resource scope provided in
the [ListLocationsRequest.name](https://docs.cloud.google.com/php/docs/reference/common-protos/latest/Cloud.Location.ListLocationsRequest.html#_Google_Cloud_Location_ListLocationsRequest__getName__) field: \*
*Global locations* *: If `name` is empty, the method lists the
public locations available to all projects. \* \*\*Project-specific
locations* \*: If `name` follows the format
`projects/{project}`, the method lists locations visible to that
specific project. This includes public, private, or other
project-specific locations enabled for the project.

For gRPC and client library implementations, the resource name is
passed as the `name` field. For direct service calls, the resource
name is
incorporated into the request path based on the specific service
implementation and version.

The async variant is [InterceptClient::listLocationsAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-network-security/latest/V1.Client.InterceptClient#_Google_Cloud_NetworkSecurity_V1_Client_InterceptClient__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\Location\ListLocationsRequest;
    use Google\Cloud\Location\Location;
    use Google\Cloud\NetworkSecurity\V1\Client\InterceptClient;

    /**
     * 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.
        $interceptClient = new InterceptClient();

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

        // Call the API and handle any network failures.
        try {
            /** @var PagedListResponse $response */
            $response = $interceptClient->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());
        }
    }

### getIamPolicy

Gets the access control policy for a resource. Returns an empty policy
if the resource exists and does not have a policy set.

The async variant is [InterceptClient::getIamPolicyAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-network-security/latest/V1.Client.InterceptClient#_Google_Cloud_NetworkSecurity_V1_Client_InterceptClient__getIamPolicyAsync__) .

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/common-protos/latest/Cloud.Iam.V1.GetIamPolicyRequest.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.Iam.V1.Policy.html` |   |

**Example**

    use Google\ApiCore\ApiException;
    use Google\Cloud\Iam\V1\GetIamPolicyRequest;
    use Google\Cloud\Iam\V1\Policy;
    use Google\Cloud\NetworkSecurity\V1\Client\InterceptClient;

    /**
     * @param string $resource REQUIRED: The resource for which the policy is being requested.
     *                         See the operation documentation for the appropriate value for this field.
     */
    function get_iam_policy_sample(string $resource): void
    {
        // Create a client.
        $interceptClient = new InterceptClient();

        // Prepare the request message.
        $request = (new GetIamPolicyRequest())
            ->setResource($resource);

        // Call the API and handle any network failures.
        try {
            /** @var Policy $response */
            $response = $interceptClient->getIamPolicy($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
    {
        $resource = '[RESOURCE]';

        get_iam_policy_sample($resource);
    }

### setIamPolicy

Sets the access control policy on the specified resource. Replaces
any existing policy.

Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`
errors.

The async variant is [InterceptClient::setIamPolicyAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-network-security/latest/V1.Client.InterceptClient#_Google_Cloud_NetworkSecurity_V1_Client_InterceptClient__setIamPolicyAsync__) .

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/common-protos/latest/Cloud.Iam.V1.SetIamPolicyRequest.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.Iam.V1.Policy.html` |   |

**Example**

    use Google\ApiCore\ApiException;
    use Google\Cloud\Iam\V1\Policy;
    use Google\Cloud\Iam\V1\SetIamPolicyRequest;
    use Google\Cloud\NetworkSecurity\V1\Client\InterceptClient;

    /**
     * @param string $resource REQUIRED: The resource for which the policy is being specified.
     *                         See the operation documentation for the appropriate value for this field.
     */
    function set_iam_policy_sample(string $resource): void
    {
        // Create a client.
        $interceptClient = new InterceptClient();

        // Prepare the request message.
        $policy = new Policy();
        $request = (new SetIamPolicyRequest())
            ->setResource($resource)
            ->setPolicy($policy);

        // Call the API and handle any network failures.
        try {
            /** @var Policy $response */
            $response = $interceptClient->setIamPolicy($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
    {
        $resource = '[RESOURCE]';

        set_iam_policy_sample($resource);
    }

### testIamPermissions

Returns permissions that a caller has on the specified resource. If the
resource does not exist, this will return an empty set of
permissions, not a `NOT_FOUND` error.

Note: This operation is designed to be used for building
permission-aware UIs and command-line tools, not for authorization
checking. This operation may "fail open" without warning.

The async variant is [InterceptClient::testIamPermissionsAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-network-security/latest/V1.Client.InterceptClient#_Google_Cloud_NetworkSecurity_V1_Client_InterceptClient__testIamPermissionsAsync__) .

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/common-protos/latest/Cloud.Iam.V1.TestIamPermissionsRequest.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.Iam.V1.TestIamPermissionsResponse.html` |   |

**Example**

    use Google\ApiCore\ApiException;
    use Google\Cloud\Iam\V1\TestIamPermissionsRequest;
    use Google\Cloud\Iam\V1\TestIamPermissionsResponse;
    use Google\Cloud\NetworkSecurity\V1\Client\InterceptClient;

    /**
     * @param string $resource           REQUIRED: The resource for which the policy detail is being requested.
     *                                   See the operation documentation for the appropriate value for this field.
     * @param string $permissionsElement The set of permissions to check for the `resource`. Permissions with
     *                                   wildcards (such as '*' or 'storage.*') are not allowed. For more
     *                                   information see
     *                                   [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions).
     */
    function test_iam_permissions_sample(string $resource, string $permissionsElement): void
    {
        // Create a client.
        $interceptClient = new InterceptClient();

        // Prepare the request message.
        $permissions = [$permissionsElement,];
        $request = (new TestIamPermissionsRequest())
            ->setResource($resource)
            ->setPermissions($permissions);

        // Call the API and handle any network failures.
        try {
            /** @var TestIamPermissionsResponse $response */
            $response = $interceptClient->testIamPermissions($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
    {
        $resource = '[RESOURCE]';
        $permissionsElement = '[PERMISSIONS]';

        test_iam_permissions_sample($resource, $permissionsElement);
    }

### createInterceptDeploymentAsync

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-network-security/latest/V1.CreateInterceptDeploymentRequest` |
| `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>` |   |

### createInterceptDeploymentGroupAsync

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-network-security/latest/V1.CreateInterceptDeploymentGroupRequest` |
| `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>` |   |

### createInterceptEndpointGroupAsync

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-network-security/latest/V1.CreateInterceptEndpointGroupRequest` |
| `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>` |   |

### createInterceptEndpointGroupAssociationAsync

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-network-security/latest/V1.CreateInterceptEndpointGroupAssociationRequest` |
| `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>` |   |

### deleteInterceptDeploymentAsync

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-network-security/latest/V1.DeleteInterceptDeploymentRequest` |
| `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>` |   |

### deleteInterceptDeploymentGroupAsync

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-network-security/latest/V1.DeleteInterceptDeploymentGroupRequest` |
| `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>` |   |

### deleteInterceptEndpointGroupAsync

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-network-security/latest/V1.DeleteInterceptEndpointGroupRequest` |
| `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>` |   |

### deleteInterceptEndpointGroupAssociationAsync

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-network-security/latest/V1.DeleteInterceptEndpointGroupAssociationRequest` |
| `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>` |   |

### getInterceptDeploymentAsync

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-network-security/latest/V1.GetInterceptDeploymentRequest` |
| `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-network-security/latest/V1.InterceptDeployment>` |   |

### getInterceptDeploymentGroupAsync

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-network-security/latest/V1.GetInterceptDeploymentGroupRequest` |
| `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-network-security/latest/V1.InterceptDeploymentGroup>` |   |

### getInterceptEndpointGroupAsync

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-network-security/latest/V1.GetInterceptEndpointGroupRequest` |
| `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-network-security/latest/V1.InterceptEndpointGroup>` |   |

### getInterceptEndpointGroupAssociationAsync

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-network-security/latest/V1.GetInterceptEndpointGroupAssociationRequest` |
| `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-network-security/latest/V1.InterceptEndpointGroupAssociation>` |   |

### listInterceptDeploymentGroupsAsync

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-network-security/latest/V1.ListInterceptDeploymentGroupsRequest` |
| `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>` |   |

### listInterceptDeploymentsAsync

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-network-security/latest/V1.ListInterceptDeploymentsRequest` |
| `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>` |   |

### listInterceptEndpointGroupAssociationsAsync

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-network-security/latest/V1.ListInterceptEndpointGroupAssociationsRequest` |
| `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>` |   |

### listInterceptEndpointGroupsAsync

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-network-security/latest/V1.ListInterceptEndpointGroupsRequest` |
| `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>` |   |

### updateInterceptDeploymentAsync

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-network-security/latest/V1.UpdateInterceptDeploymentRequest` |
| `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>` |   |

### updateInterceptDeploymentGroupAsync

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-network-security/latest/V1.UpdateInterceptDeploymentGroupRequest` |
| `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>` |   |

### updateInterceptEndpointGroupAsync

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-network-security/latest/V1.UpdateInterceptEndpointGroupRequest` |
| `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>` |   |

### updateInterceptEndpointGroupAssociationAsync

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-network-security/latest/V1.UpdateInterceptEndpointGroupAssociationRequest` |
| `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>` |   |

### getIamPolicyAsync

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/common-protos/latest/Cloud.Iam.V1.GetIamPolicyRequest.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.Iam.V1.Policy.html>` |   |

### setIamPolicyAsync

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/common-protos/latest/Cloud.Iam.V1.SetIamPolicyRequest.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.Iam.V1.Policy.html>` |   |

### testIamPermissionsAsync

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/common-protos/latest/Cloud.Iam.V1.TestIamPermissionsRequest.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.Iam.V1.TestIamPermissionsResponse.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::forwardingRuleName

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

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

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

### static::interceptDeploymentName

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

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

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

### static::interceptDeploymentGroupName

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

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

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

### static::interceptEndpointGroupName

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

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

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

### static::interceptEndpointGroupAssociationName

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

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

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

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

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

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

- forwardingRule: projects/{project}/global/forwardingRules/{forwarding_rule}
- interceptDeployment: projects/{project}/locations/{location}/interceptDeployments/{intercept_deployment}
- interceptDeploymentGroup: projects/{project}/locations/{location}/interceptDeploymentGroups/{intercept_deployment_group}
- interceptEndpointGroup: projects/{project}/locations/{location}/interceptEndpointGroups/{intercept_endpoint_group}
- interceptEndpointGroupAssociation: projects/{project}/locations/{location}/interceptEndpointGroupAssociations/{intercept_endpoint_group_association}
- location: projects/{project}/locations/{location}
- network: projects/{project}/global/networks/{network}

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