# Google Cloud Private Catalog V1beta1 Client - Class GitSource (0.6.3)

0.6.3 (latest) 0.6.2 0.5.3 0.4.6 0.3.3 0.2.13

> [!WARNING]
> **Beta**
>
>
> This library is covered by the [Pre-GA Offerings Terms](https://docs.cloud.google.com/terms/service-terms#1)
> of the Terms of Service. Pre-GA libraries might have limited support,
> and changes to pre-GA libraries might not be compatible with other pre-GA versions.
> For more information, see the
> [launch stage descriptions](https://docs.cloud.google.com/products#product-launch-stages).

Reference documentation and code samples for the Google Cloud Private Catalog V1beta1 Client class GitSource.

Defines how to access a Git Source.

Generated from protobuf message `google.cloud.privatecatalog.v1beta1.GitSource`

## Namespace

Google \\ Cloud \\ PrivateCatalog \\ V1beta1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ repo` | `string` Location of the Git repo to build. |
| `↳ dir` | `string` Directory, relative to the source root, in which to run the build. This must be a relative path. If a step's `dir` is specified and is an absolute path, this value is ignored for that step's execution. |
| `↳ commit` | `string` The revision commit to use. |
| `↳ branch` | `string` The revision branch to use. |
| `↳ tag` | `string` The revision tag to use. |

### getRepo

Location of the Git repo to build.

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

### setRepo

Location of the Git repo to build.

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

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

### getDir

Directory, relative to the source root, in which to run the build.

This must be a relative path. If a step's `dir` is specified and is an
absolute path, this value is ignored for that step's execution.

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

### setDir

Directory, relative to the source root, in which to run the build.

This must be a relative path. If a step's `dir` is specified and is an
absolute path, this value is ignored for that step's execution.

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

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

### getCommit

The revision commit to use.

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

### hasCommit

### setCommit

The revision commit to use.

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

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

### getBranch

The revision branch to use.

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

### hasBranch

### setBranch

The revision branch to use.

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

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

### getTag

The revision tag to use.

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

### hasTag

### setTag

The revision tag to use.

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

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

### getRef

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