anaplan-sdk 0.2.11__py3-none-any.whl → 0.3.1b1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
anaplan_sdk/models.py CHANGED
@@ -1,318 +1,329 @@
1
- from pydantic import BaseModel, Field, field_validator
1
+ from typing import Literal, TypeAlias
2
+
3
+ from pydantic import BaseModel, ConfigDict, Field, field_validator
4
+ from pydantic.alias_generators import to_camel
5
+
6
+ ExportTypes: TypeAlias = Literal[
7
+ "TABULAR_MULTI_COLUMN",
8
+ "TABULAR_SINGLE_COLUMN",
9
+ "GRID_CURRENT_PAGE",
10
+ "AUDIT_LOG",
11
+ "TABULAR_ALL_LINE_ITEMS",
12
+ "TABULAR_CURRENT_LINE_ITEM",
13
+ ]
14
+
15
+ ImportTypes: TypeAlias = Literal[
16
+ "MODULE_DATA", "HIERARCHY_DATA", "LINE_ITEM_DEFINITION", "USERS", "VERSIONS"
17
+ ]
2
18
 
3
19
 
4
20
  class Workspace(BaseModel):
5
- id: str
6
- """The unique identifier of this workspace."""
7
- name: str
8
- """The name of this workspace that is also displayed to the users. This can change any time."""
9
- active: bool
10
- """Whether this workspace is active or not."""
11
- size_allowance: int = Field(alias="sizeAllowance", ge=0)
12
- """The maximum allowed size of this workspace in bytes."""
13
- current_size: int = Field(alias="currentSize", ge=0)
14
- """The current size of this workspace in bytes."""
21
+ model_config = ConfigDict(alias_generator=to_camel, populate_by_name=True)
22
+ id: str = Field(description="The unique identifier of this workspace.")
23
+ name: str = Field(description="The name of this workspace that is also displayed to the users.")
24
+ active: bool = Field(description="Whether this workspace is active or not.")
25
+ size_allowance: int = Field(description="The maximum allowed size of this workspace in bytes.")
26
+ current_size: int = Field(description="The current size of this workspace in bytes.")
15
27
 
16
28
 
17
29
  class Model(BaseModel):
18
- id: str
19
- """The unique identifier of this model."""
30
+ model_config = ConfigDict(alias_generator=to_camel, populate_by_name=True)
31
+ id: str = Field(description="The unique identifier of this model.")
20
32
  name: str
21
- """The name of this model that is also displayed to the users. This can change any time."""
22
- active_state: str = Field(alias="activeState")
23
- """The current state of this model. One of "ARCHIVED", "UNLOCKED", "ACTIVE"."""
24
- last_saved_serial_number: int = Field(alias="lastSavedSerialNumber")
25
- """The serial number of the last save of this model."""
26
- last_modified_by_user_guid: str = Field(alias="lastModifiedByUserGuid")
27
- """The unique identifier of the user who last modified this model."""
28
- memory_usage: int | None = Field(None, alias="memoryUsage")
29
- """The memory usage of this model in bytes."""
30
- current_workspace_id: str = Field(alias="currentWorkspaceId")
31
- """The unique identifier of the workspace that this model is currently in."""
32
- current_workspace_name: str = Field(alias="currentWorkspaceName")
33
- """The name of the workspace that this model is currently in."""
34
- url: str = Field(alias="modelUrl")
35
- """The URL of this model."""
36
- category_values: list = Field(alias="categoryValues")
37
- """The category values of this model."""
38
- iso_creation_date: str = Field(alias="isoCreationDate")
39
- """The creation date of this model in ISO format."""
40
- last_modified: str = Field(alias="lastModified")
41
- """The last modified date of this model in ISO format."""
33
+ active_state: Literal["ARCHIVED", "UNLOCKED", "ACTIVE", "PRODUCTION"] = Field(
34
+ description="The current state of this model."
35
+ )
36
+ last_saved_serial_number: int = Field(
37
+ description="The serial number of the last save of this model."
38
+ )
39
+ last_modified_by_user_guid: str = Field(
40
+ description="The unique identifier of the user who last modified this model."
41
+ )
42
+ memory_usage: int = Field(0, description="The memory usage of this model in bytes.")
43
+ current_workspace_id: str = Field(
44
+ description="The unique identifier of the workspace that this model is currently in."
45
+ )
46
+ current_workspace_name: str = Field(
47
+ description="The name of the workspace that this model is currently in."
48
+ )
49
+ url: str = Field(validation_alias="modelUrl", description="The current URL of this model.")
50
+ category_values: list = Field(description="The category values of this model.")
51
+ iso_creation_date: str = Field(description="The creation date of this model in ISO format.")
52
+ last_modified: str = Field(description="The last modified date of this model.")
42
53
 
