# Google Cloud Network Security V1 Client - Class MirroringClient (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 MirroringClient.

Service Description: PM2 is the "out-of-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\MirroringClient; $creds = new ServiceAccountCredentials($scopes, $json); $options = new MirroringClient(['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'. |

### createMirroringDeployment

Creates a deployment in a given project and location.

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

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

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

**Example**

    use Google\ApiCore\ApiException;
    use Google\ApiCore\OperationResponse;
    use Google\Cloud\NetworkSecurity\V1\Client\MirroringClient;
    use Google\Cloud\NetworkSecurity\V1\CreateMirroringDeploymentRequest;
    use Google\Cloud\NetworkSecurity\V1\MirroringDeployment;
    use Google\Rpc\Status;

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

        // Prepare the request message.
        $mirroringDeployment = (new MirroringDeployment())
            ->setForwardingRule($formattedMirroringDeploymentForwardingRule)
            ->setMirroringDeploymentGroup($formattedMirroringDeploymentMirroringDeploymentGroup);
        $request = (new CreateMirroringDeploymentRequest())
            ->setParent($formattedParent)
            ->setMirroringDeploymentId($mirroringDeploymentId)
            ->setMirroringDeployment($mirroringDeployment);

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

            if ($response->operationSucceeded()) {
                /** @var MirroringDeployment $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 = MirroringClient::locationName('[PROJECT]', '[LOCATION]');
        $mirroringDeploymentId = '[MIRRORING_DEPLOYMENT_ID]';
        $formattedMirroringDeploymentForwardingRule = MirroringClient::forwardingRuleName(
            '[PROJECT]',
            '[FORWARDING_RULE]'
        );
        $formattedMirroringDeploymentMirroringDeploymentGroup = MirroringClient::mirroringDeploymentGroupName(
            '[PROJECT]',
            '[LOCATION]',
            '[MIRRORING_DEPLOYMENT_GROUP]'
        );

        create_mirroring_deployment_sample(
            $formattedParent,
            $mirroringDeploymentId,
            $formattedMirroringDeploymentForwardingRule,
            $formattedMirroringDeploymentMirroringDeploymentGroup
        );
    }

### createMirroringDeploymentGroup

Creates a deployment group in a given project and location.

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

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

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

**Example**

    use Google\ApiCore\ApiException;
    use Google\ApiCore\OperationResponse;
    use Google\Cloud\NetworkSecurity\V1\Client\MirroringClient;
    use Google\Cloud\NetworkSecurity\V1\CreateMirroringDeploymentGroupRequest;
    use Google\Cloud\NetworkSecurity\V1\MirroringDeploymentGroup;
    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 MirroringClient::locationName()} for help formatting this field.
     * @param string $mirroringDeploymentGroupId               The ID to use for the new deployment group, which will become the
     *                                                         final component of the deployment group's resource name.
     * @param string $formattedMirroringDeploymentGroupNetwork 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 MirroringClient::networkName()} for help formatting this field.
     */
    function create_mirroring_deployment_group_sample(
        string $formattedParent,
        string $mirroringDeploymentGroupId,
        string $formattedMirroringDeploymentGroupNetwork
    ): void {
        // Create a client.
        $mirroringClient = new MirroringClient();

        // Prepare the request message.
        $mirroringDeploymentGroup = (new MirroringDeploymentGroup())
            ->setNetwork($formattedMirroringDeploymentGroupNetwork);
        $request = (new CreateMirroringDeploymentGroupRequest())
            ->setParent($formattedParent)
            ->setMirroringDeploymentGroupId($mirroringDeploymentGroupId)
            ->setMirroringDeploymentGroup($mirroringDeploymentGroup);

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

            if ($response->operationSucceeded()) {
                /** @var MirroringDeploymentGroup $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 = MirroringClient::locationName('[PROJECT]', '[LOCATION]');
        $mirroringDeploymentGroupId = '[MIRRORING_DEPLOYMENT_GROUP_ID]';
        $formattedMirroringDeploymentGroupNetwork = MirroringClient::networkName('[PROJECT]', '[NETWORK]');

        create_mirroring_deployment_group_sample(
            $formattedParent,
            $mirroringDeploymentGroupId,
            $formattedMirroringDeploymentGroupNetwork
        );
    }

### createMirroringEndpointGroup

Creates an endpoint group in a given project and location.

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

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

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

**Example**

    use Google\ApiCore\ApiException;
    use Google\ApiCore\OperationResponse;
    use Google\Cloud\NetworkSecurity\V1\Client\MirroringClient;
    use Google\Cloud\NetworkSecurity\V1\CreateMirroringEndpointGroupRequest;
    use Google\Cloud\NetworkSecurity\V1\MirroringEndpointGroup;
    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 MirroringClient::locationName()} for help formatting this field.
     * @param string $mirroringEndpointGroupId The ID to use for the endpoint group, which will become the final
     *                                         component of the endpoint group's resource name.
     */
    function create_mirroring_endpoint_group_sample(
        string $formattedParent,
        string $mirroringEndpointGroupId
    ): void {
        // Create a client.
        $mirroringClient = new MirroringClient();

        // Prepare the request message.
        $mirroringEndpointGroup = new MirroringEndpointGroup();
        $request = (new CreateMirroringEndpointGroupRequest())
            ->setParent($formattedParent)
            ->setMirroringEndpointGroupId($mirroringEndpointGroupId)
            ->setMirroringEndpointGroup($mirroringEndpointGroup);

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

            if ($response->operationSucceeded()) {
                /** @var MirroringEndpointGroup $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 = MirroringClient::locationName('[PROJECT]', '[LOCATION]');
        $mirroringEndpointGroupId = '[MIRRORING_ENDPOINT_GROUP_ID]';

        create_mirroring_endpoint_group_sample($formattedParent, $mirroringEndpointGroupId);
    }

### createMirroringEndpointGroupAssociation

Creates an association in a given project and location.

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

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

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

**Example**

    use Google\ApiCore\ApiException;
    use Google\ApiCore\OperationResponse;
    use Google\Cloud\NetworkSecurity\V1\Client\MirroringClient;
    use Google\Cloud\NetworkSecurity\V1\CreateMirroringEndpointGroupAssociationRequest;
    use Google\Cloud\NetworkSecurity\V1\MirroringEndpointGroupAssociation;
    use Google\Rpc\Status;

    /**
     * @param string $formattedParent The parent resource where this association will be created.
     *                                Format: projects/{project}/locations/{location}
     *                                Please see {@see MirroringClient::locationName()} for help formatting this field.
     */
    function create_mirroring_endpoint_group_association_sample(string $formattedParent): void
    {
        // Create a client.
        $mirroringClient = new MirroringClient();

        // Prepare the request message.
        $mirroringEndpointGroupAssociation = new MirroringEndpointGroupAssociation();
        $request = (new CreateMirroringEndpointGroupAssociationRequest())
            ->setParent($formattedParent)
            ->setMirroringEndpointGroupAssociation($mirroringEndpointGroupAssociation);

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

            if ($response->operationSucceeded()) {
                /** @var MirroringEndpointGroupAssociation $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 = MirroringClient::locationName('[PROJECT]', '[LOCATION]');

        create_mirroring_endpoint_group_association_sample($formattedParent);
    }

### deleteMirroringDeployment

Deletes a deployment.

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

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

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

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

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

        // Call the API and handle any network failures.
        try {
            /** @var OperationResponse $response */
            $response = $mirroringClient->deleteMirroringDeployment($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 = MirroringClient::mirroringDeploymentName(
            '[PROJECT]',
            '[LOCATION]',
            '[MIRRORING_DEPLOYMENT]'
        );

        delete_mirroring_deployment_sample($formattedName);
    }

### deleteMirroringDeploymentGroup

Deletes a deployment group.

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

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

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

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

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

        // Call the API and handle any network failures.
        try {
            /** @var OperationResponse $response */
            $response = $mirroringClient->deleteMirroringDeploymentGroup($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 = MirroringClient::mirroringDeploymentGroupName(
            '[PROJECT]',
            '[LOCATION]',
            '[MIRRORING_DEPLOYMENT_GROUP]'
        );

        delete_mirroring_deployment_group_sample($formattedName);
    }

### deleteMirroringEndpointGroup

Deletes an endpoint group.

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

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

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

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

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

        // Call the API and handle any network failures.
        try {
            /** @var OperationResponse $response */
            $response = $mirroringClient->deleteMirroringEndpointGroup($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 = MirroringClient::mirroringEndpointGroupName(
            '[PROJECT]',
            '[LOCATION]',
            '[MIRRORING_ENDPOINT_GROUP]'
        );

        delete_mirroring_endpoint_group_sample($formattedName);
    }

### deleteMirroringEndpointGroupAssociation

Deletes an association.

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

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

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

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

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

        // Call the API and handle any network failures.
        try {
            /** @var OperationResponse $response */
            $response = $mirroringClient->deleteMirroringEndpointGroupAssociation($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 = MirroringClient::mirroringEndpointGroupAssociationName(
            '[PROJECT]',
            '[LOCATION]',
            '[MIRRORING_ENDPOINT_GROUP_ASSOCIATION]'
        );

        delete_mirroring_endpoint_group_association_sample($formattedName);
    }

### getMirroringDeployment

Gets a specific deployment.

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

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

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

**Example**

    use Google\ApiCore\ApiException;
    use Google\Cloud\NetworkSecurity\V1\Client\MirroringClient;
    use Google\Cloud\NetworkSecurity\V1\GetMirroringDeploymentRequest;
    use Google\Cloud\NetworkSecurity\V1\MirroringDeployment;

    /**
     * @param string $formattedName The name of the deployment to retrieve.
     *                              Format:
     *                              projects/{project}/locations/{location}/mirroringDeployments/{mirroring_deployment}
     *                              Please see {@see MirroringClient::mirroringDeploymentName()} for help formatting this field.
     */
    function get_mirroring_deployment_sample(string $formattedName): void
    {
        // Create a client.
        $mirroringClient = new MirroringClient();

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

        // Call the API and handle any network failures.
        try {
            /** @var MirroringDeployment $response */
            $response = $mirroringClient->getMirroringDeployment($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 = MirroringClient::mirroringDeploymentName(
            '[PROJECT]',
            '[LOCATION]',
            '[MIRRORING_DEPLOYMENT]'
        );

        get_mirroring_deployment_sample($formattedName);
    }

### getMirroringDeploymentGroup

Gets a specific deployment group.

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

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

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

**Example**

    use Google\ApiCore\ApiException;
    use Google\Cloud\NetworkSecurity\V1\Client\MirroringClient;
    use Google\Cloud\NetworkSecurity\V1\GetMirroringDeploymentGroupRequest;
    use Google\Cloud\NetworkSecurity\V1\MirroringDeploymentGroup;

    /**
     * @param string $formattedName The name of the deployment group to retrieve.
     *                              Format:
     *                              projects/{project}/locations/{location}/mirroringDeploymentGroups/{mirroring_deployment_group}
     *                              Please see {@see MirroringClient::mirroringDeploymentGroupName()} for help formatting this field.
     */
    function get_mirroring_deployment_group_sample(string $formattedName): void
    {
        // Create a client.
        $mirroringClient = new MirroringClient();

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

        // Call the API and handle any network failures.
        try {
            /** @var MirroringDeploymentGroup $response */
            $response = $mirroringClient->getMirroringDeploymentGroup($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 = MirroringClient::mirroringDeploymentGroupName(
            '[PROJECT]',
            '[LOCATION]',
            '[MIRRORING_DEPLOYMENT_GROUP]'
        );

        get_mirroring_deployment_group_sample($formattedName);
    }

### getMirroringEndpointGroup

Gets a specific endpoint group.

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

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

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

**Example**

    use Google\ApiCore\ApiException;
    use Google\Cloud\NetworkSecurity\V1\Client\MirroringClient;
    use Google\Cloud\NetworkSecurity\V1\GetMirroringEndpointGroupRequest;
    use Google\Cloud\NetworkSecurity\V1\MirroringEndpointGroup;

    /**
     * @param string $formattedName The name of the endpoint group to retrieve.
     *                              Format:
     *                              projects/{project}/locations/{location}/mirroringEndpointGroups/{mirroring_endpoint_group}
     *                              Please see {@see MirroringClient::mirroringEndpointGroupName()} for help formatting this field.
     */
    function get_mirroring_endpoint_group_sample(string $formattedName): void
    {
        // Create a client.
        $mirroringClient = new MirroringClient();

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

        // Call the API and handle any network failures.
        try {
            /** @var MirroringEndpointGroup $response */
            $response = $mirroringClient->getMirroringEndpointGroup($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 = MirroringClient::mirroringEndpointGroupName(
            '[PROJECT]',
            '[LOCATION]',
            '[MIRRORING_ENDPOINT_GROUP]'
        );

        get_mirroring_endpoint_group_sample($formattedName);
    }

### getMirroringEndpointGroupAssociation

Gets a specific association.

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

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

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

**Example**

    use Google\ApiCore\ApiException;
    use Google\Cloud\NetworkSecurity\V1\Client\MirroringClient;
    use Google\Cloud\NetworkSecurity\V1\GetMirroringEndpointGroupAssociationRequest;
    use Google\Cloud\NetworkSecurity\V1\MirroringEndpointGroupAssociation;

    /**
     * @param string $formattedName The name of the association to retrieve.
     *                              Format:
     *                              projects/{project}/locations/{location}/mirroringEndpointGroupAssociations/{mirroring_endpoint_group_association}
     *                              Please see {@see MirroringClient::mirroringEndpointGroupAssociationName()} for help formatting this field.
     */
    function get_mirroring_endpoint_group_association_sample(string $formattedName): void
    {
        // Create a client.
        $mirroringClient = new MirroringClient();

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

        // Call the API and handle any network failures.
        try {
            /** @var MirroringEndpointGroupAssociation $response */
            $response = $mirroringClient->getMirroringEndpointGroupAssociation($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 = MirroringClient::mirroringEndpointGroupAssociationName(
            '[PROJECT]',
            '[LOCATION]',
            '[MIRRORING_ENDPOINT_GROUP_ASSOCIATION]'
        );

        get_mirroring_endpoint_group_association_sample($formattedName);
    }

### listMirroringDeploymentGroups

Lists deployment groups in a given project and location.

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

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

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

    /**
     * @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 MirroringClient::locationName()} for help formatting this field.
     */
    function list_mirroring_deployment_groups_sample(string $formattedParent): void
    {
        // Create a client.
        $mirroringClient = new MirroringClient();

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

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

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

        list_mirroring_deployment_groups_sample($formattedParent);
    }

### listMirroringDeployments

Lists deployments in a given project and location.

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

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

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

    /**
     * @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 MirroringClient::locationName()} for help formatting this field.
     */
    function list_mirroring_deployments_sample(string $formattedParent): void
    {
        // Create a client.
        $mirroringClient = new MirroringClient();

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

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

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

        list_mirroring_deployments_sample($formattedParent);
    }

### listMirroringEndpointGroupAssociations

Lists associations in a given project and location.

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

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

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

    /**
     * @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 MirroringClient::locationName()} for help formatting this field.
     */
    function list_mirroring_endpoint_group_associations_sample(string $formattedParent): void
    {
        // Create a client.
        $mirroringClient = new MirroringClient();

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

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

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

        list_mirroring_endpoint_group_associations_sample($formattedParent);
    }

### listMirroringEndpointGroups

Lists endpoint groups in a given project and location.

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

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

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

    /**
     * @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 MirroringClient::locationName()} for help formatting this field.
     */
    function list_mirroring_endpoint_groups_sample(string $formattedParent): void
    {
        // Create a client.
        $mirroringClient = new MirroringClient();

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

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

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

        list_mirroring_endpoint_groups_sample($formattedParent);
    }

### updateMirroringDeployment

Updates a deployment.

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

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

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

**Example**

    use Google\ApiCore\ApiException;
    use Google\ApiCore\OperationResponse;
    use Google\Cloud\NetworkSecurity\V1\Client\MirroringClient;
    use Google\Cloud\NetworkSecurity\V1\MirroringDeployment;
    use Google\Cloud\NetworkSecurity\V1\UpdateMirroringDeploymentRequest;
    use Google\Rpc\Status;

    /**
     * @param string $formattedMirroringDeploymentForwardingRule           Immutable. The regional forwarding rule that fronts the mirroring
     *                                                                     collectors, for example:
     *                                                                     `projects/123456789/regions/us-central1/forwardingRules/my-rule`. See
     *                                                                     https://google.aip.dev/124. Please see
     *                                                                     {@see MirroringClient::forwardingRuleName()} for help formatting this field.
     * @param string $formattedMirroringDeploymentMirroringDeploymentGroup Immutable. The deployment group that this deployment is a part
     *                                                                     of, for example:
     *                                                                     `projects/123456789/locations/global/mirroringDeploymentGroups/my-dg`.
     *                                                                     See https://google.aip.dev/124. Please see
     *                                                                     {@see MirroringClient::mirroringDeploymentGroupName()} for help formatting this field.
     */
    function update_mirroring_deployment_sample(
        string $formattedMirroringDeploymentForwardingRule,
        string $formattedMirroringDeploymentMirroringDeploymentGroup
    ): void {
        // Create a client.
        $mirroringClient = new MirroringClient();

        // Prepare the request message.
        $mirroringDeployment = (new MirroringDeployment())
            ->setForwardingRule($formattedMirroringDeploymentForwardingRule)
            ->setMirroringDeploymentGroup($formattedMirroringDeploymentMirroringDeploymentGroup);
        $request = (new UpdateMirroringDeploymentRequest())
            ->setMirroringDeployment($mirroringDeployment);

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

            if ($response->operationSucceeded()) {
                /** @var MirroringDeployment $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
    {
        $formattedMirroringDeploymentForwardingRule = MirroringClient::forwardingRuleName(
            '[PROJECT]',
            '[FORWARDING_RULE]'
        );
        $formattedMirroringDeploymentMirroringDeploymentGroup = MirroringClient::mirroringDeploymentGroupName(
            '[PROJECT]',
            '[LOCATION]',
            '[MIRRORING_DEPLOYMENT_GROUP]'
        );

        update_mirroring_deployment_sample(
            $formattedMirroringDeploymentForwardingRule,
            $formattedMirroringDeploymentMirroringDeploymentGroup
        );
    }

### updateMirroringDeploymentGroup

Updates a deployment group.

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

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

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

**Example**

    use Google\ApiCore\ApiException;
    use Google\ApiCore\OperationResponse;
    use Google\Cloud\NetworkSecurity\V1\Client\MirroringClient;
    use Google\Cloud\NetworkSecurity\V1\MirroringDeploymentGroup;
    use Google\Cloud\NetworkSecurity\V1\UpdateMirroringDeploymentGroupRequest;
    use Google\Rpc\Status;

    /**
     * @param string $formattedMirroringDeploymentGroupNetwork 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 MirroringClient::networkName()} for help formatting this field.
     */
    function update_mirroring_deployment_group_sample(
        string $formattedMirroringDeploymentGroupNetwork
    ): void {
        // Create a client.
        $mirroringClient = new MirroringClient();

        // Prepare the request message.
        $mirroringDeploymentGroup = (new MirroringDeploymentGroup())
            ->setNetwork($formattedMirroringDeploymentGroupNetwork);
        $request = (new UpdateMirroringDeploymentGroupRequest())
            ->setMirroringDeploymentGroup($mirroringDeploymentGroup);

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

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

        update_mirroring_deployment_group_sample($formattedMirroringDeploymentGroupNetwork);
    }

### updateMirroringEndpointGroup

Updates an endpoint group.

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

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

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

**Example**

    use Google\ApiCore\ApiException;
    use Google\ApiCore\OperationResponse;
    use Google\Cloud\NetworkSecurity\V1\Client\MirroringClient;
    use Google\Cloud\NetworkSecurity\V1\MirroringEndpointGroup;
    use Google\Cloud\NetworkSecurity\V1\UpdateMirroringEndpointGroupRequest;
    use Google\Rpc\Status;

    /**
     * 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 update_mirroring_endpoint_group_sample(): void
    {
        // Create a client.
        $mirroringClient = new MirroringClient();

        // Prepare the request message.
        $mirroringEndpointGroup = new MirroringEndpointGroup();
        $request = (new UpdateMirroringEndpointGroupRequest())
            ->setMirroringEndpointGroup($mirroringEndpointGroup);

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

            if ($response->operationSucceeded()) {
                /** @var MirroringEndpointGroup $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());
        }
    }

### updateMirroringEndpointGroupAssociation

Updates an association.

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

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

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

**Example**

    use Google\ApiCore\ApiException;
    use Google\ApiCore\OperationResponse;
    use Google\Cloud\NetworkSecurity\V1\Client\MirroringClient;
    use Google\Cloud\NetworkSecurity\V1\MirroringEndpointGroupAssociation;
    use Google\Cloud\NetworkSecurity\V1\UpdateMirroringEndpointGroupAssociationRequest;
    use Google\Rpc\Status;

    /**
     * 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 update_mirroring_endpoint_group_association_sample(): void
    {
        // Create a client.
        $mirroringClient = new MirroringClient();

        // Prepare the request message.
        $mirroringEndpointGroupAssociation = new MirroringEndpointGroupAssociation();
        $request = (new UpdateMirroringEndpointGroupAssociationRequest())
            ->setMirroringEndpointGroupAssociation($mirroringEndpointGroupAssociation);

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

            if ($response->operationSucceeded()) {
                /** @var MirroringEndpointGroupAssociation $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());
        }
    }

### getLocation

Gets information about a location.

The async variant is [MirroringClient::getLocationAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-network-security/latest/V1.Client.MirroringClient#_Google_Cloud_NetworkSecurity_V1_Client_MirroringClient__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\MirroringClient;

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

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

        // Call the API and handle any network failures.
        try {
            /** @var Location $response */
            $response = $mirroringClient->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 [MirroringClient::listLocationsAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-network-security/latest/V1.Client.MirroringClient#_Google_Cloud_NetworkSecurity_V1_Client_MirroringClient__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\MirroringClient;

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

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

        // Call the API and handle any network failures.
        try {
            /** @var PagedListResponse $response */
            $response = $mirroringClient->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 [MirroringClient::getIamPolicyAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-network-security/latest/V1.Client.MirroringClient#_Google_Cloud_NetworkSecurity_V1_Client_MirroringClient__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\MirroringClient;

    /**
     * @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.
        $mirroringClient = new MirroringClient();

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

        // Call the API and handle any network failures.
        try {
            /** @var Policy $response */
            $response = $mirroringClient->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 [MirroringClient::setIamPolicyAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-network-security/latest/V1.Client.MirroringClient#_Google_Cloud_NetworkSecurity_V1_Client_MirroringClient__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\MirroringClient;

    /**
     * @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.
        $mirroringClient = new MirroringClient();

        // 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 = $mirroringClient->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 [MirroringClient::testIamPermissionsAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-network-security/latest/V1.Client.MirroringClient#_Google_Cloud_NetworkSecurity_V1_Client_MirroringClient__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\MirroringClient;

    /**
     * @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.
        $mirroringClient = new MirroringClient();

        // 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 = $mirroringClient->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);
    }

### createMirroringDeploymentAsync

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

### createMirroringDeploymentGroupAsync

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

### createMirroringEndpointGroupAsync

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

### createMirroringEndpointGroupAssociationAsync

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

### deleteMirroringDeploymentAsync

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

### deleteMirroringDeploymentGroupAsync

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

### deleteMirroringEndpointGroupAsync

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

### deleteMirroringEndpointGroupAssociationAsync

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

### getMirroringDeploymentAsync

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

### getMirroringDeploymentGroupAsync

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

### getMirroringEndpointGroupAsync

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

### getMirroringEndpointGroupAssociationAsync

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

### listMirroringDeploymentGroupsAsync

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

### listMirroringDeploymentsAsync

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

### listMirroringEndpointGroupAssociationsAsync

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

### listMirroringEndpointGroupsAsync

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

### updateMirroringDeploymentAsync

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

### updateMirroringDeploymentGroupAsync

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

### updateMirroringEndpointGroupAsync

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

### updateMirroringEndpointGroupAssociationAsync

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

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

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

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

### static::mirroringDeploymentGroupName

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

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

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

### static::mirroringEndpointGroupName

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

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

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

### static::mirroringEndpointGroupAssociationName

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

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

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` | The formatted mirroring_endpoint_group_association 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}
- location: projects/{project}/locations/{location}
- mirroringDeployment: projects/{project}/locations/{location}/mirroringDeployments/{mirroring_deployment}
- mirroringDeploymentGroup: projects/{project}/locations/{location}/mirroringDeploymentGroups/{mirroring_deployment_group}
- mirroringEndpointGroup: projects/{project}/locations/{location}/mirroringEndpointGroups/{mirroring_endpoint_group}
- mirroringEndpointGroupAssociation: projects/{project}/locations/{location}/mirroringEndpointGroupAssociations/{mirroring_endpoint_group_association}
- 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. |