ooxmlsdk 0.5.0

Open XML SDK for Rust
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
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
116
117
118
119
120
121
122
123
124
125
126
127
128
129
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
155
156
157
158
159
160
161
162
163
164
165
166
167
168
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
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
//
// -----------------------------------------------------------------------------
//  THIS FILE WAS @generated AUTOMATICALLY. DO NOT MODIFY THIS FILE MANUALLY.
// -----------------------------------------------------------------------------
//

/// Defines the Tasks Class.
///
/// Available in Office2021 and above.
///
/// When the object is serialized out as xml, it's qualified name is t:Tasks.
#[derive(Clone, Debug, Default, PartialEq, ooxmlsdk_derive::SdkType)]
#[sdk(qname = "t:CT_Tasks/t:Tasks")]
pub struct Tasks {
  pub xmlns: Vec<crate::common::XmlNamespaceDecl>,
  pub xml_header: crate::common::XmlHeaderType,
  pub mc_ignorable: Option<String>,
  /// _
  #[sdk(child(qname = "t:CT_Task/t:Task"))]
  pub t_task: Vec<Task>,
  /// _
  #[sdk(child(qname = "oel:CT_ExtensionList/t:extLst"))]
  pub t_ext_lst: Option<ExtensionList>,
}
/// Defines the Task Class.
///
/// Available in Office2021 and above.
///
/// When the object is serialized out as xml, it's qualified name is t:Task.
#[derive(Clone, Debug, Default, PartialEq, ooxmlsdk_derive::SdkType)]
#[sdk(qname = "t:CT_Task/t:Task")]
pub struct Task {
  /// id
  ///
  /// Available in Office2021 and above.
  ///
  /// Represents the following attribute in the schema: :id
  #[sdk(attr(qname = ":id"))]
  #[sdk(pattern(
    source = 1u32,
    regex = "\\{[0-9A-F]{8}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{12}\\}"
  ))]
  #[sdk(string_format(source = 1u32, kind = "token"))]
  pub id: crate::simple_type::StringValue,
  /// _
  #[sdk(child(qname = "t:CT_TaskAnchor/t:Anchor"))]
  pub task_anchor: Option<std::boxed::Box<TaskAnchor>>,
  /// _
  #[sdk(child(qname = "t:CT_TaskHistory/t:History"))]
  pub task_history: Option<TaskHistory>,
  /// _
  #[sdk(child(qname = "oel:CT_ExtensionList/t:extLst"))]
  pub extension_list: Option<ExtensionList>,
}
/// Defines the ExtensionList Class.
///
/// Available in Office2021 and above.
///
/// When the object is serialized out as xml, it's qualified name is t:extLst.
#[derive(Clone, Debug, Default, PartialEq, ooxmlsdk_derive::SdkType)]
#[sdk(qname = "oel:CT_ExtensionList/t:extLst")]
pub struct ExtensionList {
  /// _
  #[sdk(child(qname = "oel:CT_Extension/oel:ext"))]
  pub oel_ext: Vec<crate::schemas::schemas_microsoft_com_office_2019_extlst::Extension>,
}
/// Defines the TaskAnchor Class.
///
/// Available in Office2021 and above.
///
/// When the object is serialized out as xml, it's qualified name is t:Anchor.
#[derive(Clone, Debug, Default, PartialEq, ooxmlsdk_derive::SdkType)]
#[sdk(qname = "t:CT_TaskAnchor/t:Anchor")]
pub struct TaskAnchor {
  /// _
  #[sdk(child(qname = "t:CT_CommentAnchor/t:Comment"))]
  pub comment_anchor: Option<CommentAnchor>,
  /// _
  #[sdk(child(qname = "oel:CT_ExtensionList/t:extLst"))]
  pub extension_list: Option<ExtensionList>,
}
/// Defines the TaskHistory Class.
///
/// Available in Office2021 and above.
///
/// When the object is serialized out as xml, it's qualified name is t:History.
#[derive(Clone, Debug, Default, PartialEq, ooxmlsdk_derive::SdkType)]
#[sdk(qname = "t:CT_TaskHistory/t:History")]
pub struct TaskHistory {
  /// _
  #[sdk(child(qname = "t:CT_TaskHistoryEvent/t:Event"))]
  pub t_event: Vec<TaskHistoryEvent>,
}
/// Defines the TaskHistoryEvent Class.
///
/// Available in Office2021 and above.
///
/// When the object is serialized out as xml, it's qualified name is t:Event.
#[derive(Clone, Debug, Default, PartialEq, ooxmlsdk_derive::SdkType)]
#[sdk(qname = "t:CT_TaskHistoryEvent/t:Event")]
pub struct TaskHistoryEvent {
  /// time
  ///
  /// Available in Office2021 and above.
  ///
  /// Represents the following attribute in the schema: :time
  #[sdk(attr(qname = ":time"))]
  pub time: crate::simple_type::DateTimeValue,
  /// id
  ///
  /// Available in Office2021 and above.
  ///
  /// Represents the following attribute in the schema: :id
  #[sdk(attr(qname = ":id"))]
  #[sdk(pattern(
    source = 1u32,
    regex = "\\{[0-9A-F]{8}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{12}\\}"
  ))]
  #[sdk(string_format(source = 1u32, kind = "token"))]
  pub id: crate::simple_type::StringValue,
  /// _
  #[sdk(child(qname = "t:CT_TaskUser/t:Attribution"))]
  pub attribution_task_user: std::boxed::Box<AttributionTaskUser>,
  /// _
  #[sdk(child(qname = "t:CT_TaskAnchor/t:Anchor"))]
  pub task_anchor: Option<std::boxed::Box<TaskAnchor>>,
  #[sdk(choice(
    qname = "t:CT_TaskUser/t:Assign",
    qname = "t:CT_TaskUser/t:Unassign",
    qname = "t:CT_TaskCreateEventInfo/t:Create",
    qname = "t:CT_TaskTitleEventInfo/t:SetTitle",
    qname = "t:CT_TaskScheduleEventInfo/t:Schedule",
    qname = "t:CT_TaskProgressEventInfo/t:Progress",
    qname = "t:CT_TaskPriorityEventInfo/t:Priority",
    qname = "t:CT_TaskDeleteEventInfo/t:Delete",
    qname = "t:CT_TaskUndeleteEventInfo/t:Undelete",
    qname = "t:CT_TaskUnassignAll/t:UnassignAll",
    qname = "t:CT_TaskUndo/t:Undo"
  ))]
  pub task_history_event_choice: Option<TaskHistoryEventChoice>,
  /// _
  #[sdk(child(qname = "oel:CT_ExtensionList/t:extLst"))]
  pub t_ext_lst: Option<ExtensionList>,
}
/// Defines the AttributionTaskUser Class.
///
/// Available in Office2021 and above.
///
/// When the object is serialized out as xml, it's qualified name is t:Attribution.
#[derive(Clone, Debug, Default, PartialEq, ooxmlsdk_derive::SdkType)]
#[sdk(qname = "t:CT_TaskUser/t:Attribution")]
pub struct AttributionTaskUser {
  /// userId
  ///
  /// Available in Office2021 and above.
  ///
  /// Represents the following attribute in the schema: :userId
  #[sdk(attr(qname = ":userId"))]
  pub user_id: crate::simple_type::StringValue,
  /// userName
  ///
  /// Available in Office2021 and above.
  ///
  /// Represents the following attribute in the schema: :userName
  #[sdk(attr(qname = ":userName"))]
  pub user_name: crate::simple_type::StringValue,
  /// userProvider
  ///
  /// Available in Office2021 and above.
  ///
  /// Represents the following attribute in the schema: :userProvider
  #[sdk(attr(qname = ":userProvider"))]
  pub user_provider: crate::simple_type::StringValue,
}
/// Defines the AssignTaskUser Class.
///
/// Available in Office2021 and above.
///
/// When the object is serialized out as xml, it's qualified name is t:Assign.
#[derive(Clone, Debug, Default, PartialEq, ooxmlsdk_derive::SdkType)]
#[sdk(qname = "t:CT_TaskUser/t:Assign")]
pub struct AssignTaskUser {
  /// userId
  ///
  /// Available in Office2021 and above.
  ///
  /// Represents the following attribute in the schema: :userId
  #[sdk(attr(qname = ":userId"))]
  pub user_id: crate::simple_type::StringValue,
  /// userName
  ///
  /// Available in Office2021 and above.
  ///
  /// Represents the following attribute in the schema: :userName
  #[sdk(attr(qname = ":userName"))]
  pub user_name: crate::simple_type::StringValue,
  /// userProvider
  ///
  /// Available in Office2021 and above.
  ///
  /// Represents the following attribute in the schema: :userProvider
  #[sdk(attr(qname = ":userProvider"))]
  pub user_provider: crate::simple_type::StringValue,
}
/// Defines the UnassignTaskUser Class.
///
/// Available in Office2021 and above.
///
/// When the object is serialized out as xml, it's qualified name is t:Unassign.
#[derive(Clone, Debug, Default, PartialEq, ooxmlsdk_derive::SdkType)]
#[sdk(qname = "t:CT_TaskUser/t:Unassign")]
pub struct UnassignTaskUser {
  /// userId
  ///
  /// Available in Office2021 and above.
  ///
  /// Represents the following attribute in the schema: :userId
  #[sdk(attr(qname = ":userId"))]
  pub user_id: crate::simple_type::StringValue,
  /// userName
  ///
  /// Available in Office2021 and above.
  ///
  /// Represents the following attribute in the schema: :userName
  #[sdk(attr(qname = ":userName"))]
  pub user_name: crate::simple_type::StringValue,
  /// userProvider
  ///
  /// Available in Office2021 and above.
  ///
  /// Represents the following attribute in the schema: :userProvider
  #[sdk(attr(qname = ":userProvider"))]
  pub user_provider: crate::simple_type::StringValue,
}
/// Defines the OpenXmlTaskUserElement Class.
///
/// Available in Office2021 and above.
///
/// When the object is serialized out as xml, it's qualified name is .
#[derive(Clone, Debug, Default, PartialEq, ooxmlsdk_derive::SdkType)]
#[sdk(qname = "t:CT_TaskUser/")]
pub struct OpenXmlTaskUserElement {
  /// userId
  ///
  /// Available in Office2021 and above.
  ///
  /// Represents the following attribute in the schema: :userId
  #[sdk(attr(qname = ":userId"))]
  pub user_id: crate::simple_type::StringValue,
  /// userName
  ///
  /// Available in Office2021 and above.
  ///
  /// Represents the following attribute in the schema: :userName
  #[sdk(attr(qname = ":userName"))]
  pub user_name: crate::simple_type::StringValue,
  /// userProvider
  ///
  /// Available in Office2021 and above.
  ///
  /// Represents the following attribute in the schema: :userProvider
  #[sdk(attr(qname = ":userProvider"))]
  pub user_provider: crate::simple_type::StringValue,
}
/// Defines the TaskCreateEventInfo Class.
///
/// Available in Office2021 and above.
///
/// When the object is serialized out as xml, it's qualified name is t:Create.
#[derive(Clone, Debug, Default, PartialEq, ooxmlsdk_derive::SdkType)]
#[sdk(qname = "t:CT_TaskCreateEventInfo/t:Create")]
pub struct TaskCreateEventInfo {}
/// Defines the TaskTitleEventInfo Class.
///
/// Available in Office2021 and above.
///
/// When the object is serialized out as xml, it's qualified name is t:SetTitle.
#[derive(Clone, Debug, Default, PartialEq, ooxmlsdk_derive::SdkType)]
#[sdk(qname = "t:CT_TaskTitleEventInfo/t:SetTitle")]
pub struct TaskTitleEventInfo {
  /// title
  ///
  /// Available in Office2021 and above.
  ///
  /// Represents the following attribute in the schema: :title
  #[sdk(attr(qname = ":title"))]
  pub title: crate::simple_type::StringValue,
}
/// Defines the TaskScheduleEventInfo Class.
///
/// Available in Office2021 and above.
///
/// When the object is serialized out as xml, it's qualified name is t:Schedule.
#[derive(Clone, Debug, Default, PartialEq, ooxmlsdk_derive::SdkType)]
#[sdk(qname = "t:CT_TaskScheduleEventInfo/t:Schedule")]
pub struct TaskScheduleEventInfo {
  /// startDate
  ///
  /// Available in Office2021 and above.
  ///
  /// Represents the following attribute in the schema: :startDate
  #[sdk(attr(qname = ":startDate"))]
  pub start_date: Option<crate::simple_type::DateTimeValue>,
  /// dueDate
  ///
  /// Available in Office2021 and above.
  ///
  /// Represents the following attribute in the schema: :dueDate
  #[sdk(attr(qname = ":dueDate"))]
  pub due_date: Option<crate::simple_type::DateTimeValue>,
}
/// Defines the TaskProgressEventInfo Class.
///
/// Available in Office2021 and above.
///
/// When the object is serialized out as xml, it's qualified name is t:Progress.
#[derive(Clone, Debug, Default, PartialEq, ooxmlsdk_derive::SdkType)]
#[sdk(qname = "t:CT_TaskProgressEventInfo/t:Progress")]
pub struct TaskProgressEventInfo {
  /// percentComplete
  ///
  /// Available in Office2021 and above.
  ///
  /// Represents the following attribute in the schema: :percentComplete
  #[sdk(attr(qname = ":percentComplete"))]
  #[sdk(number_range(
    source = 1u32,
    min = "0",
    max = "100",
    min_inclusive = true,
    max_inclusive = true
  ))]
  pub percent_complete: crate::simple_type::Int32Value,
}
/// Defines the TaskPriorityEventInfo Class.
///
/// Available in Office2021 and above.
///
/// When the object is serialized out as xml, it's qualified name is t:Priority.
#[derive(Clone, Debug, Default, PartialEq, ooxmlsdk_derive::SdkType)]
#[sdk(qname = "t:CT_TaskPriorityEventInfo/t:Priority")]
pub struct TaskPriorityEventInfo {
  /// value
  ///
  /// Available in Office2021 and above.
  ///
  /// Represents the following attribute in the schema: :value
  #[sdk(attr(qname = ":value"))]
  #[sdk(number_range(
    source = 1u32,
    min = "0",
    max = "10",
    min_inclusive = true,
    max_inclusive = true
  ))]
  pub value: crate::simple_type::Int32Value,
}
/// Defines the TaskDeleteEventInfo Class.
///
/// Available in Office2021 and above.
///
/// When the object is serialized out as xml, it's qualified name is t:Delete.
#[derive(Clone, Debug, Default, PartialEq, ooxmlsdk_derive::SdkType)]
#[sdk(qname = "t:CT_TaskDeleteEventInfo/t:Delete")]
pub struct TaskDeleteEventInfo {}
/// Defines the TaskUndeleteEventInfo Class.
///
/// Available in Office2021 and above.
///
/// When the object is serialized out as xml, it's qualified name is t:Undelete.
#[derive(Clone, Debug, Default, PartialEq, ooxmlsdk_derive::SdkType)]
#[sdk(qname = "t:CT_TaskUndeleteEventInfo/t:Undelete")]
pub struct TaskUndeleteEventInfo {}
/// Defines the TaskUnassignAll Class.
///
/// Available in Office2021 and above.
///
/// When the object is serialized out as xml, it's qualified name is t:UnassignAll.
#[derive(Clone, Debug, Default, PartialEq, ooxmlsdk_derive::SdkType)]
#[sdk(qname = "t:CT_TaskUnassignAll/t:UnassignAll")]
pub struct TaskUnassignAll {}
/// Defines the TaskUndo Class.
///
/// Available in Office2021 and above.
///
/// When the object is serialized out as xml, it's qualified name is t:Undo.
#[derive(Clone, Debug, Default, PartialEq, ooxmlsdk_derive::SdkType)]
#[sdk(qname = "t:CT_TaskUndo/t:Undo")]
pub struct TaskUndo {
  /// id
  ///
  /// Available in Office2021 and above.
  ///
  /// Represents the following attribute in the schema: :id
  #[sdk(attr(qname = ":id"))]
  #[sdk(pattern(
    source = 1u32,
    regex = "\\{[0-9A-F]{8}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{12}\\}"
  ))]
  #[sdk(string_format(source = 1u32, kind = "token"))]
  pub id: crate::simple_type::StringValue,
}
/// Defines the CommentAnchor Class.
///
/// Available in Office2021 and above.
///
/// When the object is serialized out as xml, it's qualified name is t:Comment.
#[derive(Clone, Debug, Default, PartialEq, ooxmlsdk_derive::SdkType)]
#[sdk(qname = "t:CT_CommentAnchor/t:Comment")]
pub struct CommentAnchor {
  /// id
  ///
  /// Available in Office2021 and above.
  ///
  /// Represents the following attribute in the schema: :id
  #[sdk(attr(qname = ":id"))]
  pub id: crate::simple_type::StringValue,
}
#[derive(Clone, Debug, PartialEq, ooxmlsdk_derive::SdkChoice)]
pub enum TaskHistoryEventChoice {
  #[sdk(child(qname = "t:CT_TaskUser/t:Assign"))]
  TAssign(std::boxed::Box<AssignTaskUser>),
  #[sdk(child(qname = "t:CT_TaskUser/t:Unassign"))]
  TUnassign(std::boxed::Box<UnassignTaskUser>),
  #[sdk(child(qname = "t:CT_TaskCreateEventInfo/t:Create"))]
  TCreate(std::boxed::Box<TaskCreateEventInfo>),
  #[sdk(child(qname = "t:CT_TaskTitleEventInfo/t:SetTitle"))]
  TSetTitle(std::boxed::Box<TaskTitleEventInfo>),
  #[sdk(child(qname = "t:CT_TaskScheduleEventInfo/t:Schedule"))]
  TSchedule(std::boxed::Box<TaskScheduleEventInfo>),
  #[sdk(child(qname = "t:CT_TaskProgressEventInfo/t:Progress"))]
  TProgress(std::boxed::Box<TaskProgressEventInfo>),
  #[sdk(child(qname = "t:CT_TaskPriorityEventInfo/t:Priority"))]
  TPriority(std::boxed::Box<TaskPriorityEventInfo>),
  #[sdk(child(qname = "t:CT_TaskDeleteEventInfo/t:Delete"))]
  TDelete(std::boxed::Box<TaskDeleteEventInfo>),
  #[sdk(child(qname = "t:CT_TaskUndeleteEventInfo/t:Undelete"))]
  TUndelete(std::boxed::Box<TaskUndeleteEventInfo>),
  #[sdk(child(qname = "t:CT_TaskUnassignAll/t:UnassignAll"))]
  TUnassignAll(std::boxed::Box<TaskUnassignAll>),
  #[sdk(child(qname = "t:CT_TaskUndo/t:Undo"))]
  TUndo(std::boxed::Box<TaskUndo>),
}