# Google Cloud Build V2 Client - Class GitHubEnterpriseConfig (1.1.2)

1.1.2 (latest) 1.1.1 1.0.4 0.16.3 0.15.0 0.14.0 0.13.2 0.12.0 0.11.0 0.10.0 0.9.0 0.8.0 0.7.3 0.6.1 0.5.1 0.4.0 0.3.8 Reference documentation and code samples for the Google Cloud Build V2 Client class GitHubEnterpriseConfig.

Configuration for connections to an instance of GitHub Enterprise.

Generated from protobuf message `google.devtools.cloudbuild.v2.GitHubEnterpriseConfig`

## Namespace

Google \\ Cloud \\ Build \\ V2

## Methods

### __construct

Constructor.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `data` | `mixed` |

### getHostUri

Required. The URI of the GitHub Enterprise host this connection is for.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### setHostUri

Required. The URI of the GitHub Enterprise host this connection is for.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getApiKey

Required. API Key used for authentication of webhook events.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### setApiKey

Required. API Key used for authentication of webhook events.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getAppId

Id of the GitHub App created from the manifest.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int|string` |   |

### setAppId

Id of the GitHub App created from the manifest.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int|string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getAppSlug

The URL-friendly name of the GitHub App.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### setAppSlug

The URL-friendly name of the GitHub App.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getPrivateKeySecretVersion

SecretManager resource containing the private key of the GitHub App,
formatted as `projects/*/secrets/*/versions/*`.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### setPrivateKeySecretVersion

SecretManager resource containing the private key of the GitHub App,
formatted as `projects/*/secrets/*/versions/*`.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getWebhookSecretSecretVersion

SecretManager resource containing the webhook secret of the GitHub App,
formatted as `projects/*/secrets/*/versions/*`.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### setWebhookSecretSecretVersion

SecretManager resource containing the webhook secret of the GitHub App,
formatted as `projects/*/secrets/*/versions/*`.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getAppInstallationId

ID of the installation of the GitHub App.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int|string` |   |

### setAppInstallationId

ID of the installation of the GitHub App.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int|string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getServiceDirectoryConfig

Configuration for using Service Directory to privately connect to a GitHub
Enterprise server. This should only be set if the GitHub Enterprise server
is hosted on-premises and not reachable by public internet. If this field
is left empty, calls to the GitHub Enterprise server will be made over the
public internet.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-build/latest/V2.ServiceDirectoryConfig|null` |   |

### hasServiceDirectoryConfig

### clearServiceDirectoryConfig

### setServiceDirectoryConfig

Configuration for using Service Directory to privately connect to a GitHub
Enterprise server. This should only be set if the GitHub Enterprise server
is hosted on-premises and not reachable by public internet. If this field
is left empty, calls to the GitHub Enterprise server will be made over the
public internet.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-build/latest/V2.ServiceDirectoryConfig` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getSslCa

SSL certificate to use for requests to GitHub Enterprise.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### setSslCa

SSL certificate to use for requests to GitHub Enterprise.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getServerVersion

Output only. GitHub Enterprise version installed at the host_uri.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### setServerVersion

Output only. GitHub Enterprise version installed at the host_uri.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |