# Google Cloud Network Services V1 Client - Class NetworkServicesClient (0.8.2)

0.8.2 (latest) 0.8.1 0.7.1 0.6.1 0.5.0 0.4.0 0.3.0 0.2.3 0.1.1 Reference documentation and code samples for the Google Cloud Network Services V1 Client class NetworkServicesClient.

Service Description: Service describing handlers for resources.

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

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

## Namespace

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

### createEndpointPolicy

Creates a new EndpointPolicy in a given project and location.

The async variant is [NetworkServicesClient::createEndpointPolicyAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-networkservices/latest/V1.Client.NetworkServicesClient#_Google_Cloud_NetworkServices_V1_Client_NetworkServicesClient__createEndpointPolicyAsync__) .

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

**Example**

    use Google\ApiCore\ApiException;
    use Google\ApiCore\OperationResponse;
    use Google\Cloud\NetworkServices\V1\Client\NetworkServicesClient;
    use Google\Cloud\NetworkServices\V1\CreateEndpointPolicyRequest;
    use Google\Cloud\NetworkServices\V1\EndpointMatcher;
    use Google\Cloud\NetworkServices\V1\EndpointPolicy;
    use Google\Cloud\NetworkServices\V1\EndpointPolicy\EndpointPolicyType;
    use Google\Rpc\Status;

    /**
     * @param string $formattedParent    The parent resource of the EndpointPolicy. Must be in the
     *                                   format `projects/&#42;/locations/global`. Please see
     *                                   {@see NetworkServicesClient::locationName()} for help formatting this field.
     * @param string $endpointPolicyId   Short name of the EndpointPolicy resource to be created.
     *                                   E.g. "CustomECS".
     * @param int    $endpointPolicyType The type of endpoint policy. This is primarily used to validate
     *                                   the configuration.
     */
    function create_endpoint_policy_sample(
        string $formattedParent,
        string $endpointPolicyId,
        int $endpointPolicyType
    ): void {
        // Create a client.
        $networkServicesClient = new NetworkServicesClient();

        // Prepare the request message.
        $endpointPolicyEndpointMatcher = new EndpointMatcher();
        $endpointPolicy = (new EndpointPolicy())
            ->setType($endpointPolicyType)
            ->setEndpointMatcher($endpointPolicyEndpointMatcher);
        $request = (new CreateEndpointPolicyRequest())
            ->setParent($formattedParent)
            ->setEndpointPolicyId($endpointPolicyId)
            ->setEndpointPolicy($endpointPolicy);

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

            if ($response->operationSucceeded()) {
                /** @var EndpointPolicy $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 = NetworkServicesClient::locationName('[PROJECT]', '[LOCATION]');
        $endpointPolicyId = '[ENDPOINT_POLICY_ID]';
        $endpointPolicyType = EndpointPolicyType::ENDPOINT_POLICY_TYPE_UNSPECIFIED;

        create_endpoint_policy_sample($formattedParent, $endpointPolicyId, $endpointPolicyType);
    }

### createGateway

Creates a new Gateway in a given project and location.

The async variant is [NetworkServicesClient::createGatewayAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-networkservices/latest/V1.Client.NetworkServicesClient#_Google_Cloud_NetworkServices_V1_Client_NetworkServicesClient__createGatewayAsync__) .

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-networkservices/latest/V1.CreateGatewayRequest` 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<Google\Cloud\NetworkServices\V1\Gateway>` |   |

**Example**

    use Google\ApiCore\ApiException;
    use Google\ApiCore\OperationResponse;
    use Google\Cloud\NetworkServices\V1\Client\NetworkServicesClient;
    use Google\Cloud\NetworkServices\V1\CreateGatewayRequest;
    use Google\Cloud\NetworkServices\V1\Gateway;
    use Google\Rpc\Status;

    /**
     * @param string $formattedParent     The parent resource of the Gateway. Must be in the
     *                                    format `projects/&#42;/locations/*`. Please see
     *                                    {@see NetworkServicesClient::locationName()} for help formatting this field.
     * @param string $gatewayId           Short name of the Gateway resource to be created.
     * @param int    $gatewayPortsElement One or more port numbers (1-65535), on which the Gateway will
     *                                    receive traffic. The proxy binds to the specified ports.
     *                                    Gateways of type 'SECURE_WEB_GATEWAY' are limited to 1 port.
     *                                    Gateways of type 'OPEN_MESH' listen on 0.0.0.0 for IPv4 and :: for IPv6 and
     *                                    support multiple ports.
     */
    function create_gateway_sample(
        string $formattedParent,
        string $gatewayId,
        int $gatewayPortsElement
    ): void {
        // Create a client.
        $networkServicesClient = new NetworkServicesClient();

        // Prepare the request message.
        $gatewayPorts = [$gatewayPortsElement,];
        $gateway = (new Gateway())
            ->setPorts($gatewayPorts);
        $request = (new CreateGatewayRequest())
            ->setParent($formattedParent)
            ->setGatewayId($gatewayId)
            ->setGateway($gateway);

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

            if ($response->operationSucceeded()) {
                /** @var Gateway $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 = NetworkServicesClient::locationName('[PROJECT]', '[LOCATION]');
        $gatewayId = '[GATEWAY_ID]';
        $gatewayPortsElement = 0;

        create_gateway_sample($formattedParent, $gatewayId, $gatewayPortsElement);
    }

### createGrpcRoute

Creates a new GrpcRoute in a given project and location.

The async variant is [NetworkServicesClient::createGrpcRouteAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-networkservices/latest/V1.Client.NetworkServicesClient#_Google_Cloud_NetworkServices_V1_Client_NetworkServicesClient__createGrpcRouteAsync__) .

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-networkservices/latest/V1.CreateGrpcRouteRequest` 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<Google\Cloud\NetworkServices\V1\GrpcRoute>` |   |

**Example**

    use Google\ApiCore\ApiException;
    use Google\ApiCore\OperationResponse;
    use Google\Cloud\NetworkServices\V1\Client\NetworkServicesClient;
    use Google\Cloud\NetworkServices\V1\CreateGrpcRouteRequest;
    use Google\Cloud\NetworkServices\V1\GrpcRoute;
    use Google\Cloud\NetworkServices\V1\GrpcRoute\RouteAction;
    use Google\Cloud\NetworkServices\V1\GrpcRoute\RouteRule;
    use Google\Rpc\Status;

    /**
     * @param string $formattedParent           The parent resource of the GrpcRoute. Must be in the
     *                                          format `projects/&#42;/locations/global`. Please see
     *                                          {@see NetworkServicesClient::locationName()} for help formatting this field.
     * @param string $grpcRouteId               Short name of the GrpcRoute resource to be created.
     * @param string $grpcRouteHostnamesElement Service hostnames with an optional port for which this route
     *                                          describes traffic.
     *
     *                                          Format: <hostname>[:<port>]
     *
     *                                          Hostname is the fully qualified domain name of a network host. This matches
     *                                          the RFC 1123 definition of a hostname with 2 notable exceptions:
     *                                          - IPs are not allowed.
     *                                          - A hostname may be prefixed with a wildcard label (`*.`). The wildcard
     *                                          label must appear by itself as the first label.
     *
     *                                          Hostname can be "precise" which is a domain name without the terminating
     *                                          dot of a network host (e.g. `foo.example.com`) or "wildcard", which is a
     *                                          domain name prefixed with a single wildcard label (e.g. `*.example.com`).
     *
     *                                          Note that as per RFC1035 and RFC1123, a label must consist of lower case
     *                                          alphanumeric characters or '-', and must start and end with an alphanumeric
     *                                          character. No other punctuation is allowed.
     *
     *                                          The routes associated with a Mesh or Gateway must have unique hostnames. If
     *                                          you attempt to attach multiple routes with conflicting hostnames, the
     *                                          configuration will be rejected.
     *
     *                                          For example, while it is acceptable for routes for the hostnames
     *                                          `*.foo.bar.com` and `*.bar.com` to be associated with the same route, it is
     *                                          not possible to associate two routes both with `*.bar.com` or both with
     *                                          `bar.com`.
     *
     *                                          If a port is specified, then gRPC clients must use the channel URI with the
     *                                          port to match this rule (i.e. "xds:///service:123"), otherwise they must
     *                                          supply the URI without a port (i.e. "xds:///service").
     */
    function create_grpc_route_sample(
        string $formattedParent,
        string $grpcRouteId,
        string $grpcRouteHostnamesElement
    ): void {
        // Create a client.
        $networkServicesClient = new NetworkServicesClient();

        // Prepare the request message.
        $grpcRouteHostnames = [$grpcRouteHostnamesElement,];
        $grpcRouteRulesAction = new RouteAction();
        $routeRule = (new RouteRule())
            ->setAction($grpcRouteRulesAction);
        $grpcRouteRules = [$routeRule,];
        $grpcRoute = (new GrpcRoute())
            ->setHostnames($grpcRouteHostnames)
            ->setRules($grpcRouteRules);
        $request = (new CreateGrpcRouteRequest())
            ->setParent($formattedParent)
            ->setGrpcRouteId($grpcRouteId)
            ->setGrpcRoute($grpcRoute);

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

            if ($response->operationSucceeded()) {
                /** @var GrpcRoute $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 = NetworkServicesClient::locationName('[PROJECT]', '[LOCATION]');
        $grpcRouteId = '[GRPC_ROUTE_ID]';
        $grpcRouteHostnamesElement = '[HOSTNAMES]';

        create_grpc_route_sample($formattedParent, $grpcRouteId, $grpcRouteHostnamesElement);
    }

### createHttpRoute

Creates a new HttpRoute in a given project and location.

The async variant is [NetworkServicesClient::createHttpRouteAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-networkservices/latest/V1.Client.NetworkServicesClient#_Google_Cloud_NetworkServices_V1_Client_NetworkServicesClient__createHttpRouteAsync__) .

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-networkservices/latest/V1.CreateHttpRouteRequest` 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<Google\Cloud\NetworkServices\V1\HttpRoute>` |   |

**Example**

    use Google\ApiCore\ApiException;
    use Google\ApiCore\OperationResponse;
    use Google\Cloud\NetworkServices\V1\Client\NetworkServicesClient;
    use Google\Cloud\NetworkServices\V1\CreateHttpRouteRequest;
    use Google\Cloud\NetworkServices\V1\HttpRoute;
    use Google\Cloud\NetworkServices\V1\HttpRoute\RouteRule;
    use Google\Rpc\Status;

    /**
     * @param string $formattedParent           The parent resource of the HttpRoute. Must be in the
     *                                          format `projects/&#42;/locations/global`. Please see
     *                                          {@see NetworkServicesClient::locationName()} for help formatting this field.
     * @param string $httpRouteId               Short name of the HttpRoute resource to be created.
     * @param string $httpRouteHostnamesElement Hostnames define a set of hosts that should match against the
     *                                          HTTP host header to select a HttpRoute to process the request. Hostname is
     *                                          the fully qualified domain name of a network host, as defined by RFC 1123
     *                                          with the exception that:
     *                                          - IPs are not allowed.
     *                                          - A hostname may be prefixed with a wildcard label (`*.`). The wildcard
     *                                          label must appear by itself as the first label.
     *
     *                                          Hostname can be "precise" which is a domain name without the terminating
     *                                          dot of a network host (e.g. `foo.example.com`) or "wildcard", which is a
     *                                          domain name prefixed with a single wildcard label (e.g. `*.example.com`).
     *
     *                                          Note that as per RFC1035 and RFC1123, a label must consist of lower case
     *                                          alphanumeric characters or '-', and must start and end with an alphanumeric
     *                                          character. No other punctuation is allowed.
     *
     *                                          The routes associated with a Mesh or Gateways  must have unique hostnames.
     *                                          If you attempt to attach multiple routes with conflicting hostnames,
     *                                          the configuration will be rejected.
     *
     *                                          For example, while it is acceptable for routes for the hostnames
     *                                          `*.foo.bar.com` and `*.bar.com` to be associated with the same Mesh (or
     *                                          Gateways under the same scope), it is not possible to associate two routes
     *                                          both with `*.bar.com` or both with `bar.com`.
     */
    function create_http_route_sample(
        string $formattedParent,
        string $httpRouteId,
        string $httpRouteHostnamesElement
    ): void {
        // Create a client.
        $networkServicesClient = new NetworkServicesClient();

        // Prepare the request message.
        $httpRouteHostnames = [$httpRouteHostnamesElement,];
        $httpRouteRules = [new RouteRule()];
        $httpRoute = (new HttpRoute())
            ->setHostnames($httpRouteHostnames)
            ->setRules($httpRouteRules);
        $request = (new CreateHttpRouteRequest())
            ->setParent($formattedParent)
            ->setHttpRouteId($httpRouteId)
            ->setHttpRoute($httpRoute);

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

            if ($response->operationSucceeded()) {
                /** @var HttpRoute $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 = NetworkServicesClient::locationName('[PROJECT]', '[LOCATION]');
        $httpRouteId = '[HTTP_ROUTE_ID]';
        $httpRouteHostnamesElement = '[HOSTNAMES]';

        create_http_route_sample($formattedParent, $httpRouteId, $httpRouteHostnamesElement);
    }

### createMesh

Creates a new Mesh in a given project and location.

The async variant is [NetworkServicesClient::createMeshAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-networkservices/latest/V1.Client.NetworkServicesClient#_Google_Cloud_NetworkServices_V1_Client_NetworkServicesClient__createMeshAsync__) .

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

**Example**

    use Google\ApiCore\ApiException;
    use Google\ApiCore\OperationResponse;
    use Google\Cloud\NetworkServices\V1\Client\NetworkServicesClient;
    use Google\Cloud\NetworkServices\V1\CreateMeshRequest;
    use Google\Cloud\NetworkServices\V1\Mesh;
    use Google\Rpc\Status;

    /**
     * @param string $formattedParent The parent resource of the Mesh. Must be in the
     *                                format `projects/&#42;/locations/global`. Please see
     *                                {@see NetworkServicesClient::locationName()} for help formatting this field.
     * @param string $meshId          Short name of the Mesh resource to be created.
     */
    function create_mesh_sample(string $formattedParent, string $meshId): void
    {
        // Create a client.
        $networkServicesClient = new NetworkServicesClient();

        // Prepare the request message.
        $mesh = new Mesh();
        $request = (new CreateMeshRequest())
            ->setParent($formattedParent)
            ->setMeshId($meshId)
            ->setMesh($mesh);

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

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

        create_mesh_sample($formattedParent, $meshId);
    }

### createServiceBinding

Creates a new ServiceBinding in a given project and location.

The async variant is [NetworkServicesClient::createServiceBindingAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-networkservices/latest/V1.Client.NetworkServicesClient#_Google_Cloud_NetworkServices_V1_Client_NetworkServicesClient__createServiceBindingAsync__) .

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

**Example**

    use Google\ApiCore\ApiException;
    use Google\ApiCore\OperationResponse;
    use Google\Cloud\NetworkServices\V1\Client\NetworkServicesClient;
    use Google\Cloud\NetworkServices\V1\CreateServiceBindingRequest;
    use Google\Cloud\NetworkServices\V1\ServiceBinding;
    use Google\Rpc\Status;

    /**
     * @param string $formattedParent  The parent resource of the ServiceBinding. Must be in the
     *                                 format `projects/&#42;/locations/*`. Please see
     *                                 {@see NetworkServicesClient::locationName()} for help formatting this field.
     * @param string $serviceBindingId Short name of the ServiceBinding resource to be created.
     */
    function create_service_binding_sample(string $formattedParent, string $serviceBindingId): void
    {
        // Create a client.
        $networkServicesClient = new NetworkServicesClient();

        // Prepare the request message.
        $serviceBinding = new ServiceBinding();
        $request = (new CreateServiceBindingRequest())
            ->setParent($formattedParent)
            ->setServiceBindingId($serviceBindingId)
            ->setServiceBinding($serviceBinding);

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

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

        create_service_binding_sample($formattedParent, $serviceBindingId);
    }

### createServiceLbPolicy

Creates a new ServiceLbPolicy in a given project and location.

The async variant is [NetworkServicesClient::createServiceLbPolicyAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-networkservices/latest/V1.Client.NetworkServicesClient#_Google_Cloud_NetworkServices_V1_Client_NetworkServicesClient__createServiceLbPolicyAsync__)
.

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

**Example**

    use Google\ApiCore\ApiException;
    use Google\ApiCore\OperationResponse;
    use Google\Cloud\NetworkServices\V1\Client\NetworkServicesClient;
    use Google\Cloud\NetworkServices\V1\CreateServiceLbPolicyRequest;
    use Google\Cloud\NetworkServices\V1\ServiceLbPolicy;
    use Google\Rpc\Status;

    /**
     * @param string $formattedParent   The parent resource of the ServiceLbPolicy. Must be in the
     *                                  format `projects/{project}/locations/{location}`. Please see
     *                                  {@see NetworkServicesClient::locationName()} for help formatting this field.
     * @param string $serviceLbPolicyId Short name of the ServiceLbPolicy resource to be created.
     *                                  E.g. for resource name
     *                                  `projects/{project}/locations/{location}/serviceLbPolicies/{service_lb_policy_name}`.
     *                                  the id is value of {service_lb_policy_name}
     */
    function create_service_lb_policy_sample(string $formattedParent, string $serviceLbPolicyId): void
    {
        // Create a client.
        $networkServicesClient = new NetworkServicesClient();

        // Prepare the request message.
        $serviceLbPolicy = new ServiceLbPolicy();
        $request = (new CreateServiceLbPolicyRequest())
            ->setParent($formattedParent)
            ->setServiceLbPolicyId($serviceLbPolicyId)
            ->setServiceLbPolicy($serviceLbPolicy);

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

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

        create_service_lb_policy_sample($formattedParent, $serviceLbPolicyId);
    }

### createTcpRoute

Creates a new TcpRoute in a given project and location.

The async variant is [NetworkServicesClient::createTcpRouteAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-networkservices/latest/V1.Client.NetworkServicesClient#_Google_Cloud_NetworkServices_V1_Client_NetworkServicesClient__createTcpRouteAsync__) .

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-networkservices/latest/V1.CreateTcpRouteRequest` 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<Google\Cloud\NetworkServices\V1\TcpRoute>` |   |

**Example**

    use Google\ApiCore\ApiException;
    use Google\ApiCore\OperationResponse;
    use Google\Cloud\NetworkServices\V1\Client\NetworkServicesClient;
    use Google\Cloud\NetworkServices\V1\CreateTcpRouteRequest;
    use Google\Cloud\NetworkServices\V1\TcpRoute;
    use Google\Cloud\NetworkServices\V1\TcpRoute\RouteAction;
    use Google\Cloud\NetworkServices\V1\TcpRoute\RouteRule;
    use Google\Rpc\Status;

    /**
     * @param string $formattedParent The parent resource of the TcpRoute. Must be in the
     *                                format `projects/&#42;/locations/global`. Please see
     *                                {@see NetworkServicesClient::locationName()} for help formatting this field.
     * @param string $tcpRouteId      Short name of the TcpRoute resource to be created.
     */
    function create_tcp_route_sample(string $formattedParent, string $tcpRouteId): void
    {
        // Create a client.
        $networkServicesClient = new NetworkServicesClient();

        // Prepare the request message.
        $tcpRouteRulesAction = new RouteAction();
        $routeRule = (new RouteRule())
            ->setAction($tcpRouteRulesAction);
        $tcpRouteRules = [$routeRule,];
        $tcpRoute = (new TcpRoute())
            ->setRules($tcpRouteRules);
        $request = (new CreateTcpRouteRequest())
            ->setParent($formattedParent)
            ->setTcpRouteId($tcpRouteId)
            ->setTcpRoute($tcpRoute);

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

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

        create_tcp_route_sample($formattedParent, $tcpRouteId);
    }

### createTlsRoute

Creates a new TlsRoute in a given project and location.

The async variant is [NetworkServicesClient::createTlsRouteAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-networkservices/latest/V1.Client.NetworkServicesClient#_Google_Cloud_NetworkServices_V1_Client_NetworkServicesClient__createTlsRouteAsync__) .

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-networkservices/latest/V1.CreateTlsRouteRequest` 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<Google\Cloud\NetworkServices\V1\TlsRoute>` |   |

**Example**

    use Google\ApiCore\ApiException;
    use Google\ApiCore\OperationResponse;
    use Google\Cloud\NetworkServices\V1\Client\NetworkServicesClient;
    use Google\Cloud\NetworkServices\V1\CreateTlsRouteRequest;
    use Google\Cloud\NetworkServices\V1\TlsRoute;
    use Google\Cloud\NetworkServices\V1\TlsRoute\RouteAction;
    use Google\Cloud\NetworkServices\V1\TlsRoute\RouteDestination;
    use Google\Cloud\NetworkServices\V1\TlsRoute\RouteMatch;
    use Google\Cloud\NetworkServices\V1\TlsRoute\RouteRule;
    use Google\Rpc\Status;

    /**
     * @param string $formattedParent                                     The parent resource of the TlsRoute. Must be in the
     *                                                                    format `projects/&#42;/locations/global`. Please see
     *                                                                    {@see NetworkServicesClient::locationName()} for help formatting this field.
     * @param string $tlsRouteId                                          Short name of the TlsRoute resource to be created.
     * @param string $formattedTlsRouteRulesActionDestinationsServiceName The URL of a BackendService to route traffic to. Please see
     *                                                                    {@see NetworkServicesClient::backendServiceName()} for help formatting this field.
     */
    function create_tls_route_sample(
        string $formattedParent,
        string $tlsRouteId,
        string $formattedTlsRouteRulesActionDestinationsServiceName
    ): void {
        // Create a client.
        $networkServicesClient = new NetworkServicesClient();

        // Prepare the request message.
        $tlsRouteRulesMatches = [new RouteMatch()];
        $routeDestination = (new RouteDestination())
            ->setServiceName($formattedTlsRouteRulesActionDestinationsServiceName);
        $tlsRouteRulesActionDestinations = [$routeDestination,];
        $tlsRouteRulesAction = (new RouteAction())
            ->setDestinations($tlsRouteRulesActionDestinations);
        $routeRule = (new RouteRule())
            ->setMatches($tlsRouteRulesMatches)
            ->setAction($tlsRouteRulesAction);
        $tlsRouteRules = [$routeRule,];
        $tlsRoute = (new TlsRoute())
            ->setRules($tlsRouteRules);
        $request = (new CreateTlsRouteRequest())
            ->setParent($formattedParent)
            ->setTlsRouteId($tlsRouteId)
            ->setTlsRoute($tlsRoute);

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

            if ($response->operationSucceeded()) {
                /** @var TlsRoute $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 = NetworkServicesClient::locationName('[PROJECT]', '[LOCATION]');
        $tlsRouteId = '[TLS_ROUTE_ID]';
        $formattedTlsRouteRulesActionDestinationsServiceName = NetworkServicesClient::backendServiceName(
            '[PROJECT]',
            '[LOCATION]',
            '[BACKEND_SERVICE]'
        );

        create_tls_route_sample(
            $formattedParent,
            $tlsRouteId,
            $formattedTlsRouteRulesActionDestinationsServiceName
        );
    }

### createWasmPlugin

Creates a new `WasmPlugin` resource in a given project
and location.

The async variant is [NetworkServicesClient::createWasmPluginAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-networkservices/latest/V1.Client.NetworkServicesClient#_Google_Cloud_NetworkServices_V1_Client_NetworkServicesClient__createWasmPluginAsync__) .

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

**Example**

    use Google\ApiCore\ApiException;
    use Google\ApiCore\OperationResponse;
    use Google\Cloud\NetworkServices\V1\Client\NetworkServicesClient;
    use Google\Cloud\NetworkServices\V1\CreateWasmPluginRequest;
    use Google\Cloud\NetworkServices\V1\WasmPlugin;
    use Google\Rpc\Status;

    /**
     * @param string $formattedParent The parent resource of the `WasmPlugin` resource. Must be in the
     *                                format `projects/{project}/locations/global`. Please see
     *                                {@see NetworkServicesClient::locationName()} for help formatting this field.
     * @param string $wasmPluginId    User-provided ID of the `WasmPlugin` resource to be created.
     */
    function create_wasm_plugin_sample(string $formattedParent, string $wasmPluginId): void
    {
        // Create a client.
        $networkServicesClient = new NetworkServicesClient();

        // Prepare the request message.
        $wasmPlugin = new WasmPlugin();
        $request = (new CreateWasmPluginRequest())
            ->setParent($formattedParent)
            ->setWasmPluginId($wasmPluginId)
            ->setWasmPlugin($wasmPlugin);

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

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

        create_wasm_plugin_sample($formattedParent, $wasmPluginId);
    }

### createWasmPluginVersion

Creates a new `WasmPluginVersion` resource in a given project
and location.

The async variant is
[NetworkServicesClient::createWasmPluginVersionAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-networkservices/latest/V1.Client.NetworkServicesClient#_Google_Cloud_NetworkServices_V1_Client_NetworkServicesClient__createWasmPluginVersionAsync__) .

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

**Example**

    use Google\ApiCore\ApiException;
    use Google\ApiCore\OperationResponse;
    use Google\Cloud\NetworkServices\V1\Client\NetworkServicesClient;
    use Google\Cloud\NetworkServices\V1\CreateWasmPluginVersionRequest;
    use Google\Cloud\NetworkServices\V1\WasmPluginVersion;
    use Google\Rpc\Status;

    /**
     * @param string $formattedParent     The parent resource of the `WasmPluginVersion` resource. Must be
     *                                    in the format
     *                                    `projects/{project}/locations/global/wasmPlugins/{wasm_plugin}`. Please see
     *                                    {@see NetworkServicesClient::wasmPluginName()} for help formatting this field.
     * @param string $wasmPluginVersionId User-provided ID of the `WasmPluginVersion` resource to be
     *                                    created.
     */
    function create_wasm_plugin_version_sample(
        string $formattedParent,
        string $wasmPluginVersionId
    ): void {
        // Create a client.
        $networkServicesClient = new NetworkServicesClient();

        // Prepare the request message.
        $wasmPluginVersion = new WasmPluginVersion();
        $request = (new CreateWasmPluginVersionRequest())
            ->setParent($formattedParent)
            ->setWasmPluginVersionId($wasmPluginVersionId)
            ->setWasmPluginVersion($wasmPluginVersion);

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

            if ($response->operationSucceeded()) {
                /** @var WasmPluginVersion $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 = NetworkServicesClient::wasmPluginName(
            '[PROJECT]',
            '[LOCATION]',
            '[WASM_PLUGIN]'
        );
        $wasmPluginVersionId = '[WASM_PLUGIN_VERSION_ID]';

        create_wasm_plugin_version_sample($formattedParent, $wasmPluginVersionId);
    }

### deleteEndpointPolicy

Deletes a single EndpointPolicy.

The async variant is [NetworkServicesClient::deleteEndpointPolicyAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-networkservices/latest/V1.Client.NetworkServicesClient#_Google_Cloud_NetworkServices_V1_Client_NetworkServicesClient__deleteEndpointPolicyAsync__) .

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-networkservices/latest/V1.DeleteEndpointPolicyRequest` 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\NetworkServices\V1\Client\NetworkServicesClient;
    use Google\Cloud\NetworkServices\V1\DeleteEndpointPolicyRequest;
    use Google\Rpc\Status;

    /**
     * @param string $formattedName A name of the EndpointPolicy to delete. Must be in the format
     *                              `projects/&#42;/locations/global/endpointPolicies/*`. Please see
     *                              {@see NetworkServicesClient::endpointPolicyName()} for help formatting this field.
     */
    function delete_endpoint_policy_sample(string $formattedName): void
    {
        // Create a client.
        $networkServicesClient = new NetworkServicesClient();

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

        // Call the API and handle any network failures.
        try {
            /** @var OperationResponse $response */
            $response = $networkServicesClient->deleteEndpointPolicy($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 = NetworkServicesClient::endpointPolicyName(
            '[PROJECT]',
            '[LOCATION]',
            '[ENDPOINT_POLICY]'
        );

        delete_endpoint_policy_sample($formattedName);
    }

### deleteGateway

Deletes a single Gateway.

The async variant is [NetworkServicesClient::deleteGatewayAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-networkservices/latest/V1.Client.NetworkServicesClient#_Google_Cloud_NetworkServices_V1_Client_NetworkServicesClient__deleteGatewayAsync__) .

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-networkservices/latest/V1.DeleteGatewayRequest` 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\NetworkServices\V1\Client\NetworkServicesClient;
    use Google\Cloud\NetworkServices\V1\DeleteGatewayRequest;
    use Google\Rpc\Status;

    /**
     * @param string $formattedName A name of the Gateway to delete. Must be in the format
     *                              `projects/&#42;/locations/&#42;/gateways/*`. Please see
     *                              {@see NetworkServicesClient::gatewayName()} for help formatting this field.
     */
    function delete_gateway_sample(string $formattedName): void
    {
        // Create a client.
        $networkServicesClient = new NetworkServicesClient();

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

        // Call the API and handle any network failures.
        try {
            /** @var OperationResponse $response */
            $response = $networkServicesClient->deleteGateway($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 = NetworkServicesClient::gatewayName('[PROJECT]', '[LOCATION]', '[GATEWAY]');

        delete_gateway_sample($formattedName);
    }

### deleteGrpcRoute

Deletes a single GrpcRoute.

The async variant is [NetworkServicesClient::deleteGrpcRouteAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-networkservices/latest/V1.Client.NetworkServicesClient#_Google_Cloud_NetworkServices_V1_Client_NetworkServicesClient__deleteGrpcRouteAsync__) .

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-networkservices/latest/V1.DeleteGrpcRouteRequest` 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\NetworkServices\V1\Client\NetworkServicesClient;
    use Google\Cloud\NetworkServices\V1\DeleteGrpcRouteRequest;
    use Google\Rpc\Status;

    /**
     * @param string $formattedName A name of the GrpcRoute to delete. Must be in the format
     *                              `projects/&#42;/locations/global/grpcRoutes/*`. Please see
     *                              {@see NetworkServicesClient::grpcRouteName()} for help formatting this field.
     */
    function delete_grpc_route_sample(string $formattedName): void
    {
        // Create a client.
        $networkServicesClient = new NetworkServicesClient();

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

        // Call the API and handle any network failures.
        try {
            /** @var OperationResponse $response */
            $response = $networkServicesClient->deleteGrpcRoute($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 = NetworkServicesClient::grpcRouteName('[PROJECT]', '[LOCATION]', '[GRPC_ROUTE]');

        delete_grpc_route_sample($formattedName);
    }

### deleteHttpRoute

Deletes a single HttpRoute.

The async variant is [NetworkServicesClient::deleteHttpRouteAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-networkservices/latest/V1.Client.NetworkServicesClient#_Google_Cloud_NetworkServices_V1_Client_NetworkServicesClient__deleteHttpRouteAsync__) .

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-networkservices/latest/V1.DeleteHttpRouteRequest` 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\NetworkServices\V1\Client\NetworkServicesClient;
    use Google\Cloud\NetworkServices\V1\DeleteHttpRouteRequest;
    use Google\Rpc\Status;

    /**
     * @param string $formattedName A name of the HttpRoute to delete. Must be in the format
     *                              `projects/&#42;/locations/global/httpRoutes/*`. Please see
     *                              {@see NetworkServicesClient::httpRouteName()} for help formatting this field.
     */
    function delete_http_route_sample(string $formattedName): void
    {
        // Create a client.
        $networkServicesClient = new NetworkServicesClient();

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

        // Call the API and handle any network failures.
        try {
            /** @var OperationResponse $response */
            $response = $networkServicesClient->deleteHttpRoute($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 = NetworkServicesClient::httpRouteName('[PROJECT]', '[LOCATION]', '[HTTP_ROUTE]');

        delete_http_route_sample($formattedName);
    }

### deleteMesh

Deletes a single Mesh.

The async variant is [NetworkServicesClient::deleteMeshAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-networkservices/latest/V1.Client.NetworkServicesClient#_Google_Cloud_NetworkServices_V1_Client_NetworkServicesClient__deleteMeshAsync__) .

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-networkservices/latest/V1.DeleteMeshRequest` 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\NetworkServices\V1\Client\NetworkServicesClient;
    use Google\Cloud\NetworkServices\V1\DeleteMeshRequest;
    use Google\Rpc\Status;

    /**
     * @param string $formattedName A name of the Mesh to delete. Must be in the format
     *                              `projects/&#42;/locations/global/meshes/*`. Please see
     *                              {@see NetworkServicesClient::meshName()} for help formatting this field.
     */
    function delete_mesh_sample(string $formattedName): void
    {
        // Create a client.
        $networkServicesClient = new NetworkServicesClient();

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

        // Call the API and handle any network failures.
        try {
            /** @var OperationResponse $response */
            $response = $networkServicesClient->deleteMesh($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 = NetworkServicesClient::meshName('[PROJECT]', '[LOCATION]', '[MESH]');

        delete_mesh_sample($formattedName);
    }

### deleteServiceBinding

Deletes a single ServiceBinding.

The async variant is [NetworkServicesClient::deleteServiceBindingAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-networkservices/latest/V1.Client.NetworkServicesClient#_Google_Cloud_NetworkServices_V1_Client_NetworkServicesClient__deleteServiceBindingAsync__) .

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-networkservices/latest/V1.DeleteServiceBindingRequest` 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\NetworkServices\V1\Client\NetworkServicesClient;
    use Google\Cloud\NetworkServices\V1\DeleteServiceBindingRequest;
    use Google\Rpc\Status;

    /**
     * @param string $formattedName A name of the ServiceBinding to delete. Must be in the format
     *                              `projects/&#42;/locations/&#42;/serviceBindings/*`. Please see
     *                              {@see NetworkServicesClient::serviceBindingName()} for help formatting this field.
     */
    function delete_service_binding_sample(string $formattedName): void
    {
        // Create a client.
        $networkServicesClient = new NetworkServicesClient();

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

        // Call the API and handle any network failures.
        try {
            /** @var OperationResponse $response */
            $response = $networkServicesClient->deleteServiceBinding($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 = NetworkServicesClient::serviceBindingName(
            '[PROJECT]',
            '[LOCATION]',
            '[SERVICE_BINDING]'
        );

        delete_service_binding_sample($formattedName);
    }

### deleteServiceLbPolicy

Deletes a single ServiceLbPolicy.

The async variant is [NetworkServicesClient::deleteServiceLbPolicyAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-networkservices/latest/V1.Client.NetworkServicesClient#_Google_Cloud_NetworkServices_V1_Client_NetworkServicesClient__deleteServiceLbPolicyAsync__)
.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-networkservices/latest/V1.DeleteServiceLbPolicyRequest` 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\NetworkServices\V1\Client\NetworkServicesClient;
    use Google\Cloud\NetworkServices\V1\DeleteServiceLbPolicyRequest;
    use Google\Rpc\Status;

    /**
     * @param string $formattedName A name of the ServiceLbPolicy to delete. Must be in the format
     *                              `projects/{project}/locations/{location}/serviceLbPolicies/*`. Please see
     *                              {@see NetworkServicesClient::serviceLbPolicyName()} for help formatting this field.
     */
    function delete_service_lb_policy_sample(string $formattedName): void
    {
        // Create a client.
        $networkServicesClient = new NetworkServicesClient();

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

        // Call the API and handle any network failures.
        try {
            /** @var OperationResponse $response */
            $response = $networkServicesClient->deleteServiceLbPolicy($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 = NetworkServicesClient::serviceLbPolicyName(
            '[PROJECT]',
            '[LOCATION]',
            '[SERVICE_LB_POLICY]'
        );

        delete_service_lb_policy_sample($formattedName);
    }

### deleteTcpRoute

Deletes a single TcpRoute.

The async variant is [NetworkServicesClient::deleteTcpRouteAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-networkservices/latest/V1.Client.NetworkServicesClient#_Google_Cloud_NetworkServices_V1_Client_NetworkServicesClient__deleteTcpRouteAsync__) .

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-networkservices/latest/V1.DeleteTcpRouteRequest` 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\NetworkServices\V1\Client\NetworkServicesClient;
    use Google\Cloud\NetworkServices\V1\DeleteTcpRouteRequest;
    use Google\Rpc\Status;

    /**
     * @param string $formattedName A name of the TcpRoute to delete. Must be in the format
     *                              `projects/&#42;/locations/global/tcpRoutes/*`. Please see
     *                              {@see NetworkServicesClient::tcpRouteName()} for help formatting this field.
     */
    function delete_tcp_route_sample(string $formattedName): void
    {
        // Create a client.
        $networkServicesClient = new NetworkServicesClient();

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

        // Call the API and handle any network failures.
        try {
            /** @var OperationResponse $response */
            $response = $networkServicesClient->deleteTcpRoute($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 = NetworkServicesClient::tcpRouteName('[PROJECT]', '[LOCATION]', '[TCP_ROUTE]');

        delete_tcp_route_sample($formattedName);
    }

### deleteTlsRoute

Deletes a single TlsRoute.

The async variant is [NetworkServicesClient::deleteTlsRouteAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-networkservices/latest/V1.Client.NetworkServicesClient#_Google_Cloud_NetworkServices_V1_Client_NetworkServicesClient__deleteTlsRouteAsync__) .

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-networkservices/latest/V1.DeleteTlsRouteRequest` 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\NetworkServices\V1\Client\NetworkServicesClient;
    use Google\Cloud\NetworkServices\V1\DeleteTlsRouteRequest;
    use Google\Rpc\Status;

    /**
     * @param string $formattedName A name of the TlsRoute to delete. Must be in the format
     *                              `projects/&#42;/locations/global/tlsRoutes/*`. Please see
     *                              {@see NetworkServicesClient::tlsRouteName()} for help formatting this field.
     */
    function delete_tls_route_sample(string $formattedName): void
    {
        // Create a client.
        $networkServicesClient = new NetworkServicesClient();

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

        // Call the API and handle any network failures.
        try {
            /** @var OperationResponse $response */
            $response = $networkServicesClient->deleteTlsRoute($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 = NetworkServicesClient::tlsRouteName('[PROJECT]', '[LOCATION]', '[TLS_ROUTE]');

        delete_tls_route_sample($formattedName);
    }

### deleteWasmPlugin

Deletes the specified `WasmPlugin` resource.

The async variant is [NetworkServicesClient::deleteWasmPluginAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-networkservices/latest/V1.Client.NetworkServicesClient#_Google_Cloud_NetworkServices_V1_Client_NetworkServicesClient__deleteWasmPluginAsync__) .

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-networkservices/latest/V1.DeleteWasmPluginRequest` 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\NetworkServices\V1\Client\NetworkServicesClient;
    use Google\Cloud\NetworkServices\V1\DeleteWasmPluginRequest;
    use Google\Rpc\Status;

    /**
     * @param string $formattedName A name of the `WasmPlugin` resource to delete. Must be in the
     *                              format `projects/{project}/locations/global/wasmPlugins/{wasm_plugin}`. Please see
     *                              {@see NetworkServicesClient::wasmPluginName()} for help formatting this field.
     */
    function delete_wasm_plugin_sample(string $formattedName): void
    {
        // Create a client.
        $networkServicesClient = new NetworkServicesClient();

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

        // Call the API and handle any network failures.
        try {
            /** @var OperationResponse $response */
            $response = $networkServicesClient->deleteWasmPlugin($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 = NetworkServicesClient::wasmPluginName('[PROJECT]', '[LOCATION]', '[WASM_PLUGIN]');

        delete_wasm_plugin_sample($formattedName);
    }

### deleteWasmPluginVersion

Deletes the specified `WasmPluginVersion` resource.

The async variant is
[NetworkServicesClient::deleteWasmPluginVersionAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-networkservices/latest/V1.Client.NetworkServicesClient#_Google_Cloud_NetworkServices_V1_Client_NetworkServicesClient__deleteWasmPluginVersionAsync__) .

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-networkservices/latest/V1.DeleteWasmPluginVersionRequest` 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\NetworkServices\V1\Client\NetworkServicesClient;
    use Google\Cloud\NetworkServices\V1\DeleteWasmPluginVersionRequest;
    use Google\Rpc\Status;

    /**
     * @param string $formattedName A name of the `WasmPluginVersion` resource to delete. Must be in
     *                              the format
     *                              `projects/{project}/locations/global/wasmPlugins/{wasm_plugin}/versions/{wasm_plugin_version}`. Please see
     *                              {@see NetworkServicesClient::wasmPluginVersionName()} for help formatting this field.
     */
    function delete_wasm_plugin_version_sample(string $formattedName): void
    {
        // Create a client.
        $networkServicesClient = new NetworkServicesClient();

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

        // Call the API and handle any network failures.
        try {
            /** @var OperationResponse $response */
            $response = $networkServicesClient->deleteWasmPluginVersion($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 = NetworkServicesClient::wasmPluginVersionName(
            '[PROJECT]',
            '[LOCATION]',
            '[WASM_PLUGIN]',
            '[WASM_PLUGIN_VERSION]'
        );

        delete_wasm_plugin_version_sample($formattedName);
    }

### getEndpointPolicy

Gets details of a single EndpointPolicy.

The async variant is [NetworkServicesClient::getEndpointPolicyAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-networkservices/latest/V1.Client.NetworkServicesClient#_Google_Cloud_NetworkServices_V1_Client_NetworkServicesClient__getEndpointPolicyAsync__) .

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

**Example**

    use Google\ApiCore\ApiException;
    use Google\Cloud\NetworkServices\V1\Client\NetworkServicesClient;
    use Google\Cloud\NetworkServices\V1\EndpointPolicy;
    use Google\Cloud\NetworkServices\V1\GetEndpointPolicyRequest;

    /**
     * @param string $formattedName A name of the EndpointPolicy to get. Must be in the format
     *                              `projects/&#42;/locations/global/endpointPolicies/*`. Please see
     *                              {@see NetworkServicesClient::endpointPolicyName()} for help formatting this field.
     */
    function get_endpoint_policy_sample(string $formattedName): void
    {
        // Create a client.
        $networkServicesClient = new NetworkServicesClient();

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

        // Call the API and handle any network failures.
        try {
            /** @var EndpointPolicy $response */
            $response = $networkServicesClient->getEndpointPolicy($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 = NetworkServicesClient::endpointPolicyName(
            '[PROJECT]',
            '[LOCATION]',
            '[ENDPOINT_POLICY]'
        );

        get_endpoint_policy_sample($formattedName);
    }

### getGateway

Gets details of a single Gateway.

The async variant is [NetworkServicesClient::getGatewayAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-networkservices/latest/V1.Client.NetworkServicesClient#_Google_Cloud_NetworkServices_V1_Client_NetworkServicesClient__getGatewayAsync__) .

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-networkservices/latest/V1.GetGatewayRequest` 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** |
| `Google\Cloud\NetworkServices\V1\Gateway` |   |

**Example**

    use Google\ApiCore\ApiException;
    use Google\Cloud\NetworkServices\V1\Client\NetworkServicesClient;
    use Google\Cloud\NetworkServices\V1\Gateway;
    use Google\Cloud\NetworkServices\V1\GetGatewayRequest;

    /**
     * @param string $formattedName A name of the Gateway to get. Must be in the format
     *                              `projects/&#42;/locations/&#42;/gateways/*`. Please see
     *                              {@see NetworkServicesClient::gatewayName()} for help formatting this field.
     */
    function get_gateway_sample(string $formattedName): void
    {
        // Create a client.
        $networkServicesClient = new NetworkServicesClient();

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

        // Call the API and handle any network failures.
        try {
            /** @var Gateway $response */
            $response = $networkServicesClient->getGateway($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 = NetworkServicesClient::gatewayName('[PROJECT]', '[LOCATION]', '[GATEWAY]');

        get_gateway_sample($formattedName);
    }

### getGatewayRouteView

Get a single RouteView of a Gateway.

The async variant is [NetworkServicesClient::getGatewayRouteViewAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-networkservices/latest/V1.Client.NetworkServicesClient#_Google_Cloud_NetworkServices_V1_Client_NetworkServicesClient__getGatewayRouteViewAsync__) .

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

**Example**

    use Google\ApiCore\ApiException;
    use Google\Cloud\NetworkServices\V1\Client\NetworkServicesClient;
    use Google\Cloud\NetworkServices\V1\GatewayRouteView;
    use Google\Cloud\NetworkServices\V1\GetGatewayRouteViewRequest;

    /**
     * @param string $formattedName Name of the GatewayRouteView resource.
     *                              Formats:
     *                              projects/{project}/locations/{location}/gateways/{gateway}/routeViews/{route_view}
     *                              Please see {@see NetworkServicesClient::gatewayRouteViewName()} for help formatting this field.
     */
    function get_gateway_route_view_sample(string $formattedName): void
    {
        // Create a client.
        $networkServicesClient = new NetworkServicesClient();

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

        // Call the API and handle any network failures.
        try {
            /** @var GatewayRouteView $response */
            $response = $networkServicesClient->getGatewayRouteView($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 = NetworkServicesClient::gatewayRouteViewName(
            '[PROJECT]',
            '[LOCATION]',
            '[GATEWAY]',
            '[ROUTE_VIEW]'
        );

        get_gateway_route_view_sample($formattedName);
    }

### getGrpcRoute

Gets details of a single GrpcRoute.

The async variant is [NetworkServicesClient::getGrpcRouteAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-networkservices/latest/V1.Client.NetworkServicesClient#_Google_Cloud_NetworkServices_V1_Client_NetworkServicesClient__getGrpcRouteAsync__) .

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-networkservices/latest/V1.GetGrpcRouteRequest` 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** |
| `Google\Cloud\NetworkServices\V1\GrpcRoute` |   |

**Example**

    use Google\ApiCore\ApiException;
    use Google\Cloud\NetworkServices\V1\Client\NetworkServicesClient;
    use Google\Cloud\NetworkServices\V1\GetGrpcRouteRequest;
    use Google\Cloud\NetworkServices\V1\GrpcRoute;

    /**
     * @param string $formattedName A name of the GrpcRoute to get. Must be in the format
     *                              `projects/&#42;/locations/global/grpcRoutes/*`. Please see
     *                              {@see NetworkServicesClient::grpcRouteName()} for help formatting this field.
     */
    function get_grpc_route_sample(string $formattedName): void
    {
        // Create a client.
        $networkServicesClient = new NetworkServicesClient();

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

        // Call the API and handle any network failures.
        try {
            /** @var GrpcRoute $response */
            $response = $networkServicesClient->getGrpcRoute($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 = NetworkServicesClient::grpcRouteName('[PROJECT]', '[LOCATION]', '[GRPC_ROUTE]');

        get_grpc_route_sample($formattedName);
    }

### getHttpRoute

Gets details of a single HttpRoute.

The async variant is [NetworkServicesClient::getHttpRouteAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-networkservices/latest/V1.Client.NetworkServicesClient#_Google_Cloud_NetworkServices_V1_Client_NetworkServicesClient__getHttpRouteAsync__) .

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-networkservices/latest/V1.GetHttpRouteRequest` 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** |
| `Google\Cloud\NetworkServices\V1\HttpRoute` |   |

**Example**

    use Google\ApiCore\ApiException;
    use Google\Cloud\NetworkServices\V1\Client\NetworkServicesClient;
    use Google\Cloud\NetworkServices\V1\GetHttpRouteRequest;
    use Google\Cloud\NetworkServices\V1\HttpRoute;

    /**
     * @param string $formattedName A name of the HttpRoute to get. Must be in the format
     *                              `projects/&#42;/locations/global/httpRoutes/*`. Please see
     *                              {@see NetworkServicesClient::httpRouteName()} for help formatting this field.
     */
    function get_http_route_sample(string $formattedName): void
    {
        // Create a client.
        $networkServicesClient = new NetworkServicesClient();

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

        // Call the API and handle any network failures.
        try {
            /** @var HttpRoute $response */
            $response = $networkServicesClient->getHttpRoute($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 = NetworkServicesClient::httpRouteName('[PROJECT]', '[LOCATION]', '[HTTP_ROUTE]');

        get_http_route_sample($formattedName);
    }

### getMesh

Gets details of a single Mesh.

The async variant is [NetworkServicesClient::getMeshAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-networkservices/latest/V1.Client.NetworkServicesClient#_Google_Cloud_NetworkServices_V1_Client_NetworkServicesClient__getMeshAsync__) .

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

**Example**

    use Google\ApiCore\ApiException;
    use Google\Cloud\NetworkServices\V1\Client\NetworkServicesClient;
    use Google\Cloud\NetworkServices\V1\GetMeshRequest;
    use Google\Cloud\NetworkServices\V1\Mesh;

    /**
     * @param string $formattedName A name of the Mesh to get. Must be in the format
     *                              `projects/&#42;/locations/global/meshes/*`. Please see
     *                              {@see NetworkServicesClient::meshName()} for help formatting this field.
     */
    function get_mesh_sample(string $formattedName): void
    {
        // Create a client.
        $networkServicesClient = new NetworkServicesClient();

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

        // Call the API and handle any network failures.
        try {
            /** @var Mesh $response */
            $response = $networkServicesClient->getMesh($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 = NetworkServicesClient::meshName('[PROJECT]', '[LOCATION]', '[MESH]');

        get_mesh_sample($formattedName);
    }

### getMeshRouteView

Get a single RouteView of a Mesh.

The async variant is [NetworkServicesClient::getMeshRouteViewAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-networkservices/latest/V1.Client.NetworkServicesClient#_Google_Cloud_NetworkServices_V1_Client_NetworkServicesClient__getMeshRouteViewAsync__) .

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

**Example**

    use Google\ApiCore\ApiException;
    use Google\Cloud\NetworkServices\V1\Client\NetworkServicesClient;
    use Google\Cloud\NetworkServices\V1\GetMeshRouteViewRequest;
    use Google\Cloud\NetworkServices\V1\MeshRouteView;

    /**
     * @param string $formattedName Name of the MeshRouteView resource.
     *                              Format:
     *                              projects/{project}/locations/{location}/meshes/{mesh}/routeViews/{route_view}
     *                              Please see {@see NetworkServicesClient::meshRouteViewName()} for help formatting this field.
     */
    function get_mesh_route_view_sample(string $formattedName): void
    {
        // Create a client.
        $networkServicesClient = new NetworkServicesClient();

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

        // Call the API and handle any network failures.
        try {
            /** @var MeshRouteView $response */
            $response = $networkServicesClient->getMeshRouteView($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 = NetworkServicesClient::meshRouteViewName(
            '[PROJECT]',
            '[LOCATION]',
            '[MESH]',
            '[ROUTE_VIEW]'
        );

        get_mesh_route_view_sample($formattedName);
    }

### getServiceBinding

Gets details of a single ServiceBinding.

The async variant is [NetworkServicesClient::getServiceBindingAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-networkservices/latest/V1.Client.NetworkServicesClient#_Google_Cloud_NetworkServices_V1_Client_NetworkServicesClient__getServiceBindingAsync__) .

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

**Example**

    use Google\ApiCore\ApiException;
    use Google\Cloud\NetworkServices\V1\Client\NetworkServicesClient;
    use Google\Cloud\NetworkServices\V1\GetServiceBindingRequest;
    use Google\Cloud\NetworkServices\V1\ServiceBinding;

    /**
     * @param string $formattedName A name of the ServiceBinding to get. Must be in the format
     *                              `projects/&#42;/locations/&#42;/serviceBindings/*`. Please see
     *                              {@see NetworkServicesClient::serviceBindingName()} for help formatting this field.
     */
    function get_service_binding_sample(string $formattedName): void
    {
        // Create a client.
        $networkServicesClient = new NetworkServicesClient();

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

        // Call the API and handle any network failures.
        try {
            /** @var ServiceBinding $response */
            $response = $networkServicesClient->getServiceBinding($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 = NetworkServicesClient::serviceBindingName(
            '[PROJECT]',
            '[LOCATION]',
            '[SERVICE_BINDING]'
        );

        get_service_binding_sample($formattedName);
    }

### getServiceLbPolicy

Gets details of a single ServiceLbPolicy.

The async variant is [NetworkServicesClient::getServiceLbPolicyAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-networkservices/latest/V1.Client.NetworkServicesClient#_Google_Cloud_NetworkServices_V1_Client_NetworkServicesClient__getServiceLbPolicyAsync__) .

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

**Example**

    use Google\ApiCore\ApiException;
    use Google\Cloud\NetworkServices\V1\Client\NetworkServicesClient;
    use Google\Cloud\NetworkServices\V1\GetServiceLbPolicyRequest;
    use Google\Cloud\NetworkServices\V1\ServiceLbPolicy;

    /**
     * @param string $formattedName A name of the ServiceLbPolicy to get. Must be in the format
     *                              `projects/{project}/locations/{location}/serviceLbPolicies/*`. Please see
     *                              {@see NetworkServicesClient::serviceLbPolicyName()} for help formatting this field.
     */
    function get_service_lb_policy_sample(string $formattedName): void
    {
        // Create a client.
        $networkServicesClient = new NetworkServicesClient();

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

        // Call the API and handle any network failures.
        try {
            /** @var ServiceLbPolicy $response */
            $response = $networkServicesClient->getServiceLbPolicy($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 = NetworkServicesClient::serviceLbPolicyName(
            '[PROJECT]',
            '[LOCATION]',
            '[SERVICE_LB_POLICY]'
        );

        get_service_lb_policy_sample($formattedName);
    }

### getTcpRoute

Gets details of a single TcpRoute.

The async variant is [NetworkServicesClient::getTcpRouteAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-networkservices/latest/V1.Client.NetworkServicesClient#_Google_Cloud_NetworkServices_V1_Client_NetworkServicesClient__getTcpRouteAsync__) .

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-networkservices/latest/V1.GetTcpRouteRequest` 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** |
| `Google\Cloud\NetworkServices\V1\TcpRoute` |   |

**Example**

    use Google\ApiCore\ApiException;
    use Google\Cloud\NetworkServices\V1\Client\NetworkServicesClient;
    use Google\Cloud\NetworkServices\V1\GetTcpRouteRequest;
    use Google\Cloud\NetworkServices\V1\TcpRoute;

    /**
     * @param string $formattedName A name of the TcpRoute to get. Must be in the format
     *                              `projects/&#42;/locations/global/tcpRoutes/*`. Please see
     *                              {@see NetworkServicesClient::tcpRouteName()} for help formatting this field.
     */
    function get_tcp_route_sample(string $formattedName): void
    {
        // Create a client.
        $networkServicesClient = new NetworkServicesClient();

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

        // Call the API and handle any network failures.
        try {
            /** @var TcpRoute $response */
            $response = $networkServicesClient->getTcpRoute($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 = NetworkServicesClient::tcpRouteName('[PROJECT]', '[LOCATION]', '[TCP_ROUTE]');

        get_tcp_route_sample($formattedName);
    }

### getTlsRoute

Gets details of a single TlsRoute.

The async variant is [NetworkServicesClient::getTlsRouteAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-networkservices/latest/V1.Client.NetworkServicesClient#_Google_Cloud_NetworkServices_V1_Client_NetworkServicesClient__getTlsRouteAsync__) .

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-networkservices/latest/V1.GetTlsRouteRequest` 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** |
| `Google\Cloud\NetworkServices\V1\TlsRoute` |   |

**Example**

    use Google\ApiCore\ApiException;
    use Google\Cloud\NetworkServices\V1\Client\NetworkServicesClient;
    use Google\Cloud\NetworkServices\V1\GetTlsRouteRequest;
    use Google\Cloud\NetworkServices\V1\TlsRoute;

    /**
     * @param string $formattedName A name of the TlsRoute to get. Must be in the format
     *                              `projects/&#42;/locations/global/tlsRoutes/*`. Please see
     *                              {@see NetworkServicesClient::tlsRouteName()} for help formatting this field.
     */
    function get_tls_route_sample(string $formattedName): void
    {
        // Create a client.
        $networkServicesClient = new NetworkServicesClient();

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

        // Call the API and handle any network failures.
        try {
            /** @var TlsRoute $response */
            $response = $networkServicesClient->getTlsRoute($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 = NetworkServicesClient::tlsRouteName('[PROJECT]', '[LOCATION]', '[TLS_ROUTE]');

        get_tls_route_sample($formattedName);
    }

### getWasmPlugin

Gets details of the specified `WasmPlugin` resource.

The async variant is [NetworkServicesClient::getWasmPluginAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-networkservices/latest/V1.Client.NetworkServicesClient#_Google_Cloud_NetworkServices_V1_Client_NetworkServicesClient__getWasmPluginAsync__) .

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

**Example**

    use Google\ApiCore\ApiException;
    use Google\Cloud\NetworkServices\V1\Client\NetworkServicesClient;
    use Google\Cloud\NetworkServices\V1\GetWasmPluginRequest;
    use Google\Cloud\NetworkServices\V1\WasmPlugin;

    /**
     * @param string $formattedName A name of the `WasmPlugin` resource to get. Must be in the
     *                              format `projects/{project}/locations/global/wasmPlugins/{wasm_plugin}`. Please see
     *                              {@see NetworkServicesClient::wasmPluginName()} for help formatting this field.
     */
    function get_wasm_plugin_sample(string $formattedName): void
    {
        // Create a client.
        $networkServicesClient = new NetworkServicesClient();

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

        // Call the API and handle any network failures.
        try {
            /** @var WasmPlugin $response */
            $response = $networkServicesClient->getWasmPlugin($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 = NetworkServicesClient::wasmPluginName('[PROJECT]', '[LOCATION]', '[WASM_PLUGIN]');

        get_wasm_plugin_sample($formattedName);
    }

### getWasmPluginVersion

Gets details of the specified `WasmPluginVersion` resource.

The async variant is [NetworkServicesClient::getWasmPluginVersionAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-networkservices/latest/V1.Client.NetworkServicesClient#_Google_Cloud_NetworkServices_V1_Client_NetworkServicesClient__getWasmPluginVersionAsync__) .

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

**Example**

    use Google\ApiCore\ApiException;
    use Google\Cloud\NetworkServices\V1\Client\NetworkServicesClient;
    use Google\Cloud\NetworkServices\V1\GetWasmPluginVersionRequest;
    use Google\Cloud\NetworkServices\V1\WasmPluginVersion;

    /**
     * @param string $formattedName A name of the `WasmPluginVersion` resource to get. Must be in
     *                              the format
     *                              `projects/{project}/locations/global/wasmPlugins/{wasm_plugin}/versions/{wasm_plugin_version}`. Please see
     *                              {@see NetworkServicesClient::wasmPluginVersionName()} for help formatting this field.
     */
    function get_wasm_plugin_version_sample(string $formattedName): void
    {
        // Create a client.
        $networkServicesClient = new NetworkServicesClient();

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

        // Call the API and handle any network failures.
        try {
            /** @var WasmPluginVersion $response */
            $response = $networkServicesClient->getWasmPluginVersion($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 = NetworkServicesClient::wasmPluginVersionName(
            '[PROJECT]',
            '[LOCATION]',
            '[WASM_PLUGIN]',
            '[WASM_PLUGIN_VERSION]'
        );

        get_wasm_plugin_version_sample($formattedName);
    }

### listEndpointPolicies

Lists EndpointPolicies in a given project and location.

The async variant is [NetworkServicesClient::listEndpointPoliciesAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-networkservices/latest/V1.Client.NetworkServicesClient#_Google_Cloud_NetworkServices_V1_Client_NetworkServicesClient__listEndpointPoliciesAsync__) .

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-networkservices/latest/V1.ListEndpointPoliciesRequest` 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\NetworkServices\V1\Client\NetworkServicesClient;
    use Google\Cloud\NetworkServices\V1\EndpointPolicy;
    use Google\Cloud\NetworkServices\V1\ListEndpointPoliciesRequest;

    /**
     * @param string $formattedParent The project and location from which the EndpointPolicies should
     *                                be listed, specified in the format `projects/&#42;/locations/global`. Please see
     *                                {@see NetworkServicesClient::locationName()} for help formatting this field.
     */
    function list_endpoint_policies_sample(string $formattedParent): void
    {
        // Create a client.
        $networkServicesClient = new NetworkServicesClient();

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

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

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

        list_endpoint_policies_sample($formattedParent);
    }

### listGatewayRouteViews

Lists RouteViews

The async variant is [NetworkServicesClient::listGatewayRouteViewsAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-networkservices/latest/V1.Client.NetworkServicesClient#_Google_Cloud_NetworkServices_V1_Client_NetworkServicesClient__listGatewayRouteViewsAsync__)
.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-networkservices/latest/V1.ListGatewayRouteViewsRequest` 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\NetworkServices\V1\Client\NetworkServicesClient;
    use Google\Cloud\NetworkServices\V1\GatewayRouteView;
    use Google\Cloud\NetworkServices\V1\ListGatewayRouteViewsRequest;

    /**
     * @param string $formattedParent The Gateway to which a Route is associated.
     *                                Formats:
     *                                projects/{project}/locations/{location}/gateways/{gateway}
     *                                Please see {@see NetworkServicesClient::gatewayName()} for help formatting this field.
     */
    function list_gateway_route_views_sample(string $formattedParent): void
    {
        // Create a client.
        $networkServicesClient = new NetworkServicesClient();

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

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

            /** @var GatewayRouteView $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 = NetworkServicesClient::gatewayName('[PROJECT]', '[LOCATION]', '[GATEWAY]');

        list_gateway_route_views_sample($formattedParent);
    }

### listGateways

Lists Gateways in a given project and location.

The async variant is [NetworkServicesClient::listGatewaysAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-networkservices/latest/V1.Client.NetworkServicesClient#_Google_Cloud_NetworkServices_V1_Client_NetworkServicesClient__listGatewaysAsync__) .

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-networkservices/latest/V1.ListGatewaysRequest` 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\NetworkServices\V1\Client\NetworkServicesClient;
    use Google\Cloud\NetworkServices\V1\Gateway;
    use Google\Cloud\NetworkServices\V1\ListGatewaysRequest;

    /**
     * @param string $formattedParent The project and location from which the Gateways should be
     *                                listed, specified in the format `projects/&#42;/locations/*`. Please see
     *                                {@see NetworkServicesClient::locationName()} for help formatting this field.
     */
    function list_gateways_sample(string $formattedParent): void
    {
        // Create a client.
        $networkServicesClient = new NetworkServicesClient();

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

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

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

        list_gateways_sample($formattedParent);
    }

### listGrpcRoutes

Lists GrpcRoutes in a given project and location.

The async variant is [NetworkServicesClient::listGrpcRoutesAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-networkservices/latest/V1.Client.NetworkServicesClient#_Google_Cloud_NetworkServices_V1_Client_NetworkServicesClient__listGrpcRoutesAsync__) .

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-networkservices/latest/V1.ListGrpcRoutesRequest` 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\NetworkServices\V1\Client\NetworkServicesClient;
    use Google\Cloud\NetworkServices\V1\GrpcRoute;
    use Google\Cloud\NetworkServices\V1\ListGrpcRoutesRequest;

    /**
     * @param string $formattedParent The project and location from which the GrpcRoutes should be
     *                                listed, specified in the format `projects/&#42;/locations/global`. Please see
     *                                {@see NetworkServicesClient::locationName()} for help formatting this field.
     */
    function list_grpc_routes_sample(string $formattedParent): void
    {
        // Create a client.
        $networkServicesClient = new NetworkServicesClient();

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

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

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

        list_grpc_routes_sample($formattedParent);
    }

### listHttpRoutes

Lists HttpRoute in a given project and location.

The async variant is [NetworkServicesClient::listHttpRoutesAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-networkservices/latest/V1.Client.NetworkServicesClient#_Google_Cloud_NetworkServices_V1_Client_NetworkServicesClient__listHttpRoutesAsync__) .

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-networkservices/latest/V1.ListHttpRoutesRequest` 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\NetworkServices\V1\Client\NetworkServicesClient;
    use Google\Cloud\NetworkServices\V1\HttpRoute;
    use Google\Cloud\NetworkServices\V1\ListHttpRoutesRequest;

    /**
     * @param string $formattedParent The project and location from which the HttpRoutes should be
     *                                listed, specified in the format `projects/&#42;/locations/global`. Please see
     *                                {@see NetworkServicesClient::locationName()} for help formatting this field.
     */
    function list_http_routes_sample(string $formattedParent): void
    {
        // Create a client.
        $networkServicesClient = new NetworkServicesClient();

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

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

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

        list_http_routes_sample($formattedParent);
    }

### listMeshRouteViews

Lists RouteViews

The async variant is [NetworkServicesClient::listMeshRouteViewsAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-networkservices/latest/V1.Client.NetworkServicesClient#_Google_Cloud_NetworkServices_V1_Client_NetworkServicesClient__listMeshRouteViewsAsync__) .

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-networkservices/latest/V1.ListMeshRouteViewsRequest` 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\NetworkServices\V1\Client\NetworkServicesClient;
    use Google\Cloud\NetworkServices\V1\ListMeshRouteViewsRequest;
    use Google\Cloud\NetworkServices\V1\MeshRouteView;

    /**
     * @param string $formattedParent The Mesh to which a Route is associated.
     *                                Format:
     *                                projects/{project}/locations/{location}/meshes/{mesh}
     *                                Please see {@see NetworkServicesClient::meshName()} for help formatting this field.
     */
    function list_mesh_route_views_sample(string $formattedParent): void
    {
        // Create a client.
        $networkServicesClient = new NetworkServicesClient();

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

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

            /** @var MeshRouteView $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 = NetworkServicesClient::meshName('[PROJECT]', '[LOCATION]', '[MESH]');

        list_mesh_route_views_sample($formattedParent);
    }

### listMeshes

Lists Meshes in a given project and location.

The async variant is [NetworkServicesClient::listMeshesAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-networkservices/latest/V1.Client.NetworkServicesClient#_Google_Cloud_NetworkServices_V1_Client_NetworkServicesClient__listMeshesAsync__) .

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-networkservices/latest/V1.ListMeshesRequest` 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\NetworkServices\V1\Client\NetworkServicesClient;
    use Google\Cloud\NetworkServices\V1\ListMeshesRequest;
    use Google\Cloud\NetworkServices\V1\Mesh;

    /**
     * @param string $formattedParent The project and location from which the Meshes should be
     *                                listed, specified in the format `projects/&#42;/locations/global`. Please see
     *                                {@see NetworkServicesClient::locationName()} for help formatting this field.
     */
    function list_meshes_sample(string $formattedParent): void
    {
        // Create a client.
        $networkServicesClient = new NetworkServicesClient();

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

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

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

        list_meshes_sample($formattedParent);
    }

### listServiceBindings

Lists ServiceBinding in a given project and location.

The async variant is [NetworkServicesClient::listServiceBindingsAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-networkservices/latest/V1.Client.NetworkServicesClient#_Google_Cloud_NetworkServices_V1_Client_NetworkServicesClient__listServiceBindingsAsync__) .

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-networkservices/latest/V1.ListServiceBindingsRequest` 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\NetworkServices\V1\Client\NetworkServicesClient;
    use Google\Cloud\NetworkServices\V1\ListServiceBindingsRequest;
    use Google\Cloud\NetworkServices\V1\ServiceBinding;

    /**
     * @param string $formattedParent The project and location from which the ServiceBindings should be
     *                                listed, specified in the format `projects/&#42;/locations/*`. Please see
     *                                {@see NetworkServicesClient::locationName()} for help formatting this field.
     */
    function list_service_bindings_sample(string $formattedParent): void
    {
        // Create a client.
        $networkServicesClient = new NetworkServicesClient();

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

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

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

        list_service_bindings_sample($formattedParent);
    }

### listServiceLbPolicies

Lists ServiceLbPolicies in a given project and location.

The async variant is [NetworkServicesClient::listServiceLbPoliciesAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-networkservices/latest/V1.Client.NetworkServicesClient#_Google_Cloud_NetworkServices_V1_Client_NetworkServicesClient__listServiceLbPoliciesAsync__)
.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-networkservices/latest/V1.ListServiceLbPoliciesRequest` 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\NetworkServices\V1\Client\NetworkServicesClient;
    use Google\Cloud\NetworkServices\V1\ListServiceLbPoliciesRequest;
    use Google\Cloud\NetworkServices\V1\ServiceLbPolicy;

    /**
     * @param string $formattedParent The project and location from which the ServiceLbPolicies should
     *                                be listed, specified in the format
     *                                `projects/{project}/locations/{location}`. Please see
     *                                {@see NetworkServicesClient::locationName()} for help formatting this field.
     */
    function list_service_lb_policies_sample(string $formattedParent): void
    {
        // Create a client.
        $networkServicesClient = new NetworkServicesClient();

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

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

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

        list_service_lb_policies_sample($formattedParent);
    }

### listTcpRoutes

Lists TcpRoute in a given project and location.

The async variant is [NetworkServicesClient::listTcpRoutesAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-networkservices/latest/V1.Client.NetworkServicesClient#_Google_Cloud_NetworkServices_V1_Client_NetworkServicesClient__listTcpRoutesAsync__) .

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-networkservices/latest/V1.ListTcpRoutesRequest` 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\NetworkServices\V1\Client\NetworkServicesClient;
    use Google\Cloud\NetworkServices\V1\ListTcpRoutesRequest;
    use Google\Cloud\NetworkServices\V1\TcpRoute;

    /**
     * @param string $formattedParent The project and location from which the TcpRoutes should be
     *                                listed, specified in the format `projects/&#42;/locations/global`. Please see
     *                                {@see NetworkServicesClient::locationName()} for help formatting this field.
     */
    function list_tcp_routes_sample(string $formattedParent): void
    {
        // Create a client.
        $networkServicesClient = new NetworkServicesClient();

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

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

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

        list_tcp_routes_sample($formattedParent);
    }

### listTlsRoutes

Lists TlsRoute in a given project and location.

The async variant is [NetworkServicesClient::listTlsRoutesAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-networkservices/latest/V1.Client.NetworkServicesClient#_Google_Cloud_NetworkServices_V1_Client_NetworkServicesClient__listTlsRoutesAsync__) .

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-networkservices/latest/V1.ListTlsRoutesRequest` 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\NetworkServices\V1\Client\NetworkServicesClient;
    use Google\Cloud\NetworkServices\V1\ListTlsRoutesRequest;
    use Google\Cloud\NetworkServices\V1\TlsRoute;

    /**
     * @param string $formattedParent The project and location from which the TlsRoutes should be
     *                                listed, specified in the format `projects/&#42;/locations/global`. Please see
     *                                {@see NetworkServicesClient::locationName()} for help formatting this field.
     */
    function list_tls_routes_sample(string $formattedParent): void
    {
        // Create a client.
        $networkServicesClient = new NetworkServicesClient();

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

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

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

        list_tls_routes_sample($formattedParent);
    }

### listWasmPluginVersions

Lists `WasmPluginVersion` resources in a given project and
location.

The async variant is [NetworkServicesClient::listWasmPluginVersionsAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-networkservices/latest/V1.Client.NetworkServicesClient#_Google_Cloud_NetworkServices_V1_Client_NetworkServicesClient__listWasmPluginVersionsAsync__)
.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-networkservices/latest/V1.ListWasmPluginVersionsRequest` 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\NetworkServices\V1\Client\NetworkServicesClient;
    use Google\Cloud\NetworkServices\V1\ListWasmPluginVersionsRequest;
    use Google\Cloud\NetworkServices\V1\WasmPluginVersion;

    /**
     * @param string $formattedParent The `WasmPlugin` resource whose `WasmPluginVersion`s
     *                                are listed, specified in the following format:
     *                                `projects/{project}/locations/global/wasmPlugins/{wasm_plugin}`. Please see
     *                                {@see NetworkServicesClient::wasmPluginName()} for help formatting this field.
     */
    function list_wasm_plugin_versions_sample(string $formattedParent): void
    {
        // Create a client.
        $networkServicesClient = new NetworkServicesClient();

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

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

            /** @var WasmPluginVersion $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 = NetworkServicesClient::wasmPluginName(
            '[PROJECT]',
            '[LOCATION]',
            '[WASM_PLUGIN]'
        );

        list_wasm_plugin_versions_sample($formattedParent);
    }

### listWasmPlugins

Lists `WasmPlugin` resources in a given project and
location.

The async variant is [NetworkServicesClient::listWasmPluginsAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-networkservices/latest/V1.Client.NetworkServicesClient#_Google_Cloud_NetworkServices_V1_Client_NetworkServicesClient__listWasmPluginsAsync__) .

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-networkservices/latest/V1.ListWasmPluginsRequest` 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\NetworkServices\V1\Client\NetworkServicesClient;
    use Google\Cloud\NetworkServices\V1\ListWasmPluginsRequest;
    use Google\Cloud\NetworkServices\V1\WasmPlugin;

    /**
     * @param string $formattedParent The project and location from which the `WasmPlugin` resources
     *                                are listed, specified in the following format:
     *                                `projects/{project}/locations/global`. Please see
     *                                {@see NetworkServicesClient::locationName()} for help formatting this field.
     */
    function list_wasm_plugins_sample(string $formattedParent): void
    {
        // Create a client.
        $networkServicesClient = new NetworkServicesClient();

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

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

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

        list_wasm_plugins_sample($formattedParent);
    }

### updateEndpointPolicy

Updates the parameters of a single EndpointPolicy.

The async variant is [NetworkServicesClient::updateEndpointPolicyAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-networkservices/latest/V1.Client.NetworkServicesClient#_Google_Cloud_NetworkServices_V1_Client_NetworkServicesClient__updateEndpointPolicyAsync__) .

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

**Example**

    use Google\ApiCore\ApiException;
    use Google\ApiCore\OperationResponse;
    use Google\Cloud\NetworkServices\V1\Client\NetworkServicesClient;
    use Google\Cloud\NetworkServices\V1\EndpointMatcher;
    use Google\Cloud\NetworkServices\V1\EndpointPolicy;
    use Google\Cloud\NetworkServices\V1\EndpointPolicy\EndpointPolicyType;
    use Google\Cloud\NetworkServices\V1\UpdateEndpointPolicyRequest;
    use Google\Rpc\Status;

    /**
     * @param int $endpointPolicyType The type of endpoint policy. This is primarily used to validate
     *                                the configuration.
     */
    function update_endpoint_policy_sample(int $endpointPolicyType): void
    {
        // Create a client.
        $networkServicesClient = new NetworkServicesClient();

        // Prepare the request message.
        $endpointPolicyEndpointMatcher = new EndpointMatcher();
        $endpointPolicy = (new EndpointPolicy())
            ->setType($endpointPolicyType)
            ->setEndpointMatcher($endpointPolicyEndpointMatcher);
        $request = (new UpdateEndpointPolicyRequest())
            ->setEndpointPolicy($endpointPolicy);

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

            if ($response->operationSucceeded()) {
                /** @var EndpointPolicy $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
    {
        $endpointPolicyType = EndpointPolicyType::ENDPOINT_POLICY_TYPE_UNSPECIFIED;

        update_endpoint_policy_sample($endpointPolicyType);
    }

### updateGateway

Updates the parameters of a single Gateway.

The async variant is [NetworkServicesClient::updateGatewayAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-networkservices/latest/V1.Client.NetworkServicesClient#_Google_Cloud_NetworkServices_V1_Client_NetworkServicesClient__updateGatewayAsync__) .

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-networkservices/latest/V1.UpdateGatewayRequest` 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<Google\Cloud\NetworkServices\V1\Gateway>` |   |

**Example**

    use Google\ApiCore\ApiException;
    use Google\ApiCore\OperationResponse;
    use Google\Cloud\NetworkServices\V1\Client\NetworkServicesClient;
    use Google\Cloud\NetworkServices\V1\Gateway;
    use Google\Cloud\NetworkServices\V1\UpdateGatewayRequest;
    use Google\Rpc\Status;

    /**
     * @param int $gatewayPortsElement One or more port numbers (1-65535), on which the Gateway will
     *                                 receive traffic. The proxy binds to the specified ports.
     *                                 Gateways of type 'SECURE_WEB_GATEWAY' are limited to 1 port.
     *                                 Gateways of type 'OPEN_MESH' listen on 0.0.0.0 for IPv4 and :: for IPv6 and
     *                                 support multiple ports.
     */
    function update_gateway_sample(int $gatewayPortsElement): void
    {
        // Create a client.
        $networkServicesClient = new NetworkServicesClient();

        // Prepare the request message.
        $gatewayPorts = [$gatewayPortsElement,];
        $gateway = (new Gateway())
            ->setPorts($gatewayPorts);
        $request = (new UpdateGatewayRequest())
            ->setGateway($gateway);

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

            if ($response->operationSucceeded()) {
                /** @var Gateway $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
    {
        $gatewayPortsElement = 0;

        update_gateway_sample($gatewayPortsElement);
    }

### updateGrpcRoute

Updates the parameters of a single GrpcRoute.

The async variant is [NetworkServicesClient::updateGrpcRouteAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-networkservices/latest/V1.Client.NetworkServicesClient#_Google_Cloud_NetworkServices_V1_Client_NetworkServicesClient__updateGrpcRouteAsync__) .

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-networkservices/latest/V1.UpdateGrpcRouteRequest` 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<Google\Cloud\NetworkServices\V1\GrpcRoute>` |   |

**Example**

    use Google\ApiCore\ApiException;
    use Google\ApiCore\OperationResponse;
    use Google\Cloud\NetworkServices\V1\Client\NetworkServicesClient;
    use Google\Cloud\NetworkServices\V1\GrpcRoute;
    use Google\Cloud\NetworkServices\V1\GrpcRoute\RouteAction;
    use Google\Cloud\NetworkServices\V1\GrpcRoute\RouteRule;
    use Google\Cloud\NetworkServices\V1\UpdateGrpcRouteRequest;
    use Google\Rpc\Status;

    /**
     * @param string $grpcRouteHostnamesElement Service hostnames with an optional port for which this route
     *                                          describes traffic.
     *
     *                                          Format: <hostname>[:<port>]
     *
     *                                          Hostname is the fully qualified domain name of a network host. This matches
     *                                          the RFC 1123 definition of a hostname with 2 notable exceptions:
     *                                          - IPs are not allowed.
     *                                          - A hostname may be prefixed with a wildcard label (`*.`). The wildcard
     *                                          label must appear by itself as the first label.
     *
     *                                          Hostname can be "precise" which is a domain name without the terminating
     *                                          dot of a network host (e.g. `foo.example.com`) or "wildcard", which is a
     *                                          domain name prefixed with a single wildcard label (e.g. `*.example.com`).
     *
     *                                          Note that as per RFC1035 and RFC1123, a label must consist of lower case
     *                                          alphanumeric characters or '-', and must start and end with an alphanumeric
     *                                          character. No other punctuation is allowed.
     *
     *                                          The routes associated with a Mesh or Gateway must have unique hostnames. If
     *                                          you attempt to attach multiple routes with conflicting hostnames, the
     *                                          configuration will be rejected.
     *
     *                                          For example, while it is acceptable for routes for the hostnames
     *                                          `*.foo.bar.com` and `*.bar.com` to be associated with the same route, it is
     *                                          not possible to associate two routes both with `*.bar.com` or both with
     *                                          `bar.com`.
     *
     *                                          If a port is specified, then gRPC clients must use the channel URI with the
     *                                          port to match this rule (i.e. "xds:///service:123"), otherwise they must
     *                                          supply the URI without a port (i.e. "xds:///service").
     */
    function update_grpc_route_sample(string $grpcRouteHostnamesElement): void
    {
        // Create a client.
        $networkServicesClient = new NetworkServicesClient();

        // Prepare the request message.
        $grpcRouteHostnames = [$grpcRouteHostnamesElement,];
        $grpcRouteRulesAction = new RouteAction();
        $routeRule = (new RouteRule())
            ->setAction($grpcRouteRulesAction);
        $grpcRouteRules = [$routeRule,];
        $grpcRoute = (new GrpcRoute())
            ->setHostnames($grpcRouteHostnames)
            ->setRules($grpcRouteRules);
        $request = (new UpdateGrpcRouteRequest())
            ->setGrpcRoute($grpcRoute);

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

            if ($response->operationSucceeded()) {
                /** @var GrpcRoute $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
    {
        $grpcRouteHostnamesElement = '[HOSTNAMES]';

        update_grpc_route_sample($grpcRouteHostnamesElement);
    }

### updateHttpRoute

Updates the parameters of a single HttpRoute.

The async variant is [NetworkServicesClient::updateHttpRouteAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-networkservices/latest/V1.Client.NetworkServicesClient#_Google_Cloud_NetworkServices_V1_Client_NetworkServicesClient__updateHttpRouteAsync__) .

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-networkservices/latest/V1.UpdateHttpRouteRequest` 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<Google\Cloud\NetworkServices\V1\HttpRoute>` |   |

**Example**

    use Google\ApiCore\ApiException;
    use Google\ApiCore\OperationResponse;
    use Google\Cloud\NetworkServices\V1\Client\NetworkServicesClient;
    use Google\Cloud\NetworkServices\V1\HttpRoute;
    use Google\Cloud\NetworkServices\V1\HttpRoute\RouteRule;
    use Google\Cloud\NetworkServices\V1\UpdateHttpRouteRequest;
    use Google\Rpc\Status;

    /**
     * @param string $httpRouteHostnamesElement Hostnames define a set of hosts that should match against the
     *                                          HTTP host header to select a HttpRoute to process the request. Hostname is
     *                                          the fully qualified domain name of a network host, as defined by RFC 1123
     *                                          with the exception that:
     *                                          - IPs are not allowed.
     *                                          - A hostname may be prefixed with a wildcard label (`*.`). The wildcard
     *                                          label must appear by itself as the first label.
     *
     *                                          Hostname can be "precise" which is a domain name without the terminating
     *                                          dot of a network host (e.g. `foo.example.com`) or "wildcard", which is a
     *                                          domain name prefixed with a single wildcard label (e.g. `*.example.com`).
     *
     *                                          Note that as per RFC1035 and RFC1123, a label must consist of lower case
     *                                          alphanumeric characters or '-', and must start and end with an alphanumeric
     *                                          character. No other punctuation is allowed.
     *
     *                                          The routes associated with a Mesh or Gateways  must have unique hostnames.
     *                                          If you attempt to attach multiple routes with conflicting hostnames,
     *                                          the configuration will be rejected.
     *
     *                                          For example, while it is acceptable for routes for the hostnames
     *                                          `*.foo.bar.com` and `*.bar.com` to be associated with the same Mesh (or
     *                                          Gateways under the same scope), it is not possible to associate two routes
     *                                          both with `*.bar.com` or both with `bar.com`.
     */
    function update_http_route_sample(string $httpRouteHostnamesElement): void
    {
        // Create a client.
        $networkServicesClient = new NetworkServicesClient();

        // Prepare the request message.
        $httpRouteHostnames = [$httpRouteHostnamesElement,];
        $httpRouteRules = [new RouteRule()];
        $httpRoute = (new HttpRoute())
            ->setHostnames($httpRouteHostnames)
            ->setRules($httpRouteRules);
        $request = (new UpdateHttpRouteRequest())
            ->setHttpRoute($httpRoute);

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

            if ($response->operationSucceeded()) {
                /** @var HttpRoute $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
    {
        $httpRouteHostnamesElement = '[HOSTNAMES]';

        update_http_route_sample($httpRouteHostnamesElement);
    }

### updateMesh

Updates the parameters of a single Mesh.

The async variant is [NetworkServicesClient::updateMeshAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-networkservices/latest/V1.Client.NetworkServicesClient#_Google_Cloud_NetworkServices_V1_Client_NetworkServicesClient__updateMeshAsync__) .

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

**Example**

    use Google\ApiCore\ApiException;
    use Google\ApiCore\OperationResponse;
    use Google\Cloud\NetworkServices\V1\Client\NetworkServicesClient;
    use Google\Cloud\NetworkServices\V1\Mesh;
    use Google\Cloud\NetworkServices\V1\UpdateMeshRequest;
    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_mesh_sample(): void
    {
        // Create a client.
        $networkServicesClient = new NetworkServicesClient();

        // Prepare the request message.
        $mesh = new Mesh();
        $request = (new UpdateMeshRequest())
            ->setMesh($mesh);

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

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

### updateServiceBinding

Updates the parameters of a single ServiceBinding.

The async variant is [NetworkServicesClient::updateServiceBindingAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-networkservices/latest/V1.Client.NetworkServicesClient#_Google_Cloud_NetworkServices_V1_Client_NetworkServicesClient__updateServiceBindingAsync__) .

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

**Example**

    use Google\ApiCore\ApiException;
    use Google\ApiCore\OperationResponse;
    use Google\Cloud\NetworkServices\V1\Client\NetworkServicesClient;
    use Google\Cloud\NetworkServices\V1\ServiceBinding;
    use Google\Cloud\NetworkServices\V1\UpdateServiceBindingRequest;
    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_service_binding_sample(): void
    {
        // Create a client.
        $networkServicesClient = new NetworkServicesClient();

        // Prepare the request message.
        $serviceBinding = new ServiceBinding();
        $request = (new UpdateServiceBindingRequest())
            ->setServiceBinding($serviceBinding);

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

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

### updateServiceLbPolicy

Updates the parameters of a single ServiceLbPolicy.

The async variant is [NetworkServicesClient::updateServiceLbPolicyAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-networkservices/latest/V1.Client.NetworkServicesClient#_Google_Cloud_NetworkServices_V1_Client_NetworkServicesClient__updateServiceLbPolicyAsync__)
.

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

**Example**

    use Google\ApiCore\ApiException;
    use Google\ApiCore\OperationResponse;
    use Google\Cloud\NetworkServices\V1\Client\NetworkServicesClient;
    use Google\Cloud\NetworkServices\V1\ServiceLbPolicy;
    use Google\Cloud\NetworkServices\V1\UpdateServiceLbPolicyRequest;
    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_service_lb_policy_sample(): void
    {
        // Create a client.
        $networkServicesClient = new NetworkServicesClient();

        // Prepare the request message.
        $serviceLbPolicy = new ServiceLbPolicy();
        $request = (new UpdateServiceLbPolicyRequest())
            ->setServiceLbPolicy($serviceLbPolicy);

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

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

### updateTcpRoute

Updates the parameters of a single TcpRoute.

The async variant is [NetworkServicesClient::updateTcpRouteAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-networkservices/latest/V1.Client.NetworkServicesClient#_Google_Cloud_NetworkServices_V1_Client_NetworkServicesClient__updateTcpRouteAsync__) .

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-networkservices/latest/V1.UpdateTcpRouteRequest` 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<Google\Cloud\NetworkServices\V1\TcpRoute>` |   |

**Example**

    use Google\ApiCore\ApiException;
    use Google\ApiCore\OperationResponse;
    use Google\Cloud\NetworkServices\V1\Client\NetworkServicesClient;
    use Google\Cloud\NetworkServices\V1\TcpRoute;
    use Google\Cloud\NetworkServices\V1\TcpRoute\RouteAction;
    use Google\Cloud\NetworkServices\V1\TcpRoute\RouteRule;
    use Google\Cloud\NetworkServices\V1\UpdateTcpRouteRequest;
    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_tcp_route_sample(): void
    {
        // Create a client.
        $networkServicesClient = new NetworkServicesClient();

        // Prepare the request message.
        $tcpRouteRulesAction = new RouteAction();
        $routeRule = (new RouteRule())
            ->setAction($tcpRouteRulesAction);
        $tcpRouteRules = [$routeRule,];
        $tcpRoute = (new TcpRoute())
            ->setRules($tcpRouteRules);
        $request = (new UpdateTcpRouteRequest())
            ->setTcpRoute($tcpRoute);

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

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

### updateTlsRoute

Updates the parameters of a single TlsRoute.

The async variant is [NetworkServicesClient::updateTlsRouteAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-networkservices/latest/V1.Client.NetworkServicesClient#_Google_Cloud_NetworkServices_V1_Client_NetworkServicesClient__updateTlsRouteAsync__) .

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-networkservices/latest/V1.UpdateTlsRouteRequest` 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<Google\Cloud\NetworkServices\V1\TlsRoute>` |   |

**Example**

    use Google\ApiCore\ApiException;
    use Google\ApiCore\OperationResponse;
    use Google\Cloud\NetworkServices\V1\Client\NetworkServicesClient;
    use Google\Cloud\NetworkServices\V1\TlsRoute;
    use Google\Cloud\NetworkServices\V1\TlsRoute\RouteAction;
    use Google\Cloud\NetworkServices\V1\TlsRoute\RouteDestination;
    use Google\Cloud\NetworkServices\V1\TlsRoute\RouteMatch;
    use Google\Cloud\NetworkServices\V1\TlsRoute\RouteRule;
    use Google\Cloud\NetworkServices\V1\UpdateTlsRouteRequest;
    use Google\Rpc\Status;

    /**
     * @param string $formattedTlsRouteRulesActionDestinationsServiceName The URL of a BackendService to route traffic to. Please see
     *                                                                    {@see NetworkServicesClient::backendServiceName()} for help formatting this field.
     */
    function update_tls_route_sample(
        string $formattedTlsRouteRulesActionDestinationsServiceName
    ): void {
        // Create a client.
        $networkServicesClient = new NetworkServicesClient();

        // Prepare the request message.
        $tlsRouteRulesMatches = [new RouteMatch()];
        $routeDestination = (new RouteDestination())
            ->setServiceName($formattedTlsRouteRulesActionDestinationsServiceName);
        $tlsRouteRulesActionDestinations = [$routeDestination,];
        $tlsRouteRulesAction = (new RouteAction())
            ->setDestinations($tlsRouteRulesActionDestinations);
        $routeRule = (new RouteRule())
            ->setMatches($tlsRouteRulesMatches)
            ->setAction($tlsRouteRulesAction);
        $tlsRouteRules = [$routeRule,];
        $tlsRoute = (new TlsRoute())
            ->setRules($tlsRouteRules);
        $request = (new UpdateTlsRouteRequest())
            ->setTlsRoute($tlsRoute);

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

            if ($response->operationSucceeded()) {
                /** @var TlsRoute $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
    {
        $formattedTlsRouteRulesActionDestinationsServiceName = NetworkServicesClient::backendServiceName(
            '[PROJECT]',
            '[LOCATION]',
            '[BACKEND_SERVICE]'
        );

        update_tls_route_sample($formattedTlsRouteRulesActionDestinationsServiceName);
    }

### updateWasmPlugin

Updates the parameters of the specified `WasmPlugin` resource.

The async variant is [NetworkServicesClient::updateWasmPluginAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-networkservices/latest/V1.Client.NetworkServicesClient#_Google_Cloud_NetworkServices_V1_Client_NetworkServicesClient__updateWasmPluginAsync__) .

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

**Example**

    use Google\ApiCore\ApiException;
    use Google\ApiCore\OperationResponse;
    use Google\Cloud\NetworkServices\V1\Client\NetworkServicesClient;
    use Google\Cloud\NetworkServices\V1\UpdateWasmPluginRequest;
    use Google\Cloud\NetworkServices\V1\WasmPlugin;
    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_wasm_plugin_sample(): void
    {
        // Create a client.
        $networkServicesClient = new NetworkServicesClient();

        // Prepare the request message.
        $wasmPlugin = new WasmPlugin();
        $request = (new UpdateWasmPluginRequest())
            ->setWasmPlugin($wasmPlugin);

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

            if ($response->operationSucceeded()) {
                /** @var WasmPlugin $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 [NetworkServicesClient::getLocationAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-networkservices/latest/V1.Client.NetworkServicesClient#_Google_Cloud_NetworkServices_V1_Client_NetworkServicesClient__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\NetworkServices\V1\Client\NetworkServicesClient;

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

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

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

### listLocations

Lists information about the supported locations for this service.

The async variant is [NetworkServicesClient::listLocationsAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-networkservices/latest/V1.Client.NetworkServicesClient#_Google_Cloud_NetworkServices_V1_Client_NetworkServicesClient__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\NetworkServices\V1\Client\NetworkServicesClient;

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

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

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

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

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

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

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

        // 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 = $networkServicesClient->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 [NetworkServicesClient::testIamPermissionsAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-networkservices/latest/V1.Client.NetworkServicesClient#_Google_Cloud_NetworkServices_V1_Client_NetworkServicesClient__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\NetworkServices\V1\Client\NetworkServicesClient;

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

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

### createEndpointPolicyAsync

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

### createGatewayAsync

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

### createGrpcRouteAsync

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

### createHttpRouteAsync

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

### createMeshAsync

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

### createServiceBindingAsync

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

### createServiceLbPolicyAsync

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

### createTcpRouteAsync

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

### createTlsRouteAsync

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

### createWasmPluginAsync

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

### createWasmPluginVersionAsync

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

### deleteEndpointPolicyAsync

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

### deleteGatewayAsync

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

### deleteGrpcRouteAsync

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

### deleteHttpRouteAsync

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

### deleteMeshAsync

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

### deleteServiceBindingAsync

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

### deleteServiceLbPolicyAsync

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

### deleteTcpRouteAsync

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

### deleteTlsRouteAsync

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

### deleteWasmPluginAsync

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

### deleteWasmPluginVersionAsync

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

### getEndpointPolicyAsync

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

### getGatewayAsync

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

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.aws.amazon.com/aws-sdk-php/v3/api/class-GuzzleHttp.Promise.Promise.html<Google\Cloud\NetworkServices\V1\Gateway>` |   |

### getGatewayRouteViewAsync

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

### getGrpcRouteAsync

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

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.aws.amazon.com/aws-sdk-php/v3/api/class-GuzzleHttp.Promise.Promise.html<Google\Cloud\NetworkServices\V1\GrpcRoute>` |   |

### getHttpRouteAsync

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

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.aws.amazon.com/aws-sdk-php/v3/api/class-GuzzleHttp.Promise.Promise.html<Google\Cloud\NetworkServices\V1\HttpRoute>` |   |

### getMeshAsync

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

### getMeshRouteViewAsync

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

### getServiceBindingAsync

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

### getServiceLbPolicyAsync

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

### getTcpRouteAsync

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

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.aws.amazon.com/aws-sdk-php/v3/api/class-GuzzleHttp.Promise.Promise.html<Google\Cloud\NetworkServices\V1\TcpRoute>` |   |

### getTlsRouteAsync

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

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.aws.amazon.com/aws-sdk-php/v3/api/class-GuzzleHttp.Promise.Promise.html<Google\Cloud\NetworkServices\V1\TlsRoute>` |   |

### getWasmPluginAsync

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

### getWasmPluginVersionAsync

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

### listEndpointPoliciesAsync

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

### listGatewayRouteViewsAsync

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

### listGatewaysAsync

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

### listGrpcRoutesAsync

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

### listHttpRoutesAsync

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

### listMeshRouteViewsAsync

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

### listMeshesAsync

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

### listServiceBindingsAsync

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

### listServiceLbPoliciesAsync

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

### listTcpRoutesAsync

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

### listTlsRoutesAsync

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

### listWasmPluginVersionsAsync

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

### listWasmPluginsAsync

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

### updateEndpointPolicyAsync

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

### updateGatewayAsync

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

### updateGrpcRouteAsync

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

### updateHttpRouteAsync

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

### updateMeshAsync

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

### updateServiceBindingAsync

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

### updateServiceLbPolicyAsync

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

### updateTcpRouteAsync

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

### updateTlsRouteAsync

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

### updateWasmPluginAsync

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

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

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `project` | `string` |
| `region` | `string` |
| `address` | `string` |

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

### static::authorizationPolicyName

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

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

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

### static::backendServiceName

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

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

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

### static::certificateName

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

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

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

### static::clientTlsPolicyName

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

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

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

### static::endpointPolicyName

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

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

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

### static::gatewayName

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

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

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

### static::gatewayRouteViewName

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

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

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

### static::gatewaySecurityPolicyName

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

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

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

### static::grpcRouteName

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

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

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

### static::httpRouteName

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

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

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

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

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

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

### static::meshRouteViewName

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

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

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

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

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

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

### static::serviceName

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

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

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

### static::serviceBindingName

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

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

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

### static::serviceLbPolicyName

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

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

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

### static::subnetworkName

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

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `project` | `string` |
| `region` | `string` |
| `subnetwork` | `string` |

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

### static::tcpRouteName

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

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

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

### static::tlsRouteName

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

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

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

### static::wasmPluginName

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

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

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

### static::wasmPluginVersionName

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

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

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

- address: projects/{project}/regions/{region}/addresses/{address}
- authorizationPolicy: projects/{project}/locations/{location}/authorizationPolicies/{authorization_policy}
- backendService: projects/{project}/locations/{location}/backendServices/{backend_service}
- certificate: projects/{project}/locations/{location}/certificates/{certificate}
- clientTlsPolicy: projects/{project}/locations/{location}/clientTlsPolicies/{client_tls_policy}
- endpointPolicy: projects/{project}/locations/{location}/endpointPolicies/{endpoint_policy}
- gateway: projects/{project}/locations/{location}/gateways/{gateway}
- gatewayRouteView: projects/{project}/locations/{location}/gateways/{gateway}/routeViews/{route_view}
- gatewaySecurityPolicy: projects/{project}/locations/{location}/gatewaySecurityPolicies/{gateway_security_policy}
- grpcRoute: projects/{project}/locations/{location}/grpcRoutes/{grpc_route}
- httpRoute: projects/{project}/locations/{location}/httpRoutes/{http_route}
- location: projects/{project}/locations/{location}
- mesh: projects/{project}/locations/{location}/meshes/{mesh}
- meshRouteView: projects/{project}/locations/{location}/meshes/{mesh}/routeViews/{route_view}
- network: projects/{project}/global/networks/{network}
- serverTlsPolicy: projects/{project}/locations/{location}/serverTlsPolicies/{server_tls_policy}
- service: projects/{project}/locations/{location}/namespaces/{namespace}/services/{service}
- serviceBinding: projects/{project}/locations/{location}/serviceBindings/{service_binding}
- serviceLbPolicy: projects/{project}/locations/{location}/serviceLbPolicies/{service_lb_policy}
- subnetwork: projects/{project}/regions/{region}/subnetworks/{subnetwork}
- tcpRoute: projects/{project}/locations/{location}/tcpRoutes/{tcp_route}
- tlsRoute: projects/{project}/locations/{location}/tlsRoutes/{tls_route}
- wasmPlugin: projects/{project}/locations/{location}/wasmPlugins/{wasm_plugin}
- wasmPluginVersion: projects/{project}/locations/{location}/wasmPlugins/{wasm_plugin}/versions/{wasm_plugin_version}

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