43
54
 
44
55
  class File(BaseModel):
45
- id: int
46
- """The unique identifier of this file."""
47
- name: str
48
- """The name of this file."""
49
- chunk_count: int = Field(alias="chunkCount")
50
- """The number of chunks this file is split into."""
51
- delimiter: str | None = Field(None)
52
- """The delimiter used in this file."""
53
- encoding: str | None = Field(None)
54
- """The encoding of this file."""
55
- first_data_row: int = Field(alias="firstDataRow")
56
- """The row number of the first data row in this file."""
57
- format: str | None = Field(None)
58
- """The format of this file."""
59
- header_row: int = Field(alias="headerRow")
60
- """The row number of the header row in this file."""
61
- separator: str | None = Field(None)
62
- """The separator used in this file."""
56
+ model_config = ConfigDict(alias_generator=to_camel, populate_by_name=True)
57
+ id: int = Field(description="The unique identifier of this file.")
58
+ name: str = Field(description="The name of this file.")
59
+ chunk_count: int = Field(description="The number of chunks this file is split into.")
60
+ delimiter: str | None = Field(None, description="The delimiter used in this file.")
61
+ encoding: str | None = Field(None, description="The encoding of this file.")
62
+ first_data_row: int = Field(description="The row number of the first data row in this file.")
63
+ format: str | None = Field(None, description="The format of this file.")
64
+ header_row: int = Field(description="The row number of the header row in this file.")
65
+ separator: str | None = Field(None, description="The separator used in this file.")
63
66
 
64
67
 
65
68
  class List(BaseModel):
66
- id: int
67
- """The unique identifier of this list."""
68
- name: str
69
- """The name of this list."""
69
+ id: int = Field(description="The unique identifier of this list.")
70
+ name: str = Field(description="The name of this list.")
70
71
 
71
72
 
72
73
  class ListMetadata(BaseModel):
73
- id: int
74
- """The unique identifier of this list."""
75
- name: str
76
- """The name of this list."""
77
- has_selective_access: bool = Field(alias="hasSelectiveAccess")
78
- """Whether this list has selective access or not."""
79
- properties: list = Field([])
80
- """The properties of this list."""
81
- production_data: bool = Field(alias="productionData")
82
- """Whether this list is production data or not."""
83
- managed_by: str = Field(alias="managedBy")
84
- """The user who manages this list."""
85
- numbered_list: bool = Field(alias="numberedList")
86
- """Whether this list is a numbered list or not."""
87
- use_top_level_as_page_default: bool = Field(alias="useTopLevelAsPageDefault")
88
- """Whether the top level is used as the page default or not."""
89
- item_count: int = Field(alias="itemCount")
90
- """The number of items in this list."""
91
- next_item_index: int | None = Field(None, alias="nextItemIndex")
92
- """The index of the next item in this list."""
93
- workflow_enabled: bool = Field(alias="workflowEnabled")
94
- """Whether the workflow is enabled for this list or not."""
95
- permitted_items: int = Field(alias="permittedItems")
96
- """The number of permitted items in this list."""
97
- used_in_applies_to: str | None = Field(None, alias="usedInAppliesTo")
98
- """The applies to value of this list."""
74
+ model_config = ConfigDict(alias_generator=to_camel, populate_by_name=True)
75
+ id: int = Field(description="The unique identifier of this list.")
76
+ name: str = Field(description="The name of this list.")
77
+ has_selective_access: bool = Field(description="Whether this list has selective access or not.")
78
+ properties: list = Field([], description="The properties of this list.")
79
+ production_data: bool = Field(description="Whether this list is production data or not.")
80
+ managed_by: str = Field(description="The user who manages this list.")
81
+ numbered_list: bool = Field(description="Whether this list is a numbered list or not.")
82
+ use_top_level_as_page_default: bool = Field(
83
+ description="Whether the top level is used as the page default or not."
84
+ )
85
+ item_count: int = Field(description="The number of items in this list.")
86
+ next_item_index: int | None = Field(
87
+ None, description="The index of the next item in this list."
88
+ )
89
+ workflow_enabled: bool = Field(
90
+ description="Whether the workflow is enabled for this list or not."
91
+ )
92
+ permitted_items: int = Field(description="The number of permitted items in this list.")
93
+ used_in_applies_to: str | None = Field(None, description="The applies to value of this list.")
99
94
 
