0.6.2 (latest) 0.6.1 0.5.3 0.4.1 0.3.0 0.2.2 0.1.2 Reference documentation and code samples for the Google Cloud Developer Connect V1 Client class DeveloperConnectClient.

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

### createAccountConnector

Creates a new AccountConnector in a given project and location.

The async variant is
[DeveloperConnectClient::createAccountConnectorAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-developerconnect/latest/V1.Client.DeveloperConnectClient#_Google_Cloud_DeveloperConnect_V1_Client_DeveloperConnectClient__createAccountConnectorAsync__) .

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

**Example**

    use Google\ApiCore\ApiException;
    use Google\ApiCore\OperationResponse;
    use Google\Cloud\DeveloperConnect\V1\AccountConnector;
    use Google\Cloud\DeveloperConnect\V1\Client\DeveloperConnectClient;
    use Google\Cloud\DeveloperConnect\V1\CreateAccountConnectorRequest;
    use Google\Rpc\Status;

    /**
     * @param string $formattedParent    Location resource name as the account_connector's parent. Please see
     *                                   {@see DeveloperConnectClient::locationName()} for help formatting this field.
     * @param string $accountConnectorId The ID to use for the AccountConnector, which will become the
     *                                   final component of the AccountConnector's resource name. Its format should
     *                                   adhere to https://google.aip.dev/122#resource-id-segments Names must be
     *                                   unique per-project per-location.
     */
    function create_account_connector_sample(
        string $formattedParent,
        string $accountConnectorId
    ): void {
        // Create a client.
        $developerConnectClient = new DeveloperConnectClient();

        // Prepare the request message.
        $accountConnector = new AccountConnector();
        $request = (new CreateAccountConnectorRequest())
            ->setParent($formattedParent)
            ->setAccountConnectorId($accountConnectorId)
            ->setAccountConnector($accountConnector);

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

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

        create_account_connector_sample($formattedParent, $accountConnectorId);
    }

### createConnection

Creates a new Connection in a given project and location.

The async variant is [DeveloperConnectClient::createConnectionAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-developerconnect/latest/V1.Client.DeveloperConnectClient#_Google_Cloud_DeveloperConnect_V1_Client_DeveloperConnectClient__createConnectionAsync__) .

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

**Example**

    use Google\ApiCore\ApiException;
    use Google\ApiCore\OperationResponse;
    use Google\Cloud\DeveloperConnect\V1\Client\DeveloperConnectClient;
    use Google\Cloud\DeveloperConnect\V1\Connection;
    use Google\Cloud\DeveloperConnect\V1\CreateConnectionRequest;
    use Google\Rpc\Status;

    /**
     * @param string $formattedParent Value for parent. Please see
     *                                {@see DeveloperConnectClient::locationName()} for help formatting this field.
     * @param string $connectionId    Id of the requesting object
     *                                If auto-generating Id server-side, remove this field and
     *                                connection_id from the method_signature of Create RPC
     */
    function create_connection_sample(string $formattedParent, string $connectionId): void
    {
        // Create a client.
        $developerConnectClient = new DeveloperConnectClient();

        // Prepare the request message.
        $connection = new Connection();
        $request = (new CreateConnectionRequest())
            ->setParent($formattedParent)
            ->setConnectionId($connectionId)
            ->setConnection($connection);

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

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

        create_connection_sample($formattedParent, $connectionId);
    }

### createGitRepositoryLink

Creates a GitRepositoryLink. Upon linking a Git Repository, Developer
Connect will configure the Git Repository to send webhook events to
Developer Connect. Connections that use Firebase GitHub Application will
have events forwarded to the Firebase service. Connections that use Gemini
Code Assist will have events forwarded to Gemini Code Assist service. All
other Connections will have events forwarded to Cloud Build.

The async variant is
[DeveloperConnectClient::createGitRepositoryLinkAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-developerconnect/latest/V1.Client.DeveloperConnectClient#_Google_Cloud_DeveloperConnect_V1_Client_DeveloperConnectClient__createGitRepositoryLinkAsync__) .

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

**Example**

    use Google\ApiCore\ApiException;
    use Google\ApiCore\OperationResponse;
    use Google\Cloud\DeveloperConnect\V1\Client\DeveloperConnectClient;
    use Google\Cloud\DeveloperConnect\V1\CreateGitRepositoryLinkRequest;
    use Google\Cloud\DeveloperConnect\V1\GitRepositoryLink;
    use Google\Rpc\Status;

    /**
     * @param string $formattedParent           Value for parent. Please see
     *                                          {@see DeveloperConnectClient::connectionName()} for help formatting this field.
     * @param string $gitRepositoryLinkCloneUri Git Clone URI.
     * @param string $gitRepositoryLinkId       The ID to use for the repository, which will become the final
     *                                          component of the repository's resource name. This ID should be unique in
     *                                          the connection. Allows alphanumeric characters and any of
     *                                          -._~%!$&'()*+,;=&#64;.
     */
    function create_git_repository_link_sample(
        string $formattedParent,
        string $gitRepositoryLinkCloneUri,
        string $gitRepositoryLinkId
    ): void {
        // Create a client.
        $developerConnectClient = new DeveloperConnectClient();

        // Prepare the request message.
        $gitRepositoryLink = (new GitRepositoryLink())
            ->setCloneUri($gitRepositoryLinkCloneUri);
        $request = (new CreateGitRepositoryLinkRequest())
            ->setParent($formattedParent)
            ->setGitRepositoryLink($gitRepositoryLink)
            ->setGitRepositoryLinkId($gitRepositoryLinkId);

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

            if ($response->operationSucceeded()) {
                /** @var GitRepositoryLink $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 = DeveloperConnectClient::connectionName(
            '[PROJECT]',
            '[LOCATION]',
            '[CONNECTION]'
        );
        $gitRepositoryLinkCloneUri = '[CLONE_URI]';
        $gitRepositoryLinkId = '[GIT_REPOSITORY_LINK_ID]';

        create_git_repository_link_sample(
            $formattedParent,
            $gitRepositoryLinkCloneUri,
            $gitRepositoryLinkId
        );
    }

### deleteAccountConnector

Deletes a single AccountConnector.

The async variant is
[DeveloperConnectClient::deleteAccountConnectorAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-developerconnect/latest/V1.Client.DeveloperConnectClient#_Google_Cloud_DeveloperConnect_V1_Client_DeveloperConnectClient__deleteAccountConnectorAsync__) .

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

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

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

        // Call the API and handle any network failures.
        try {
            /** @var OperationResponse $response */
            $response = $developerConnectClient->deleteAccountConnector($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 = DeveloperConnectClient::accountConnectorName(
            '[PROJECT]',
            '[LOCATION]',
            '[ACCOUNT_CONNECTOR]'
        );

        delete_account_connector_sample($formattedName);
    }

### deleteConnection

Deletes a single Connection.

The async variant is [DeveloperConnectClient::deleteConnectionAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-developerconnect/latest/V1.Client.DeveloperConnectClient#_Google_Cloud_DeveloperConnect_V1_Client_DeveloperConnectClient__deleteConnectionAsync__) .

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

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

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

        // Call the API and handle any network failures.
        try {
            /** @var OperationResponse $response */
            $response = $developerConnectClient->deleteConnection($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 = DeveloperConnectClient::connectionName('[PROJECT]', '[LOCATION]', '[CONNECTION]');

        delete_connection_sample($formattedName);
    }

### deleteGitRepositoryLink

Deletes a single GitRepositoryLink.

The async variant is
[DeveloperConnectClient::deleteGitRepositoryLinkAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-developerconnect/latest/V1.Client.DeveloperConnectClient#_Google_Cloud_DeveloperConnect_V1_Client_DeveloperConnectClient__deleteGitRepositoryLinkAsync__) .

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

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

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

        // Call the API and handle any network failures.
        try {
            /** @var OperationResponse $response */
            $response = $developerConnectClient->deleteGitRepositoryLink($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 = DeveloperConnectClient::gitRepositoryLinkName(
            '[PROJECT]',
            '[LOCATION]',
            '[CONNECTION]',
            '[GIT_REPOSITORY_LINK]'
        );

        delete_git_repository_link_sample($formattedName);
    }

### deleteSelf

Delete the User based on the user credentials.

The async variant is [DeveloperConnectClient::deleteSelfAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-developerconnect/latest/V1.Client.DeveloperConnectClient#_Google_Cloud_DeveloperConnect_V1_Client_DeveloperConnectClient__deleteSelfAsync__) .

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

    /**
     * @param string $formattedName Name of the AccountConnector resource
     *                              Please see {@see DeveloperConnectClient::accountConnectorName()} for help formatting this field.
     */
    function delete_self_sample(string $formattedName): void
    {
        // Create a client.
        $developerConnectClient = new DeveloperConnectClient();

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

        // Call the API and handle any network failures.
        try {
            /** @var OperationResponse $response */
            $response = $developerConnectClient->deleteSelf($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 = DeveloperConnectClient::accountConnectorName(
            '[PROJECT]',
            '[LOCATION]',
            '[ACCOUNT_CONNECTOR]'
        );

        delete_self_sample($formattedName);
    }

### deleteUser

Deletes a single User.

The async variant is [DeveloperConnectClient::deleteUserAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-developerconnect/latest/V1.Client.DeveloperConnectClient#_Google_Cloud_DeveloperConnect_V1_Client_DeveloperConnectClient__deleteUserAsync__) .

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

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

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

        // Call the API and handle any network failures.
        try {
            /** @var OperationResponse $response */
            $response = $developerConnectClient->deleteUser($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 = DeveloperConnectClient::userName(
            '[PROJECT]',
            '[LOCATION]',
            '[ACCOUNT_CONNECTOR]',
            '[USER]'
        );

        delete_user_sample($formattedName);
    }

### fetchAccessToken

Fetches OAuth access token based on end user credentials.

The async variant is [DeveloperConnectClient::fetchAccessTokenAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-developerconnect/latest/V1.Client.DeveloperConnectClient#_Google_Cloud_DeveloperConnect_V1_Client_DeveloperConnectClient__fetchAccessTokenAsync__) .

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

**Example**

    use Google\ApiCore\ApiException;
    use Google\Cloud\DeveloperConnect\V1\Client\DeveloperConnectClient;
    use Google\Cloud\DeveloperConnect\V1\FetchAccessTokenRequest;
    use Google\Cloud\DeveloperConnect\V1\FetchAccessTokenResponse;

    /**
     * @param string $formattedAccountConnector The resource name of the AccountConnector in the format
     *                                          `projects/&#42;/locations/&#42;/accountConnectors/*`. Please see
     *                                          {@see DeveloperConnectClient::accountConnectorName()} for help formatting this field.
     */
    function fetch_access_token_sample(string $formattedAccountConnector): void
    {
        // Create a client.
        $developerConnectClient = new DeveloperConnectClient();

        // Prepare the request message.
        $request = (new FetchAccessTokenRequest())
            ->setAccountConnector($formattedAccountConnector);

        // Call the API and handle any network failures.
        try {
            /** @var FetchAccessTokenResponse $response */
            $response = $developerConnectClient->fetchAccessToken($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
    {
        $formattedAccountConnector = DeveloperConnectClient::accountConnectorName(
            '[PROJECT]',
            '[LOCATION]',
            '[ACCOUNT_CONNECTOR]'
        );

        fetch_access_token_sample($formattedAccountConnector);
    }

### fetchGitHubInstallations

FetchGitHubInstallations returns the list of GitHub Installations that
are available to be added to a Connection.

For github.com, only installations accessible to the authorizer token
are returned. For GitHub Enterprise, all installations are returned.

The async variant is
[DeveloperConnectClient::fetchGitHubInstallationsAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-developerconnect/latest/V1.Client.DeveloperConnectClient#_Google_Cloud_DeveloperConnect_V1_Client_DeveloperConnectClient__fetchGitHubInstallationsAsync__) .

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

**Example**

    use Google\ApiCore\ApiException;
    use Google\Cloud\DeveloperConnect\V1\Client\DeveloperConnectClient;
    use Google\Cloud\DeveloperConnect\V1\FetchGitHubInstallationsRequest;
    use Google\Cloud\DeveloperConnect\V1\FetchGitHubInstallationsResponse;

    /**
     * @param string $formattedConnection The resource name of the connection in the format
     *                                    `projects/&#42;/locations/&#42;/connections/*`. Please see
     *                                    {@see DeveloperConnectClient::connectionName()} for help formatting this field.
     */
    function fetch_git_hub_installations_sample(string $formattedConnection): void
    {
        // Create a client.
        $developerConnectClient = new DeveloperConnectClient();

        // Prepare the request message.
        $request = (new FetchGitHubInstallationsRequest())
            ->setConnection($formattedConnection);

        // Call the API and handle any network failures.
        try {
            /** @var FetchGitHubInstallationsResponse $response */
            $response = $developerConnectClient->fetchGitHubInstallations($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
    {
        $formattedConnection = DeveloperConnectClient::connectionName(
            '[PROJECT]',
            '[LOCATION]',
            '[CONNECTION]'
        );

        fetch_git_hub_installations_sample($formattedConnection);
    }

### fetchGitRefs

Fetch the list of branches or tags for a given repository.

The async variant is [DeveloperConnectClient::fetchGitRefsAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-developerconnect/latest/V1.Client.DeveloperConnectClient#_Google_Cloud_DeveloperConnect_V1_Client_DeveloperConnectClient__fetchGitRefsAsync__) .

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-developerconnect/latest/V1.FetchGitRefsRequest` 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\DeveloperConnect\V1\Client\DeveloperConnectClient;
    use Google\Cloud\DeveloperConnect\V1\FetchGitRefsRequest;
    use Google\Cloud\DeveloperConnect\V1\FetchGitRefsRequest\RefType;

    /**
     * @param string $formattedGitRepositoryLink The resource name of GitRepositoryLink in the format
     *                                           `projects/&#42;/locations/&#42;/connections/&#42;/gitRepositoryLinks/*`. Please see
     *                                           {@see DeveloperConnectClient::gitRepositoryLinkName()} for help formatting this field.
     * @param int    $refType                    Type of refs to fetch.
     */
    function fetch_git_refs_sample(string $formattedGitRepositoryLink, int $refType): void
    {
        // Create a client.
        $developerConnectClient = new DeveloperConnectClient();

        // Prepare the request message.
        $request = (new FetchGitRefsRequest())
            ->setGitRepositoryLink($formattedGitRepositoryLink)
            ->setRefType($refType);

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

            /** @var string $element */
            foreach ($response as $element) {
                printf('Element data: %s' . PHP_EOL, $element);
            }
        } 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
    {
        $formattedGitRepositoryLink = DeveloperConnectClient::gitRepositoryLinkName(
            '[PROJECT]',
            '[LOCATION]',
            '[CONNECTION]',
            '[GIT_REPOSITORY_LINK]'
        );
        $refType = RefType::REF_TYPE_UNSPECIFIED;

        fetch_git_refs_sample($formattedGitRepositoryLink, $refType);
    }

### fetchLinkableGitRepositories

FetchLinkableGitRepositories returns a list of git repositories from an SCM
that are available to be added to a Connection.

The async variant is
[DeveloperConnectClient::fetchLinkableGitRepositoriesAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-developerconnect/latest/V1.Client.DeveloperConnectClient#_Google_Cloud_DeveloperConnect_V1_Client_DeveloperConnectClient__fetchLinkableGitRepositoriesAsync__) .

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `Google\Cloud\DeveloperConnect\V1\FetchLinkableGitRepositoriesRequest` 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\DeveloperConnect\V1\Client\DeveloperConnectClient;
    use Google\Cloud\DeveloperConnect\V1\FetchLinkableGitRepositoriesRequest;
    use Google\Cloud\DeveloperConnect\V1\LinkableGitRepository;

    /**
     * @param string $formattedConnection The name of the Connection.
     *                                    Format: `projects/&#42;/locations/&#42;/connections/*`. Please see
     *                                    {@see DeveloperConnectClient::connectionName()} for help formatting this field.
     */
    function fetch_linkable_git_repositories_sample(string $formattedConnection): void
    {
        // Create a client.
        $developerConnectClient = new DeveloperConnectClient();

        // Prepare the request message.
        $request = (new FetchLinkableGitRepositoriesRequest())
            ->setConnection($formattedConnection);

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

            /** @var LinkableGitRepository $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
    {
        $formattedConnection = DeveloperConnectClient::connectionName(
            '[PROJECT]',
            '[LOCATION]',
            '[CONNECTION]'
        );

        fetch_linkable_git_repositories_sample($formattedConnection);
    }

### fetchReadToken

Fetches read token of a given gitRepositoryLink.

The async variant is [DeveloperConnectClient::fetchReadTokenAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-developerconnect/latest/V1.Client.DeveloperConnectClient#_Google_Cloud_DeveloperConnect_V1_Client_DeveloperConnectClient__fetchReadTokenAsync__) .

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

**Example**

    use Google\ApiCore\ApiException;
    use Google\Cloud\DeveloperConnect\V1\Client\DeveloperConnectClient;
    use Google\Cloud\DeveloperConnect\V1\FetchReadTokenRequest;
    use Google\Cloud\DeveloperConnect\V1\FetchReadTokenResponse;

    /**
     * @param string $formattedGitRepositoryLink The resource name of the gitRepositoryLink in the format
     *                                           `projects/&#42;/locations/&#42;/connections/&#42;/gitRepositoryLinks/*`. Please see
     *                                           {@see DeveloperConnectClient::gitRepositoryLinkName()} for help formatting this field.
     */
    function fetch_read_token_sample(string $formattedGitRepositoryLink): void
    {
        // Create a client.
        $developerConnectClient = new DeveloperConnectClient();

        // Prepare the request message.
        $request = (new FetchReadTokenRequest())
            ->setGitRepositoryLink($formattedGitRepositoryLink);

        // Call the API and handle any network failures.
        try {
            /** @var FetchReadTokenResponse $response */
            $response = $developerConnectClient->fetchReadToken($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
    {
        $formattedGitRepositoryLink = DeveloperConnectClient::gitRepositoryLinkName(
            '[PROJECT]',
            '[LOCATION]',
            '[CONNECTION]',
            '[GIT_REPOSITORY_LINK]'
        );

        fetch_read_token_sample($formattedGitRepositoryLink);
    }

### fetchReadWriteToken

Fetches read/write token of a given gitRepositoryLink.

The async variant is [DeveloperConnectClient::fetchReadWriteTokenAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-developerconnect/latest/V1.Client.DeveloperConnectClient#_Google_Cloud_DeveloperConnect_V1_Client_DeveloperConnectClient__fetchReadWriteTokenAsync__) .

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

**Example**

    use Google\ApiCore\ApiException;
    use Google\Cloud\DeveloperConnect\V1\Client\DeveloperConnectClient;
    use Google\Cloud\DeveloperConnect\V1\FetchReadWriteTokenRequest;
    use Google\Cloud\DeveloperConnect\V1\FetchReadWriteTokenResponse;

    /**
     * @param string $formattedGitRepositoryLink The resource name of the gitRepositoryLink in the format
     *                                           `projects/&#42;/locations/&#42;/connections/&#42;/gitRepositoryLinks/*`. Please see
     *                                           {@see DeveloperConnectClient::gitRepositoryLinkName()} for help formatting this field.
     */
    function fetch_read_write_token_sample(string $formattedGitRepositoryLink): void
    {
        // Create a client.
        $developerConnectClient = new DeveloperConnectClient();

        // Prepare the request message.
        $request = (new FetchReadWriteTokenRequest())
            ->setGitRepositoryLink($formattedGitRepositoryLink);

        // Call the API and handle any network failures.
        try {
            /** @var FetchReadWriteTokenResponse $response */
            $response = $developerConnectClient->fetchReadWriteToken($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
    {
        $formattedGitRepositoryLink = DeveloperConnectClient::gitRepositoryLinkName(
            '[PROJECT]',
            '[LOCATION]',
            '[CONNECTION]',
            '[GIT_REPOSITORY_LINK]'
        );

        fetch_read_write_token_sample($formattedGitRepositoryLink);
    }

### fetchSelf

Fetch the User based on the user credentials.

The async variant is [DeveloperConnectClient::fetchSelfAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-developerconnect/latest/V1.Client.DeveloperConnectClient#_Google_Cloud_DeveloperConnect_V1_Client_DeveloperConnectClient__fetchSelfAsync__) .

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

**Example**

    use Google\ApiCore\ApiException;
    use Google\Cloud\DeveloperConnect\V1\Client\DeveloperConnectClient;
    use Google\Cloud\DeveloperConnect\V1\FetchSelfRequest;
    use Google\Cloud\DeveloperConnect\V1\User;

    /**
     * @param string $formattedName Name of the AccountConnector resource
     *                              Please see {@see DeveloperConnectClient::accountConnectorName()} for help formatting this field.
     */
    function fetch_self_sample(string $formattedName): void
    {
        // Create a client.
        $developerConnectClient = new DeveloperConnectClient();

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

        // Call the API and handle any network failures.
        try {
            /** @var User $response */
            $response = $developerConnectClient->fetchSelf($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 = DeveloperConnectClient::accountConnectorName(
            '[PROJECT]',
            '[LOCATION]',
            '[ACCOUNT_CONNECTOR]'
        );

        fetch_self_sample($formattedName);
    }

### finishOAuth

Finishes OAuth flow for an account connector.

The async variant is [DeveloperConnectClient::finishOAuthAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-developerconnect/latest/V1.Client.DeveloperConnectClient#_Google_Cloud_DeveloperConnect_V1_Client_DeveloperConnectClient__finishOAuthAsync__) .

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

**Example**

    use Google\ApiCore\ApiException;
    use Google\Cloud\DeveloperConnect\V1\Client\DeveloperConnectClient;
    use Google\Cloud\DeveloperConnect\V1\FinishOAuthRequest;
    use Google\Cloud\DeveloperConnect\V1\FinishOAuthResponse;

    /**
     * @param string $formattedAccountConnector The resource name of the AccountConnector in the format
     *                                          `projects/&#42;/locations/&#42;/accountConnectors/*`. Please see
     *                                          {@see DeveloperConnectClient::accountConnectorName()} for help formatting this field.
     */
    function finish_o_auth_sample(string $formattedAccountConnector): void
    {
        // Create a client.
        $developerConnectClient = new DeveloperConnectClient();

        // Prepare the request message.
        $request = (new FinishOAuthRequest())
            ->setAccountConnector($formattedAccountConnector);

        // Call the API and handle any network failures.
        try {
            /** @var FinishOAuthResponse $response */
            $response = $developerConnectClient->finishOAuth($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
    {
        $formattedAccountConnector = DeveloperConnectClient::accountConnectorName(
            '[PROJECT]',
            '[LOCATION]',
            '[ACCOUNT_CONNECTOR]'
        );

        finish_o_auth_sample($formattedAccountConnector);
    }

### getAccountConnector

Gets details of a single AccountConnector.

The async variant is [DeveloperConnectClient::getAccountConnectorAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-developerconnect/latest/V1.Client.DeveloperConnectClient#_Google_Cloud_DeveloperConnect_V1_Client_DeveloperConnectClient__getAccountConnectorAsync__) .

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

**Example**

    use Google\ApiCore\ApiException;
    use Google\Cloud\DeveloperConnect\V1\AccountConnector;
    use Google\Cloud\DeveloperConnect\V1\Client\DeveloperConnectClient;
    use Google\Cloud\DeveloperConnect\V1\GetAccountConnectorRequest;

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

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

        // Call the API and handle any network failures.
        try {
            /** @var AccountConnector $response */
            $response = $developerConnectClient->getAccountConnector($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 = DeveloperConnectClient::accountConnectorName(
            '[PROJECT]',
            '[LOCATION]',
            '[ACCOUNT_CONNECTOR]'
        );

        get_account_connector_sample($formattedName);
    }

### getConnection

Gets details of a single Connection.

The async variant is [DeveloperConnectClient::getConnectionAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-developerconnect/latest/V1.Client.DeveloperConnectClient#_Google_Cloud_DeveloperConnect_V1_Client_DeveloperConnectClient__getConnectionAsync__) .

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

**Example**

    use Google\ApiCore\ApiException;
    use Google\Cloud\DeveloperConnect\V1\Client\DeveloperConnectClient;
    use Google\Cloud\DeveloperConnect\V1\Connection;
    use Google\Cloud\DeveloperConnect\V1\GetConnectionRequest;

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

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

        // Call the API and handle any network failures.
        try {
            /** @var Connection $response */
            $response = $developerConnectClient->getConnection($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 = DeveloperConnectClient::connectionName('[PROJECT]', '[LOCATION]', '[CONNECTION]');

        get_connection_sample($formattedName);
    }

### getGitRepositoryLink

Gets details of a single GitRepositoryLink.

The async variant is [DeveloperConnectClient::getGitRepositoryLinkAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-developerconnect/latest/V1.Client.DeveloperConnectClient#_Google_Cloud_DeveloperConnect_V1_Client_DeveloperConnectClient__getGitRepositoryLinkAsync__)
.

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

**Example**

    use Google\ApiCore\ApiException;
    use Google\Cloud\DeveloperConnect\V1\Client\DeveloperConnectClient;
    use Google\Cloud\DeveloperConnect\V1\GetGitRepositoryLinkRequest;
    use Google\Cloud\DeveloperConnect\V1\GitRepositoryLink;

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

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

        // Call the API and handle any network failures.
        try {
            /** @var GitRepositoryLink $response */
            $response = $developerConnectClient->getGitRepositoryLink($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 = DeveloperConnectClient::gitRepositoryLinkName(
            '[PROJECT]',
            '[LOCATION]',
            '[CONNECTION]',
            '[GIT_REPOSITORY_LINK]'
        );

        get_git_repository_link_sample($formattedName);
    }

### listAccountConnectors

Lists AccountConnectors in a given project and location.

The async variant is [DeveloperConnectClient::listAccountConnectorsAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-developerconnect/latest/V1.Client.DeveloperConnectClient#_Google_Cloud_DeveloperConnect_V1_Client_DeveloperConnectClient__listAccountConnectorsAsync__)
.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-developerconnect/latest/V1.ListAccountConnectorsRequest` 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\DeveloperConnect\V1\AccountConnector;
    use Google\Cloud\DeveloperConnect\V1\Client\DeveloperConnectClient;
    use Google\Cloud\DeveloperConnect\V1\ListAccountConnectorsRequest;

    /**
     * @param string $formattedParent Parent value for ListAccountConnectorsRequest
     *                                Please see {@see DeveloperConnectClient::locationName()} for help formatting this field.
     */
    function list_account_connectors_sample(string $formattedParent): void
    {
        // Create a client.
        $developerConnectClient = new DeveloperConnectClient();

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

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

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

        list_account_connectors_sample($formattedParent);
    }

### listConnections

Lists Connections in a given project and location.

The async variant is [DeveloperConnectClient::listConnectionsAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-developerconnect/latest/V1.Client.DeveloperConnectClient#_Google_Cloud_DeveloperConnect_V1_Client_DeveloperConnectClient__listConnectionsAsync__) .

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-developerconnect/latest/V1.ListConnectionsRequest` 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\DeveloperConnect\V1\Client\DeveloperConnectClient;
    use Google\Cloud\DeveloperConnect\V1\Connection;
    use Google\Cloud\DeveloperConnect\V1\ListConnectionsRequest;

    /**
     * @param string $formattedParent Parent value for ListConnectionsRequest
     *                                Please see {@see DeveloperConnectClient::locationName()} for help formatting this field.
     */
    function list_connections_sample(string $formattedParent): void
    {
        // Create a client.
        $developerConnectClient = new DeveloperConnectClient();

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

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

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

        list_connections_sample($formattedParent);
    }

### listGitRepositoryLinks

Lists GitRepositoryLinks in a given project, location, and connection.

The async variant is
[DeveloperConnectClient::listGitRepositoryLinksAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-developerconnect/latest/V1.Client.DeveloperConnectClient#_Google_Cloud_DeveloperConnect_V1_Client_DeveloperConnectClient__listGitRepositoryLinksAsync__) .

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-developerconnect/latest/V1.ListGitRepositoryLinksRequest` 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\DeveloperConnect\V1\Client\DeveloperConnectClient;
    use Google\Cloud\DeveloperConnect\V1\GitRepositoryLink;
    use Google\Cloud\DeveloperConnect\V1\ListGitRepositoryLinksRequest;

    /**
     * @param string $formattedParent Parent value for ListGitRepositoryLinksRequest
     *                                Please see {@see DeveloperConnectClient::connectionName()} for help formatting this field.
     */
    function list_git_repository_links_sample(string $formattedParent): void
    {
        // Create a client.
        $developerConnectClient = new DeveloperConnectClient();

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

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

            /** @var GitRepositoryLink $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 = DeveloperConnectClient::connectionName(
            '[PROJECT]',
            '[LOCATION]',
            '[CONNECTION]'
        );

        list_git_repository_links_sample($formattedParent);
    }

### listUsers

Lists Users in a given project, location, and account_connector.

The async variant is [DeveloperConnectClient::listUsersAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-developerconnect/latest/V1.Client.DeveloperConnectClient#_Google_Cloud_DeveloperConnect_V1_Client_DeveloperConnectClient__listUsersAsync__) .

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-developerconnect/latest/V1.ListUsersRequest` 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\DeveloperConnect\V1\Client\DeveloperConnectClient;
    use Google\Cloud\DeveloperConnect\V1\ListUsersRequest;
    use Google\Cloud\DeveloperConnect\V1\User;

    /**
     * @param string $formattedParent Parent value for ListUsersRequest
     *                                Please see {@see DeveloperConnectClient::accountConnectorName()} for help formatting this field.
     */
    function list_users_sample(string $formattedParent): void
    {
        // Create a client.
        $developerConnectClient = new DeveloperConnectClient();

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

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

            /** @var User $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 = DeveloperConnectClient::accountConnectorName(
            '[PROJECT]',
            '[LOCATION]',
            '[ACCOUNT_CONNECTOR]'
        );

        list_users_sample($formattedParent);
    }

### startOAuth

Starts OAuth flow for an account connector.

The async variant is [DeveloperConnectClient::startOAuthAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-developerconnect/latest/V1.Client.DeveloperConnectClient#_Google_Cloud_DeveloperConnect_V1_Client_DeveloperConnectClient__startOAuthAsync__) .

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

**Example**

    use Google\ApiCore\ApiException;
    use Google\Cloud\DeveloperConnect\V1\Client\DeveloperConnectClient;
    use Google\Cloud\DeveloperConnect\V1\StartOAuthRequest;
    use Google\Cloud\DeveloperConnect\V1\StartOAuthResponse;

    /**
     * @param string $formattedAccountConnector The resource name of the AccountConnector in the format
     *                                          `projects/&#42;/locations/&#42;/accountConnectors/*`. Please see
     *                                          {@see DeveloperConnectClient::accountConnectorName()} for help formatting this field.
     */
    function start_o_auth_sample(string $formattedAccountConnector): void
    {
        // Create a client.
        $developerConnectClient = new DeveloperConnectClient();

        // Prepare the request message.
        $request = (new StartOAuthRequest())
            ->setAccountConnector($formattedAccountConnector);

        // Call the API and handle any network failures.
        try {
            /** @var StartOAuthResponse $response */
            $response = $developerConnectClient->startOAuth($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
    {
        $formattedAccountConnector = DeveloperConnectClient::accountConnectorName(
            '[PROJECT]',
            '[LOCATION]',
            '[ACCOUNT_CONNECTOR]'
        );

        start_o_auth_sample($formattedAccountConnector);
    }

### updateAccountConnector

Updates the parameters of a single AccountConnector.

The async variant is
[DeveloperConnectClient::updateAccountConnectorAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-developerconnect/latest/V1.Client.DeveloperConnectClient#_Google_Cloud_DeveloperConnect_V1_Client_DeveloperConnectClient__updateAccountConnectorAsync__) .

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

**Example**

    use Google\ApiCore\ApiException;
    use Google\ApiCore\OperationResponse;
    use Google\Cloud\DeveloperConnect\V1\AccountConnector;
    use Google\Cloud\DeveloperConnect\V1\Client\DeveloperConnectClient;
    use Google\Cloud\DeveloperConnect\V1\UpdateAccountConnectorRequest;
    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_account_connector_sample(): void
    {
        // Create a client.
        $developerConnectClient = new DeveloperConnectClient();

        // Prepare the request message.
        $accountConnector = new AccountConnector();
        $request = (new UpdateAccountConnectorRequest())
            ->setAccountConnector($accountConnector);

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

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

### updateConnection

Updates the parameters of a single Connection.

The async variant is [DeveloperConnectClient::updateConnectionAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-developerconnect/latest/V1.Client.DeveloperConnectClient#_Google_Cloud_DeveloperConnect_V1_Client_DeveloperConnectClient__updateConnectionAsync__) .

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

**Example**

    use Google\ApiCore\ApiException;
    use Google\ApiCore\OperationResponse;
    use Google\Cloud\DeveloperConnect\V1\Client\DeveloperConnectClient;
    use Google\Cloud\DeveloperConnect\V1\Connection;
    use Google\Cloud\DeveloperConnect\V1\UpdateConnectionRequest;
    use Google\Protobuf\FieldMask;
    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_connection_sample(): void
    {
        // Create a client.
        $developerConnectClient = new DeveloperConnectClient();

        // Prepare the request message.
        $updateMask = new FieldMask();
        $connection = new Connection();
        $request = (new UpdateConnectionRequest())
            ->setUpdateMask($updateMask)
            ->setConnection($connection);

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

            if ($response->operationSucceeded()) {
                /** @var Connection $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 [DeveloperConnectClient::getLocationAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-developerconnect/latest/V1.Client.DeveloperConnectClient#_Google_Cloud_DeveloperConnect_V1_Client_DeveloperConnectClient__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\DeveloperConnect\V1\Client\DeveloperConnectClient;
    use Google\Cloud\Location\GetLocationRequest;
    use Google\Cloud\Location\Location;

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

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

        // Call the API and handle any network failures.
        try {
            /** @var Location $response */
            $response = $developerConnectClient->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 can be called in two ways:

- **List all public locations:** Use the path `GET /v1/locations`.
- **List project-visible locations:** Use the path `GET /v1/projects/{project_id}/locations`. This may include public locations as well as private or other locations specifically visible to the project.

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

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

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

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

### createAccountConnectorAsync

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

### createConnectionAsync

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

### createGitRepositoryLinkAsync

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

### deleteAccountConnectorAsync

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

### deleteConnectionAsync

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

### deleteGitRepositoryLinkAsync

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

### deleteSelfAsync

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

### deleteUserAsync

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

### fetchAccessTokenAsync

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

### fetchGitHubInstallationsAsync

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

### fetchGitRefsAsync

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

### fetchLinkableGitRepositoriesAsync

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `Google\Cloud\DeveloperConnect\V1\FetchLinkableGitRepositoriesRequest` |
| `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>` |   |

### fetchReadTokenAsync

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

### fetchReadWriteTokenAsync

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

### fetchSelfAsync

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

### finishOAuthAsync

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

### getAccountConnectorAsync

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

### getConnectionAsync

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

### getGitRepositoryLinkAsync

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

### listAccountConnectorsAsync

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

### listConnectionsAsync

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

### listGitRepositoryLinksAsync

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

### listUsersAsync

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

### startOAuthAsync

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

### updateAccountConnectorAsync

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

### updateConnectionAsync

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

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

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

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

### static::connectionName

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

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

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

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

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

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

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

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

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

### static::projectSecretSecretVersionName

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

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `project` | `string` |
| `secret` | `string` |
| `secretVersion` | `string` |

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

### static::secretVersionName

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

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `project` | `string` |
| `secret` | `string` |
| `secretVersion` | `string` |

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

### static::serviceName

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

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

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

### static::userName

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

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

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

- accountConnector: projects/{project}/locations/{location}/accountConnectors/{account_connector}
- connection: projects/{project}/locations/{location}/connections/{connection}
- cryptoKey: projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}
- gitRepositoryLink: projects/{project}/locations/{location}/connections/{connection}/gitRepositoryLinks/{git_repository_link}
- instance: projects/{project}/locations/{location}/instances/{instance}
- location: projects/{project}/locations/{location}
- projectLocationSecretSecretVersion: projects/{project}/locations/{location}/secrets/{secret}/versions/{secret_version}
- projectSecretSecretVersion: projects/{project}/secrets/{secret}/versions/{secret_version}
- secretVersion: projects/{project}/secrets/{secret}/versions/{secret_version}
- service: projects/{project}/locations/{location}/namespaces/{namespace}/services/{service}
- user: projects/{project}/locations/{location}/accountConnectors/{account_connector}/users/{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. |