0.16.0 (latest) 0.15.0 0.14.0 0.13.3 0.12.0 0.10.0 0.9.0 0.8.0 0.7.0 0.6.2 0.5.1 0.4.2 0.3.0 0.2.0 0.1.1 Reference documentation and code samples for the Google Cloud Memorystore V1 Client class MemorystoreClient.

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

### addAuthToken

Adds a token for a user of a token based auth enabled instance.

The async variant is [MemorystoreClient::addAuthTokenAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-memorystore/latest/V1.Client.MemorystoreClient#_Google_Cloud_Memorystore_V1_Client_MemorystoreClient__addAuthTokenAsync__) .

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

**Example**

    use Google\ApiCore\ApiException;
    use Google\ApiCore\OperationResponse;
    use Google\Cloud\Memorystore\V1\AddAuthTokenRequest;
    use Google\Cloud\Memorystore\V1\AuthToken;
    use Google\Cloud\Memorystore\V1\Client\MemorystoreClient;
    use Google\Cloud\Memorystore\V1\TokenAuthUser;
    use Google\Rpc\Status;

    /**
     * @param string $formattedTokenAuthUser The name of the token auth user resource that this token will be
     *                                       added for. Please see
     *                                       {@see MemorystoreClient::tokenAuthUserName()} for help formatting this field.
     */
    function add_auth_token_sample(string $formattedTokenAuthUser): void
    {
        // Create a client.
        $memorystoreClient = new MemorystoreClient();

        // Prepare the request message.
        $authToken = new AuthToken();
        $request = (new AddAuthTokenRequest())
            ->setTokenAuthUser($formattedTokenAuthUser)
            ->setAuthToken($authToken);

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

            if ($response->operationSucceeded()) {
                /** @var TokenAuthUser $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
    {
        $formattedTokenAuthUser = MemorystoreClient::tokenAuthUserName(
            '[PROJECT]',
            '[LOCATION]',
            '[INSTANCE]',
            '[TOKEN_AUTH_USER]'
        );

        add_auth_token_sample($formattedTokenAuthUser);
    }

### addTokenAuthUser

Adds a token auth user for a token based auth enabled instance.

The async variant is [MemorystoreClient::addTokenAuthUserAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-memorystore/latest/V1.Client.MemorystoreClient#_Google_Cloud_Memorystore_V1_Client_MemorystoreClient__addTokenAuthUserAsync__) .

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

**Example**

    use Google\ApiCore\ApiException;
    use Google\ApiCore\OperationResponse;
    use Google\Cloud\Memorystore\V1\AddTokenAuthUserRequest;
    use Google\Cloud\Memorystore\V1\Client\MemorystoreClient;
    use Google\Cloud\Memorystore\V1\Instance;
    use Google\Rpc\Status;

    /**
     * @param string $formattedInstance The instance resource that this token auth user will be added
     *                                  for. Format: projects/{project}/locations/{location}/instances/{instance}
     *                                  Please see {@see MemorystoreClient::instanceName()} for help formatting this field.
     * @param string $tokenAuthUser     The name of the token auth user to add.
     */
    function add_token_auth_user_sample(string $formattedInstance, string $tokenAuthUser): void
    {
        // Create a client.
        $memorystoreClient = new MemorystoreClient();

        // Prepare the request message.
        $request = (new AddTokenAuthUserRequest())
            ->setInstance($formattedInstance)
            ->setTokenAuthUser($tokenAuthUser);

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

            if ($response->operationSucceeded()) {
                /** @var Instance $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
    {
        $formattedInstance = MemorystoreClient::instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]');
        $tokenAuthUser = '[TOKEN_AUTH_USER]';

        add_token_auth_user_sample($formattedInstance, $tokenAuthUser);
    }

### backupInstance

Backup Instance.

If this is the first time a backup is being created, a backup collection
will be created at the backend, and this backup belongs to this collection.
Both collection and backup will have a resource name. Backup will be
executed for each shard. A replica (primary if nonHA) will be selected to
perform the execution. Backup call will be rejected if there is an ongoing
backup or update operation. Be aware that during preview, if the instance's
internal software version is too old, critical update will be performed
before actual backup. Once the internal software version is updated to the
minimum version required by the backup feature, subsequent backups will not
require critical update. After preview, there will be no critical update
needed for backup.

The async variant is [MemorystoreClient::backupInstanceAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-memorystore/latest/V1.Client.MemorystoreClient#_Google_Cloud_Memorystore_V1_Client_MemorystoreClient__backupInstanceAsync__) .

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

**Example**

    use Google\ApiCore\ApiException;
    use Google\ApiCore\OperationResponse;
    use Google\Cloud\Memorystore\V1\BackupInstanceRequest;
    use Google\Cloud\Memorystore\V1\Client\MemorystoreClient;
    use Google\Cloud\Memorystore\V1\Instance;
    use Google\Rpc\Status;

    /**
     * @param string $formattedName Instance resource name using the form:
     *                              `projects/{project_id}/locations/{location_id}/instances/{instance_id}`
     *                              where `location_id` refers to a Google Cloud region. Please see
     *                              {@see MemorystoreClient::instanceName()} for help formatting this field.
     */
    function backup_instance_sample(string $formattedName): void
    {
        // Create a client.
        $memorystoreClient = new MemorystoreClient();

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

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

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

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

        backup_instance_sample($formattedName);
    }

### createAclPolicy

Creates an ACL policy.

The creation is executed synchronously and the policy is available for use
immediately after the RPC returns.

The async variant is [MemorystoreClient::createAclPolicyAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-memorystore/latest/V1.Client.MemorystoreClient#_Google_Cloud_Memorystore_V1_Client_MemorystoreClient__createAclPolicyAsync__) .

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

**Example**

    use Google\ApiCore\ApiException;
    use Google\Cloud\Memorystore\V1\AclPolicy;
    use Google\Cloud\Memorystore\V1\AclRule;
    use Google\Cloud\Memorystore\V1\Client\MemorystoreClient;
    use Google\Cloud\Memorystore\V1\CreateAclPolicyRequest;

    /**
     * @param string $formattedParent        The resource name of the ACL policy location using the form:
     *                                       `projects/{project}/locations/{location}`
     *                                       where `location` refers to a Google Cloud region. Please see
     *                                       {@see MemorystoreClient::locationName()} for help formatting this field.
     * @param string $aclPolicyId            The logical name of the ACL policy in the customer project
     *                                       with the following restrictions:
     *
     *                                       * Must contain only lowercase letters, numbers, and hyphens.
     *                                       * Must start with a letter.
     *                                       * Must be between 1-63 characters.
     *                                       * Must end with a number or a letter.
     *                                       * Must be unique within the customer project / location
     * @param string $aclPolicyRulesUsername Specifies the IAM user or service account to be added to the ACL
     *                                       policy. This username will be directly set on the Valkey OSS.
     * @param string $aclPolicyRulesRule     The rule to be applied to the username. Ex: "on >password123 ~*
     *                                       +&#64;all" The format of the rule is defined by Valkey OSS:
     *                                       https://valkey.io/topics/acl/
     */
    function create_acl_policy_sample(
        string $formattedParent,
        string $aclPolicyId,
        string $aclPolicyRulesUsername,
        string $aclPolicyRulesRule
    ): void {
        // Create a client.
        $memorystoreClient = new MemorystoreClient();

        // Prepare the request message.
        $aclRule = (new AclRule())
            ->setUsername($aclPolicyRulesUsername)
            ->setRule($aclPolicyRulesRule);
        $aclPolicyRules = [$aclRule];
        $aclPolicy = (new AclPolicy())
            ->setRules($aclPolicyRules);
        $request = (new CreateAclPolicyRequest())
            ->setParent($formattedParent)
            ->setAclPolicyId($aclPolicyId)
            ->setAclPolicy($aclPolicy);

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

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

        create_acl_policy_sample(
            $formattedParent,
            $aclPolicyId,
            $aclPolicyRulesUsername,
            $aclPolicyRulesRule
        );
    }

### createInstance

Creates a new Instance in a given project and location.

The async variant is [MemorystoreClient::createInstanceAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-memorystore/latest/V1.Client.MemorystoreClient#_Google_Cloud_Memorystore_V1_Client_MemorystoreClient__createInstanceAsync__) .

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

**Example**

    use Google\ApiCore\ApiException;
    use Google\ApiCore\OperationResponse;
    use Google\Cloud\Memorystore\V1\Client\MemorystoreClient;
    use Google\Cloud\Memorystore\V1\CreateInstanceRequest;
    use Google\Cloud\Memorystore\V1\Instance;
    use Google\Rpc\Status;

    /**
     * @param string $formattedParent The parent resource where this instance will be created.
     *                                Format: projects/{project}/locations/{location}
     *                                Please see {@see MemorystoreClient::locationName()} for help formatting this field.
     * @param string $instanceId      The ID to use for the instance, which will become the final
     *                                component of the instance's resource name.
     *
     *                                This value is subject to the following restrictions:
     *
     *                                * Must be 4-63 characters in length
     *                                * Must begin with a letter or digit
     *                                * Must contain only lowercase letters, digits, and hyphens
     *                                * Must not end with a hyphen
     *                                * Must be unique within a location
     */
    function create_instance_sample(string $formattedParent, string $instanceId): void
    {
        // Create a client.
        $memorystoreClient = new MemorystoreClient();

        // Prepare the request message.
        $instance = new Instance();
        $request = (new CreateInstanceRequest())
            ->setParent($formattedParent)
            ->setInstanceId($instanceId)
            ->setInstance($instance);

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

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

        create_instance_sample($formattedParent, $instanceId);
    }

### deleteAclPolicy

Deletes a specific ACL policy. This action will delete the ACL policy and
all the rules associated with it. An ACL policy cannot be deleted if it is
attached to an instance.

The async variant is [MemorystoreClient::deleteAclPolicyAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-memorystore/latest/V1.Client.MemorystoreClient#_Google_Cloud_Memorystore_V1_Client_MemorystoreClient__deleteAclPolicyAsync__) .

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

    /**
     * @param string $formattedName Memorystore ACL policy resource name using the form:
     *                              `projects/{project}/locations/{location}/aclPolicies/{acl_policy_id}`
     *                              where `location` refers to a Google Cloud region. Please see
     *                              {@see MemorystoreClient::aclPolicyName()} for help formatting this field.
     */
    function delete_acl_policy_sample(string $formattedName): void
    {
        // Create a client.
        $memorystoreClient = new MemorystoreClient();

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

        // Call the API and handle any network failures.
        try {
            /** @var OperationResponse $response */
            $response = $memorystoreClient->deleteAclPolicy($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 = MemorystoreClient::aclPolicyName('[PROJECT]', '[LOCATION]', '[ACL_POLICY]');

        delete_acl_policy_sample($formattedName);
    }

### deleteAuthToken

Deletes a token for a user of a token based auth enabled instance.

The async variant is [MemorystoreClient::deleteAuthTokenAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-memorystore/latest/V1.Client.MemorystoreClient#_Google_Cloud_Memorystore_V1_Client_MemorystoreClient__deleteAuthTokenAsync__) .

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

    /**
     * @param string $formattedName The name of the token auth user resource that this token will be
     *                              deleted from. Format:
     *                              projects/{project}/locations/{location}/instances/{instance}/tokenAuthUsers/{token_auth_user}/authTokens/{name}
     *                              Please see {@see MemorystoreClient::authTokenName()} for help formatting this field.
     */
    function delete_auth_token_sample(string $formattedName): void
    {
        // Create a client.
        $memorystoreClient = new MemorystoreClient();

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

        // Call the API and handle any network failures.
        try {
            /** @var OperationResponse $response */
            $response = $memorystoreClient->deleteAuthToken($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 = MemorystoreClient::authTokenName(
            '[PROJECT]',
            '[LOCATION]',
            '[INSTANCE]',
            '[TOKEN_AUTH_USER]',
            '[AUTH_TOKEN]'
        );

        delete_auth_token_sample($formattedName);
    }

### deleteBackup

Deletes a specific backup.

The async variant is [MemorystoreClient::deleteBackupAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-memorystore/latest/V1.Client.MemorystoreClient#_Google_Cloud_Memorystore_V1_Client_MemorystoreClient__deleteBackupAsync__) .

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

    /**
     * @param string $formattedName Instance backup resource name using the form:
     *                              `projects/{project_id}/locations/{location_id}/backupCollections/{backup_collection_id}/backups/{backup_id}`
     *                              Please see {@see MemorystoreClient::backupName()} for help formatting this field.
     */
    function delete_backup_sample(string $formattedName): void
    {
        // Create a client.
        $memorystoreClient = new MemorystoreClient();

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

        // Call the API and handle any network failures.
        try {
            /** @var OperationResponse $response */
            $response = $memorystoreClient->deleteBackup($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 = MemorystoreClient::backupName(
            '[PROJECT]',
            '[LOCATION]',
            '[BACKUP_COLLECTION]',
            '[BACKUP]'
        );

        delete_backup_sample($formattedName);
    }

### deleteInstance

Deletes a single Instance.

The async variant is [MemorystoreClient::deleteInstanceAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-memorystore/latest/V1.Client.MemorystoreClient#_Google_Cloud_Memorystore_V1_Client_MemorystoreClient__deleteInstanceAsync__) .

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

    /**
     * @param string $formattedName The name of the instance to delete.
     *                              Format: projects/{project}/locations/{location}/instances/{instance}
     *                              Please see {@see MemorystoreClient::instanceName()} for help formatting this field.
     */
    function delete_instance_sample(string $formattedName): void
    {
        // Create a client.
        $memorystoreClient = new MemorystoreClient();

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

        // Call the API and handle any network failures.
        try {
            /** @var OperationResponse $response */
            $response = $memorystoreClient->deleteInstance($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 = MemorystoreClient::instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]');

        delete_instance_sample($formattedName);
    }

### deleteTokenAuthUser

Deletes a token auth user for a token based auth enabled instance.

The async variant is [MemorystoreClient::deleteTokenAuthUserAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-memorystore/latest/V1.Client.MemorystoreClient#_Google_Cloud_Memorystore_V1_Client_MemorystoreClient__deleteTokenAuthUserAsync__) .

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

    /**
     * @param string $formattedName The name of the token auth user to delete.
     *                              Format:
     *                              projects/{project}/locations/{location}/instances/{instance}/tokenAuthUsers/{token_auth_user}
     *                              Please see {@see MemorystoreClient::tokenAuthUserName()} for help formatting this field.
     */
    function delete_token_auth_user_sample(string $formattedName): void
    {
        // Create a client.
        $memorystoreClient = new MemorystoreClient();

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

        // Call the API and handle any network failures.
        try {
            /** @var OperationResponse $response */
            $response = $memorystoreClient->deleteTokenAuthUser($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 = MemorystoreClient::tokenAuthUserName(
            '[PROJECT]',
            '[LOCATION]',
            '[INSTANCE]',
            '[TOKEN_AUTH_USER]'
        );

        delete_token_auth_user_sample($formattedName);
    }

### exportBackup

Exports a specific backup to a customer target Cloud Storage URI.

The async variant is [MemorystoreClient::exportBackupAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-memorystore/latest/V1.Client.MemorystoreClient#_Google_Cloud_Memorystore_V1_Client_MemorystoreClient__exportBackupAsync__) .

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

**Example**

    use Google\ApiCore\ApiException;
    use Google\ApiCore\OperationResponse;
    use Google\Cloud\Memorystore\V1\Backup;
    use Google\Cloud\Memorystore\V1\Client\MemorystoreClient;
    use Google\Cloud\Memorystore\V1\ExportBackupRequest;
    use Google\Rpc\Status;

    /**
     * @param string $formattedName Instance backup resource name using the form:
     *                              `projects/{project_id}/locations/{location_id}/backupCollections/{backup_collection_id}/backups/{backup_id}`
     *                              Please see {@see MemorystoreClient::backupName()} for help formatting this field.
     */
    function export_backup_sample(string $formattedName): void
    {
        // Create a client.
        $memorystoreClient = new MemorystoreClient();

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

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

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

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

        export_backup_sample($formattedName);
    }

### finishMigration

Finalizes the migration process.

After the successful completion of this operation, the target instance
will:

1. Stop replicating from the source instance.
2. Allow both reads and writes.

The async variant is [MemorystoreClient::finishMigrationAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-memorystore/latest/V1.Client.MemorystoreClient#_Google_Cloud_Memorystore_V1_Client_MemorystoreClient__finishMigrationAsync__) .

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

**Example**

    use Google\ApiCore\ApiException;
    use Google\ApiCore\OperationResponse;
    use Google\Cloud\Memorystore\V1\Client\MemorystoreClient;
    use Google\Cloud\Memorystore\V1\FinishMigrationRequest;
    use Google\Cloud\Memorystore\V1\Instance;
    use Google\Rpc\Status;

    /**
     * @param string $formattedName The resource name of the instance to finalize migration on.
     *                              Format: projects/{project}/locations/{location}/instances/{instance}
     *                              Please see {@see MemorystoreClient::instanceName()} for help formatting this field.
     */
    function finish_migration_sample(string $formattedName): void
    {
        // Create a client.
        $memorystoreClient = new MemorystoreClient();

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

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

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

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

        finish_migration_sample($formattedName);
    }

### getAclPolicy

Gets the details of a specific Memorystore ACL policy.

The async variant is [MemorystoreClient::getAclPolicyAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-memorystore/latest/V1.Client.MemorystoreClient#_Google_Cloud_Memorystore_V1_Client_MemorystoreClient__getAclPolicyAsync__) .

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

**Example**

    use Google\ApiCore\ApiException;
    use Google\Cloud\Memorystore\V1\AclPolicy;
    use Google\Cloud\Memorystore\V1\Client\MemorystoreClient;
    use Google\Cloud\Memorystore\V1\GetAclPolicyRequest;

    /**
     * @param string $formattedName Memorystore ACL policy resource name using the form:
     *                              `projects/{project}/locations/{location}/aclPolicies/{acl_policy}`
     *                              where `location` refers to a Google Cloud region. Please see
     *                              {@see MemorystoreClient::aclPolicyName()} for help formatting this field.
     */
    function get_acl_policy_sample(string $formattedName): void
    {
        // Create a client.
        $memorystoreClient = new MemorystoreClient();

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

        // Call the API and handle any network failures.
        try {
            /** @var AclPolicy $response */
            $response = $memorystoreClient->getAclPolicy($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 = MemorystoreClient::aclPolicyName('[PROJECT]', '[LOCATION]', '[ACL_POLICY]');

        get_acl_policy_sample($formattedName);
    }

### getAclPolicyRevision

Gets details of a specific ACL policy revision.

The async variant is [MemorystoreClient::getAclPolicyRevisionAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-memorystore/latest/V1.Client.MemorystoreClient#_Google_Cloud_Memorystore_V1_Client_MemorystoreClient__getAclPolicyRevisionAsync__) .

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

**Example**

    use Google\ApiCore\ApiException;
    use Google\Cloud\Memorystore\V1\AclPolicyRevision;
    use Google\Cloud\Memorystore\V1\Client\MemorystoreClient;
    use Google\Cloud\Memorystore\V1\GetAclPolicyRevisionRequest;

    /**
     * @param string $formattedName Memorystore ACL policy revision resource name using the form:
     *                              `projects/{project}/locations/{location}/aclPolicies/{acl_policy}/revisions/{revision}`
     *                              where `location` refers to a Google Cloud region. Please see
     *                              {@see MemorystoreClient::aclPolicyRevisionName()} for help formatting this field.
     */
    function get_acl_policy_revision_sample(string $formattedName): void
    {
        // Create a client.
        $memorystoreClient = new MemorystoreClient();

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

        // Call the API and handle any network failures.
        try {
            /** @var AclPolicyRevision $response */
            $response = $memorystoreClient->getAclPolicyRevision($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 = MemorystoreClient::aclPolicyRevisionName(
            '[PROJECT]',
            '[LOCATION]',
            '[ACL_POLICY]',
            '[REVISION]'
        );

        get_acl_policy_revision_sample($formattedName);
    }

### getAuthToken

Gets a token based auth enabled instance's auth token for a given user.

The async variant is [MemorystoreClient::getAuthTokenAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-memorystore/latest/V1.Client.MemorystoreClient#_Google_Cloud_Memorystore_V1_Client_MemorystoreClient__getAuthTokenAsync__) .

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

**Example**

    use Google\ApiCore\ApiException;
    use Google\Cloud\Memorystore\V1\AuthToken;
    use Google\Cloud\Memorystore\V1\Client\MemorystoreClient;
    use Google\Cloud\Memorystore\V1\GetAuthTokenRequest;

    /**
     * @param string $formattedName The name of token auth user for a token auth enabled instance.
     *                              Format:
     *                              projects/{project}/locations/{location}/instances/{instance}/tokenAuthUsers/{token_auth_user}/authTokens/{auth_token}
     *                              Please see {@see MemorystoreClient::authTokenName()} for help formatting this field.
     */
    function get_auth_token_sample(string $formattedName): void
    {
        // Create a client.
        $memorystoreClient = new MemorystoreClient();

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

        // Call the API and handle any network failures.
        try {
            /** @var AuthToken $response */
            $response = $memorystoreClient->getAuthToken($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 = MemorystoreClient::authTokenName(
            '[PROJECT]',
            '[LOCATION]',
            '[INSTANCE]',
            '[TOKEN_AUTH_USER]',
            '[AUTH_TOKEN]'
        );

        get_auth_token_sample($formattedName);
    }

### getBackup

Gets the details of a specific backup.

The async variant is [MemorystoreClient::getBackupAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-memorystore/latest/V1.Client.MemorystoreClient#_Google_Cloud_Memorystore_V1_Client_MemorystoreClient__getBackupAsync__) .

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

**Example**

    use Google\ApiCore\ApiException;
    use Google\Cloud\Memorystore\V1\Backup;
    use Google\Cloud\Memorystore\V1\Client\MemorystoreClient;
    use Google\Cloud\Memorystore\V1\GetBackupRequest;

    /**
     * @param string $formattedName Instance backup resource name using the form:
     *                              `projects/{project_id}/locations/{location_id}/backupCollections/{backup_collection_id}/backups/{backup_id}`
     *                              Please see {@see MemorystoreClient::backupName()} for help formatting this field.
     */
    function get_backup_sample(string $formattedName): void
    {
        // Create a client.
        $memorystoreClient = new MemorystoreClient();

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

        // Call the API and handle any network failures.
        try {
            /** @var Backup $response */
            $response = $memorystoreClient->getBackup($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 = MemorystoreClient::backupName(
            '[PROJECT]',
            '[LOCATION]',
            '[BACKUP_COLLECTION]',
            '[BACKUP]'
        );

        get_backup_sample($formattedName);
    }

### getBackupCollection

Get a backup collection.

The async variant is [MemorystoreClient::getBackupCollectionAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-memorystore/latest/V1.Client.MemorystoreClient#_Google_Cloud_Memorystore_V1_Client_MemorystoreClient__getBackupCollectionAsync__) .

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

**Example**

    use Google\ApiCore\ApiException;
    use Google\Cloud\Memorystore\V1\BackupCollection;
    use Google\Cloud\Memorystore\V1\Client\MemorystoreClient;
    use Google\Cloud\Memorystore\V1\GetBackupCollectionRequest;

    /**
     * @param string $formattedName Instance backupCollection resource name using the form:
     *                              `projects/{project_id}/locations/{location_id}/backupCollections/{backup_collection_id}`
     *                              where `location_id` refers to a Google Cloud region. Please see
     *                              {@see MemorystoreClient::backupCollectionName()} for help formatting this field.
     */
    function get_backup_collection_sample(string $formattedName): void
    {
        // Create a client.
        $memorystoreClient = new MemorystoreClient();

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

        // Call the API and handle any network failures.
        try {
            /** @var BackupCollection $response */
            $response = $memorystoreClient->getBackupCollection($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 = MemorystoreClient::backupCollectionName(
            '[PROJECT]',
            '[LOCATION]',
            '[BACKUP_COLLECTION]'
        );

        get_backup_collection_sample($formattedName);
    }

### getCertificateAuthority

Gets details about the certificate authority for an Instance.

The async variant is [MemorystoreClient::getCertificateAuthorityAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-memorystore/latest/V1.Client.MemorystoreClient#_Google_Cloud_Memorystore_V1_Client_MemorystoreClient__getCertificateAuthorityAsync__) .

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

**Example**

    use Google\ApiCore\ApiException;
    use Google\Cloud\Memorystore\V1\CertificateAuthority;
    use Google\Cloud\Memorystore\V1\Client\MemorystoreClient;
    use Google\Cloud\Memorystore\V1\GetCertificateAuthorityRequest;

    /**
     * @param string $formattedName The name of the certificate authority.
     *                              Format:
     *                              projects/{project}/locations/{location}/instances/{instance}/certificateAuthority
     *                              Please see {@see MemorystoreClient::instanceName()} for help formatting this field.
     */
    function get_certificate_authority_sample(string $formattedName): void
    {
        // Create a client.
        $memorystoreClient = new MemorystoreClient();

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

        // Call the API and handle any network failures.
        try {
            /** @var CertificateAuthority $response */
            $response = $memorystoreClient->getCertificateAuthority($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 = MemorystoreClient::instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]');

        get_certificate_authority_sample($formattedName);
    }

### getInstance

Gets details of a single Instance.

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

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

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

**Example**

    use Google\ApiCore\ApiException;
    use Google\Cloud\Memorystore\V1\Client\MemorystoreClient;
    use Google\Cloud\Memorystore\V1\GetInstanceRequest;
    use Google\Cloud\Memorystore\V1\Instance;

    /**
     * @param string $formattedName The name of the instance to retrieve.
     *                              Format: projects/{project}/locations/{location}/instances/{instance}
     *                              Please see {@see MemorystoreClient::instanceName()} for help formatting this field.
     */
    function get_instance_sample(string $formattedName): void
    {
        // Create a client.
        $memorystoreClient = new MemorystoreClient();

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

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

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

        get_instance_sample($formattedName);
    }

### getSharedRegionalCertificateAuthority

Gets the details of shared regional certificate authority information for
Memorystore instance.

The async variant is
[MemorystoreClient::getSharedRegionalCertificateAuthorityAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-memorystore/latest/V1.Client.MemorystoreClient#_Google_Cloud_Memorystore_V1_Client_MemorystoreClient__getSharedRegionalCertificateAuthorityAsync__) .

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

**Example**

    use Google\ApiCore\ApiException;
    use Google\Cloud\Memorystore\V1\Client\MemorystoreClient;
    use Google\Cloud\Memorystore\V1\GetSharedRegionalCertificateAuthorityRequest;
    use Google\Cloud\Memorystore\V1\SharedRegionalCertificateAuthority;

    /**
     * @param string $formattedName Regional certificate authority resource name using the form:
     *                              `projects/{project}/locations/{location}/sharedRegionalCertificateAuthority`
     *                              where `location_id` refers to a Google Cloud region. Please see
     *                              {@see MemorystoreClient::sharedRegionalCertificateAuthorityName()} for help formatting this field.
     */
    function get_shared_regional_certificate_authority_sample(string $formattedName): void
    {
        // Create a client.
        $memorystoreClient = new MemorystoreClient();

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

        // Call the API and handle any network failures.
        try {
            /** @var SharedRegionalCertificateAuthority $response */
            $response = $memorystoreClient->getSharedRegionalCertificateAuthority($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 = MemorystoreClient::sharedRegionalCertificateAuthorityName(
            '[PROJECT]',
            '[LOCATION]'
        );

        get_shared_regional_certificate_authority_sample($formattedName);
    }

### getTokenAuthUser

Gets a specific token auth user for a token based auth enabled instance.

The async variant is [MemorystoreClient::getTokenAuthUserAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-memorystore/latest/V1.Client.MemorystoreClient#_Google_Cloud_Memorystore_V1_Client_MemorystoreClient__getTokenAuthUserAsync__) .

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

**Example**

    use Google\ApiCore\ApiException;
    use Google\Cloud\Memorystore\V1\Client\MemorystoreClient;
    use Google\Cloud\Memorystore\V1\GetTokenAuthUserRequest;
    use Google\Cloud\Memorystore\V1\TokenAuthUser;

    /**
     * @param string $formattedName The name of token auth user for a basic auth enabled instance.
     *                              Format:
     *                              projects/{project}/locations/{location}/instances/{instance}/tokenAuthUsers/{token_auth_user}
     *                              Please see {@see MemorystoreClient::tokenAuthUserName()} for help formatting this field.
     */
    function get_token_auth_user_sample(string $formattedName): void
    {
        // Create a client.
        $memorystoreClient = new MemorystoreClient();

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

        // Call the API and handle any network failures.
        try {
            /** @var TokenAuthUser $response */
            $response = $memorystoreClient->getTokenAuthUser($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 = MemorystoreClient::tokenAuthUserName(
            '[PROJECT]',
            '[LOCATION]',
            '[INSTANCE]',
            '[TOKEN_AUTH_USER]'
        );

        get_token_auth_user_sample($formattedName);
    }

### listAclPolicies

Lists all ACL policies owned by a project in either the specified
location (region) or all locations.

The location should have the following format:

- `projects/{project_id}/locations/{location_id}`

If `location_id` is specified as `-` (wildcard), then all regions
available to the project are queried, and the results are aggregated.

The async variant is [MemorystoreClient::listAclPoliciesAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-memorystore/latest/V1.Client.MemorystoreClient#_Google_Cloud_Memorystore_V1_Client_MemorystoreClient__listAclPoliciesAsync__) .

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-memorystore/latest/V1.ListAclPoliciesRequest` 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\Memorystore\V1\AclPolicy;
    use Google\Cloud\Memorystore\V1\Client\MemorystoreClient;
    use Google\Cloud\Memorystore\V1\ListAclPoliciesRequest;

    /**
     * @param string $formattedParent The resource name of the ACL policy location using the form:
     *                                `projects/{project}/locations/{location}`
     *                                where `location` refers to a Google Cloud region. Please see
     *                                {@see MemorystoreClient::locationName()} for help formatting this field.
     */
    function list_acl_policies_sample(string $formattedParent): void
    {
        // Create a client.
        $memorystoreClient = new MemorystoreClient();

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

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

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

        list_acl_policies_sample($formattedParent);
    }

### listAclPolicyRevisions

Lists all ACL policy revisions in a given ACL policy.

The async variant is [MemorystoreClient::listAclPolicyRevisionsAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-memorystore/latest/V1.Client.MemorystoreClient#_Google_Cloud_Memorystore_V1_Client_MemorystoreClient__listAclPolicyRevisionsAsync__) .

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-memorystore/latest/V1.ListAclPolicyRevisionsRequest` 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\Memorystore\V1\AclPolicyRevision;
    use Google\Cloud\Memorystore\V1\Client\MemorystoreClient;
    use Google\Cloud\Memorystore\V1\ListAclPolicyRevisionsRequest;

    /**
     * @param string $formattedParent The resource name of the ACL policy to list revisions for.
     *                                Format: "projects/{project}/locations/{location}/aclPolicies/{acl_policy}"
     *                                Please see {@see MemorystoreClient::aclPolicyName()} for help formatting this field.
     */
    function list_acl_policy_revisions_sample(string $formattedParent): void
    {
        // Create a client.
        $memorystoreClient = new MemorystoreClient();

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

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

            /** @var AclPolicyRevision $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 = MemorystoreClient::aclPolicyName('[PROJECT]', '[LOCATION]', '[ACL_POLICY]');

        list_acl_policy_revisions_sample($formattedParent);
    }

### listAuthTokens

Lists all the auth tokens for a specific token auth user.

The async variant is [MemorystoreClient::listAuthTokensAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-memorystore/latest/V1.Client.MemorystoreClient#_Google_Cloud_Memorystore_V1_Client_MemorystoreClient__listAuthTokensAsync__) .

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-memorystore/latest/V1.ListAuthTokensRequest` 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\Memorystore\V1\AuthToken;
    use Google\Cloud\Memorystore\V1\Client\MemorystoreClient;
    use Google\Cloud\Memorystore\V1\ListAuthTokensRequest;

    /**
     * @param string $formattedParent The parent to list auth tokens from.
     *                                Format:
     *                                projects/{project}/locations/{location}/instances/{instance}/tokenAuthUsers/{token_auth_user}
     *                                Please see {@see MemorystoreClient::tokenAuthUserName()} for help formatting this field.
     */
    function list_auth_tokens_sample(string $formattedParent): void
    {
        // Create a client.
        $memorystoreClient = new MemorystoreClient();

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

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

            /** @var AuthToken $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 = MemorystoreClient::tokenAuthUserName(
            '[PROJECT]',
            '[LOCATION]',
            '[INSTANCE]',
            '[TOKEN_AUTH_USER]'
        );

        list_auth_tokens_sample($formattedParent);
    }

### listBackupCollections

Lists all backup collections owned by a consumer project in either the
specified location (region) or all locations.

If `location_id` is specified as `-` (wildcard), then all regions
available to the project are queried, and the results are aggregated.

The async variant is [MemorystoreClient::listBackupCollectionsAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-memorystore/latest/V1.Client.MemorystoreClient#_Google_Cloud_Memorystore_V1_Client_MemorystoreClient__listBackupCollectionsAsync__) .

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-memorystore/latest/V1.ListBackupCollectionsRequest` 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\Memorystore\V1\BackupCollection;
    use Google\Cloud\Memorystore\V1\Client\MemorystoreClient;
    use Google\Cloud\Memorystore\V1\ListBackupCollectionsRequest;

    /**
     * @param string $formattedParent The resource name of the backupCollection location using the
     *                                form:
     *                                `projects/{project_id}/locations/{location_id}`
     *                                where `location_id` refers to a Google Cloud region. Please see
     *                                {@see MemorystoreClient::locationName()} for help formatting this field.
     */
    function list_backup_collections_sample(string $formattedParent): void
    {
        // Create a client.
        $memorystoreClient = new MemorystoreClient();

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

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

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

        list_backup_collections_sample($formattedParent);
    }

### listBackups

Lists all backups owned by a backup collection.

The async variant is [MemorystoreClient::listBackupsAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-memorystore/latest/V1.Client.MemorystoreClient#_Google_Cloud_Memorystore_V1_Client_MemorystoreClient__listBackupsAsync__) .

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-memorystore/latest/V1.ListBackupsRequest` 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\Memorystore\V1\Backup;
    use Google\Cloud\Memorystore\V1\Client\MemorystoreClient;
    use Google\Cloud\Memorystore\V1\ListBackupsRequest;

    /**
     * @param string $formattedParent The resource name of the backupCollection using the form:
     *                                `projects/{project_id}/locations/{location_id}/backupCollections/{backup_collection_id}`
     *                                Please see {@see MemorystoreClient::backupCollectionName()} for help formatting this field.
     */
    function list_backups_sample(string $formattedParent): void
    {
        // Create a client.
        $memorystoreClient = new MemorystoreClient();

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

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

            /** @var Backup $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 = MemorystoreClient::backupCollectionName(
            '[PROJECT]',
            '[LOCATION]',
            '[BACKUP_COLLECTION]'
        );

        list_backups_sample($formattedParent);
    }

### listInstances

Lists Instances in a given project and location.

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

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

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

**Example**

    use Google\ApiCore\ApiException;
    use Google\ApiCore\PagedListResponse;
    use Google\Cloud\Memorystore\V1\Client\MemorystoreClient;
    use Google\Cloud\Memorystore\V1\Instance;
    use Google\Cloud\Memorystore\V1\ListInstancesRequest;

    /**
     * @param string $formattedParent The parent to list instances from.
     *                                Format: projects/{project}/locations/{location}
     *                                Please see {@see MemorystoreClient::locationName()} for help formatting this field.
     */
    function list_instances_sample(string $formattedParent): void
    {
        // Create a client.
        $memorystoreClient = new MemorystoreClient();

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

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

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

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

        list_instances_sample($formattedParent);
    }

### listTokenAuthUsers

Lists all the token auth users for a token based auth enabled instance.

The async variant is [MemorystoreClient::listTokenAuthUsersAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-memorystore/latest/V1.Client.MemorystoreClient#_Google_Cloud_Memorystore_V1_Client_MemorystoreClient__listTokenAuthUsersAsync__) .

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-memorystore/latest/V1.ListTokenAuthUsersRequest` 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\Memorystore\V1\Client\MemorystoreClient;
    use Google\Cloud\Memorystore\V1\ListTokenAuthUsersRequest;
    use Google\Cloud\Memorystore\V1\TokenAuthUser;

    /**
     * @param string $formattedParent The parent to list token auth users from.
     *                                Format: projects/{project}/locations/{location}/instances/{instance}
     *                                Please see {@see MemorystoreClient::instanceName()} for help formatting this field.
     */
    function list_token_auth_users_sample(string $formattedParent): void
    {
        // Create a client.
        $memorystoreClient = new MemorystoreClient();

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

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

            /** @var TokenAuthUser $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 = MemorystoreClient::instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]');

        list_token_auth_users_sample($formattedParent);
    }

### rescheduleMaintenance

Reschedules upcoming maintenance event.

The async variant is [MemorystoreClient::rescheduleMaintenanceAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-memorystore/latest/V1.Client.MemorystoreClient#_Google_Cloud_Memorystore_V1_Client_MemorystoreClient__rescheduleMaintenanceAsync__) .

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

**Example**

    use Google\ApiCore\ApiException;
    use Google\ApiCore\OperationResponse;
    use Google\Cloud\Memorystore\V1\Client\MemorystoreClient;
    use Google\Cloud\Memorystore\V1\Instance;
    use Google\Cloud\Memorystore\V1\RescheduleMaintenanceRequest;
    use Google\Cloud\Memorystore\V1\RescheduleMaintenanceRequest\RescheduleType;
    use Google\Rpc\Status;

    /**
     * @param string $formattedName  Name of the instance to reschedule maintenance for:
     *                               `projects/{project}/locations/{location_id}/instances/{instance}`
     *                               Please see {@see MemorystoreClient::instanceName()} for help formatting this field.
     * @param int    $rescheduleType If reschedule type is SPECIFIC_TIME, schedule_time must be set.
     */
    function reschedule_maintenance_sample(string $formattedName, int $rescheduleType): void
    {
        // Create a client.
        $memorystoreClient = new MemorystoreClient();

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

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

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

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

        reschedule_maintenance_sample($formattedName, $rescheduleType);
    }

### startMigration

Initiates the migration of a source instance to the target Memorystore
instance.

After the successful completion of this operation, the target instance
will:

1. Set up replication with the source instance and replicate any writes to the source instance.
2. Only allow reads.

The async variant is [MemorystoreClient::startMigrationAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-memorystore/latest/V1.Client.MemorystoreClient#_Google_Cloud_Memorystore_V1_Client_MemorystoreClient__startMigrationAsync__) .

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

**Example**

    use Google\ApiCore\ApiException;
    use Google\ApiCore\OperationResponse;
    use Google\Cloud\Memorystore\V1\Client\MemorystoreClient;
    use Google\Cloud\Memorystore\V1\Instance;
    use Google\Cloud\Memorystore\V1\SelfManagedSource;
    use Google\Cloud\Memorystore\V1\StartMigrationRequest;
    use Google\Rpc\Status;

    /**
     * @param string $selfManagedSourceIpAddress                  The IP address of the source instance.
     *                                                            This IP address should be a stable IP address that can be accessed by the
     *                                                            Memorystore instance throughout the migration process.
     * @param int    $selfManagedSourcePort                       The port of the source instance.
     *                                                            This port should be a stable port that can be accessed by the Memorystore
     *                                                            instance throughout the migration process.
     * @param string $formattedSelfManagedSourceNetworkAttachment The resource name of the Private Service Connect Network
     *                                                            Attachment used to establish connectivity to the source instance. This
     *                                                            network attachment has the following requirements:
     *                                                            1. It must be in the same project as the Memorystore instance.
     *                                                            2. It must be in the same region as the Memorystore instance.
     *                                                            3. The subnet attached to the network attachment must be in the same VPC
     *                                                            network as the source instance nodes.
     *
     *                                                            Format:
     *                                                            projects/{project}/regions/{region}/networkAttachments/{network_attachment}
     *                                                            Please see {@see MemorystoreClient::networkAttachmentName()} for help formatting this field.
     * @param string $formattedName                               The resource name of the instance to start migration on.
     *                                                            Format: projects/{project}/locations/{location}/instances/{instance}
     *                                                            Please see {@see MemorystoreClient::instanceName()} for help formatting this field.
     */
    function start_migration_sample(
        string $selfManagedSourceIpAddress,
        int $selfManagedSourcePort,
        string $formattedSelfManagedSourceNetworkAttachment,
        string $formattedName
    ): void {
        // Create a client.
        $memorystoreClient = new MemorystoreClient();

        // Prepare the request message.
        $selfManagedSource = (new SelfManagedSource())
            ->setIpAddress($selfManagedSourceIpAddress)
            ->setPort($selfManagedSourcePort)
            ->setNetworkAttachment($formattedSelfManagedSourceNetworkAttachment);
        $request = (new StartMigrationRequest())
            ->setSelfManagedSource($selfManagedSource)
            ->setName($formattedName);

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

            if ($response->operationSucceeded()) {
                /** @var Instance $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
    {
        $selfManagedSourceIpAddress = '[IP_ADDRESS]';
        $selfManagedSourcePort = 0;
        $formattedSelfManagedSourceNetworkAttachment = MemorystoreClient::networkAttachmentName(
            '[PROJECT]',
            '[REGION]',
            '[NETWORK_ATTACHMENT]'
        );
        $formattedName = MemorystoreClient::instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]');

        start_migration_sample(
            $selfManagedSourceIpAddress,
            $selfManagedSourcePort,
            $formattedSelfManagedSourceNetworkAttachment,
            $formattedName
        );
    }

### updateAclPolicy

Updates the ACL policy.

The operation will apply the updated ACL policy to all the linked
instances. The operation will return success if it successfully applied the
policy to all the instances. If the operation completed with a failure, the
service will continue to apply the policy via reconciliation for the failed
instances even after operation completion to ensure eventual consistency.

Completed longrunning.Operation will contain the new ACL policy object
in the response field.

The async variant is [MemorystoreClient::updateAclPolicyAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-memorystore/latest/V1.Client.MemorystoreClient#_Google_Cloud_Memorystore_V1_Client_MemorystoreClient__updateAclPolicyAsync__) .

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

**Example**

    use Google\ApiCore\ApiException;
    use Google\ApiCore\OperationResponse;
    use Google\Cloud\Memorystore\V1\AclPolicy;
    use Google\Cloud\Memorystore\V1\AclRule;
    use Google\Cloud\Memorystore\V1\Client\MemorystoreClient;
    use Google\Cloud\Memorystore\V1\UpdateAclPolicyRequest;
    use Google\Rpc\Status;

    /**
     * @param string $aclPolicyRulesUsername Specifies the IAM user or service account to be added to the ACL
     *                                       policy. This username will be directly set on the Valkey OSS.
     * @param string $aclPolicyRulesRule     The rule to be applied to the username. Ex: "on >password123 ~*
     *                                       +&#64;all" The format of the rule is defined by Valkey OSS:
     *                                       https://valkey.io/topics/acl/
     */
    function update_acl_policy_sample(
        string $aclPolicyRulesUsername,
        string $aclPolicyRulesRule
    ): void {
        // Create a client.
        $memorystoreClient = new MemorystoreClient();

        // Prepare the request message.
        $aclRule = (new AclRule())
            ->setUsername($aclPolicyRulesUsername)
            ->setRule($aclPolicyRulesRule);
        $aclPolicyRules = [$aclRule];
        $aclPolicy = (new AclPolicy())
            ->setRules($aclPolicyRules);
        $request = (new UpdateAclPolicyRequest())
            ->setAclPolicy($aclPolicy);

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

            if ($response->operationSucceeded()) {
                /** @var AclPolicy $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
    {
        $aclPolicyRulesUsername = '[USERNAME]';
        $aclPolicyRulesRule = '[RULE]';

        update_acl_policy_sample($aclPolicyRulesUsername, $aclPolicyRulesRule);
    }

### updateInstance

Updates the parameters of a single Instance.

The async variant is [MemorystoreClient::updateInstanceAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-memorystore/latest/V1.Client.MemorystoreClient#_Google_Cloud_Memorystore_V1_Client_MemorystoreClient__updateInstanceAsync__) .

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

**Example**

    use Google\ApiCore\ApiException;
    use Google\ApiCore\OperationResponse;
    use Google\Cloud\Memorystore\V1\Client\MemorystoreClient;
    use Google\Cloud\Memorystore\V1\Instance;
    use Google\Cloud\Memorystore\V1\UpdateInstanceRequest;
    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_instance_sample(): void
    {
        // Create a client.
        $memorystoreClient = new MemorystoreClient();

        // Prepare the request message.
        $instance = new Instance();
        $request = (new UpdateInstanceRequest())
            ->setInstance($instance);

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

            if ($response->operationSucceeded()) {
                /** @var Instance $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 [MemorystoreClient::getLocationAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-memorystore/latest/V1.Client.MemorystoreClient#_Google_Cloud_Memorystore_V1_Client_MemorystoreClient__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\Memorystore\V1\Client\MemorystoreClient;

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

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

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

### listLocations

Lists information about the supported locations for this service.

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

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

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

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

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

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

### addAuthTokenAsync

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

### addTokenAuthUserAsync

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

### backupInstanceAsync

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

### createAclPolicyAsync

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

### createInstanceAsync

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

### deleteAclPolicyAsync

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

### deleteAuthTokenAsync

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

### deleteBackupAsync

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

### deleteInstanceAsync

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

### deleteTokenAuthUserAsync

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

### exportBackupAsync

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

### finishMigrationAsync

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

### getAclPolicyAsync

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

### getAclPolicyRevisionAsync

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

### getAuthTokenAsync

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

### getBackupAsync

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

### getBackupCollectionAsync

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

### getCertificateAuthorityAsync

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

### getInstanceAsync

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

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

### getSharedRegionalCertificateAuthorityAsync

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

### getTokenAuthUserAsync

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

### listAclPoliciesAsync

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

### listAclPolicyRevisionsAsync

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

### listAuthTokensAsync

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

### listBackupCollectionsAsync

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

### listBackupsAsync

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

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

### listInstancesAsync

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

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

### listTokenAuthUsersAsync

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

### rescheduleMaintenanceAsync

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

### startMigrationAsync

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

### updateAclPolicyAsync

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

### updateInstanceAsync

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

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

### getLocationAsync

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

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

### listLocationsAsync

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

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

### getOperationsClient

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

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

### resumeOperation

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

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

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

### static::aclPolicyName

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

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

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

### static::aclPolicyRevisionName

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

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

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

### static::authTokenName

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

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

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

### static::backupName

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

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

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

### static::backupCollectionName

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

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

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

### static::caPoolName

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

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

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

### static::cryptoKeyName

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

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

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

### static::cryptoKeyVersionName

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

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `project` | `string` |
| `location` | `string` |
| `keyRing` | `string` |
| `cryptoKey` | `string` |
| `cryptoKeyVersion` | `string` |

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

### static::forwardingRuleName

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

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

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

### static::instanceName

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

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

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

### static::locationName

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

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

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

### static::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::networkAttachmentName

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

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

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

### static::serviceAttachmentName

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

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

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

### static::sharedRegionalCertificateAuthorityName

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

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

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

### static::tokenAuthUserName

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

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

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

- aclPolicy: projects/{project}/locations/{location}/aclPolicies/{acl_policy}
- aclPolicyRevision: projects/{project}/locations/{location}/aclPolicies/{acl_policy}/revisions/{revision}
- authToken: projects/{project}/locations/{location}/instances/{instance}/tokenAuthUsers/{token_auth_user}/authTokens/{auth_token}
- backup: projects/{project}/locations/{location}/backupCollections/{backup_collection}/backups/{backup}
- backupCollection: projects/{project}/locations/{location}/backupCollections/{backup_collection}
- caPool: projects/{project}/locations/{location}/caPools/{ca_pool}
- cryptoKey: projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}
- cryptoKeyVersion: projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{crypto_key_version}
- forwardingRule: projects/{project}/regions/{region}/forwardingRules/{forwarding_rule}
- instance: projects/{project}/locations/{location}/instances/{instance}
- location: projects/{project}/locations/{location}
- network: projects/{project}/global/networks/{network}
- networkAttachment: projects/{project}/regions/{region}/networkAttachments/{network_attachment}
- serviceAttachment: projects/{project}/regions/{region}/serviceAttachments/{service_attachment}
- sharedRegionalCertificateAuthority: projects/{project}/locations/{location}/sharedRegionalCertificateAuthority
- tokenAuthUser: projects/{project}/locations/{location}/instances/{instance}/tokenAuthUsers/{token_auth_user}

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