100
95
 
101
- class ListItem(BaseModel):
102
- id: int
103
- """The unique identifier of this list item."""
104
- name: str
105
- """The name of this list item."""
106
- code: str | None = Field(None)
107
- """The code of this list item."""
108
- properties: dict = Field({})
109
- """The properties of this list item."""
110
- subsets: dict = Field({})
111
- """The subsets of this list item."""
112
- parent: str | None = Field(None)
113
- """The parent of this list item."""
114
- parent_id: str | None = Field(None, alias="parentId")
115
- """The unique identifier of the parent of this list item."""
96
+ class Action(BaseModel):
97
+ model_config = ConfigDict(populate_by_name=True)
98
+ id: int = Field(description="The unique identifier of this action.")
99
+ name: str = Field(
100
+ description="The name of this Action. This is the same as the one displayed in the Web UI."
101
+ )
102
+ type: str | None = Field(
103
+ None, validation_alias="actionType", description="The type of this action."
104
+ )
116
105
 
117
106
 
118
- class Action(BaseModel):
119
- id: int
120
- """The unique identifier of this action."""
121
- name: str
122
- """The name of this action."""
123
- type: str = Field(alias="actionType")
124
- """The type of this action."""
107
+ class ListItem(BaseModel):
108
+ model_config = ConfigDict(alias_generator=to_camel, populate_by_name=True)
109
+ id: int = Field(description="The unique identifier of this list item.")
110
+ name: str = Field(description="The name of this list item.")
111
+ code: str | None = Field(None, description="The code of this list item.")
112
+ properties: dict = Field({}, description="The properties of this list item.")
113
+ subsets: dict = Field({}, description="The subsets of this list item.")
114
+ parent: str | None = Field(None, description="The parent of this list item.")
115
+ parent_id: str | None = Field(
116
+ None, description="The unique identifier of the parent of this list item."
117
+ )
125
118
 
126
119
 
127
120
  class Process(BaseModel):
128
- id: int
129
- """The unique identifier of this process."""
130
- name: str
131
- """The name of this process."""
121
+ id: int = Field(description="The unique identifier of this process.")
122
+ name: str = Field(description="The name of this process.")
132
123
 
133
124
 
134
125
  class Import(BaseModel):
135
- id: int
136
- """The unique identifier of this import."""
137
- name: str
138
- """The name of this import."""
139
- type: str = Field(alias="importType")
140
- """The type of this import."""
141
- source_id: int | None = Field(None, alias="importDataSourceId")
142
- """The unique identifier of the data source of this import."""
126
+ id: int = Field(description="The unique identifier of this import.")
127
+ name: str = Field(description="The name of this import.")
128
+ type: ImportTypes = Field(validation_alias="importType", description="The type of this import.")
129
+ file_id: int | None = Field(
130
+ None,
131
+ validation_alias="importDataSourceId",
132
+ description=(
133
+ "The unique identifier of the data source of this import. If it is absent, it means "
134
+ "that the import is not a file import."
135
+ ),
136
+ )
143
137
 
144
138
  # noinspection PyNestedDecorators
145
- @field_validator("source_id", mode="before")
139
+ @field_validator("file_id", mode="before")
146
140
  @classmethod
147
141
  def _empty_source_is_none(cls, inp: str):
148
142
  return inp if inp else None
149
143
 
