## Update Pipeline File

`PipelineFile pipelines().files().update(FileUpdateParamsparams, RequestOptionsrequestOptions = RequestOptions.none())`

**put** `/api/v1/pipelines/{pipeline_id}/files/{file_id}`

Update a file for a pipeline.

### Parameters

- `FileUpdateParams params`

  - `String pipelineId`

  - `Optional<String> fileId`

  - `Optional<CustomMetadata> customMetadata`

    Custom metadata for the file

    - `class UnionMember0:`

    - `List<JsonValue>`

    - `String`

    - `double`

    - `boolean`

### Returns

- `class PipelineFile:`

  A file associated with a pipeline.

  - `String id`

    Unique identifier for the pipeline file.

  - `String pipelineId`

    The ID of the pipeline that the file is associated with.

  - `Optional<ConfigHash> configHash`

    Hashes for the configuration of the pipeline.

    - `class UnionMember0:`

    - `List<JsonValue>`

    - `String`

    - `double`

    - `boolean`

  - `Optional<LocalDateTime> createdAt`

    When the pipeline file was created.

  - `Optional<CustomMetadata> customMetadata`

    Custom metadata for the file.

    - `class UnionMember0:`

    - `List<JsonValue>`

    - `String`

    - `double`

    - `boolean`

  - `Optional<String> dataSourceId`

    The ID of the data source that the file belongs to.

  - `Optional<String> externalFileId`

    The ID of the file in the external system.

  - `Optional<String> fileId`

    The ID of the file.

  - `Optional<Long> fileSize`

    Size of the file in bytes.

  - `Optional<String> fileType`

    File type (e.g. pdf, docx, etc.).

  - `Optional<Long> indexedPageCount`

    The number of pages that have been indexed for this file.

  - `Optional<LocalDateTime> lastModifiedAt`

    The last modified time of the file.

  - `Optional<String> name`

    Name of the file.

  - `Optional<PermissionInfo> permissionInfo`

    Permission information for the file.

    - `class UnionMember0:`

    - `List<JsonValue>`

    - `String`

    - `double`

    - `boolean`

  - `Optional<String> projectId`

    The ID of the project that the file belongs to.

  - `Optional<ResourceInfo> resourceInfo`

    Resource information for the file.

    - `class UnionMember0:`

    - `List<JsonValue>`

    - `String`

    - `double`

    - `boolean`

  - `Optional<Status> status`

    Status of the pipeline file.

    - `NOT_STARTED("NOT_STARTED")`

    - `IN_PROGRESS("IN_PROGRESS")`

    - `SUCCESS("SUCCESS")`

    - `ERROR("ERROR")`

    - `CANCELLED("CANCELLED")`

  - `Optional<LocalDateTime> statusUpdatedAt`

    The last time the status was updated.

  - `Optional<LocalDateTime> updatedAt`

    When the pipeline file was last updated.

### Example

```java
package com.llamacloud_prod.api.example;

import com.llamacloud_prod.api.client.LlamaCloudClient;
import com.llamacloud_prod.api.client.okhttp.LlamaCloudOkHttpClient;
import com.llamacloud_prod.api.models.pipelines.files.FileUpdateParams;
import com.llamacloud_prod.api.models.pipelines.files.PipelineFile;

public final class Main {
    private Main() {}

    public static void main(String[] args) {
        LlamaCloudClient client = LlamaCloudOkHttpClient.fromEnv();

        FileUpdateParams params = FileUpdateParams.builder()
            .pipelineId("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")
            .fileId("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")
            .build();
        PipelineFile pipelineFile = client.pipelines().files().update(params);
    }
}
```

#### Response

```json
{
  "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
  "pipeline_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
  "config_hash": {
    "foo": {
      "foo": "bar"
    }
  },
  "created_at": "2019-12-27T18:11:19.117Z",
  "custom_metadata": {
    "foo": {
      "foo": "bar"
    }
  },
  "data_source_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
  "external_file_id": "external_file_id",
  "file_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
  "file_size": 0,
  "file_type": "file_type",
  "indexed_page_count": 0,
  "last_modified_at": "2019-12-27T18:11:19.117Z",
  "name": "name",
  "permission_info": {
    "foo": {
      "foo": "bar"
    }
  },
  "project_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
  "resource_info": {
    "foo": {
      "foo": "bar"
    }
  },
  "status": "NOT_STARTED",
  "status_updated_at": "2019-12-27T18:11:19.117Z",
  "updated_at": "2019-12-27T18:11:19.117Z"
}
```
