2.22.0 (latest) 2.21.0 2.20.0 2.19.0 2.18.0 2.17.0 2.16.0 2.15.0 2.14.0 2.13.0 2.12.0 2.11.0 2.10.0 2.9.0 2.8.0 2.7.0 2.6.0 2.5.0 2.4.0 2.3.0 2.2.0 2.1.0 2.0.0 1.4.0 1.3.0 1.2.0 1.1.0 1.0.0

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

Reference documentation and code samples for the Cloud Build v1 API class GitFileSource.

GitFileSource describes a file within a (possibly remote) code repository.

## Inheritance

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

## Implements

[IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.html)[GitFileSource](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CloudBuild.V1/latest/Google.Cloud.CloudBuild.V1.GitFileSource), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[GitFileSource](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CloudBuild.V1/latest/Google.Cloud.CloudBuild.V1.GitFileSource), [IDeepCloneable](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.html)[GitFileSource](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CloudBuild.V1/latest/Google.Cloud.CloudBuild.V1.GitFileSource), [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.CloudBuild.V1](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CloudBuild.V1/latest/Google.Cloud.CloudBuild.V1)

## Assembly

Google.Cloud.CloudBuild.V1.dll

## Constructors

### GitFileSource()

    public GitFileSource()

### GitFileSource(GitFileSource)

    public GitFileSource(GitFileSource other)

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `other` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CloudBuild.V1/latest/Google.Cloud.CloudBuild.V1.GitFileSource` |

## Properties

### EnterpriseConfigCase

    public GitFileSource.EnterpriseConfigOneofCase EnterpriseConfigCase { get; }

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CloudBuild.V1/latest/Google.Cloud.CloudBuild.V1.GitFileSourcehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CloudBuild.V1/latest/Google.Cloud.CloudBuild.V1.GitFileSource.EnterpriseConfigOneofCase` |   |

### GithubEnterpriseConfig

    public string GithubEnterpriseConfig { get; set; }

The full resource name of the github enterprise config.
Format:
`projects/{project}/locations/{location}/githubEnterpriseConfigs/{id}`.
`projects/{project}/githubEnterpriseConfigs/{id}`.

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

### GithubEnterpriseConfigAsGithubEnterpriseConfigName

    public GithubEnterpriseConfigName GithubEnterpriseConfigAsGithubEnterpriseConfigName { get; set; }

[GithubEnterpriseConfigName](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CloudBuild.V1/latest/Google.Cloud.CloudBuild.V1.GithubEnterpriseConfigName)-typed view over the [GithubEnterpriseConfig](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CloudBuild.V1/latest/Google.Cloud.CloudBuild.V1.GitFileSource#Google_Cloud_CloudBuild_V1_GitFileSource_GithubEnterpriseConfig) resource
name property.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CloudBuild.V1/latest/Google.Cloud.CloudBuild.V1.GithubEnterpriseConfigName` |   |

### HasGithubEnterpriseConfig

    public bool HasGithubEnterpriseConfig { get; }

Gets whether the "github_enterprise_config" field is set

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

### HasRepository

    public bool HasRepository { get; }

Gets whether the "repository" field is set

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

### Path

    public string Path { get; set; }

The path of the file, with the repo root as the root of the path.

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

### RepoType

    public GitFileSource.Types.RepoType RepoType { get; set; }

See RepoType above.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CloudBuild.V1/latest/Google.Cloud.CloudBuild.V1.GitFileSourcehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CloudBuild.V1/latest/Google.Cloud.CloudBuild.V1.GitFileSource.Typeshttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CloudBuild.V1/latest/Google.Cloud.CloudBuild.V1.GitFileSource.Types.RepoType` |   |

### Repository

    public string Repository { get; set; }

The fully qualified resource name of the Repos API repository.
Either URI or repository can be specified.
If unspecified, the repo from which the trigger invocation originated is
assumed to be the repo from which to read the specified path.

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

### RepositoryAsRepositoryName

    public RepositoryName RepositoryAsRepositoryName { get; set; }

[RepositoryName](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CloudBuild.V1/latest/Google.Cloud.CloudBuild.V1.RepositoryName)-typed view over the [Repository](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CloudBuild.V1/latest/Google.Cloud.CloudBuild.V1.GitFileSource#Google_Cloud_CloudBuild_V1_GitFileSource_Repository) resource name property.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CloudBuild.V1/latest/Google.Cloud.CloudBuild.V1.RepositoryName` |   |

### Revision

    public string Revision { get; set; }

The branch, tag, arbitrary ref, or SHA version of the repo to use when
resolving the filename (optional).
This field respects the same syntax/resolution as described here:
<https://git-scm.com/docs/gitrevisions>
If unspecified, the revision from which the trigger invocation originated
is assumed to be the revision from which to read the specified path.

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

### SourceCase

    public GitFileSource.SourceOneofCase SourceCase { get; }

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CloudBuild.V1/latest/Google.Cloud.CloudBuild.V1.GitFileSourcehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CloudBuild.V1/latest/Google.Cloud.CloudBuild.V1.GitFileSource.SourceOneofCase` |   |

### Uri

    public string Uri { get; set; }

The URI of the repo.
Either uri or repository can be specified.
If unspecified, the repo from which the trigger invocation originated is
assumed to be the repo from which to read the specified path.

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