150
144
 
151
145
  class Export(BaseModel):
152
- id: int
153
- """The unique identifier of this export."""
154
- name: str
155
- """The name of this export."""
156
- type: str = Field(alias="exportType")
157
- """The type of this export."""
158
- format: str = Field(alias="exportFormat")
159
- """The format of this export."""
160
- encoding: str
161
- """The encoding of this export."""
162
- layout: str
163
- """The layout of this export. Will hold values such as `GRID_CURRENT_PAGE`
164
- and `TABULAR_ALL_LINE_ITEMS`, representing the Anaplan Export Structure.
165
- """
146
+ model_config = ConfigDict(populate_by_name=True)
147
+ id: int = Field(description="The unique identifier of this export.")
148
+ name: str = Field(description="The name of this export.")
149
+ type: ExportTypes = Field(validation_alias="exportType", description="The type of this export.")
150
+ format: str = Field(validation_alias="exportFormat", description="The format of this export.")
151
+ encoding: str | None = Field(None, description="The encoding of this export.")
152
+ layout: ExportTypes = Field(
153
+ description="The layout of this export, representing the Anaplan Export Structure."
154
+ )
166
155
 
167
156
 
168
157
  class Module(BaseModel):
169
- id: int
170
- """The unique identifier of this module."""
171
- name: str
172
- """The name of this module."""
158
+ id: int = Field(description="The unique identifier of this module.")
159
+ name: str = Field(description="The name of this module.")
173
160
 
174
161
 
175
162
  class ModelStatus(BaseModel):
176
- peak_memory_usage_estimate: int | None = Field(alias="peakMemoryUsageEstimate")
177
- """The peak memory usage estimate of this model."""
178
- peak_memory_usage_time: int | None = Field(alias="peakMemoryUsageTime")
179
- """The peak memory usage time of this model."""
180
- progress: float
181
- """The progress of this model."""
182
- current_step: str = Field(alias="currentStep")
183
- """The current step of this model."""
184
- tooltip: str | None
185
- """The tooltip of this model."""
186
- task_id: str | None = Field(alias="taskId")
187
- """The unique identifier of the task of this model."""
188
- creation_time: int = Field(alias="creationTime")
189
- """The creation time of this model."""
190
- export_task_type: str | None = Field(alias="exportTaskType")
191
- """The export task type of this model."""
163
+ model_config = ConfigDict(alias_generator=to_camel, populate_by_name=True)
164
+ peak_memory_usage_estimate: int | None = Field(
165
+ description="The peak memory usage estimate of this model."
166
+ )
167
+ peak_memory_usage_time: int | None = Field(
168
+ description="The peak memory usage time of this model."
169
+ )
170
+ progress: float = Field(description="The progress of this model.")
171
+ current_step: str = Field(description="The current step of this model.")
172
+ tooltip: str | None = Field(description="The tooltip of this model.")
173
+ task_id: str | None = Field(description="The unique identifier of the task of this model.")
174
+ creation_time: int = Field(description="The creation time of this model.")
175
+ export_task_type: str | None = Field(description="The export task type of this model.")
192
176
 
193
177
 
194
178
  class LineItem(BaseModel):
