# Grafeas V1 Client - Class GerritSourceContext (1.7.0)

1.7.0 (latest) 1.6.0 1.5.0 1.4.0 1.3.2 1.2.2 1.1.3 1.0.0 0.10.3 0.9.0 0.8.3 0.7.1 0.6.0 0.5.0 0.4.4 Reference documentation and code samples for the Grafeas V1 Client class GerritSourceContext.

A SourceContext referring to a Gerrit project.

Generated from protobuf message `grafeas.v1.GerritSourceContext`

## Namespace

Grafeas \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ host_uri` | `string` The URI of a running Gerrit instance. |
| `↳ gerrit_project` | `string` The full project name within the host. Projects may be nested, so "project/subproject" is a valid project name. The "repo name" is the hostURI/project. |
| `↳ revision_id` | `string` A revision (commit) ID. |
| `↳ alias_context` | `https://docs.cloud.google.com/php/docs/reference/grafeas/latest/V1.AliasContext` An alias, which may be a branch or tag. |

### getHostUri

The URI of a running Gerrit instance.

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

### setHostUri

The URI of a running Gerrit instance.

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

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

### getGerritProject

The full project name within the host. Projects may be nested, so
"project/subproject" is a valid project name. The "repo name" is the
hostURI/project.

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

### setGerritProject

The full project name within the host. Projects may be nested, so
"project/subproject" is a valid project name. The "repo name" is the
hostURI/project.

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

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

### getRevisionId

A revision (commit) ID.

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

### hasRevisionId

### setRevisionId

A revision (commit) ID.

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

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

### getAliasContext

An alias, which may be a branch or tag.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/grafeas/latest/V1.AliasContext|null` |   |

### hasAliasContext

### setAliasContext

An alias, which may be a branch or tag.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/grafeas/latest/V1.AliasContext` |

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

### getRevision

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