# DownloadObject

Required Frends version: 5.5+

Required .NET version: 6.0

Compatible Agents: Crossplatform

Source code: <https://github.com/FrendsPlatform/Frends.GoogleCloudStorage/tree/main/Frends.GoogleCloudStorage.DownloadObject>

{% tabs %}
{% tab title="Parameter: Input" %}

| Name                          | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| ----------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| ProjectId : `String`          | <p>Id of the project.</p><p><br>Default: <code>your - project - id</code><br>Example: <code>your - project - id</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| BucketName : `String`         | <p>Name of the bucket.</p><p><br>Default: <code>your-unique-bucket-name</code><br>Example: <code>your-unique-bucket-name</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| Directory : `String`          | <p>Destination directory for the downloaded files.</p><p><br>Default: <code>-</code><br>Example: <code>c:\folder\</code></code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| Pattern : `String`            | <p>File mask for the source files.</p><p><br>Default: <code>-</code><br>Example: <code>\*.txt</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| ContentType : `String`        | <p>Content to be uploaded to the Google Cloud Storage.</p><p><br>Default: <code>-</code><br>Example: <code>text/plain</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| CredentialJson : `String`     | <p>Google Credentials in JSON format.</p><p><br>Default: <code>-</code><br>Example: <code>{ "type": "service\_account", "project\_id": "instant-test-stone-387712", "private\_key\_id": "17d0g1b5a6e255c0ed67ef7213j8466c336edc55", "private\_key": "-----BEGIN PRIVATE KEY-----\jnejbUHBVudhcebuheuwhv....\n-----END PRIVATE KEY-----\n", "client\_email": "<cloudstorage-testuser@instant-stone-387712.iam.gserviceaccount.com>", "client\_id": "vjkornijvnerijvneri", "auth\_uri": "<https://accounts.google.com/o/oauth2/auth>", "token\_uri": "<https://oauth2.googleapis.com/token>", "auth\_provider\_x509\_cert\_url": "<https://www.googleapis.com/oauth2/v1/certs>", "client\_x509\_cert\_url": "<https://www.googleapis.com/robot/v1/metadata/x509/cloudstorage-testuser%40instant-stone-387712.iam.gserviceaccount.com>", "universe\_domain": "googleapis.com" }</code></p> |
| CredentialFilePath : `String` | <p>Full path to the json file which has credentials for Google.</p><p><br>Default: <code>-</code><br>Example: <code>C:\folder\google\_credentials.json</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| {% endtab %}                  |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |

{% tab title="Result: List<Result>" %}

| Name               | Description |
| ------------------ | ----------- |
| Capacity : `Int32` |             |
| Count : `Int32`    |             |
| Item : `Result`    |             |
| {% endtab %}       |             |

{% tab title="Changelog" %}

## Changelog

### \[1.1.0] - 2025-06-18

#### Removed

* Eliminated the `ListBuckets` call used only for error handling. The bucket name is now passed directly to `FindMatchingFiles`.

#### Fixed

* Access-policy failure when the `storage.buckets.list` permission is missing.

### \[1.0.0] - 2023-06-12

#### Added

* Initial implementation
  {% endtab %}
  {% endtabs %}