195
- id: int
196
- """The unique identifier of this line item."""
197
- name: str
198
- """The name of this line item."""
199
- module_id: int = Field(alias="moduleId")
200
- """The unique identifier of the module this line item belongs to."""
201
- module_name: str = Field(alias="moduleName")
202
- """The name of the module this line item belongs to."""
203
- format: str
204
- """The format of this line item."""
205
- format_metadata: dict = Field(alias="formatMetadata")
206
- """The format metadata of this line item."""
207
- summary: str
208
- """The summary of this line item."""
209
- applies_to: list[dict] = Field([], alias="appliesTo")
210
- """The applies to value of this line item."""
211
- time_scale: str = Field(alias="timeScale")
212
- """The time scale of this line item."""
213
- time_range: str = Field(alias="timeRange")
214
- """The time range of this line item."""
215
- version: dict
216
- """The version of this line item."""
217
- style: str
218
- """The style of this line item."""
219
- cell_count: int | None = Field(None, alias="cellCount")
220
- """The cell count of this line item."""
221
- notes: str
222
- """The notes of this line item."""
223
- is_summary: bool = Field(alias="isSummary")
224
- """Whether this line item is a summary or not."""
225
- formula: str | None = Field(None)
226
- """The formula of this line item."""
227
- formula_scope: str = Field(alias="formulaScope")
228
- """The formula scope of this line item."""
229
- use_switchover: bool = Field(alias="useSwitchover")
230
- """Whether the switchover is used or not."""
231
- breakback: bool
232
- """Whether the breakback is enabled or not."""
233
- brought_forward: bool = Field(alias="broughtForward")
234
- """Whether the brought forward is enabled or not."""
235
- start_of_section: bool = Field(alias="startOfSection")
236
- """Whether this line item is the start of a section or not."""
179
+ model_config = ConfigDict(alias_generator=to_camel, populate_by_name=True)
180
+ id: int = Field(description="The unique identifier of this line item.")
181
+ name: str = Field(description="The name of this line item.")
182
+ module_id: int = Field(
183
+ description="The unique identifier of the module this line item belongs to."
184
+ )
185
+ module_name: str = Field(description="The name of the module this line item belongs to.")
186
+ format: str = Field(description="The format of this line item.")
187
+ format_metadata: dict = Field(description="The format metadata of this line item.")
188
+ summary: str = Field(description="The summary of this line item.")
189
+ applies_to: list[dict] = Field([], description="The applies to value of this line item.")
190
+ time_scale: str = Field(description="The time scale of this line item.")
191
+ time_range: str = Field(description="The time range of this line item.")
192
+ version: dict = Field(description="The version of this line item.")
193
+ style: str = Field(description="The style of this line item.")
194
+ cell_count: int | None = Field(None, description="The cell count of this line item.")
195
+ notes: str = Field(description="The notes of this line item.")
196
+ is_summary: bool = Field(description="Whether this line item is a summary or not.")
197
+ formula: str | None = Field(None, description="The formula of this line item.")
198
+ formula_scope: str = Field(description="The formula scope of this line item.")
199
+ use_switchover: bool = Field(description="Whether the switchover is used or not.")
200
+ breakback: bool = Field(description="Whether the breakback is enabled or not.")
201
+ brought_forward: bool = Field(description="Whether the brought forward is enabled or not.")
202
+ start_of_section: bool = Field(
203
+ description="Whether this line item is the start of a section or not."
204
+ )
237
205
 
238
206
 
239
207
  class Failure(BaseModel):
240
- index: int = Field(alias="requestIndex")
241
- """The index of the item that failed."""
242
- reason: str = Field(alias="failureType")
243
- """The reason for the failure."""
244
- details: str = Field(alias="failureMessageDetails")
245
- """The details of the failure."""
208
+ model_config = ConfigDict(populate_by_name=True)
209
+ index: int = Field(
210
+ validation_alias="requestIndex", description="The index of the item that failed."
211
+ )
212
+ reason: str = Field(validation_alias="failureType", description="The reason for the failure.")
213
+ details: str = Field(
214
+ validation_alias="failureMessageDetails", description="The details of the failure."
215
+ )
246
216
 
247
217
 
248
218
  class InsertionResult(BaseModel):
249
- added: int
250
- """The number of items successfully added."""
251
- ignored: int
252
- """The number of items ignored, or items that failed."""
253
- total: int
254
- """The total number of items."""
255
- failures: list[Failure] = Field([])
256
- """The list of failures."""
219
+ added: int = Field(description="The number of items successfully added.")
220
+ ignored: int = Field(description="The number of items ignored, or items that failed.")
221
+ total: int = Field(description="The total number of items.")
222
+ failures: list[Failure] = Field([], description="The list of failures.")
257
223
 
258
224
 
259
225
  class Revision(BaseModel):
