# Cloud Private Catalog v1beta1 API - Class GitSource (2.0.0-beta06)

<button class="button button-with-icon cloud-select-dropdown__button " aria-haspopup="true">Version latest</button>

- [2.0.0-beta06 (latest)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.PrivateCatalog.V1Beta1/latest/Google.Cloud.PrivateCatalog.V1Beta1.GitSource)
- [2.0.0-beta05](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.PrivateCatalog.V1Beta1/2.0.0-beta05/Google.Cloud.PrivateCatalog.V1Beta1.GitSource)
- [1.0.0-beta02](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.PrivateCatalog.V1Beta1/1.0.0-beta02/Google.Cloud.PrivateCatalog.V1Beta1.GitSource)

    public sealed class GitSource : IMessage<GitSource>, IEquatable<GitSource>, IDeepCloneable<GitSource>, IBufferMessage, IMessage

Reference documentation and code samples for the Cloud Private Catalog v1beta1 API class GitSource.

Defines how to access a Git Source.

## Inheritance

[object](https://learn.microsoft.com/dotnet/api/system.object) \> GitSource

## Implements

[IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.html)[GitSource](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.PrivateCatalog.V1Beta1/latest/Google.Cloud.PrivateCatalog.V1Beta1.GitSource), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[GitSource](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.PrivateCatalog.V1Beta1/latest/Google.Cloud.PrivateCatalog.V1Beta1.GitSource), [IDeepCloneable](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.html)[GitSource](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.PrivateCatalog.V1Beta1/latest/Google.Cloud.PrivateCatalog.V1Beta1.GitSource), [IBufferMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IBufferMessage.html), [IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage.html)

## Inherited Members

[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) [object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) [object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)

## Namespace

[Google.Cloud.PrivateCatalog.V1Beta1](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.PrivateCatalog.V1Beta1/latest/Google.Cloud.PrivateCatalog.V1Beta1)

## Assembly

Google.Cloud.PrivateCatalog.V1Beta1.dll

## Constructors

### GitSource()

    public GitSource()

### GitSource(GitSource)

    public GitSource(GitSource other)

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `other` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.PrivateCatalog.V1Beta1/latest/Google.Cloud.PrivateCatalog.V1Beta1.GitSource` |

## Properties

### Branch

    public string Branch { get; set; }

The revision branch to use.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.string` |   |

### Commit

    public string Commit { get; set; }

The revision commit to use.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.string` |   |

### Dir

    public string Dir { get; set; }

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.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.string` |   |

### HasBranch

    public bool HasBranch { get; }

Gets whether the "branch" field is set

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.boolean` |   |

### HasCommit

    public bool HasCommit { get; }

Gets whether the "commit" field is set

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.boolean` |   |

### HasTag

    public bool HasTag { get; }

Gets whether the "tag" field is set

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.boolean` |   |

### RefCase

    public GitSource.RefOneofCase RefCase { get; }

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.PrivateCatalog.V1Beta1/latest/Google.Cloud.PrivateCatalog.V1Beta1.GitSourcehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.PrivateCatalog.V1Beta1/latest/Google.Cloud.PrivateCatalog.V1Beta1.GitSource.RefOneofCase` |   |

### Repo

    public string Repo { get; set; }

Location of the Git repo to build.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.string` |   |

### Tag

    public string Tag { get; set; }

The revision tag to use.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.string` |   |