# Grafeas V1 Client - Class Source (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 Source.

Source describes the location of the source used for the build.

Generated from protobuf message `grafeas.v1.Source`

## Namespace

Grafeas \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ artifact_storage_source_uri` | `string` If provided, the input binary artifacts for the build came from this location. |
| `↳ file_hashes` | `array|https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Internal/MapField` Hash(es) of the build source, which can be used to verify that the original source integrity was maintained in the build. The keys to this map are file paths used as build source and the values contain the hash values for those files. If the build source came in a single package such as a gzipped tarfile (.tar.gz), the FileHash will be for the single path to that file. |
| `↳ context` | `https://docs.cloud.google.com/php/docs/reference/grafeas/latest/V1.SourceContext` If provided, the source code used for the build came from this location. |
| `↳ additional_contexts` | `array<https://docs.cloud.google.com/php/docs/reference/grafeas/latest/V1.SourceContext>` If provided, some of the source code used for the build may be found in these locations, in the case where the source repository had multiple remotes or submodules. This list will not include the context specified in the context field. |

### getArtifactStorageSourceUri

If provided, the input binary artifacts for the build came from this
location.

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

### setArtifactStorageSourceUri

If provided, the input binary artifacts for the build came from this
location.

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

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

### getFileHashes

Hash(es) of the build source, which can be used to verify that the original
source integrity was maintained in the build.

The keys to this map are file paths used as build source and the values
contain the hash values for those files.
If the build source came in a single package such as a gzipped tarfile
(.tar.gz), the FileHash will be for the single path to that file.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Internal/MapField` |   |

### setFileHashes

Hash(es) of the build source, which can be used to verify that the original
source integrity was maintained in the build.

The keys to this map are file paths used as build source and the values
contain the hash values for those files.
If the build source came in a single package such as a gzipped tarfile
(.tar.gz), the FileHash will be for the single path to that file.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `array|https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Internal/MapField` |

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

### getContext

If provided, the source code used for the build came from this location.

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

### hasContext

### clearContext

### setContext

If provided, the source code used for the build came from this location.

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

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

### getAdditionalContexts

If provided, some of the source code used for the build may be found in
these locations, in the case where the source repository had multiple
remotes or submodules. This list will not include the context specified in
the context field.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<https://docs.cloud.google.com/php/docs/reference/grafeas/latest/V1.SourceContext>` |   |

### setAdditionalContexts

If provided, some of the source code used for the build may be found in
these locations, in the case where the source repository had multiple
remotes or submodules. This list will not include the context specified in
the context field.

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

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