260
- id: str
261
- """The unique identifier of this revision."""
262
- name: str
263
- """The name of this revision."""
264
- description: str | None = Field(None)
265
- """The description of this revision. Not always present."""
266
- created_on: str = Field(alias="createdOn")
267
- """The creation date of this revision in ISO format."""
268
- created_by: str = Field(alias="createdBy")
269
- """The unique identifier of the user who created this revision."""
270
- creation_method: str = Field(alias="creationMethod")
271
- """The creation method of this revision."""
272
- applied_on: str = Field(alias="appliedOn")
273
- """The application date of this revision in ISO format."""
274
- applied_by: str = Field(alias="appliedBy")
275
- """The unique identifier of the user who applied this revision."""
226
+ model_config = ConfigDict(alias_generator=to_camel, populate_by_name=True)
227
+ id: str = Field(description="The unique identifier of this revision.")
228
+ name: str = Field(description="The name of this revision.")
229
+ description: str | None = Field(
230
+ None, description="The description of this revision. Not always present."
231
+ )
232
+ created_on: str = Field(description="The creation date of this revision in ISO format.")
233
+ created_by: str = Field(
234
+ description="The unique identifier of the user who created this revision."
235
+ )
236
+ creation_method: str = Field(description="The creation method of this revision.")
237
+ applied_on: str = Field(description="The application date of this revision in ISO format.")
238
+ applied_by: str = Field(
239
+ description="The unique identifier of the user who applied this revision."
240
+ )
276
241
 
277
242
 
278
243
  class ModelRevision(BaseModel):
279
- id: str = Field(alias="modelId")
280
- """The unique identifier of the model this revision belongs to."""
281
- name: str = Field(alias="modelName")
282
- """The name of the model this revision belongs to."""
283
- workspace_id: str = Field(alias="workspaceId")
284
- """The unique identifier of the workspace this revision belongs to."""
285
- applied_by: str = Field(alias="appliedBy")
286
- """The unique identifier of the user who applied this revision."""
287
- applied_on: str = Field(alias="appliedOn")
288
- """The application date of this revision in ISO format."""
289
- applied_method: str = Field(alias="appliedMethod")
290
- """The application method of this revision."""
291
- deleted: bool | None = Field(None, alias="modelDeleted")
292
- """Whether the model has been deleted or not."""
244
+ model_config = ConfigDict(alias_generator=to_camel, populate_by_name=True)
245
+ id: str = Field(
246
+ validation_alias="modelId",
247
+ description="The unique identifier of the model this revision belongs to.",
248
+ )
249
+ name: str = Field(
250
+ validation_alias="modelName", description="The name of the model this revision belongs to."
251
+ )
252
+ workspace_id: str = Field(
253
+ description="The unique identifier of the workspace this revision belongs to."
254
+ )
255
+ applied_by: str = Field(
256
+ description="The unique identifier of the user who applied this revision."
257
+ )
258
+ applied_on: str = Field(description="The application date of this revision in ISO format.")
259
+ applied_method: str = Field(description="The application method of this revision.")
260
+ deleted: bool | None = Field(
261
+ None,
262
+ validation_alias="modelDeleted",
263
+ description="Whether the model has been deleted or not.",
264
+ )
293
265
 
294
266
 
295
267
  class SyncTask(BaseModel):
296
- task_id: str = Field(alias="taskId")
297
- """The unique identifier of this task."""
298
- task_state: str = Field(alias="taskState")
299
- """The state of this task."""
300
- creation_time: int = Field(alias="creationTime")
301
- """The creation time of this task."""
268
+ model_config = ConfigDict(alias_generator=to_camel, populate_by_name=True)
269
+ id: str = Field(validation_alias="taskId", description="The unique identifier of this task.")
270
+ task_state: str = Field(description="The state of this task.")
271
+ creation_time: int = Field(description="The creation time of this task.")
302
272
 
303
273
 
304
274
  class User(BaseModel):
