Data Models¶
This section contains all the Pydantic models used to serialize and deserialize requests and responses to the EOSC Data Transfer API.
FileTransfer
¶
Bases: BaseModel
Represents the details of a file transfer.
Attributes:
Name | Type | Description |
---|---|---|
sources |
List[str]
|
List of source file paths. |
destinations |
List[str]
|
List of destination file paths. |
checksum |
str
|
Checksum of the file to verify integrity. |
filesize |
int
|
Size of the file in bytes. |
activity |
Optional[str]
|
Activity associated with the transfer (default: 'default'). |
Source code in eosc_data_transfer_client/models.py
34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 |
|
StorageContent
¶
Bases: BaseModel
Represents the parsed content result of a DOI, including a list of downloadable elements.
Attributes:
Name | Type | Description |
---|---|---|
kind |
str
|
The type of content (should be 'StorageContent'). |
count |
int
|
Number of elements parsed. |
elements |
List[StorageElement]
|
List of parsed file or folder items. |
Source code in eosc_data_transfer_client/models.py
156 157 158 159 160 161 162 163 164 165 166 167 |
|
StorageElement
¶
Bases: BaseModel
Represents a single file or folder item parsed from a DOI.
Attributes:
Name | Type | Description |
---|---|---|
kind |
str
|
The type of content (should be 'StorageElement'). |
name |
str
|
Name of the file. |
path |
str
|
Path to the file. |
isFolder |
bool
|
Whether the storage element corresponds to a folder. |
isAccessible |
bool
|
Whether the storage element is publicly accessible. |
mediaType |
str
|
The storage element media type. |
accessUrl |
str
|
The url to access the storage element. |
downloadUrl |
str
|
The url to download the storage element. |
checksum |
str
|
The checksum of the storage element. |
Source code in eosc_data_transfer_client/models.py
130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 |
|
TransferParameters
¶
Bases: BaseModel
Defines optional parameters to control the behavior of a transfer job.
Attributes:
Name | Type | Description |
---|---|---|
verifyChecksum |
Optional[bool]
|
Whether to verify the checksum of the destination file. |
overwrite |
Optional[bool]
|
Whether to overwrite the destination file if it already exists. |
retry |
Optional[int]
|
Number of times a failed transfer should be retried. |
priority |
Optional[int]
|
The priority level of the transfer. |
Source code in eosc_data_transfer_client/models.py
19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
|
TransferRequest
¶
Bases: BaseModel
Represents a request to initiate a transfer job.
Attributes:
Name | Type | Description |
---|---|---|
files |
List[FileTransfer]
|
List of file transfers to be executed. |
params |
TransferParameters
|
Parameters controlling the behavior of the transfer job. |
Source code in eosc_data_transfer_client/models.py
52 53 54 55 56 57 58 59 60 61 |
|
TransferResponse
¶
Bases: BaseModel
Represents the response received after initiating a transfer job.
Attributes:
Name | Type | Description |
---|---|---|
kind |
str
|
The kind of transfer job. |
jobId |
str
|
The unique job ID for the transfer. |
Source code in eosc_data_transfer_client/models.py
63 64 65 66 67 68 69 70 71 72 |
|
TransferStatus
¶
Bases: BaseModel
Represents the status of an ongoing or completed transfer job.
Attributes:
Name | Type | Description |
---|---|---|
kind |
str
|
The kind of transfer job. |
jobId |
str
|
The unique job ID for the transfer. |
source_se |
str
|
The source storage element. |
destination_se |
Optional[str]
|
The destination storage element (if any). |
jobState |
str
|
The state of the job (e.g., 'completed', 'in-progress'). |
verifyChecksum |
str
|
Whether checksum verification is enabled. |
overwrite |
Optional[bool]
|
Whether overwriting is allowed. |
priority |
int
|
Priority of the transfer. |
retry |
int
|
Retry count. |
retryDelay |
int
|
Retry delay time. |
cancel |
bool
|
Whether the job has been canceled. |
submittedAt |
datetime
|
Timestamp when the job was submitted. |
submittedTo |
str
|
The system to which the job was submitted. |
finishedAt |
Optional[datetime]
|
Timestamp when the job finished. |
reason |
Optional[str]
|
The error reason (if any). |
vo_name |
str
|
The VO name associated with the transfer. |
user_dn |
str
|
The user distinguished name. |
cred_id |
str
|
The credential ID. |
Source code in eosc_data_transfer_client/models.py
74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 |
|
TransferStatusList
¶
Bases: BaseModel
Represents a list of transfer statuses.
Attributes:
Name | Type | Description |
---|---|---|
kind |
str
|
The kind of transfer status list. |
count |
int
|
The number of transfers in the list. |
transfers |
List[TransferStatus]
|
List of individual transfer statuses. |
Source code in eosc_data_transfer_client/models.py
117 118 119 120 121 122 123 124 125 126 127 128 |
|
UserInfo
¶
Bases: BaseModel
Represents information about the current user, retrieved from the /userinfo endpoint.
Fields vary depending on authentication status.
Attributes:
Name | Type | Description |
---|---|---|
kind |
str
|
The type of content (should be 'UserInfo'). |
base_id |
base_id
|
The id that identifies the user. |
user_dn |
str
|
The user distinguished name (DN) |
delegation_id |
str
|
The delegation id used in the FTS service. |
vos |
Optional[List[str]]
|
The list containing the vos the user belongs to. |
vos_id |
Optional[List[str]]
|
The ids of the vos the user belongs to. |
voms_cred |
Optional[List[str]]
|
The list of vo groups the user belongs to. |
Source code in eosc_data_transfer_client/models.py
169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 |
|