305
- id: str
306
- """The unique identifier of this user."""
307
- active: bool
308
- """Whether this user is active or not."""
309
- email: str
310
- """The email address of this user."""
311
- email_opt_in: bool = Field(alias="emailOptIn")
312
- """Whether this user has opted in to receive emails or not."""
313
- first_name: str = Field(alias="firstName")
314
- """The first name of this user."""
315
- last_name: str = Field(alias="lastName")
316
- """The last name of this user."""
317
- last_login_date: str | None = Field(None, alias="lastLoginDate")
318
- """The last login date of this user in ISO format."""
275
+ model_config = ConfigDict(alias_generator=to_camel, populate_by_name=True)
276
+ id: str = Field(description="The unique identifier of this user.")
277
+ active: bool = Field(description="Whether this user is active or not.")
278
+ email: str = Field(description="The email address of this user.")
279
+ email_opt_in: bool = Field(
280
+ description="Whether this user has opted in to receive emails or not."
281
+ )
282
+ first_name: str = Field(description="The first name of this user.")
283
+ last_name: str = Field(description="The last name of this user.")
284
+ last_login_date: str | None = Field(
285
+ None, description="The last login date of this user in ISO format."
286
+ )
287
+
288
+
289
+ class TaskSummary(BaseModel):
290
+ model_config = ConfigDict(alias_generator=to_camel, populate_by_name=True)
291
+ id: str = Field(validation_alias="taskId", description="The unique identifier of this task.")
292
+ task_state: Literal["NOT_STARTED", "IN_PROGRESS", "COMPLETE"] = Field(
293
+ description="The state of this task."
294
+ )
295
+ creation_time: int = Field(description="Unix timestamp of when this task was created.")
296
+
297
+
298
+ class TaskResultDetail(BaseModel):
299
+ model_config = ConfigDict(alias_generator=to_camel, populate_by_name=True)
300
+ local_message_text: str = Field(description="Error message text.")
301
+ occurrences: int = Field(0, description="The number of occurrences of this error.")
302
+ type: str = Field(description="The type of this error.")
303
+ values: list[str] = Field([], description="Further error information if available.")
304
+
305
+
306
+ class TaskResult(BaseModel):
307
+ model_config = ConfigDict(alias_generator=to_camel, populate_by_name=True)
308
+ details: list[TaskResultDetail] = Field(
309
+ [], description="The details of this task result if available."
310
+ )
311
+ successful: bool = Field(description="Whether this task completed successfully or not.")
312
+ failure_dump_available: bool = Field(
313
+ description="Whether this task completed successfully or not."
314
+ )
315
+ nested_results: list["TaskResult"] = Field(
316
+ [], description="The nested results of this task, if available."
317
+ )
318
+
319
+
320
+ class TaskStatus(BaseModel):
321
+ model_config = ConfigDict(alias_generator=to_camel, populate_by_name=True)
322
+ id: str = Field(validation_alias="taskId", description="The unique identifier of this task.")
323
+ task_state: Literal["NOT_STARTED", "IN_PROGRESS", "COMPLETE"] = Field(
324
+ description="The state of this task."
325
+ )
326
+ creation_time: int = Field(description="Unix timestamp of when this task was created.")
327
+ progress: float = Field(description="The progress of this task as a float between 0 and 1.")
328
+ current_step: str | None = Field(None, description="The current step of this task.")
329
+ result: TaskResult | None = Field(None)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: anaplan-sdk
3
- Version: 0.2.11
3
+ Version: 0.3.1b1
4
4
  Summary: Provides pythonic access to the Anaplan API
5
5
  Project-URL: Homepage, https://vinzenzklass.github.io/anaplan-sdk/
6
6
  Project-URL: Repository, https://github.com/VinzenzKlass/anaplan-sdk
@@ -38,7 +38,7 @@ implementation details like authentication, error handling, chunking, compressio
38
38
  This Projects supports
39
39
  the [Bulk APIs](https://help.anaplan.com/use-the-bulk-apis-93218e5e-00e5-406e-8361-09ab861889a7),
40
40
  the [Transactional APIs](https://help.anaplan.com/use-the-transactional-apis-cc1c1e91-39fc-4272-a4b5-16bc91e9c313) and
41
- the [ALM APsI](https://help.anaplan.com/application-lifecycle-management-api-2565cfa6-e0c2-4e24-884e-d0df957184d6),
41
+ the [ALM APIs](https://help.anaplan.com/application-lifecycle-management-api-2565cfa6-e0c2-4e24-884e-d0df957184d6),
42
42
  the [Audit APIs](https://auditservice.docs.apiary.io/#),
43
43
  providing both synchronous and asynchronous Clients.
44
44