1#![allow(non_camel_case_types)]
4#![allow(unused_imports)]
5use serde::de::{value, Deserializer, IntoDeserializer};
6use serde::{Deserialize, Serialize, Serializer};
7use std::str::FromStr;
8#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
9pub struct AccountMyWorkResult {
10 #[doc = "True, when length of WorkItemDetails is same as the limit"]
11 #[serde(
12 rename = "querySizeLimitExceeded",
13 default,
14 skip_serializing_if = "Option::is_none"
15 )]
16 pub query_size_limit_exceeded: Option<bool>,
17 #[doc = "WorkItem Details"]
18 #[serde(
19 rename = "workItemDetails",
20 default,
21 deserialize_with = "crate::serde::deserialize_null_as_default",
22 skip_serializing_if = "Vec::is_empty"
23 )]
24 pub work_item_details: Vec<AccountWorkWorkItemModel>,
25}
26impl AccountMyWorkResult {
27 pub fn new() -> Self {
28 Self::default()
29 }
30}
31#[doc = "Represents Work Item Recent Activity"]
32#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
33pub struct AccountRecentActivityWorkItemModel {
34 #[serde(flatten)]
35 pub account_recent_activity_work_item_model_base: AccountRecentActivityWorkItemModelBase,
36 #[doc = "Assigned To"]
37 #[serde(
38 rename = "assignedTo",
39 default,
40 skip_serializing_if = "Option::is_none"
41 )]
42 pub assigned_to: Option<String>,
43}
44impl AccountRecentActivityWorkItemModel {
45 pub fn new() -> Self {
46 Self::default()
47 }
48}
49#[doc = "Represents Work Item Recent Activity"]
50#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
51pub struct AccountRecentActivityWorkItemModel2 {
52 #[serde(flatten)]
53 pub account_recent_activity_work_item_model_base: AccountRecentActivityWorkItemModelBase,
54 #[serde(
55 rename = "assignedTo",
56 default,
57 skip_serializing_if = "Option::is_none"
58 )]
59 pub assigned_to: Option<IdentityRef>,
60}
61impl AccountRecentActivityWorkItemModel2 {
62 pub fn new() -> Self {
63 Self::default()
64 }
65}
66#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
67pub struct AccountRecentActivityWorkItemModel2List {
68 #[serde(default, skip_serializing_if = "Option::is_none")]
69 pub count: Option<i32>,
70 #[serde(
71 default,
72 deserialize_with = "crate::serde::deserialize_null_as_default",
73 skip_serializing_if = "Vec::is_empty"
74 )]
75 pub value: Vec<AccountRecentActivityWorkItemModel2>,
76}
77impl AccountRecentActivityWorkItemModel2List {
78 pub fn new() -> Self {
79 Self::default()
80 }
81}
82#[doc = "Represents Work Item Recent Activity"]
83#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
84pub struct AccountRecentActivityWorkItemModelBase {
85 #[doc = "Date of the last Activity by the user"]
86 #[serde(
87 rename = "activityDate",
88 default,
89 skip_serializing_if = "Option::is_none",
90 with = "crate::date_time::rfc3339::option"
91 )]
92 pub activity_date: Option<time::OffsetDateTime>,
93 #[doc = "Type of the activity"]
94 #[serde(
95 rename = "activityType",
96 default,
97 skip_serializing_if = "Option::is_none"
98 )]
99 pub activity_type: Option<account_recent_activity_work_item_model_base::ActivityType>,
100 #[doc = "Last changed date of the work item"]
101 #[serde(
102 rename = "changedDate",
103 default,
104 skip_serializing_if = "Option::is_none",
105 with = "crate::date_time::rfc3339::option"
106 )]
107 pub changed_date: Option<time::OffsetDateTime>,
108 #[doc = "Work Item Id"]
109 #[serde(default, skip_serializing_if = "Option::is_none")]
110 pub id: Option<i32>,
111 #[doc = "TeamFoundationId of the user this activity belongs to"]
112 #[serde(
113 rename = "identityId",
114 default,
115 skip_serializing_if = "Option::is_none"
116 )]
117 pub identity_id: Option<String>,
118 #[doc = "State of the work item"]
119 #[serde(default, skip_serializing_if = "Option::is_none")]
120 pub state: Option<String>,
121 #[doc = "Team project the work item belongs to"]
122 #[serde(
123 rename = "teamProject",
124 default,
125 skip_serializing_if = "Option::is_none"
126 )]
127 pub team_project: Option<String>,
128 #[doc = "Title of the work item"]
129 #[serde(default, skip_serializing_if = "Option::is_none")]
130 pub title: Option<String>,
131 #[doc = "Type of Work Item"]
132 #[serde(
133 rename = "workItemType",
134 default,
135 skip_serializing_if = "Option::is_none"
136 )]
137 pub work_item_type: Option<String>,
138}
139impl AccountRecentActivityWorkItemModelBase {
140 pub fn new() -> Self {
141 Self::default()
142 }
143}
144pub mod account_recent_activity_work_item_model_base {
145 use super::*;
146 #[doc = "Type of the activity"]
147 #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
148 pub enum ActivityType {
149 #[serde(rename = "visited")]
150 Visited,
151 #[serde(rename = "edited")]
152 Edited,
153 #[serde(rename = "deleted")]
154 Deleted,
155 #[serde(rename = "restored")]
156 Restored,
157 }
158}
159#[doc = "Represents Recent Mention Work Item"]
160#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
161pub struct AccountRecentMentionWorkItemModel {
162 #[doc = "Assigned To"]
163 #[serde(
164 rename = "assignedTo",
165 default,
166 skip_serializing_if = "Option::is_none"
167 )]
168 pub assigned_to: Option<String>,
169 #[doc = "Work Item Id"]
170 #[serde(default, skip_serializing_if = "Option::is_none")]
171 pub id: Option<i32>,
172 #[doc = "Latest date that the user were mentioned"]
173 #[serde(
174 rename = "mentionedDateField",
175 default,
176 skip_serializing_if = "Option::is_none",
177 with = "crate::date_time::rfc3339::option"
178 )]
179 pub mentioned_date_field: Option<time::OffsetDateTime>,
180 #[doc = "State of the work item"]
181 #[serde(default, skip_serializing_if = "Option::is_none")]
182 pub state: Option<String>,
183 #[doc = "Team project the work item belongs to"]
184 #[serde(
185 rename = "teamProject",
186 default,
187 skip_serializing_if = "Option::is_none"
188 )]
189 pub team_project: Option<String>,
190 #[doc = "Title of the work item"]
191 #[serde(default, skip_serializing_if = "Option::is_none")]
192 pub title: Option<String>,
193 #[doc = "Type of Work Item"]
194 #[serde(
195 rename = "workItemType",
196 default,
197 skip_serializing_if = "Option::is_none"
198 )]
199 pub work_item_type: Option<String>,
200}
201impl AccountRecentMentionWorkItemModel {
202 pub fn new() -> Self {
203 Self::default()
204 }
205}
206#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
207pub struct AccountWorkWorkItemModel {
208 #[serde(
209 rename = "assignedTo",
210 default,
211 skip_serializing_if = "Option::is_none"
212 )]
213 pub assigned_to: Option<String>,
214 #[serde(
215 rename = "changedDate",
216 default,
217 skip_serializing_if = "Option::is_none",
218 with = "crate::date_time::rfc3339::option"
219 )]
220 pub changed_date: Option<time::OffsetDateTime>,
221 #[serde(default, skip_serializing_if = "Option::is_none")]
222 pub id: Option<i32>,
223 #[serde(default, skip_serializing_if = "Option::is_none")]
224 pub state: Option<String>,
225 #[serde(
226 rename = "teamProject",
227 default,
228 skip_serializing_if = "Option::is_none"
229 )]
230 pub team_project: Option<String>,
231 #[serde(default, skip_serializing_if = "Option::is_none")]
232 pub title: Option<String>,
233 #[serde(
234 rename = "workItemType",
235 default,
236 skip_serializing_if = "Option::is_none"
237 )]
238 pub work_item_type: Option<String>,
239}
240impl AccountWorkWorkItemModel {
241 pub fn new() -> Self {
242 Self::default()
243 }
244}
245#[doc = "Contains criteria for querying work items based on artifact URI."]
246#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
247pub struct ArtifactUriQuery {
248 #[doc = "List of artifact URIs to use for querying work items."]
249 #[serde(
250 rename = "artifactUris",
251 default,
252 deserialize_with = "crate::serde::deserialize_null_as_default",
253 skip_serializing_if = "Vec::is_empty"
254 )]
255 pub artifact_uris: Vec<String>,
256}
257impl ArtifactUriQuery {
258 pub fn new() -> Self {
259 Self::default()
260 }
261}
262#[doc = "Defines result of artifact URI query on work items. Contains mapping of work item IDs to artifact URI."]
263#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
264pub struct ArtifactUriQueryResult {
265 #[doc = "A Dictionary that maps a list of work item references to the given list of artifact URI."]
266 #[serde(
267 rename = "artifactUrisQueryResult",
268 default,
269 skip_serializing_if = "Option::is_none"
270 )]
271 pub artifact_uris_query_result: Option<serde_json::Value>,
272}
273impl ArtifactUriQueryResult {
274 pub fn new() -> Self {
275 Self::default()
276 }
277}
278#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
279pub struct AttachmentReference {
280 #[serde(default, skip_serializing_if = "Option::is_none")]
281 pub id: Option<String>,
282 #[serde(default, skip_serializing_if = "Option::is_none")]
283 pub url: Option<String>,
284}
285impl AttachmentReference {
286 pub fn new() -> Self {
287 Self::default()
288 }
289}
290#[doc = "Comment on a Work Item."]
291#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
292pub struct Comment {
293 #[serde(flatten)]
294 pub work_item_tracking_resource: WorkItemTrackingResource,
295 #[serde(rename = "createdBy", default, skip_serializing_if = "Option::is_none")]
296 pub created_by: Option<IdentityRef>,
297 #[doc = "The creation date of the comment."]
298 #[serde(
299 rename = "createdDate",
300 default,
301 skip_serializing_if = "Option::is_none",
302 with = "crate::date_time::rfc3339::option"
303 )]
304 pub created_date: Option<time::OffsetDateTime>,
305 #[doc = "Effective Date/time value for adding the comment. Can be optionally different from CreatedDate."]
306 #[serde(
307 rename = "createdOnBehalfDate",
308 default,
309 skip_serializing_if = "Option::is_none",
310 with = "crate::date_time::rfc3339::option"
311 )]
312 pub created_on_behalf_date: Option<time::OffsetDateTime>,
313 #[serde(
314 rename = "createdOnBehalfOf",
315 default,
316 skip_serializing_if = "Option::is_none"
317 )]
318 pub created_on_behalf_of: Option<IdentityRef>,
319 #[doc = "Represents the possible types for the comment format."]
320 #[serde(default, skip_serializing_if = "Option::is_none")]
321 pub format: Option<comment::Format>,
322 #[doc = "The id assigned to the comment."]
323 #[serde(default, skip_serializing_if = "Option::is_none")]
324 pub id: Option<i32>,
325 #[doc = "Indicates if the comment has been deleted."]
326 #[serde(rename = "isDeleted", default, skip_serializing_if = "Option::is_none")]
327 pub is_deleted: Option<bool>,
328 #[doc = "The mentions of the comment."]
329 #[serde(
330 default,
331 deserialize_with = "crate::serde::deserialize_null_as_default",
332 skip_serializing_if = "Vec::is_empty"
333 )]
334 pub mentions: Vec<CommentMention>,
335 #[serde(
336 rename = "modifiedBy",
337 default,
338 skip_serializing_if = "Option::is_none"
339 )]
340 pub modified_by: Option<IdentityRef>,
341 #[doc = "The last modification date of the comment."]
342 #[serde(
343 rename = "modifiedDate",
344 default,
345 skip_serializing_if = "Option::is_none",
346 with = "crate::date_time::rfc3339::option"
347 )]
348 pub modified_date: Option<time::OffsetDateTime>,
349 #[doc = "The reactions of the comment."]
350 #[serde(
351 default,
352 deserialize_with = "crate::serde::deserialize_null_as_default",
353 skip_serializing_if = "Vec::is_empty"
354 )]
355 pub reactions: Vec<CommentReaction>,
356 #[doc = "The text of the comment in HTML format."]
357 #[serde(
358 rename = "renderedText",
359 default,
360 skip_serializing_if = "Option::is_none"
361 )]
362 pub rendered_text: Option<String>,
363 #[doc = "The text of the comment."]
364 #[serde(default, skip_serializing_if = "Option::is_none")]
365 pub text: Option<String>,
366 #[doc = "The current version of the comment."]
367 #[serde(default, skip_serializing_if = "Option::is_none")]
368 pub version: Option<i32>,
369 #[doc = "The id of the work item this comment belongs to."]
370 #[serde(
371 rename = "workItemId",
372 default,
373 skip_serializing_if = "Option::is_none"
374 )]
375 pub work_item_id: Option<i32>,
376}
377impl Comment {
378 pub fn new(work_item_tracking_resource: WorkItemTrackingResource) -> Self {
379 Self {
380 work_item_tracking_resource,
381 created_by: None,
382 created_date: None,
383 created_on_behalf_date: None,
384 created_on_behalf_of: None,
385 format: None,
386 id: None,
387 is_deleted: None,
388 mentions: Vec::new(),
389 modified_by: None,
390 modified_date: None,
391 reactions: Vec::new(),
392 rendered_text: None,
393 text: None,
394 version: None,
395 work_item_id: None,
396 }
397 }
398}
399pub mod comment {
400 use super::*;
401 #[doc = "Represents the possible types for the comment format."]
402 #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
403 pub enum Format {
404 #[serde(rename = "markdown")]
405 Markdown,
406 #[serde(rename = "html")]
407 Html,
408 }
409}
410#[doc = "Represents a request to create a work item comment."]
411#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
412pub struct CommentCreate {
413 #[doc = "The text of the comment."]
414 #[serde(default, skip_serializing_if = "Option::is_none")]
415 pub text: Option<String>,
416}
417impl CommentCreate {
418 pub fn new() -> Self {
419 Self::default()
420 }
421}
422#[doc = "Represents a list of work item comments."]
423#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
424pub struct CommentList {
425 #[serde(flatten)]
426 pub work_item_tracking_resource: WorkItemTrackingResource,
427 #[doc = "List of comments in the current batch."]
428 #[serde(
429 default,
430 deserialize_with = "crate::serde::deserialize_null_as_default",
431 skip_serializing_if = "Vec::is_empty"
432 )]
433 pub comments: Vec<Comment>,
434 #[doc = "A string token that can be used to retrieving next page of comments if available. Otherwise null."]
435 #[serde(
436 rename = "continuationToken",
437 default,
438 skip_serializing_if = "Option::is_none"
439 )]
440 pub continuation_token: Option<String>,
441 #[doc = "The count of comments in the current batch."]
442 #[serde(default, skip_serializing_if = "Option::is_none")]
443 pub count: Option<i32>,
444 #[doc = "Uri to the next page of comments if it is available. Otherwise null."]
445 #[serde(rename = "nextPage", default, skip_serializing_if = "Option::is_none")]
446 pub next_page: Option<String>,
447 #[doc = "Total count of comments on a work item."]
448 #[serde(
449 rename = "totalCount",
450 default,
451 skip_serializing_if = "Option::is_none"
452 )]
453 pub total_count: Option<i32>,
454}
455impl CommentList {
456 pub fn new(work_item_tracking_resource: WorkItemTrackingResource) -> Self {
457 Self {
458 work_item_tracking_resource,
459 comments: Vec::new(),
460 continuation_token: None,
461 count: None,
462 next_page: None,
463 total_count: None,
464 }
465 }
466}
467#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
468pub struct CommentMention {
469 #[serde(flatten)]
470 pub work_item_tracking_resource: WorkItemTrackingResource,
471 #[doc = "The artifact portion of the parsed text. (i.e. the work item's id)"]
472 #[serde(
473 rename = "artifactId",
474 default,
475 skip_serializing_if = "Option::is_none"
476 )]
477 pub artifact_id: Option<String>,
478 #[doc = "The type the parser assigned to the mention. (i.e. person, work item, etc)"]
479 #[serde(
480 rename = "artifactType",
481 default,
482 skip_serializing_if = "Option::is_none"
483 )]
484 pub artifact_type: Option<String>,
485 #[doc = "The comment id of the mention."]
486 #[serde(rename = "commentId", default, skip_serializing_if = "Option::is_none")]
487 pub comment_id: Option<i32>,
488 #[doc = "The resolved target of the mention. An example of this could be a user's tfid"]
489 #[serde(rename = "targetId", default, skip_serializing_if = "Option::is_none")]
490 pub target_id: Option<String>,
491}
492impl CommentMention {
493 pub fn new(work_item_tracking_resource: WorkItemTrackingResource) -> Self {
494 Self {
495 work_item_tracking_resource,
496 artifact_id: None,
497 artifact_type: None,
498 comment_id: None,
499 target_id: None,
500 }
501 }
502}
503#[doc = "Contains information about work item comment reaction for a particular reaction type."]
504#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
505pub struct CommentReaction {
506 #[serde(flatten)]
507 pub work_item_tracking_resource: WorkItemTrackingResource,
508 #[doc = "The id of the comment this reaction belongs to."]
509 #[serde(rename = "commentId", default, skip_serializing_if = "Option::is_none")]
510 pub comment_id: Option<i32>,
511 #[doc = "Total number of reactions for the CommentReactionType."]
512 #[serde(default, skip_serializing_if = "Option::is_none")]
513 pub count: Option<i32>,
514 #[doc = "Flag to indicate if the current user has engaged on this particular EngagementType (e.g. if they liked the associated comment)."]
515 #[serde(
516 rename = "isCurrentUserEngaged",
517 default,
518 skip_serializing_if = "Option::is_none"
519 )]
520 pub is_current_user_engaged: Option<bool>,
521 #[doc = "Type of the reaction."]
522 #[serde(rename = "type", default, skip_serializing_if = "Option::is_none")]
523 pub type_: Option<comment_reaction::Type>,
524}
525impl CommentReaction {
526 pub fn new(work_item_tracking_resource: WorkItemTrackingResource) -> Self {
527 Self {
528 work_item_tracking_resource,
529 comment_id: None,
530 count: None,
531 is_current_user_engaged: None,
532 type_: None,
533 }
534 }
535}
536pub mod comment_reaction {
537 use super::*;
538 #[doc = "Type of the reaction."]
539 #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
540 pub enum Type {
541 #[serde(rename = "like")]
542 Like,
543 #[serde(rename = "dislike")]
544 Dislike,
545 #[serde(rename = "heart")]
546 Heart,
547 #[serde(rename = "hooray")]
548 Hooray,
549 #[serde(rename = "smile")]
550 Smile,
551 #[serde(rename = "confused")]
552 Confused,
553 }
554}
555#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
556pub struct CommentReactionList {
557 #[serde(default, skip_serializing_if = "Option::is_none")]
558 pub count: Option<i32>,
559 #[serde(
560 default,
561 deserialize_with = "crate::serde::deserialize_null_as_default",
562 skip_serializing_if = "Vec::is_empty"
563 )]
564 pub value: Vec<CommentReaction>,
565}
566impl CommentReactionList {
567 pub fn new() -> Self {
568 Self::default()
569 }
570}
571#[doc = "Represents a request to update a work item comment."]
572#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
573pub struct CommentUpdate {
574 #[doc = "The updated text of the comment."]
575 #[serde(default, skip_serializing_if = "Option::is_none")]
576 pub text: Option<String>,
577}
578impl CommentUpdate {
579 pub fn new() -> Self {
580 Self::default()
581 }
582}
583#[doc = "Represents a specific version of a comment on a work item."]
584#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
585pub struct CommentVersion {
586 #[serde(flatten)]
587 pub work_item_tracking_resource: WorkItemTrackingResource,
588 #[serde(rename = "createdBy", default, skip_serializing_if = "Option::is_none")]
589 pub created_by: Option<IdentityRef>,
590 #[doc = "The creation date of the comment."]
591 #[serde(
592 rename = "createdDate",
593 default,
594 skip_serializing_if = "Option::is_none",
595 with = "crate::date_time::rfc3339::option"
596 )]
597 pub created_date: Option<time::OffsetDateTime>,
598 #[doc = "Effective Date/time value for adding the comment. Can be optionally different from CreatedDate."]
599 #[serde(
600 rename = "createdOnBehalfDate",
601 default,
602 skip_serializing_if = "Option::is_none",
603 with = "crate::date_time::rfc3339::option"
604 )]
605 pub created_on_behalf_date: Option<time::OffsetDateTime>,
606 #[serde(
607 rename = "createdOnBehalfOf",
608 default,
609 skip_serializing_if = "Option::is_none"
610 )]
611 pub created_on_behalf_of: Option<IdentityRef>,
612 #[doc = "The id assigned to the comment."]
613 #[serde(default, skip_serializing_if = "Option::is_none")]
614 pub id: Option<i32>,
615 #[doc = "Indicates if the comment has been deleted at this version."]
616 #[serde(rename = "isDeleted", default, skip_serializing_if = "Option::is_none")]
617 pub is_deleted: Option<bool>,
618 #[serde(
619 rename = "modifiedBy",
620 default,
621 skip_serializing_if = "Option::is_none"
622 )]
623 pub modified_by: Option<IdentityRef>,
624 #[doc = "The modification date of the comment for this version."]
625 #[serde(
626 rename = "modifiedDate",
627 default,
628 skip_serializing_if = "Option::is_none",
629 with = "crate::date_time::rfc3339::option"
630 )]
631 pub modified_date: Option<time::OffsetDateTime>,
632 #[doc = "The rendered content of the comment at this version."]
633 #[serde(
634 rename = "renderedText",
635 default,
636 skip_serializing_if = "Option::is_none"
637 )]
638 pub rendered_text: Option<String>,
639 #[doc = "The text of the comment at this version."]
640 #[serde(default, skip_serializing_if = "Option::is_none")]
641 pub text: Option<String>,
642 #[doc = "The version number."]
643 #[serde(default, skip_serializing_if = "Option::is_none")]
644 pub version: Option<i32>,
645}
646impl CommentVersion {
647 pub fn new(work_item_tracking_resource: WorkItemTrackingResource) -> Self {
648 Self {
649 work_item_tracking_resource,
650 created_by: None,
651 created_date: None,
652 created_on_behalf_date: None,
653 created_on_behalf_of: None,
654 id: None,
655 is_deleted: None,
656 modified_by: None,
657 modified_date: None,
658 rendered_text: None,
659 text: None,
660 version: None,
661 }
662 }
663}
664#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
665pub struct CommentVersionList {
666 #[serde(default, skip_serializing_if = "Option::is_none")]
667 pub count: Option<i32>,
668 #[serde(
669 default,
670 deserialize_with = "crate::serde::deserialize_null_as_default",
671 skip_serializing_if = "Vec::is_empty"
672 )]
673 pub value: Vec<CommentVersion>,
674}
675impl CommentVersionList {
676 pub fn new() -> Self {
677 Self::default()
678 }
679}
680#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
681pub struct EmailRecipients {
682 #[doc = "Plaintext email addresses."]
683 #[serde(
684 rename = "emailAddresses",
685 default,
686 deserialize_with = "crate::serde::deserialize_null_as_default",
687 skip_serializing_if = "Vec::is_empty"
688 )]
689 pub email_addresses: Vec<String>,
690 #[doc = "TfIds"]
691 #[serde(
692 rename = "tfIds",
693 default,
694 deserialize_with = "crate::serde::deserialize_null_as_default",
695 skip_serializing_if = "Vec::is_empty"
696 )]
697 pub tf_ids: Vec<String>,
698 #[doc = "Unresolved entity ids"]
699 #[serde(
700 rename = "unresolvedEntityIds",
701 default,
702 deserialize_with = "crate::serde::deserialize_null_as_default",
703 skip_serializing_if = "Vec::is_empty"
704 )]
705 pub unresolved_entity_ids: Vec<String>,
706}
707impl EmailRecipients {
708 pub fn new() -> Self {
709 Self::default()
710 }
711}
712#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
713pub struct ExternalDeployment {
714 #[serde(
715 rename = "artifactId",
716 default,
717 skip_serializing_if = "Option::is_none"
718 )]
719 pub artifact_id: Option<String>,
720 #[serde(rename = "createdBy", default, skip_serializing_if = "Option::is_none")]
721 pub created_by: Option<String>,
722 #[serde(default, skip_serializing_if = "Option::is_none")]
723 pub description: Option<String>,
724 #[serde(
725 rename = "displayName",
726 default,
727 skip_serializing_if = "Option::is_none"
728 )]
729 pub display_name: Option<String>,
730 #[serde(default, skip_serializing_if = "Option::is_none")]
731 pub environment: Option<ExternalEnvironment>,
732 #[serde(default, skip_serializing_if = "Option::is_none")]
733 pub group: Option<String>,
734 #[serde(default, skip_serializing_if = "Option::is_none")]
735 pub pipeline: Option<ExternalPipeline>,
736 #[serde(
737 rename = "relatedWorkItemIds",
738 default,
739 deserialize_with = "crate::serde::deserialize_null_as_default",
740 skip_serializing_if = "Vec::is_empty"
741 )]
742 pub related_work_item_ids: Vec<i32>,
743 #[serde(rename = "runId", default, skip_serializing_if = "Option::is_none")]
744 pub run_id: Option<i32>,
745 #[serde(
746 rename = "sequenceNumber",
747 default,
748 skip_serializing_if = "Option::is_none"
749 )]
750 pub sequence_number: Option<i32>,
751 #[serde(default, skip_serializing_if = "Option::is_none")]
752 pub status: Option<String>,
753 #[serde(
754 rename = "statusDate",
755 default,
756 skip_serializing_if = "Option::is_none",
757 with = "crate::date_time::rfc3339::option"
758 )]
759 pub status_date: Option<time::OffsetDateTime>,
760 #[serde(default, skip_serializing_if = "Option::is_none")]
761 pub url: Option<String>,
762}
763impl ExternalDeployment {
764 pub fn new() -> Self {
765 Self::default()
766 }
767}
768#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
769pub struct ExternalEnvironment {
770 #[serde(
771 rename = "displayName",
772 default,
773 skip_serializing_if = "Option::is_none"
774 )]
775 pub display_name: Option<String>,
776 #[serde(default, skip_serializing_if = "Option::is_none")]
777 pub id: Option<i32>,
778 #[serde(rename = "type", default, skip_serializing_if = "Option::is_none")]
779 pub type_: Option<String>,
780}
781impl ExternalEnvironment {
782 pub fn new() -> Self {
783 Self::default()
784 }
785}
786#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
787pub struct ExternalPipeline {
788 #[serde(
789 rename = "displayName",
790 default,
791 skip_serializing_if = "Option::is_none"
792 )]
793 pub display_name: Option<String>,
794 #[serde(default, skip_serializing_if = "Option::is_none")]
795 pub id: Option<i32>,
796 #[serde(default, skip_serializing_if = "Option::is_none")]
797 pub url: Option<String>,
798}
799impl ExternalPipeline {
800 pub fn new() -> Self {
801 Self::default()
802 }
803}
804#[doc = "Describes a list of dependent fields for a rule."]
805#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
806pub struct FieldDependentRule {
807 #[serde(flatten)]
808 pub work_item_tracking_resource: WorkItemTrackingResource,
809 #[doc = "The dependent fields."]
810 #[serde(
811 rename = "dependentFields",
812 default,
813 deserialize_with = "crate::serde::deserialize_null_as_default",
814 skip_serializing_if = "Vec::is_empty"
815 )]
816 pub dependent_fields: Vec<WorkItemFieldReference>,
817}
818impl FieldDependentRule {
819 pub fn new(work_item_tracking_resource: WorkItemTrackingResource) -> Self {
820 Self {
821 work_item_tracking_resource,
822 dependent_fields: Vec::new(),
823 }
824 }
825}
826#[doc = "Describes an update request for a work item field."]
827#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
828pub struct FieldUpdate {
829 #[doc = "Indicates whether the user wants to restore the field."]
830 #[serde(rename = "isDeleted", default, skip_serializing_if = "Option::is_none")]
831 pub is_deleted: Option<bool>,
832 #[doc = "Indicates whether the user wants to lock the field."]
833 #[serde(rename = "isLocked", default, skip_serializing_if = "Option::is_none")]
834 pub is_locked: Option<bool>,
835}
836impl FieldUpdate {
837 pub fn new() -> Self {
838 Self::default()
839 }
840}
841#[doc = "Describes Github connection."]
842#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
843pub struct GitHubConnectionModel {
844 #[doc = "Github connection authorization type (f. e. PAT, OAuth)"]
845 #[serde(
846 rename = "authorizationType",
847 default,
848 skip_serializing_if = "Option::is_none"
849 )]
850 pub authorization_type: Option<String>,
851 #[serde(rename = "createdBy", default, skip_serializing_if = "Option::is_none")]
852 pub created_by: Option<IdentityRef>,
853 #[doc = "Github connection id"]
854 #[serde(default, skip_serializing_if = "Option::is_none")]
855 pub id: Option<String>,
856 #[doc = "Whether current Github connection is valid or not"]
857 #[serde(
858 rename = "isConnectionValid",
859 default,
860 skip_serializing_if = "Option::is_none"
861 )]
862 pub is_connection_valid: Option<bool>,
863 #[doc = "Github connection name (should contain organization/user name)"]
864 #[serde(default, skip_serializing_if = "Option::is_none")]
865 pub name: Option<String>,
866}
867impl GitHubConnectionModel {
868 pub fn new() -> Self {
869 Self::default()
870 }
871}
872#[doc = "Describes Github connection's repo."]
873#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
874pub struct GitHubConnectionRepoModel {
875 #[doc = "Error message"]
876 #[serde(
877 rename = "errorMessage",
878 default,
879 skip_serializing_if = "Option::is_none"
880 )]
881 pub error_message: Option<String>,
882 #[doc = "Repository web url"]
883 #[serde(
884 rename = "gitHubRepositoryUrl",
885 default,
886 skip_serializing_if = "Option::is_none"
887 )]
888 pub git_hub_repository_url: Option<String>,
889}
890impl GitHubConnectionRepoModel {
891 pub fn new() -> Self {
892 Self::default()
893 }
894}
895#[doc = "Describes Github connection's repo bulk request"]
896#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
897pub struct GitHubConnectionReposBatchRequest {
898 #[doc = "Requested repos urls"]
899 #[serde(
900 rename = "gitHubRepositoryUrls",
901 default,
902 deserialize_with = "crate::serde::deserialize_null_as_default",
903 skip_serializing_if = "Vec::is_empty"
904 )]
905 pub git_hub_repository_urls: Vec<GitHubConnectionRepoModel>,
906 #[doc = "Operation type (f. e. add, remove)"]
907 #[serde(
908 rename = "operationType",
909 default,
910 skip_serializing_if = "Option::is_none"
911 )]
912 pub operation_type: Option<String>,
913}
914impl GitHubConnectionReposBatchRequest {
915 pub fn new() -> Self {
916 Self::default()
917 }
918}
919#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
920pub struct GraphSubjectBase {
921 #[doc = "Links"]
922 #[serde(rename = "_links", default, skip_serializing_if = "Option::is_none")]
923 pub links: Option<serde_json::Value>,
924 #[doc = "The descriptor is the primary way to reference the graph subject while the system is running. This field will uniquely identify the same graph subject across both Accounts and Organizations."]
925 #[serde(default, skip_serializing_if = "Option::is_none")]
926 pub descriptor: Option<String>,
927 #[doc = "This is the non-unique display name of the graph subject. To change this field, you must alter its value in the source provider."]
928 #[serde(
929 rename = "displayName",
930 default,
931 skip_serializing_if = "Option::is_none"
932 )]
933 pub display_name: Option<String>,
934 #[doc = "This url is the full route to the source resource of this graph subject."]
935 #[serde(default, skip_serializing_if = "Option::is_none")]
936 pub url: Option<String>,
937}
938impl GraphSubjectBase {
939 pub fn new() -> Self {
940 Self::default()
941 }
942}
943#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
944pub struct IdentityRef {
945 #[serde(flatten)]
946 pub graph_subject_base: GraphSubjectBase,
947 #[doc = "Deprecated - Can be retrieved by querying the Graph user referenced in the \"self\" entry of the IdentityRef \"_links\" dictionary"]
948 #[serde(
949 rename = "directoryAlias",
950 default,
951 skip_serializing_if = "Option::is_none"
952 )]
953 pub directory_alias: Option<String>,
954 #[serde(default, skip_serializing_if = "Option::is_none")]
955 pub id: Option<String>,
956 #[doc = "Deprecated - Available in the \"avatar\" entry of the IdentityRef \"_links\" dictionary"]
957 #[serde(rename = "imageUrl", default, skip_serializing_if = "Option::is_none")]
958 pub image_url: Option<String>,
959 #[doc = "Deprecated - Can be retrieved by querying the Graph membership state referenced in the \"membershipState\" entry of the GraphUser \"_links\" dictionary"]
960 #[serde(default, skip_serializing_if = "Option::is_none")]
961 pub inactive: Option<bool>,
962 #[doc = "Deprecated - Can be inferred from the subject type of the descriptor (Descriptor.IsAadUserType/Descriptor.IsAadGroupType)"]
963 #[serde(
964 rename = "isAadIdentity",
965 default,
966 skip_serializing_if = "Option::is_none"
967 )]
968 pub is_aad_identity: Option<bool>,
969 #[doc = "Deprecated - Can be inferred from the subject type of the descriptor (Descriptor.IsGroupType)"]
970 #[serde(
971 rename = "isContainer",
972 default,
973 skip_serializing_if = "Option::is_none"
974 )]
975 pub is_container: Option<bool>,
976 #[serde(
977 rename = "isDeletedInOrigin",
978 default,
979 skip_serializing_if = "Option::is_none"
980 )]
981 pub is_deleted_in_origin: Option<bool>,
982 #[doc = "Deprecated - not in use in most preexisting implementations of ToIdentityRef"]
983 #[serde(
984 rename = "profileUrl",
985 default,
986 skip_serializing_if = "Option::is_none"
987 )]
988 pub profile_url: Option<String>,
989 #[doc = "Deprecated - use Domain+PrincipalName instead"]
990 #[serde(
991 rename = "uniqueName",
992 default,
993 skip_serializing_if = "Option::is_none"
994 )]
995 pub unique_name: Option<String>,
996}
997impl IdentityRef {
998 pub fn new() -> Self {
999 Self::default()
1000 }
1001}
1002#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
1003pub struct IdentityRefList {
1004 #[serde(default, skip_serializing_if = "Option::is_none")]
1005 pub count: Option<i32>,
1006 #[serde(
1007 default,
1008 deserialize_with = "crate::serde::deserialize_null_as_default",
1009 skip_serializing_if = "Vec::is_empty"
1010 )]
1011 pub value: Vec<IdentityRef>,
1012}
1013impl IdentityRefList {
1014 pub fn new() -> Self {
1015 Self::default()
1016 }
1017}
1018#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
1019pub struct IdentityReference {
1020 #[serde(flatten)]
1021 pub graph_subject_base: GraphSubjectBase,
1022 #[doc = "Deprecated - Can be retrieved by querying the Graph user referenced in the \"self\" entry of the IdentityRef \"_links\" dictionary"]
1023 #[serde(
1024 rename = "directoryAlias",
1025 default,
1026 skip_serializing_if = "Option::is_none"
1027 )]
1028 pub directory_alias: Option<String>,
1029 #[serde(default, skip_serializing_if = "Option::is_none")]
1030 pub id: Option<String>,
1031 #[doc = "Deprecated - Available in the \"avatar\" entry of the IdentityRef \"_links\" dictionary"]
1032 #[serde(rename = "imageUrl", default, skip_serializing_if = "Option::is_none")]
1033 pub image_url: Option<String>,
1034 #[doc = "Deprecated - Can be retrieved by querying the Graph membership state referenced in the \"membershipState\" entry of the GraphUser \"_links\" dictionary"]
1035 #[serde(default, skip_serializing_if = "Option::is_none")]
1036 pub inactive: Option<bool>,
1037 #[doc = "Deprecated - Can be inferred from the subject type of the descriptor (Descriptor.IsAadUserType/Descriptor.IsAadGroupType)"]
1038 #[serde(
1039 rename = "isAadIdentity",
1040 default,
1041 skip_serializing_if = "Option::is_none"
1042 )]
1043 pub is_aad_identity: Option<bool>,
1044 #[doc = "Deprecated - Can be inferred from the subject type of the descriptor (Descriptor.IsGroupType)"]
1045 #[serde(
1046 rename = "isContainer",
1047 default,
1048 skip_serializing_if = "Option::is_none"
1049 )]
1050 pub is_container: Option<bool>,
1051 #[serde(
1052 rename = "isDeletedInOrigin",
1053 default,
1054 skip_serializing_if = "Option::is_none"
1055 )]
1056 pub is_deleted_in_origin: Option<bool>,
1057 #[doc = "Deprecated - not in use in most preexisting implementations of ToIdentityRef"]
1058 #[serde(
1059 rename = "profileUrl",
1060 default,
1061 skip_serializing_if = "Option::is_none"
1062 )]
1063 pub profile_url: Option<String>,
1064 #[doc = "Deprecated - use Domain+PrincipalName instead"]
1065 #[serde(
1066 rename = "uniqueName",
1067 default,
1068 skip_serializing_if = "Option::is_none"
1069 )]
1070 pub unique_name: Option<String>,
1071}
1072impl IdentityReference {
1073 pub fn new() -> Self {
1074 Self::default()
1075 }
1076}
1077#[doc = "The JSON model for JSON Patch Operations"]
1078#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
1079pub struct JsonPatchDocument {}
1080impl JsonPatchDocument {
1081 pub fn new() -> Self {
1082 Self::default()
1083 }
1084}
1085#[doc = "The JSON model for a JSON Patch operation"]
1086#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
1087pub struct JsonPatchOperation {
1088 #[doc = "The path to copy from for the Move/Copy operation."]
1089 #[serde(default, skip_serializing_if = "Option::is_none")]
1090 pub from: Option<String>,
1091 #[doc = "The patch operation"]
1092 #[serde(default, skip_serializing_if = "Option::is_none")]
1093 pub op: Option<json_patch_operation::Op>,
1094 #[doc = "The path for the operation. In the case of an array, a zero based index can be used to specify the position in the array (e.g. /biscuits/0/name). The \"-\" character can be used instead of an index to insert at the end of the array (e.g. /biscuits/-)."]
1095 #[serde(default, skip_serializing_if = "Option::is_none")]
1096 pub path: Option<String>,
1097 #[doc = "The value for the operation. This is either a primitive or a JToken."]
1098 #[serde(default, skip_serializing_if = "Option::is_none")]
1099 pub value: Option<serde_json::Value>,
1100}
1101impl JsonPatchOperation {
1102 pub fn new() -> Self {
1103 Self::default()
1104 }
1105}
1106pub mod json_patch_operation {
1107 use super::*;
1108 #[doc = "The patch operation"]
1109 #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
1110 pub enum Op {
1111 #[serde(rename = "add")]
1112 Add,
1113 #[serde(rename = "remove")]
1114 Remove,
1115 #[serde(rename = "replace")]
1116 Replace,
1117 #[serde(rename = "move")]
1118 Move,
1119 #[serde(rename = "copy")]
1120 Copy,
1121 #[serde(rename = "test")]
1122 Test,
1123 }
1124}
1125#[doc = "Link description."]
1126#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
1127pub struct Link {
1128 #[doc = "Collection of link attributes."]
1129 pub attributes: serde_json::Value,
1130 #[doc = "Relation type."]
1131 pub rel: String,
1132 #[doc = "Link url."]
1133 pub url: String,
1134}
1135impl Link {
1136 pub fn new(attributes: serde_json::Value, rel: String, url: String) -> Self {
1137 Self {
1138 attributes,
1139 rel,
1140 url,
1141 }
1142 }
1143}
1144#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
1145pub struct MailMessage {
1146 #[doc = "The mail body in HTML format."]
1147 #[serde(default, skip_serializing_if = "Option::is_none")]
1148 pub body: Option<String>,
1149 #[serde(default, skip_serializing_if = "Option::is_none")]
1150 pub cc: Option<EmailRecipients>,
1151 #[doc = "The in-reply-to header value"]
1152 #[serde(rename = "inReplyTo", default, skip_serializing_if = "Option::is_none")]
1153 pub in_reply_to: Option<String>,
1154 #[doc = "The Message Id value"]
1155 #[serde(rename = "messageId", default, skip_serializing_if = "Option::is_none")]
1156 pub message_id: Option<String>,
1157 #[serde(rename = "replyTo", default, skip_serializing_if = "Option::is_none")]
1158 pub reply_to: Option<EmailRecipients>,
1159 #[doc = "The mail subject."]
1160 #[serde(default, skip_serializing_if = "Option::is_none")]
1161 pub subject: Option<String>,
1162 #[serde(default, skip_serializing_if = "Option::is_none")]
1163 pub to: Option<EmailRecipients>,
1164}
1165impl MailMessage {
1166 pub fn new() -> Self {
1167 Self::default()
1168 }
1169}
1170#[doc = "Stores process ID."]
1171#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
1172pub struct ProcessIdModel {
1173 #[doc = "The ID of the process."]
1174 #[serde(rename = "typeId", default, skip_serializing_if = "Option::is_none")]
1175 pub type_id: Option<String>,
1176}
1177impl ProcessIdModel {
1178 pub fn new() -> Self {
1179 Self::default()
1180 }
1181}
1182#[doc = "Stores project ID and its process ID."]
1183#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
1184pub struct ProcessMigrationResultModel {
1185 #[doc = "The ID of the process."]
1186 #[serde(rename = "processId", default, skip_serializing_if = "Option::is_none")]
1187 pub process_id: Option<String>,
1188 #[doc = "The ID of the project."]
1189 #[serde(rename = "projectId", default, skip_serializing_if = "Option::is_none")]
1190 pub project_id: Option<String>,
1191}
1192impl ProcessMigrationResultModel {
1193 pub fn new() -> Self {
1194 Self::default()
1195 }
1196}
1197#[doc = "Project work item type state colors"]
1198#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
1199pub struct ProjectWorkItemStateColors {
1200 #[doc = "Project name"]
1201 #[serde(
1202 rename = "projectName",
1203 default,
1204 skip_serializing_if = "Option::is_none"
1205 )]
1206 pub project_name: Option<String>,
1207 #[doc = "State colors for all work item type in a project"]
1208 #[serde(
1209 rename = "workItemTypeStateColors",
1210 default,
1211 deserialize_with = "crate::serde::deserialize_null_as_default",
1212 skip_serializing_if = "Vec::is_empty"
1213 )]
1214 pub work_item_type_state_colors: Vec<WorkItemTypeStateColors>,
1215}
1216impl ProjectWorkItemStateColors {
1217 pub fn new() -> Self {
1218 Self::default()
1219 }
1220}
1221#[doc = "Result of an update work item type XML update operation."]
1222#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
1223pub struct ProvisioningResult {
1224 #[doc = "Details about of the provisioning import events."]
1225 #[serde(
1226 rename = "provisioningImportEvents",
1227 default,
1228 deserialize_with = "crate::serde::deserialize_null_as_default",
1229 skip_serializing_if = "Vec::is_empty"
1230 )]
1231 pub provisioning_import_events: Vec<String>,
1232}
1233impl ProvisioningResult {
1234 pub fn new() -> Self {
1235 Self::default()
1236 }
1237}
1238#[doc = "Describes a request to get a list of queries"]
1239#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
1240pub struct QueryBatchGetRequest {
1241 #[doc = "The expand parameters for queries. Possible options are { None, Wiql, Clauses, All, Minimal }"]
1242 #[serde(rename = "$expand", default, skip_serializing_if = "Option::is_none")]
1243 pub expand: Option<query_batch_get_request::Expand>,
1244 #[doc = "The flag to control error policy in a query batch request. Possible options are { Fail, Omit }."]
1245 #[serde(
1246 rename = "errorPolicy",
1247 default,
1248 skip_serializing_if = "Option::is_none"
1249 )]
1250 pub error_policy: Option<query_batch_get_request::ErrorPolicy>,
1251 #[doc = "The requested query ids"]
1252 #[serde(
1253 default,
1254 deserialize_with = "crate::serde::deserialize_null_as_default",
1255 skip_serializing_if = "Vec::is_empty"
1256 )]
1257 pub ids: Vec<String>,
1258}
1259impl QueryBatchGetRequest {
1260 pub fn new() -> Self {
1261 Self::default()
1262 }
1263}
1264pub mod query_batch_get_request {
1265 use super::*;
1266 #[doc = "The expand parameters for queries. Possible options are { None, Wiql, Clauses, All, Minimal }"]
1267 #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
1268 pub enum Expand {
1269 #[serde(rename = "none")]
1270 None,
1271 #[serde(rename = "wiql")]
1272 Wiql,
1273 #[serde(rename = "clauses")]
1274 Clauses,
1275 #[serde(rename = "all")]
1276 All,
1277 #[serde(rename = "minimal")]
1278 Minimal,
1279 }
1280 #[doc = "The flag to control error policy in a query batch request. Possible options are { Fail, Omit }."]
1281 #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
1282 pub enum ErrorPolicy {
1283 #[serde(rename = "fail")]
1284 Fail,
1285 #[serde(rename = "omit")]
1286 Omit,
1287 }
1288}
1289#[doc = "Represents an item in the work item query hierarchy. This can be either a query or a folder."]
1290#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
1291pub struct QueryHierarchyItem {
1292 #[serde(flatten)]
1293 pub work_item_tracking_resource: WorkItemTrackingResource,
1294 #[doc = "The child query items inside a query folder."]
1295 #[serde(
1296 default,
1297 deserialize_with = "crate::serde::deserialize_null_as_default",
1298 skip_serializing_if = "Vec::is_empty"
1299 )]
1300 pub children: Vec<QueryHierarchyItem>,
1301 #[doc = "Represents a clause in a work item query. This shows the structure of a work item query."]
1302 #[serde(default, skip_serializing_if = "Option::is_none")]
1303 pub clauses: Option<WorkItemQueryClause>,
1304 #[doc = "The columns of the query."]
1305 #[serde(
1306 default,
1307 deserialize_with = "crate::serde::deserialize_null_as_default",
1308 skip_serializing_if = "Vec::is_empty"
1309 )]
1310 pub columns: Vec<WorkItemFieldReference>,
1311 #[serde(rename = "createdBy", default, skip_serializing_if = "Option::is_none")]
1312 pub created_by: Option<IdentityReference>,
1313 #[doc = "When the query item was created."]
1314 #[serde(
1315 rename = "createdDate",
1316 default,
1317 skip_serializing_if = "Option::is_none",
1318 with = "crate::date_time::rfc3339::option"
1319 )]
1320 pub created_date: Option<time::OffsetDateTime>,
1321 #[doc = "The link query mode."]
1322 #[serde(
1323 rename = "filterOptions",
1324 default,
1325 skip_serializing_if = "Option::is_none"
1326 )]
1327 pub filter_options: Option<query_hierarchy_item::FilterOptions>,
1328 #[doc = "If this is a query folder, indicates if it contains any children."]
1329 #[serde(
1330 rename = "hasChildren",
1331 default,
1332 skip_serializing_if = "Option::is_none"
1333 )]
1334 pub has_children: Option<bool>,
1335 #[doc = "The id of the query item."]
1336 #[serde(default, skip_serializing_if = "Option::is_none")]
1337 pub id: Option<String>,
1338 #[doc = "Indicates if this query item is deleted. Setting this to false on a deleted query item will undelete it. Undeleting a query or folder will not bring back the permission changes that were previously applied to it."]
1339 #[serde(rename = "isDeleted", default, skip_serializing_if = "Option::is_none")]
1340 pub is_deleted: Option<bool>,
1341 #[doc = "Indicates if this is a query folder or a query."]
1342 #[serde(rename = "isFolder", default, skip_serializing_if = "Option::is_none")]
1343 pub is_folder: Option<bool>,
1344 #[doc = "Indicates if the WIQL of this query is invalid. This could be due to invalid syntax or a no longer valid area/iteration path."]
1345 #[serde(
1346 rename = "isInvalidSyntax",
1347 default,
1348 skip_serializing_if = "Option::is_none"
1349 )]
1350 pub is_invalid_syntax: Option<bool>,
1351 #[doc = "Indicates if this query item is public or private."]
1352 #[serde(rename = "isPublic", default, skip_serializing_if = "Option::is_none")]
1353 pub is_public: Option<bool>,
1354 #[serde(
1355 rename = "lastExecutedBy",
1356 default,
1357 skip_serializing_if = "Option::is_none"
1358 )]
1359 pub last_executed_by: Option<IdentityReference>,
1360 #[doc = "When the query was last run."]
1361 #[serde(
1362 rename = "lastExecutedDate",
1363 default,
1364 skip_serializing_if = "Option::is_none",
1365 with = "crate::date_time::rfc3339::option"
1366 )]
1367 pub last_executed_date: Option<time::OffsetDateTime>,
1368 #[serde(
1369 rename = "lastModifiedBy",
1370 default,
1371 skip_serializing_if = "Option::is_none"
1372 )]
1373 pub last_modified_by: Option<IdentityReference>,
1374 #[doc = "When the query item was last modified."]
1375 #[serde(
1376 rename = "lastModifiedDate",
1377 default,
1378 skip_serializing_if = "Option::is_none",
1379 with = "crate::date_time::rfc3339::option"
1380 )]
1381 pub last_modified_date: Option<time::OffsetDateTime>,
1382 #[doc = "Represents a clause in a work item query. This shows the structure of a work item query."]
1383 #[serde(
1384 rename = "linkClauses",
1385 default,
1386 skip_serializing_if = "Option::is_none"
1387 )]
1388 pub link_clauses: Option<WorkItemQueryClause>,
1389 #[doc = "The name of the query item."]
1390 #[serde(default, skip_serializing_if = "Option::is_none")]
1391 pub name: Option<String>,
1392 #[doc = "The path of the query item."]
1393 #[serde(default, skip_serializing_if = "Option::is_none")]
1394 pub path: Option<String>,
1395 #[doc = "The recursion option for use in a tree query."]
1396 #[serde(
1397 rename = "queryRecursionOption",
1398 default,
1399 skip_serializing_if = "Option::is_none"
1400 )]
1401 pub query_recursion_option: Option<query_hierarchy_item::QueryRecursionOption>,
1402 #[doc = "The type of query."]
1403 #[serde(rename = "queryType", default, skip_serializing_if = "Option::is_none")]
1404 pub query_type: Option<query_hierarchy_item::QueryType>,
1405 #[doc = "The sort columns of the query."]
1406 #[serde(
1407 rename = "sortColumns",
1408 default,
1409 deserialize_with = "crate::serde::deserialize_null_as_default",
1410 skip_serializing_if = "Vec::is_empty"
1411 )]
1412 pub sort_columns: Vec<WorkItemQuerySortColumn>,
1413 #[doc = "Represents a clause in a work item query. This shows the structure of a work item query."]
1414 #[serde(
1415 rename = "sourceClauses",
1416 default,
1417 skip_serializing_if = "Option::is_none"
1418 )]
1419 pub source_clauses: Option<WorkItemQueryClause>,
1420 #[doc = "Represents a clause in a work item query. This shows the structure of a work item query."]
1421 #[serde(
1422 rename = "targetClauses",
1423 default,
1424 skip_serializing_if = "Option::is_none"
1425 )]
1426 pub target_clauses: Option<WorkItemQueryClause>,
1427 #[doc = "The WIQL text of the query"]
1428 #[serde(default, skip_serializing_if = "Option::is_none")]
1429 pub wiql: Option<String>,
1430}
1431impl QueryHierarchyItem {
1432 pub fn new(work_item_tracking_resource: WorkItemTrackingResource) -> Self {
1433 Self {
1434 work_item_tracking_resource,
1435 children: Vec::new(),
1436 clauses: None,
1437 columns: Vec::new(),
1438 created_by: None,
1439 created_date: None,
1440 filter_options: None,
1441 has_children: None,
1442 id: None,
1443 is_deleted: None,
1444 is_folder: None,
1445 is_invalid_syntax: None,
1446 is_public: None,
1447 last_executed_by: None,
1448 last_executed_date: None,
1449 last_modified_by: None,
1450 last_modified_date: None,
1451 link_clauses: None,
1452 name: None,
1453 path: None,
1454 query_recursion_option: None,
1455 query_type: None,
1456 sort_columns: Vec::new(),
1457 source_clauses: None,
1458 target_clauses: None,
1459 wiql: None,
1460 }
1461 }
1462}
1463pub mod query_hierarchy_item {
1464 use super::*;
1465 #[doc = "The link query mode."]
1466 #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
1467 pub enum FilterOptions {
1468 #[serde(rename = "workItems")]
1469 WorkItems,
1470 #[serde(rename = "linksOneHopMustContain")]
1471 LinksOneHopMustContain,
1472 #[serde(rename = "linksOneHopMayContain")]
1473 LinksOneHopMayContain,
1474 #[serde(rename = "linksOneHopDoesNotContain")]
1475 LinksOneHopDoesNotContain,
1476 #[serde(rename = "linksRecursiveMustContain")]
1477 LinksRecursiveMustContain,
1478 #[serde(rename = "linksRecursiveMayContain")]
1479 LinksRecursiveMayContain,
1480 #[serde(rename = "linksRecursiveDoesNotContain")]
1481 LinksRecursiveDoesNotContain,
1482 }
1483 #[doc = "The recursion option for use in a tree query."]
1484 #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
1485 pub enum QueryRecursionOption {
1486 #[serde(rename = "parentFirst")]
1487 ParentFirst,
1488 #[serde(rename = "childFirst")]
1489 ChildFirst,
1490 }
1491 #[doc = "The type of query."]
1492 #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
1493 pub enum QueryType {
1494 #[serde(rename = "flat")]
1495 Flat,
1496 #[serde(rename = "tree")]
1497 Tree,
1498 #[serde(rename = "oneHop")]
1499 OneHop,
1500 }
1501}
1502#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
1503pub struct QueryHierarchyItemList {
1504 #[serde(default, skip_serializing_if = "Option::is_none")]
1505 pub count: Option<i32>,
1506 #[serde(
1507 default,
1508 deserialize_with = "crate::serde::deserialize_null_as_default",
1509 skip_serializing_if = "Vec::is_empty"
1510 )]
1511 pub value: Vec<QueryHierarchyItem>,
1512}
1513impl QueryHierarchyItemList {
1514 pub fn new() -> Self {
1515 Self::default()
1516 }
1517}
1518#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
1519pub struct QueryHierarchyItemsResult {
1520 #[doc = "The count of items."]
1521 #[serde(default, skip_serializing_if = "Option::is_none")]
1522 pub count: Option<i32>,
1523 #[doc = "Indicates if the max return limit was hit but there are still more items"]
1524 #[serde(rename = "hasMore", default, skip_serializing_if = "Option::is_none")]
1525 pub has_more: Option<bool>,
1526 #[doc = "The list of items"]
1527 #[serde(
1528 default,
1529 deserialize_with = "crate::serde::deserialize_null_as_default",
1530 skip_serializing_if = "Vec::is_empty"
1531 )]
1532 pub value: Vec<QueryHierarchyItem>,
1533}
1534impl QueryHierarchyItemsResult {
1535 pub fn new() -> Self {
1536 Self::default()
1537 }
1538}
1539#[doc = "The class to represent a collection of REST reference links."]
1540#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
1541pub struct ReferenceLinks {
1542 #[doc = "The readonly view of the links. Because Reference links are readonly, we only want to expose them as read only."]
1543 #[serde(default, skip_serializing_if = "Option::is_none")]
1544 pub links: Option<serde_json::Value>,
1545}
1546impl ReferenceLinks {
1547 pub fn new() -> Self {
1548 Self::default()
1549 }
1550}
1551#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
1552pub struct ReportingWorkItemLinksBatch {
1553 #[serde(flatten)]
1554 pub streamed_batch: StreamedBatch,
1555}
1556impl ReportingWorkItemLinksBatch {
1557 pub fn new() -> Self {
1558 Self::default()
1559 }
1560}
1561#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
1562pub struct ReportingWorkItemRevisionsBatch {
1563 #[serde(flatten)]
1564 pub streamed_batch: StreamedBatch,
1565}
1566impl ReportingWorkItemRevisionsBatch {
1567 pub fn new() -> Self {
1568 Self::default()
1569 }
1570}
1571#[doc = "The class represents the reporting work item revision filer."]
1572#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
1573pub struct ReportingWorkItemRevisionsFilter {
1574 #[doc = "A list of fields to return in work item revisions. Omit this parameter to get all reportable fields."]
1575 #[serde(
1576 default,
1577 deserialize_with = "crate::serde::deserialize_null_as_default",
1578 skip_serializing_if = "Vec::is_empty"
1579 )]
1580 pub fields: Vec<String>,
1581 #[doc = "Include deleted work item in the result."]
1582 #[serde(
1583 rename = "includeDeleted",
1584 default,
1585 skip_serializing_if = "Option::is_none"
1586 )]
1587 pub include_deleted: Option<bool>,
1588 #[doc = "Return an identity reference instead of a string value for identity fields."]
1589 #[serde(
1590 rename = "includeIdentityRef",
1591 default,
1592 skip_serializing_if = "Option::is_none"
1593 )]
1594 pub include_identity_ref: Option<bool>,
1595 #[doc = "Include only the latest version of a work item, skipping over all previous revisions of the work item."]
1596 #[serde(
1597 rename = "includeLatestOnly",
1598 default,
1599 skip_serializing_if = "Option::is_none"
1600 )]
1601 pub include_latest_only: Option<bool>,
1602 #[doc = "Include tag reference instead of string value for System.Tags field"]
1603 #[serde(
1604 rename = "includeTagRef",
1605 default,
1606 skip_serializing_if = "Option::is_none"
1607 )]
1608 pub include_tag_ref: Option<bool>,
1609 #[doc = "A list of types to filter the results to specific work item types. Omit this parameter to get work item revisions of all work item types."]
1610 #[serde(
1611 default,
1612 deserialize_with = "crate::serde::deserialize_null_as_default",
1613 skip_serializing_if = "Vec::is_empty"
1614 )]
1615 pub types: Vec<String>,
1616}
1617impl ReportingWorkItemRevisionsFilter {
1618 pub fn new() -> Self {
1619 Self::default()
1620 }
1621}
1622#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
1623pub struct SendMailBody {
1624 #[serde(
1625 default,
1626 deserialize_with = "crate::serde::deserialize_null_as_default",
1627 skip_serializing_if = "Vec::is_empty"
1628 )]
1629 pub fields: Vec<String>,
1630 #[serde(
1631 default,
1632 deserialize_with = "crate::serde::deserialize_null_as_default",
1633 skip_serializing_if = "Vec::is_empty"
1634 )]
1635 pub ids: Vec<i32>,
1636 #[serde(default, skip_serializing_if = "Option::is_none")]
1637 pub message: Option<MailMessage>,
1638 #[serde(
1639 rename = "persistenceId",
1640 default,
1641 skip_serializing_if = "Option::is_none"
1642 )]
1643 pub persistence_id: Option<String>,
1644 #[serde(rename = "projectId", default, skip_serializing_if = "Option::is_none")]
1645 pub project_id: Option<String>,
1646 #[serde(
1647 rename = "sortFields",
1648 default,
1649 deserialize_with = "crate::serde::deserialize_null_as_default",
1650 skip_serializing_if = "Vec::is_empty"
1651 )]
1652 pub sort_fields: Vec<String>,
1653 #[serde(
1654 rename = "tempQueryId",
1655 default,
1656 skip_serializing_if = "Option::is_none"
1657 )]
1658 pub temp_query_id: Option<String>,
1659 #[serde(default, skip_serializing_if = "Option::is_none")]
1660 pub wiql: Option<String>,
1661}
1662impl SendMailBody {
1663 pub fn new() -> Self {
1664 Self::default()
1665 }
1666}
1667#[doc = "The class describes reporting work item revision batch."]
1668#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
1669pub struct StreamedBatch {
1670 #[doc = "ContinuationToken acts as a waterMark. Used while querying large results."]
1671 #[serde(
1672 rename = "continuationToken",
1673 default,
1674 skip_serializing_if = "Option::is_none"
1675 )]
1676 pub continuation_token: Option<String>,
1677 #[doc = "Returns 'true' if it's last batch, 'false' otherwise."]
1678 #[serde(
1679 rename = "isLastBatch",
1680 default,
1681 skip_serializing_if = "Option::is_none"
1682 )]
1683 pub is_last_batch: Option<bool>,
1684 #[doc = "The next link for the work item."]
1685 #[serde(rename = "nextLink", default, skip_serializing_if = "Option::is_none")]
1686 pub next_link: Option<String>,
1687 #[doc = "Values such as rel, sourceId, TargetId, ChangedDate, isActive."]
1688 #[serde(
1689 default,
1690 deserialize_with = "crate::serde::deserialize_null_as_default",
1691 skip_serializing_if = "Vec::is_empty"
1692 )]
1693 pub values: Vec<String>,
1694}
1695impl StreamedBatch {
1696 pub fn new() -> Self {
1697 Self::default()
1698 }
1699}
1700#[doc = "The Team Context for an operation."]
1701#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
1702pub struct TeamContext {
1703 #[doc = "The team project Id or name. Ignored if ProjectId is set."]
1704 #[serde(default, skip_serializing_if = "Option::is_none")]
1705 pub project: Option<String>,
1706 #[doc = "The Team Project ID. Required if Project is not set."]
1707 #[serde(rename = "projectId", default, skip_serializing_if = "Option::is_none")]
1708 pub project_id: Option<String>,
1709 #[doc = "The Team Id or name. Ignored if TeamId is set."]
1710 #[serde(default, skip_serializing_if = "Option::is_none")]
1711 pub team: Option<String>,
1712 #[doc = "The Team Id"]
1713 #[serde(rename = "teamId", default, skip_serializing_if = "Option::is_none")]
1714 pub team_id: Option<String>,
1715}
1716impl TeamContext {
1717 pub fn new() -> Self {
1718 Self::default()
1719 }
1720}
1721#[doc = "Describes a request to create a temporary query"]
1722#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
1723pub struct TemporaryQueryRequestModel {
1724 #[serde(flatten)]
1725 pub work_item_tracking_resource: WorkItemTrackingResource,
1726 #[doc = "The WIQL text of the temporary query"]
1727 #[serde(default, skip_serializing_if = "Option::is_none")]
1728 pub wiql: Option<String>,
1729}
1730impl TemporaryQueryRequestModel {
1731 pub fn new(work_item_tracking_resource: WorkItemTrackingResource) -> Self {
1732 Self {
1733 work_item_tracking_resource,
1734 wiql: None,
1735 }
1736 }
1737}
1738#[doc = "The result of a temporary query creation."]
1739#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
1740pub struct TemporaryQueryResponseModel {
1741 #[doc = "The id of the temporary query item."]
1742 #[serde(default, skip_serializing_if = "Option::is_none")]
1743 pub id: Option<String>,
1744}
1745impl TemporaryQueryResponseModel {
1746 pub fn new() -> Self {
1747 Self::default()
1748 }
1749}
1750#[doc = "Describes an update request for a work item field."]
1751#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
1752pub struct UpdateWorkItemField {
1753 #[doc = "Indicates whether the user wants to restore the field."]
1754 #[serde(rename = "isDeleted", default, skip_serializing_if = "Option::is_none")]
1755 pub is_deleted: Option<bool>,
1756}
1757impl UpdateWorkItemField {
1758 pub fn new() -> Self {
1759 Self::default()
1760 }
1761}
1762#[doc = "This class is used to serialize collections as a single JSON object on the wire."]
1763#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
1764pub struct VssJsonCollectionWrapper {
1765 #[serde(flatten)]
1766 pub vss_json_collection_wrapper_base: VssJsonCollectionWrapperBase,
1767 #[doc = "The serialized item."]
1768 #[serde(default, skip_serializing_if = "Option::is_none")]
1769 pub value: Option<String>,
1770}
1771impl VssJsonCollectionWrapper {
1772 pub fn new() -> Self {
1773 Self::default()
1774 }
1775}
1776#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
1777pub struct VssJsonCollectionWrapperBase {
1778 #[doc = "The number of serialized items."]
1779 #[serde(default, skip_serializing_if = "Option::is_none")]
1780 pub count: Option<i32>,
1781}
1782impl VssJsonCollectionWrapperBase {
1783 pub fn new() -> Self {
1784 Self::default()
1785 }
1786}
1787#[doc = "A WIQL query"]
1788#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
1789pub struct Wiql {
1790 #[doc = "The text of the WIQL query"]
1791 #[serde(default, skip_serializing_if = "Option::is_none")]
1792 pub query: Option<String>,
1793}
1794impl Wiql {
1795 pub fn new() -> Self {
1796 Self::default()
1797 }
1798}
1799#[doc = "A work artifact link describes an outbound artifact link type."]
1800#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
1801pub struct WorkArtifactLink {
1802 #[doc = "Target artifact type."]
1803 #[serde(
1804 rename = "artifactType",
1805 default,
1806 skip_serializing_if = "Option::is_none"
1807 )]
1808 pub artifact_type: Option<String>,
1809 #[doc = "Outbound link type."]
1810 #[serde(rename = "linkType", default, skip_serializing_if = "Option::is_none")]
1811 pub link_type: Option<String>,
1812 #[doc = "Target tool type."]
1813 #[serde(rename = "toolType", default, skip_serializing_if = "Option::is_none")]
1814 pub tool_type: Option<String>,
1815}
1816impl WorkArtifactLink {
1817 pub fn new() -> Self {
1818 Self::default()
1819 }
1820}
1821#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
1822pub struct WorkArtifactLinkList {
1823 #[serde(default, skip_serializing_if = "Option::is_none")]
1824 pub count: Option<i32>,
1825 #[serde(
1826 default,
1827 deserialize_with = "crate::serde::deserialize_null_as_default",
1828 skip_serializing_if = "Vec::is_empty"
1829 )]
1830 pub value: Vec<WorkArtifactLink>,
1831}
1832impl WorkArtifactLinkList {
1833 pub fn new() -> Self {
1834 Self::default()
1835 }
1836}
1837#[doc = "Describes a work item."]
1838#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
1839pub struct WorkItem {
1840 #[serde(flatten)]
1841 pub work_item_tracking_resource: WorkItemTrackingResource,
1842 #[doc = "Represents the reference to a specific version of a comment on a Work Item."]
1843 #[serde(
1844 rename = "commentVersionRef",
1845 default,
1846 skip_serializing_if = "Option::is_none"
1847 )]
1848 pub comment_version_ref: Option<WorkItemCommentVersionRef>,
1849 #[doc = "Map of field and values for the work item."]
1850 pub fields: serde_json::Value,
1851 #[doc = "The work item ID."]
1852 pub id: i32,
1853 #[doc = "Relations of the work item."]
1854 #[serde(
1855 default,
1856 deserialize_with = "crate::serde::deserialize_null_as_default",
1857 skip_serializing_if = "Vec::is_empty"
1858 )]
1859 pub relations: Vec<WorkItemRelation>,
1860 #[doc = "Revision number of the work item."]
1861 #[serde(default, skip_serializing_if = "Option::is_none")]
1862 pub rev: Option<i32>,
1863}
1864impl WorkItem {
1865 pub fn new(
1866 work_item_tracking_resource: WorkItemTrackingResource,
1867 fields: serde_json::Value,
1868 id: i32,
1869 ) -> Self {
1870 Self {
1871 work_item_tracking_resource,
1872 comment_version_ref: None,
1873 fields,
1874 id,
1875 relations: Vec::new(),
1876 rev: None,
1877 }
1878 }
1879}
1880#[doc = "Describes a request to get a set of work items"]
1881#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
1882pub struct WorkItemBatchGetRequest {
1883 #[doc = "The expand parameters for work item attributes. Possible options are { None, Relations, Fields, Links, All }"]
1884 #[serde(rename = "$expand", default, skip_serializing_if = "Option::is_none")]
1885 pub expand: Option<work_item_batch_get_request::Expand>,
1886 #[doc = "AsOf UTC date time string"]
1887 #[serde(
1888 rename = "asOf",
1889 default,
1890 skip_serializing_if = "Option::is_none",
1891 with = "crate::date_time::rfc3339::option"
1892 )]
1893 pub as_of: Option<time::OffsetDateTime>,
1894 #[doc = "The flag to control error policy in a bulk get work items request. Possible options are {Fail, Omit}."]
1895 #[serde(
1896 rename = "errorPolicy",
1897 default,
1898 skip_serializing_if = "Option::is_none"
1899 )]
1900 pub error_policy: Option<work_item_batch_get_request::ErrorPolicy>,
1901 #[doc = "The requested fields"]
1902 #[serde(
1903 default,
1904 deserialize_with = "crate::serde::deserialize_null_as_default",
1905 skip_serializing_if = "Vec::is_empty"
1906 )]
1907 pub fields: Vec<String>,
1908 #[doc = "The requested work item ids"]
1909 #[serde(
1910 default,
1911 deserialize_with = "crate::serde::deserialize_null_as_default",
1912 skip_serializing_if = "Vec::is_empty"
1913 )]
1914 pub ids: Vec<i32>,
1915}
1916impl WorkItemBatchGetRequest {
1917 pub fn new() -> Self {
1918 Self::default()
1919 }
1920}
1921pub mod work_item_batch_get_request {
1922 use super::*;
1923 #[doc = "The expand parameters for work item attributes. Possible options are { None, Relations, Fields, Links, All }"]
1924 #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
1925 pub enum Expand {
1926 #[serde(rename = "none")]
1927 None,
1928 #[serde(rename = "relations")]
1929 Relations,
1930 #[serde(rename = "fields")]
1931 Fields,
1932 #[serde(rename = "links")]
1933 Links,
1934 #[serde(rename = "all")]
1935 All,
1936 }
1937 #[doc = "The flag to control error policy in a bulk get work items request. Possible options are {Fail, Omit}."]
1938 #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
1939 pub enum ErrorPolicy {
1940 #[serde(rename = "fail")]
1941 Fail,
1942 #[serde(rename = "omit")]
1943 Omit,
1944 }
1945}
1946#[doc = "Defines a classification node for work item tracking."]
1947#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
1948pub struct WorkItemClassificationNode {
1949 #[serde(flatten)]
1950 pub work_item_tracking_resource: WorkItemTrackingResource,
1951 #[doc = "Dictionary that has node attributes like start/finish date for iteration nodes."]
1952 #[serde(default, skip_serializing_if = "Option::is_none")]
1953 pub attributes: Option<serde_json::Value>,
1954 #[doc = "List of child nodes fetched."]
1955 #[serde(
1956 default,
1957 deserialize_with = "crate::serde::deserialize_null_as_default",
1958 skip_serializing_if = "Vec::is_empty"
1959 )]
1960 pub children: Vec<WorkItemClassificationNode>,
1961 #[doc = "Flag that indicates if the classification node has any child nodes."]
1962 #[serde(
1963 rename = "hasChildren",
1964 default,
1965 skip_serializing_if = "Option::is_none"
1966 )]
1967 pub has_children: Option<bool>,
1968 #[doc = "Integer ID of the classification node."]
1969 #[serde(default, skip_serializing_if = "Option::is_none")]
1970 pub id: Option<i32>,
1971 #[doc = "GUID ID of the classification node."]
1972 #[serde(default, skip_serializing_if = "Option::is_none")]
1973 pub identifier: Option<String>,
1974 #[doc = "Name of the classification node."]
1975 #[serde(default, skip_serializing_if = "Option::is_none")]
1976 pub name: Option<String>,
1977 #[doc = "Path of the classification node."]
1978 #[serde(default, skip_serializing_if = "Option::is_none")]
1979 pub path: Option<String>,
1980 #[doc = "Node structure type."]
1981 #[serde(
1982 rename = "structureType",
1983 default,
1984 skip_serializing_if = "Option::is_none"
1985 )]
1986 pub structure_type: Option<work_item_classification_node::StructureType>,
1987}
1988impl WorkItemClassificationNode {
1989 pub fn new(work_item_tracking_resource: WorkItemTrackingResource) -> Self {
1990 Self {
1991 work_item_tracking_resource,
1992 attributes: None,
1993 children: Vec::new(),
1994 has_children: None,
1995 id: None,
1996 identifier: None,
1997 name: None,
1998 path: None,
1999 structure_type: None,
2000 }
2001 }
2002}
2003pub mod work_item_classification_node {
2004 use super::*;
2005 #[doc = "Node structure type."]
2006 #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
2007 pub enum StructureType {
2008 #[serde(rename = "area")]
2009 Area,
2010 #[serde(rename = "iteration")]
2011 Iteration,
2012 }
2013}
2014#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
2015pub struct WorkItemClassificationNodeList {
2016 #[serde(default, skip_serializing_if = "Option::is_none")]
2017 pub count: Option<i32>,
2018 #[serde(
2019 default,
2020 deserialize_with = "crate::serde::deserialize_null_as_default",
2021 skip_serializing_if = "Vec::is_empty"
2022 )]
2023 pub value: Vec<WorkItemClassificationNode>,
2024}
2025impl WorkItemClassificationNodeList {
2026 pub fn new() -> Self {
2027 Self::default()
2028 }
2029}
2030#[doc = "Comment on Work Item"]
2031#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
2032pub struct WorkItemComment {
2033 #[serde(flatten)]
2034 pub work_item_tracking_resource: WorkItemTrackingResource,
2035 #[doc = "Represents the possible types for the comment format."]
2036 #[serde(default, skip_serializing_if = "Option::is_none")]
2037 pub format: Option<work_item_comment::Format>,
2038 #[doc = "The text of the comment in HTML format."]
2039 #[serde(
2040 rename = "renderedText",
2041 default,
2042 skip_serializing_if = "Option::is_none"
2043 )]
2044 pub rendered_text: Option<String>,
2045 #[serde(rename = "revisedBy", default, skip_serializing_if = "Option::is_none")]
2046 pub revised_by: Option<IdentityReference>,
2047 #[doc = "The date of comment."]
2048 #[serde(
2049 rename = "revisedDate",
2050 default,
2051 skip_serializing_if = "Option::is_none",
2052 with = "crate::date_time::rfc3339::option"
2053 )]
2054 pub revised_date: Option<time::OffsetDateTime>,
2055 #[doc = "The work item revision number."]
2056 #[serde(default, skip_serializing_if = "Option::is_none")]
2057 pub revision: Option<i32>,
2058 #[doc = "The text of the comment."]
2059 #[serde(default, skip_serializing_if = "Option::is_none")]
2060 pub text: Option<String>,
2061}
2062impl WorkItemComment {
2063 pub fn new(work_item_tracking_resource: WorkItemTrackingResource) -> Self {
2064 Self {
2065 work_item_tracking_resource,
2066 format: None,
2067 rendered_text: None,
2068 revised_by: None,
2069 revised_date: None,
2070 revision: None,
2071 text: None,
2072 }
2073 }
2074}
2075pub mod work_item_comment {
2076 use super::*;
2077 #[doc = "Represents the possible types for the comment format."]
2078 #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
2079 pub enum Format {
2080 #[serde(rename = "markdown")]
2081 Markdown,
2082 #[serde(rename = "html")]
2083 Html,
2084 }
2085}
2086#[doc = "Represents the reference to a specific version of a comment on a Work Item."]
2087#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
2088pub struct WorkItemCommentVersionRef {
2089 #[serde(flatten)]
2090 pub work_item_tracking_resource_reference: WorkItemTrackingResourceReference,
2091 #[doc = "The id assigned to the comment."]
2092 #[serde(rename = "commentId", default, skip_serializing_if = "Option::is_none")]
2093 pub comment_id: Option<i32>,
2094 #[doc = "\\[Internal\\] The work item revision where this comment was originally added."]
2095 #[serde(
2096 rename = "createdInRevision",
2097 default,
2098 skip_serializing_if = "Option::is_none"
2099 )]
2100 pub created_in_revision: Option<i32>,
2101 #[doc = "\\[Internal\\] Specifies whether comment was deleted."]
2102 #[serde(rename = "isDeleted", default, skip_serializing_if = "Option::is_none")]
2103 pub is_deleted: Option<bool>,
2104 #[doc = "\\[Internal\\] The text of the comment."]
2105 #[serde(default, skip_serializing_if = "Option::is_none")]
2106 pub text: Option<String>,
2107 #[doc = "The version number."]
2108 #[serde(default, skip_serializing_if = "Option::is_none")]
2109 pub version: Option<i32>,
2110}
2111impl WorkItemCommentVersionRef {
2112 pub fn new(work_item_tracking_resource_reference: WorkItemTrackingResourceReference) -> Self {
2113 Self {
2114 work_item_tracking_resource_reference,
2115 comment_id: None,
2116 created_in_revision: None,
2117 is_deleted: None,
2118 text: None,
2119 version: None,
2120 }
2121 }
2122}
2123#[doc = "Collection of comments."]
2124#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
2125pub struct WorkItemComments {
2126 #[serde(flatten)]
2127 pub work_item_tracking_resource: WorkItemTrackingResource,
2128 #[doc = "Comments collection."]
2129 #[serde(
2130 default,
2131 deserialize_with = "crate::serde::deserialize_null_as_default",
2132 skip_serializing_if = "Vec::is_empty"
2133 )]
2134 pub comments: Vec<WorkItemComment>,
2135 #[doc = "The count of comments."]
2136 #[serde(default, skip_serializing_if = "Option::is_none")]
2137 pub count: Option<i32>,
2138 #[doc = "Count of comments from the revision."]
2139 #[serde(
2140 rename = "fromRevisionCount",
2141 default,
2142 skip_serializing_if = "Option::is_none"
2143 )]
2144 pub from_revision_count: Option<i32>,
2145 #[doc = "Total count of comments."]
2146 #[serde(
2147 rename = "totalCount",
2148 default,
2149 skip_serializing_if = "Option::is_none"
2150 )]
2151 pub total_count: Option<i32>,
2152}
2153impl WorkItemComments {
2154 pub fn new(work_item_tracking_resource: WorkItemTrackingResource) -> Self {
2155 Self {
2156 work_item_tracking_resource,
2157 comments: Vec::new(),
2158 count: None,
2159 from_revision_count: None,
2160 total_count: None,
2161 }
2162 }
2163}
2164#[doc = "Full deleted work item object. Includes the work item itself."]
2165#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
2166pub struct WorkItemDelete {
2167 #[serde(flatten)]
2168 pub work_item_delete_reference: WorkItemDeleteReference,
2169 #[doc = "Describes a work item."]
2170 #[serde(default, skip_serializing_if = "Option::is_none")]
2171 pub resource: Option<WorkItem>,
2172}
2173impl WorkItemDelete {
2174 pub fn new() -> Self {
2175 Self::default()
2176 }
2177}
2178#[doc = "Describes response to delete a set of work items."]
2179#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
2180pub struct WorkItemDeleteBatch {
2181 #[doc = "List of results for each work item"]
2182 #[serde(
2183 default,
2184 deserialize_with = "crate::serde::deserialize_null_as_default",
2185 skip_serializing_if = "Vec::is_empty"
2186 )]
2187 pub results: Vec<WorkItemDelete>,
2188}
2189impl WorkItemDeleteBatch {
2190 pub fn new() -> Self {
2191 Self::default()
2192 }
2193}
2194#[doc = "Describes a request to delete a set of work items"]
2195#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
2196pub struct WorkItemDeleteBatchRequest {
2197 #[doc = "Optional parameter, if set to true, the work item is deleted permanently. Please note: the destroy action is PERMANENT and cannot be undone."]
2198 #[serde(default, skip_serializing_if = "Option::is_none")]
2199 pub destroy: Option<bool>,
2200 #[doc = "The requested work item ids"]
2201 #[serde(
2202 default,
2203 deserialize_with = "crate::serde::deserialize_null_as_default",
2204 skip_serializing_if = "Vec::is_empty"
2205 )]
2206 pub ids: Vec<i32>,
2207 #[doc = "Optional parameter, if set to true, notifications will be disabled."]
2208 #[serde(
2209 rename = "skipNotifications",
2210 default,
2211 skip_serializing_if = "Option::is_none"
2212 )]
2213 pub skip_notifications: Option<bool>,
2214}
2215impl WorkItemDeleteBatchRequest {
2216 pub fn new() -> Self {
2217 Self::default()
2218 }
2219}
2220#[doc = "Reference to a deleted work item."]
2221#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
2222pub struct WorkItemDeleteReference {
2223 #[doc = "The HTTP status code for work item operation in a batch request."]
2224 #[serde(default, skip_serializing_if = "Option::is_none")]
2225 pub code: Option<i32>,
2226 #[doc = "The user who deleted the work item type."]
2227 #[serde(rename = "deletedBy", default, skip_serializing_if = "Option::is_none")]
2228 pub deleted_by: Option<String>,
2229 #[doc = "The work item deletion date."]
2230 #[serde(
2231 rename = "deletedDate",
2232 default,
2233 skip_serializing_if = "Option::is_none"
2234 )]
2235 pub deleted_date: Option<String>,
2236 #[doc = "Work item ID."]
2237 #[serde(default, skip_serializing_if = "Option::is_none")]
2238 pub id: Option<i32>,
2239 #[doc = "The exception message for work item operation in a batch request."]
2240 #[serde(default, skip_serializing_if = "Option::is_none")]
2241 pub message: Option<String>,
2242 #[doc = "Name or title of the work item."]
2243 #[serde(default, skip_serializing_if = "Option::is_none")]
2244 pub name: Option<String>,
2245 #[doc = "Parent project of the deleted work item."]
2246 #[serde(default, skip_serializing_if = "Option::is_none")]
2247 pub project: Option<String>,
2248 #[doc = "Type of work item."]
2249 #[serde(rename = "type", default, skip_serializing_if = "Option::is_none")]
2250 pub type_: Option<String>,
2251 #[doc = "REST API URL of the resource"]
2252 #[serde(default, skip_serializing_if = "Option::is_none")]
2253 pub url: Option<String>,
2254}
2255impl WorkItemDeleteReference {
2256 pub fn new() -> Self {
2257 Self::default()
2258 }
2259}
2260#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
2261pub struct WorkItemDeleteReferenceList {
2262 #[serde(default, skip_serializing_if = "Option::is_none")]
2263 pub count: Option<i32>,
2264 #[serde(
2265 default,
2266 deserialize_with = "crate::serde::deserialize_null_as_default",
2267 skip_serializing_if = "Vec::is_empty"
2268 )]
2269 pub value: Vec<WorkItemDeleteReference>,
2270}
2271impl WorkItemDeleteReferenceList {
2272 pub fn new() -> Self {
2273 Self::default()
2274 }
2275}
2276#[doc = "Shallow Reference to a deleted work item."]
2277#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
2278pub struct WorkItemDeleteShallowReference {
2279 #[doc = "Work item ID."]
2280 #[serde(default, skip_serializing_if = "Option::is_none")]
2281 pub id: Option<i32>,
2282 #[doc = "REST API URL of the resource"]
2283 #[serde(default, skip_serializing_if = "Option::is_none")]
2284 pub url: Option<String>,
2285}
2286impl WorkItemDeleteShallowReference {
2287 pub fn new() -> Self {
2288 Self::default()
2289 }
2290}
2291#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
2292pub struct WorkItemDeleteShallowReferenceList {
2293 #[serde(default, skip_serializing_if = "Option::is_none")]
2294 pub count: Option<i32>,
2295 #[serde(
2296 default,
2297 deserialize_with = "crate::serde::deserialize_null_as_default",
2298 skip_serializing_if = "Vec::is_empty"
2299 )]
2300 pub value: Vec<WorkItemDeleteShallowReference>,
2301}
2302impl WorkItemDeleteShallowReferenceList {
2303 pub fn new() -> Self {
2304 Self::default()
2305 }
2306}
2307#[doc = "Describes an update request for a deleted work item."]
2308#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
2309pub struct WorkItemDeleteUpdate {
2310 #[doc = "Sets a value indicating whether this work item is deleted."]
2311 #[serde(rename = "isDeleted", default, skip_serializing_if = "Option::is_none")]
2312 pub is_deleted: Option<bool>,
2313}
2314impl WorkItemDeleteUpdate {
2315 pub fn new() -> Self {
2316 Self::default()
2317 }
2318}
2319#[doc = "Describes a field on a work item and it's properties specific to that work item type."]
2320#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
2321pub struct WorkItemField {
2322 #[serde(flatten)]
2323 pub work_item_tracking_resource: WorkItemTrackingResource,
2324 #[doc = "Indicates whether the field is sortable in server queries."]
2325 #[serde(rename = "canSortBy", default, skip_serializing_if = "Option::is_none")]
2326 pub can_sort_by: Option<bool>,
2327 #[doc = "The description of the field."]
2328 #[serde(default, skip_serializing_if = "Option::is_none")]
2329 pub description: Option<String>,
2330 #[doc = "Indicates whether this field is deleted."]
2331 #[serde(rename = "isDeleted", default, skip_serializing_if = "Option::is_none")]
2332 pub is_deleted: Option<bool>,
2333 #[doc = "Indicates whether this field is an identity field."]
2334 #[serde(
2335 rename = "isIdentity",
2336 default,
2337 skip_serializing_if = "Option::is_none"
2338 )]
2339 pub is_identity: Option<bool>,
2340 #[doc = "Indicates whether this instance is picklist."]
2341 #[serde(
2342 rename = "isPicklist",
2343 default,
2344 skip_serializing_if = "Option::is_none"
2345 )]
2346 pub is_picklist: Option<bool>,
2347 #[doc = "Indicates whether this instance is a suggested picklist ."]
2348 #[serde(
2349 rename = "isPicklistSuggested",
2350 default,
2351 skip_serializing_if = "Option::is_none"
2352 )]
2353 pub is_picklist_suggested: Option<bool>,
2354 #[doc = "Indicates whether the field can be queried in the server."]
2355 #[serde(
2356 rename = "isQueryable",
2357 default,
2358 skip_serializing_if = "Option::is_none"
2359 )]
2360 pub is_queryable: Option<bool>,
2361 #[doc = "The name of the field."]
2362 #[serde(default, skip_serializing_if = "Option::is_none")]
2363 pub name: Option<String>,
2364 #[doc = "If this field is picklist, the identifier of the picklist associated, otherwise null"]
2365 #[serde(
2366 rename = "picklistId",
2367 default,
2368 skip_serializing_if = "Option::is_none"
2369 )]
2370 pub picklist_id: Option<String>,
2371 #[doc = "Indicates whether the field is [read only]."]
2372 #[serde(rename = "readOnly", default, skip_serializing_if = "Option::is_none")]
2373 pub read_only: Option<bool>,
2374 #[doc = "The reference name of the field."]
2375 #[serde(
2376 rename = "referenceName",
2377 default,
2378 skip_serializing_if = "Option::is_none"
2379 )]
2380 pub reference_name: Option<String>,
2381 #[doc = "The supported operations on this field."]
2382 #[serde(
2383 rename = "supportedOperations",
2384 default,
2385 deserialize_with = "crate::serde::deserialize_null_as_default",
2386 skip_serializing_if = "Vec::is_empty"
2387 )]
2388 pub supported_operations: Vec<WorkItemFieldOperation>,
2389 #[doc = "The type of the field."]
2390 #[serde(rename = "type", default, skip_serializing_if = "Option::is_none")]
2391 pub type_: Option<work_item_field::Type>,
2392 #[doc = "The usage of the field."]
2393 #[serde(default, skip_serializing_if = "Option::is_none")]
2394 pub usage: Option<work_item_field::Usage>,
2395}
2396impl WorkItemField {
2397 pub fn new(work_item_tracking_resource: WorkItemTrackingResource) -> Self {
2398 Self {
2399 work_item_tracking_resource,
2400 can_sort_by: None,
2401 description: None,
2402 is_deleted: None,
2403 is_identity: None,
2404 is_picklist: None,
2405 is_picklist_suggested: None,
2406 is_queryable: None,
2407 name: None,
2408 picklist_id: None,
2409 read_only: None,
2410 reference_name: None,
2411 supported_operations: Vec::new(),
2412 type_: None,
2413 usage: None,
2414 }
2415 }
2416}
2417pub mod work_item_field {
2418 use super::*;
2419 #[doc = "The type of the field."]
2420 #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
2421 pub enum Type {
2422 #[serde(rename = "string")]
2423 String,
2424 #[serde(rename = "integer")]
2425 Integer,
2426 #[serde(rename = "dateTime")]
2427 DateTime,
2428 #[serde(rename = "plainText")]
2429 PlainText,
2430 #[serde(rename = "html")]
2431 Html,
2432 #[serde(rename = "treePath")]
2433 TreePath,
2434 #[serde(rename = "history")]
2435 History,
2436 #[serde(rename = "double")]
2437 Double,
2438 #[serde(rename = "guid")]
2439 Guid,
2440 #[serde(rename = "boolean")]
2441 Boolean,
2442 #[serde(rename = "identity")]
2443 Identity,
2444 #[serde(rename = "picklistString")]
2445 PicklistString,
2446 #[serde(rename = "picklistInteger")]
2447 PicklistInteger,
2448 #[serde(rename = "picklistDouble")]
2449 PicklistDouble,
2450 }
2451 #[doc = "The usage of the field."]
2452 #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
2453 pub enum Usage {
2454 #[serde(rename = "none")]
2455 None,
2456 #[serde(rename = "workItem")]
2457 WorkItem,
2458 #[serde(rename = "workItemLink")]
2459 WorkItemLink,
2460 #[serde(rename = "tree")]
2461 Tree,
2462 #[serde(rename = "workItemTypeExtension")]
2463 WorkItemTypeExtension,
2464 }
2465}
2466#[doc = "Describes a field on a work item and it's properties specific to that work item type."]
2467#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
2468pub struct WorkItemField2 {
2469 #[serde(flatten)]
2470 pub work_item_field: WorkItemField,
2471 #[doc = "Indicates whether this field is marked as locked for editing."]
2472 #[serde(rename = "isLocked", default, skip_serializing_if = "Option::is_none")]
2473 pub is_locked: Option<bool>,
2474}
2475impl WorkItemField2 {
2476 pub fn new(work_item_field: WorkItemField) -> Self {
2477 Self {
2478 work_item_field,
2479 is_locked: None,
2480 }
2481 }
2482}
2483#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
2484pub struct WorkItemField2List {
2485 #[serde(default, skip_serializing_if = "Option::is_none")]
2486 pub count: Option<i32>,
2487 #[serde(
2488 default,
2489 deserialize_with = "crate::serde::deserialize_null_as_default",
2490 skip_serializing_if = "Vec::is_empty"
2491 )]
2492 pub value: Vec<WorkItemField2>,
2493}
2494impl WorkItemField2List {
2495 pub fn new() -> Self {
2496 Self::default()
2497 }
2498}
2499#[doc = "Describes the list of allowed values of the field."]
2500#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
2501pub struct WorkItemFieldAllowedValues {
2502 #[doc = "The list of field allowed values."]
2503 #[serde(
2504 rename = "allowedValues",
2505 default,
2506 deserialize_with = "crate::serde::deserialize_null_as_default",
2507 skip_serializing_if = "Vec::is_empty"
2508 )]
2509 pub allowed_values: Vec<String>,
2510 #[doc = "Name of the field."]
2511 #[serde(rename = "fieldName", default, skip_serializing_if = "Option::is_none")]
2512 pub field_name: Option<String>,
2513}
2514impl WorkItemFieldAllowedValues {
2515 pub fn new() -> Self {
2516 Self::default()
2517 }
2518}
2519#[doc = "Describes a work item field operation."]
2520#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
2521pub struct WorkItemFieldOperation {
2522 #[doc = "Friendly name of the operation."]
2523 #[serde(default, skip_serializing_if = "Option::is_none")]
2524 pub name: Option<String>,
2525 #[doc = "Reference name of the operation."]
2526 #[serde(
2527 rename = "referenceName",
2528 default,
2529 skip_serializing_if = "Option::is_none"
2530 )]
2531 pub reference_name: Option<String>,
2532}
2533impl WorkItemFieldOperation {
2534 pub fn new() -> Self {
2535 Self::default()
2536 }
2537}
2538#[doc = "Reference to a field in a work item"]
2539#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
2540pub struct WorkItemFieldReference {
2541 #[doc = "The friendly name of the field."]
2542 #[serde(default, skip_serializing_if = "Option::is_none")]
2543 pub name: Option<String>,
2544 #[doc = "The reference name of the field."]
2545 #[serde(
2546 rename = "referenceName",
2547 default,
2548 skip_serializing_if = "Option::is_none"
2549 )]
2550 pub reference_name: Option<String>,
2551 #[doc = "The REST URL of the resource."]
2552 #[serde(default, skip_serializing_if = "Option::is_none")]
2553 pub url: Option<String>,
2554}
2555impl WorkItemFieldReference {
2556 pub fn new() -> Self {
2557 Self::default()
2558 }
2559}
2560#[doc = "Describes an update to a work item field."]
2561#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
2562pub struct WorkItemFieldUpdate {
2563 #[doc = "The new value of the field."]
2564 #[serde(rename = "newValue", default, skip_serializing_if = "Option::is_none")]
2565 pub new_value: Option<serde_json::Value>,
2566 #[doc = "The old value of the field."]
2567 #[serde(rename = "oldValue", default, skip_serializing_if = "Option::is_none")]
2568 pub old_value: Option<serde_json::Value>,
2569}
2570impl WorkItemFieldUpdate {
2571 pub fn new() -> Self {
2572 Self::default()
2573 }
2574}
2575#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
2576pub struct WorkItemHistory {
2577 #[serde(flatten)]
2578 pub work_item_tracking_resource: WorkItemTrackingResource,
2579 #[serde(default, skip_serializing_if = "Option::is_none")]
2580 pub rev: Option<i32>,
2581 #[serde(rename = "revisedBy", default, skip_serializing_if = "Option::is_none")]
2582 pub revised_by: Option<IdentityReference>,
2583 #[serde(
2584 rename = "revisedDate",
2585 default,
2586 skip_serializing_if = "Option::is_none",
2587 with = "crate::date_time::rfc3339::option"
2588 )]
2589 pub revised_date: Option<time::OffsetDateTime>,
2590 #[serde(default, skip_serializing_if = "Option::is_none")]
2591 pub value: Option<String>,
2592}
2593impl WorkItemHistory {
2594 pub fn new(work_item_tracking_resource: WorkItemTrackingResource) -> Self {
2595 Self {
2596 work_item_tracking_resource,
2597 rev: None,
2598 revised_by: None,
2599 revised_date: None,
2600 value: None,
2601 }
2602 }
2603}
2604#[doc = "Reference to a work item icon."]
2605#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
2606pub struct WorkItemIcon {
2607 #[doc = "The identifier of the icon."]
2608 #[serde(default, skip_serializing_if = "Option::is_none")]
2609 pub id: Option<String>,
2610 #[doc = "The REST URL of the resource."]
2611 #[serde(default, skip_serializing_if = "Option::is_none")]
2612 pub url: Option<String>,
2613}
2614impl WorkItemIcon {
2615 pub fn new() -> Self {
2616 Self::default()
2617 }
2618}
2619#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
2620pub struct WorkItemIconList {
2621 #[serde(default, skip_serializing_if = "Option::is_none")]
2622 pub count: Option<i32>,
2623 #[serde(
2624 default,
2625 deserialize_with = "crate::serde::deserialize_null_as_default",
2626 skip_serializing_if = "Vec::is_empty"
2627 )]
2628 pub value: Vec<WorkItemIcon>,
2629}
2630impl WorkItemIconList {
2631 pub fn new() -> Self {
2632 Self::default()
2633 }
2634}
2635#[doc = "A link between two work items."]
2636#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
2637pub struct WorkItemLink {
2638 #[doc = "The type of link."]
2639 #[serde(default, skip_serializing_if = "Option::is_none")]
2640 pub rel: Option<String>,
2641 #[doc = "Contains reference to a work item."]
2642 #[serde(default, skip_serializing_if = "Option::is_none")]
2643 pub source: Option<WorkItemReference>,
2644 #[doc = "Contains reference to a work item."]
2645 #[serde(default, skip_serializing_if = "Option::is_none")]
2646 pub target: Option<WorkItemReference>,
2647}
2648impl WorkItemLink {
2649 pub fn new() -> Self {
2650 Self::default()
2651 }
2652}
2653#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
2654pub struct WorkItemList {
2655 #[serde(default, skip_serializing_if = "Option::is_none")]
2656 pub count: Option<i32>,
2657 #[serde(
2658 default,
2659 deserialize_with = "crate::serde::deserialize_null_as_default",
2660 skip_serializing_if = "Vec::is_empty"
2661 )]
2662 pub value: Vec<WorkItem>,
2663}
2664impl WorkItemList {
2665 pub fn new() -> Self {
2666 Self::default()
2667 }
2668}
2669#[doc = "Describes the next state for a work item."]
2670#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
2671pub struct WorkItemNextStateOnTransition {
2672 #[doc = "Error code if there is no next state transition possible."]
2673 #[serde(rename = "errorCode", default, skip_serializing_if = "Option::is_none")]
2674 pub error_code: Option<String>,
2675 #[doc = "Work item ID."]
2676 #[serde(default, skip_serializing_if = "Option::is_none")]
2677 pub id: Option<i32>,
2678 #[doc = "Error message if there is no next state transition possible."]
2679 #[serde(default, skip_serializing_if = "Option::is_none")]
2680 pub message: Option<String>,
2681 #[doc = "Name of the next state on transition."]
2682 #[serde(
2683 rename = "stateOnTransition",
2684 default,
2685 skip_serializing_if = "Option::is_none"
2686 )]
2687 pub state_on_transition: Option<String>,
2688}
2689impl WorkItemNextStateOnTransition {
2690 pub fn new() -> Self {
2691 Self::default()
2692 }
2693}
2694#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
2695pub struct WorkItemNextStateOnTransitionList {
2696 #[serde(default, skip_serializing_if = "Option::is_none")]
2697 pub count: Option<i32>,
2698 #[serde(
2699 default,
2700 deserialize_with = "crate::serde::deserialize_null_as_default",
2701 skip_serializing_if = "Vec::is_empty"
2702 )]
2703 pub value: Vec<WorkItemNextStateOnTransition>,
2704}
2705impl WorkItemNextStateOnTransitionList {
2706 pub fn new() -> Self {
2707 Self::default()
2708 }
2709}
2710#[doc = "Represents a clause in a work item query. This shows the structure of a work item query."]
2711#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
2712pub struct WorkItemQueryClause {
2713 #[doc = "Child clauses if the current clause is a logical operator"]
2714 #[serde(
2715 default,
2716 deserialize_with = "crate::serde::deserialize_null_as_default",
2717 skip_serializing_if = "Vec::is_empty"
2718 )]
2719 pub clauses: Vec<WorkItemQueryClause>,
2720 #[doc = "Reference to a field in a work item"]
2721 #[serde(default, skip_serializing_if = "Option::is_none")]
2722 pub field: Option<WorkItemFieldReference>,
2723 #[doc = "Reference to a field in a work item"]
2724 #[serde(
2725 rename = "fieldValue",
2726 default,
2727 skip_serializing_if = "Option::is_none"
2728 )]
2729 pub field_value: Option<WorkItemFieldReference>,
2730 #[doc = "Determines if this is a field to field comparison"]
2731 #[serde(
2732 rename = "isFieldValue",
2733 default,
2734 skip_serializing_if = "Option::is_none"
2735 )]
2736 pub is_field_value: Option<bool>,
2737 #[doc = "Logical operator separating the condition clause"]
2738 #[serde(
2739 rename = "logicalOperator",
2740 default,
2741 skip_serializing_if = "Option::is_none"
2742 )]
2743 pub logical_operator: Option<work_item_query_clause::LogicalOperator>,
2744 #[doc = "Describes a work item field operation."]
2745 #[serde(default, skip_serializing_if = "Option::is_none")]
2746 pub operator: Option<WorkItemFieldOperation>,
2747 #[doc = "Right side of the condition when a field to value comparison"]
2748 #[serde(default, skip_serializing_if = "Option::is_none")]
2749 pub value: Option<String>,
2750}
2751impl WorkItemQueryClause {
2752 pub fn new() -> Self {
2753 Self::default()
2754 }
2755}
2756pub mod work_item_query_clause {
2757 use super::*;
2758 #[doc = "Logical operator separating the condition clause"]
2759 #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
2760 pub enum LogicalOperator {
2761 #[serde(rename = "none")]
2762 None,
2763 #[serde(rename = "and")]
2764 And,
2765 #[serde(rename = "or")]
2766 Or,
2767 }
2768}
2769#[doc = "The result of a work item query."]
2770#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
2771pub struct WorkItemQueryResult {
2772 #[doc = "The date the query was run in the context of."]
2773 #[serde(
2774 rename = "asOf",
2775 default,
2776 skip_serializing_if = "Option::is_none",
2777 with = "crate::date_time::rfc3339::option"
2778 )]
2779 pub as_of: Option<time::OffsetDateTime>,
2780 #[doc = "The columns of the query."]
2781 #[serde(
2782 default,
2783 deserialize_with = "crate::serde::deserialize_null_as_default",
2784 skip_serializing_if = "Vec::is_empty"
2785 )]
2786 pub columns: Vec<WorkItemFieldReference>,
2787 #[doc = "The result type"]
2788 #[serde(
2789 rename = "queryResultType",
2790 default,
2791 skip_serializing_if = "Option::is_none"
2792 )]
2793 pub query_result_type: Option<work_item_query_result::QueryResultType>,
2794 #[doc = "The type of the query"]
2795 #[serde(rename = "queryType", default, skip_serializing_if = "Option::is_none")]
2796 pub query_type: Option<work_item_query_result::QueryType>,
2797 #[doc = "The sort columns of the query."]
2798 #[serde(
2799 rename = "sortColumns",
2800 default,
2801 deserialize_with = "crate::serde::deserialize_null_as_default",
2802 skip_serializing_if = "Vec::is_empty"
2803 )]
2804 pub sort_columns: Vec<WorkItemQuerySortColumn>,
2805 #[doc = "The work item links returned by the query."]
2806 #[serde(
2807 rename = "workItemRelations",
2808 default,
2809 deserialize_with = "crate::serde::deserialize_null_as_default",
2810 skip_serializing_if = "Vec::is_empty"
2811 )]
2812 pub work_item_relations: Vec<WorkItemLink>,
2813 #[doc = "The work items returned by the query."]
2814 #[serde(
2815 rename = "workItems",
2816 default,
2817 deserialize_with = "crate::serde::deserialize_null_as_default",
2818 skip_serializing_if = "Vec::is_empty"
2819 )]
2820 pub work_items: Vec<WorkItemReference>,
2821}
2822impl WorkItemQueryResult {
2823 pub fn new() -> Self {
2824 Self::default()
2825 }
2826}
2827pub mod work_item_query_result {
2828 use super::*;
2829 #[doc = "The result type"]
2830 #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
2831 pub enum QueryResultType {
2832 #[serde(rename = "workItem")]
2833 WorkItem,
2834 #[serde(rename = "workItemLink")]
2835 WorkItemLink,
2836 }
2837 #[doc = "The type of the query"]
2838 #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
2839 pub enum QueryType {
2840 #[serde(rename = "flat")]
2841 Flat,
2842 #[serde(rename = "tree")]
2843 Tree,
2844 #[serde(rename = "oneHop")]
2845 OneHop,
2846 }
2847}
2848#[doc = "A sort column."]
2849#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
2850pub struct WorkItemQuerySortColumn {
2851 #[doc = "The direction to sort by."]
2852 #[serde(default, skip_serializing_if = "Option::is_none")]
2853 pub descending: Option<bool>,
2854 #[doc = "Reference to a field in a work item"]
2855 #[serde(default, skip_serializing_if = "Option::is_none")]
2856 pub field: Option<WorkItemFieldReference>,
2857}
2858impl WorkItemQuerySortColumn {
2859 pub fn new() -> Self {
2860 Self::default()
2861 }
2862}
2863#[doc = "Contains reference to a work item."]
2864#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
2865pub struct WorkItemReference {
2866 #[doc = "Work item ID."]
2867 #[serde(default, skip_serializing_if = "Option::is_none")]
2868 pub id: Option<i32>,
2869 #[doc = "REST API URL of the resource"]
2870 #[serde(default, skip_serializing_if = "Option::is_none")]
2871 pub url: Option<String>,
2872}
2873impl WorkItemReference {
2874 pub fn new() -> Self {
2875 Self::default()
2876 }
2877}
2878#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
2879pub struct WorkItemRelation {
2880 #[serde(flatten)]
2881 pub link: Link,
2882}
2883impl WorkItemRelation {
2884 pub fn new(link: Link) -> Self {
2885 Self { link }
2886 }
2887}
2888#[doc = "Represents the work item type relation type."]
2889#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
2890pub struct WorkItemRelationType {
2891 #[serde(flatten)]
2892 pub work_item_tracking_reference: WorkItemTrackingReference,
2893 #[doc = "The collection of relation type attributes."]
2894 #[serde(default, skip_serializing_if = "Option::is_none")]
2895 pub attributes: Option<serde_json::Value>,
2896}
2897impl WorkItemRelationType {
2898 pub fn new(work_item_tracking_reference: WorkItemTrackingReference) -> Self {
2899 Self {
2900 work_item_tracking_reference,
2901 attributes: None,
2902 }
2903 }
2904}
2905#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
2906pub struct WorkItemRelationTypeList {
2907 #[serde(default, skip_serializing_if = "Option::is_none")]
2908 pub count: Option<i32>,
2909 #[serde(
2910 default,
2911 deserialize_with = "crate::serde::deserialize_null_as_default",
2912 skip_serializing_if = "Vec::is_empty"
2913 )]
2914 pub value: Vec<WorkItemRelationType>,
2915}
2916impl WorkItemRelationTypeList {
2917 pub fn new() -> Self {
2918 Self::default()
2919 }
2920}
2921#[doc = "Describes updates to a work item's relations."]
2922#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
2923pub struct WorkItemRelationUpdates {
2924 #[doc = "List of newly added relations."]
2925 #[serde(
2926 default,
2927 deserialize_with = "crate::serde::deserialize_null_as_default",
2928 skip_serializing_if = "Vec::is_empty"
2929 )]
2930 pub added: Vec<WorkItemRelation>,
2931 #[doc = "List of removed relations."]
2932 #[serde(
2933 default,
2934 deserialize_with = "crate::serde::deserialize_null_as_default",
2935 skip_serializing_if = "Vec::is_empty"
2936 )]
2937 pub removed: Vec<WorkItemRelation>,
2938 #[doc = "List of updated relations."]
2939 #[serde(
2940 default,
2941 deserialize_with = "crate::serde::deserialize_null_as_default",
2942 skip_serializing_if = "Vec::is_empty"
2943 )]
2944 pub updated: Vec<WorkItemRelation>,
2945}
2946impl WorkItemRelationUpdates {
2947 pub fn new() -> Self {
2948 Self::default()
2949 }
2950}
2951#[doc = "Work item type state name, color and state category"]
2952#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
2953pub struct WorkItemStateColor {
2954 #[doc = "Category of state"]
2955 #[serde(default, skip_serializing_if = "Option::is_none")]
2956 pub category: Option<String>,
2957 #[doc = "Color value"]
2958 #[serde(default, skip_serializing_if = "Option::is_none")]
2959 pub color: Option<String>,
2960 #[doc = "Work item type state name"]
2961 #[serde(default, skip_serializing_if = "Option::is_none")]
2962 pub name: Option<String>,
2963}
2964impl WorkItemStateColor {
2965 pub fn new() -> Self {
2966 Self::default()
2967 }
2968}
2969#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
2970pub struct WorkItemStateColorList {
2971 #[serde(default, skip_serializing_if = "Option::is_none")]
2972 pub count: Option<i32>,
2973 #[serde(
2974 default,
2975 deserialize_with = "crate::serde::deserialize_null_as_default",
2976 skip_serializing_if = "Vec::is_empty"
2977 )]
2978 pub value: Vec<WorkItemStateColor>,
2979}
2980impl WorkItemStateColorList {
2981 pub fn new() -> Self {
2982 Self::default()
2983 }
2984}
2985#[doc = "Describes a state transition in a work item."]
2986#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
2987pub struct WorkItemStateTransition {
2988 #[doc = "Gets a list of actions needed to transition to that state."]
2989 #[serde(
2990 default,
2991 deserialize_with = "crate::serde::deserialize_null_as_default",
2992 skip_serializing_if = "Vec::is_empty"
2993 )]
2994 pub actions: Vec<String>,
2995 #[doc = "Name of the next state."]
2996 #[serde(default, skip_serializing_if = "Option::is_none")]
2997 pub to: Option<String>,
2998}
2999impl WorkItemStateTransition {
3000 pub fn new() -> Self {
3001 Self::default()
3002 }
3003}
3004#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
3005pub struct WorkItemTagDefinition {
3006 #[serde(default, skip_serializing_if = "Option::is_none")]
3007 pub id: Option<String>,
3008 #[serde(
3009 rename = "lastUpdated",
3010 default,
3011 skip_serializing_if = "Option::is_none",
3012 with = "crate::date_time::rfc3339::option"
3013 )]
3014 pub last_updated: Option<time::OffsetDateTime>,
3015 #[serde(default, skip_serializing_if = "Option::is_none")]
3016 pub name: Option<String>,
3017 #[serde(default, skip_serializing_if = "Option::is_none")]
3018 pub url: Option<String>,
3019}
3020impl WorkItemTagDefinition {
3021 pub fn new() -> Self {
3022 Self::default()
3023 }
3024}
3025#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
3026pub struct WorkItemTagDefinitionList {
3027 #[serde(default, skip_serializing_if = "Option::is_none")]
3028 pub count: Option<i32>,
3029 #[serde(
3030 default,
3031 deserialize_with = "crate::serde::deserialize_null_as_default",
3032 skip_serializing_if = "Vec::is_empty"
3033 )]
3034 pub value: Vec<WorkItemTagDefinition>,
3035}
3036impl WorkItemTagDefinitionList {
3037 pub fn new() -> Self {
3038 Self::default()
3039 }
3040}
3041#[doc = "Describes a work item template."]
3042#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
3043pub struct WorkItemTemplate {
3044 #[serde(flatten)]
3045 pub work_item_template_reference: WorkItemTemplateReference,
3046 #[doc = "Mapping of field and its templated value."]
3047 #[serde(default, skip_serializing_if = "Option::is_none")]
3048 pub fields: Option<serde_json::Value>,
3049}
3050impl WorkItemTemplate {
3051 pub fn new(work_item_template_reference: WorkItemTemplateReference) -> Self {
3052 Self {
3053 work_item_template_reference,
3054 fields: None,
3055 }
3056 }
3057}
3058#[doc = "Describes a shallow reference to a work item template."]
3059#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
3060pub struct WorkItemTemplateReference {
3061 #[serde(flatten)]
3062 pub work_item_tracking_resource: WorkItemTrackingResource,
3063 #[doc = "The description of the work item template."]
3064 #[serde(default, skip_serializing_if = "Option::is_none")]
3065 pub description: Option<String>,
3066 #[doc = "The identifier of the work item template."]
3067 #[serde(default, skip_serializing_if = "Option::is_none")]
3068 pub id: Option<String>,
3069 #[doc = "The name of the work item template."]
3070 #[serde(default, skip_serializing_if = "Option::is_none")]
3071 pub name: Option<String>,
3072 #[doc = "The name of the work item type."]
3073 #[serde(
3074 rename = "workItemTypeName",
3075 default,
3076 skip_serializing_if = "Option::is_none"
3077 )]
3078 pub work_item_type_name: Option<String>,
3079}
3080impl WorkItemTemplateReference {
3081 pub fn new(work_item_tracking_resource: WorkItemTrackingResource) -> Self {
3082 Self {
3083 work_item_tracking_resource,
3084 description: None,
3085 id: None,
3086 name: None,
3087 work_item_type_name: None,
3088 }
3089 }
3090}
3091#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
3092pub struct WorkItemTemplateReferenceList {
3093 #[serde(default, skip_serializing_if = "Option::is_none")]
3094 pub count: Option<i32>,
3095 #[serde(
3096 default,
3097 deserialize_with = "crate::serde::deserialize_null_as_default",
3098 skip_serializing_if = "Vec::is_empty"
3099 )]
3100 pub value: Vec<WorkItemTemplateReference>,
3101}
3102impl WorkItemTemplateReferenceList {
3103 pub fn new() -> Self {
3104 Self::default()
3105 }
3106}
3107#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
3108pub struct WorkItemTrackingReference {
3109 #[serde(flatten)]
3110 pub work_item_tracking_resource: WorkItemTrackingResource,
3111 #[doc = "The name."]
3112 #[serde(default, skip_serializing_if = "Option::is_none")]
3113 pub name: Option<String>,
3114 #[doc = "The reference name."]
3115 #[serde(
3116 rename = "referenceName",
3117 default,
3118 skip_serializing_if = "Option::is_none"
3119 )]
3120 pub reference_name: Option<String>,
3121}
3122impl WorkItemTrackingReference {
3123 pub fn new(work_item_tracking_resource: WorkItemTrackingResource) -> Self {
3124 Self {
3125 work_item_tracking_resource,
3126 name: None,
3127 reference_name: None,
3128 }
3129 }
3130}
3131#[doc = "Base class for WIT REST resources."]
3132#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
3133pub struct WorkItemTrackingResource {
3134 #[serde(flatten)]
3135 pub work_item_tracking_resource_reference: WorkItemTrackingResourceReference,
3136 #[doc = "Links"]
3137 #[serde(rename = "_links", default, skip_serializing_if = "Option::is_none")]
3138 pub links: Option<serde_json::Value>,
3139}
3140impl WorkItemTrackingResource {
3141 pub fn new(work_item_tracking_resource_reference: WorkItemTrackingResourceReference) -> Self {
3142 Self {
3143 work_item_tracking_resource_reference,
3144 links: None,
3145 }
3146 }
3147}
3148#[doc = "Base class for work item tracking resource references."]
3149#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
3150pub struct WorkItemTrackingResourceReference {
3151 pub url: String,
3152}
3153impl WorkItemTrackingResourceReference {
3154 pub fn new(url: String) -> Self {
3155 Self { url }
3156 }
3157}
3158#[doc = "Describes a work item type."]
3159#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
3160pub struct WorkItemType {
3161 #[serde(flatten)]
3162 pub work_item_tracking_resource: WorkItemTrackingResource,
3163 #[doc = "The color."]
3164 #[serde(default, skip_serializing_if = "Option::is_none")]
3165 pub color: Option<String>,
3166 #[doc = "The description of the work item type."]
3167 #[serde(default, skip_serializing_if = "Option::is_none")]
3168 pub description: Option<String>,
3169 #[doc = "The fields that exist on the work item type."]
3170 #[serde(
3171 rename = "fieldInstances",
3172 default,
3173 deserialize_with = "crate::serde::deserialize_null_as_default",
3174 skip_serializing_if = "Vec::is_empty"
3175 )]
3176 pub field_instances: Vec<WorkItemTypeFieldInstance>,
3177 #[doc = "The fields that exist on the work item type."]
3178 #[serde(
3179 default,
3180 deserialize_with = "crate::serde::deserialize_null_as_default",
3181 skip_serializing_if = "Vec::is_empty"
3182 )]
3183 pub fields: Vec<WorkItemTypeFieldInstance>,
3184 #[doc = "Reference to a work item icon."]
3185 #[serde(default, skip_serializing_if = "Option::is_none")]
3186 pub icon: Option<WorkItemIcon>,
3187 #[doc = "True if work item type is disabled"]
3188 #[serde(
3189 rename = "isDisabled",
3190 default,
3191 skip_serializing_if = "Option::is_none"
3192 )]
3193 pub is_disabled: Option<bool>,
3194 #[doc = "Gets the name of the work item type."]
3195 #[serde(default, skip_serializing_if = "Option::is_none")]
3196 pub name: Option<String>,
3197 #[doc = "The reference name of the work item type."]
3198 #[serde(
3199 rename = "referenceName",
3200 default,
3201 skip_serializing_if = "Option::is_none"
3202 )]
3203 pub reference_name: Option<String>,
3204 #[doc = "Gets state information for the work item type."]
3205 #[serde(
3206 default,
3207 deserialize_with = "crate::serde::deserialize_null_as_default",
3208 skip_serializing_if = "Vec::is_empty"
3209 )]
3210 pub states: Vec<WorkItemStateColor>,
3211 #[doc = "Gets the various state transition mappings in the work item type."]
3212 #[serde(default, skip_serializing_if = "Option::is_none")]
3213 pub transitions: Option<serde_json::Value>,
3214 #[doc = "The XML form."]
3215 #[serde(rename = "xmlForm", default, skip_serializing_if = "Option::is_none")]
3216 pub xml_form: Option<String>,
3217}
3218impl WorkItemType {
3219 pub fn new(work_item_tracking_resource: WorkItemTrackingResource) -> Self {
3220 Self {
3221 work_item_tracking_resource,
3222 color: None,
3223 description: None,
3224 field_instances: Vec::new(),
3225 fields: Vec::new(),
3226 icon: None,
3227 is_disabled: None,
3228 name: None,
3229 reference_name: None,
3230 states: Vec::new(),
3231 transitions: None,
3232 xml_form: None,
3233 }
3234 }
3235}
3236#[doc = "Describes a work item type category."]
3237#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
3238pub struct WorkItemTypeCategory {
3239 #[serde(flatten)]
3240 pub work_item_tracking_resource: WorkItemTrackingResource,
3241 #[doc = "Reference to a work item type."]
3242 #[serde(
3243 rename = "defaultWorkItemType",
3244 default,
3245 skip_serializing_if = "Option::is_none"
3246 )]
3247 pub default_work_item_type: Option<WorkItemTypeReference>,
3248 #[doc = "The name of the category."]
3249 #[serde(default, skip_serializing_if = "Option::is_none")]
3250 pub name: Option<String>,
3251 #[doc = "The reference name of the category."]
3252 #[serde(
3253 rename = "referenceName",
3254 default,
3255 skip_serializing_if = "Option::is_none"
3256 )]
3257 pub reference_name: Option<String>,
3258 #[doc = "The work item types that belong to the category."]
3259 #[serde(
3260 rename = "workItemTypes",
3261 default,
3262 deserialize_with = "crate::serde::deserialize_null_as_default",
3263 skip_serializing_if = "Vec::is_empty"
3264 )]
3265 pub work_item_types: Vec<WorkItemTypeReference>,
3266}
3267impl WorkItemTypeCategory {
3268 pub fn new(work_item_tracking_resource: WorkItemTrackingResource) -> Self {
3269 Self {
3270 work_item_tracking_resource,
3271 default_work_item_type: None,
3272 name: None,
3273 reference_name: None,
3274 work_item_types: Vec::new(),
3275 }
3276 }
3277}
3278#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
3279pub struct WorkItemTypeCategoryList {
3280 #[serde(default, skip_serializing_if = "Option::is_none")]
3281 pub count: Option<i32>,
3282 #[serde(
3283 default,
3284 deserialize_with = "crate::serde::deserialize_null_as_default",
3285 skip_serializing_if = "Vec::is_empty"
3286 )]
3287 pub value: Vec<WorkItemTypeCategory>,
3288}
3289impl WorkItemTypeCategoryList {
3290 pub fn new() -> Self {
3291 Self::default()
3292 }
3293}
3294#[doc = "Describes a work item type's colors."]
3295#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
3296pub struct WorkItemTypeColor {
3297 #[doc = "Gets or sets the color of the primary."]
3298 #[serde(
3299 rename = "primaryColor",
3300 default,
3301 skip_serializing_if = "Option::is_none"
3302 )]
3303 pub primary_color: Option<String>,
3304 #[doc = "Gets or sets the color of the secondary."]
3305 #[serde(
3306 rename = "secondaryColor",
3307 default,
3308 skip_serializing_if = "Option::is_none"
3309 )]
3310 pub secondary_color: Option<String>,
3311 #[doc = "The name of the work item type."]
3312 #[serde(
3313 rename = "workItemTypeName",
3314 default,
3315 skip_serializing_if = "Option::is_none"
3316 )]
3317 pub work_item_type_name: Option<String>,
3318}
3319impl WorkItemTypeColor {
3320 pub fn new() -> Self {
3321 Self::default()
3322 }
3323}
3324#[doc = "Describes work item type name, its icon and color."]
3325#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
3326pub struct WorkItemTypeColorAndIcon {
3327 #[doc = "The color of the work item type in hex format."]
3328 #[serde(default, skip_serializing_if = "Option::is_none")]
3329 pub color: Option<String>,
3330 #[doc = "The work item type icon."]
3331 #[serde(default, skip_serializing_if = "Option::is_none")]
3332 pub icon: Option<String>,
3333 #[doc = "Indicates if the work item is disabled in the process."]
3334 #[serde(
3335 rename = "isDisabled",
3336 default,
3337 skip_serializing_if = "Option::is_none"
3338 )]
3339 pub is_disabled: Option<bool>,
3340 #[doc = "The name of the work item type."]
3341 #[serde(
3342 rename = "workItemTypeName",
3343 default,
3344 skip_serializing_if = "Option::is_none"
3345 )]
3346 pub work_item_type_name: Option<String>,
3347}
3348impl WorkItemTypeColorAndIcon {
3349 pub fn new() -> Self {
3350 Self::default()
3351 }
3352}
3353#[doc = "Field instance of a work item type."]
3354#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
3355pub struct WorkItemTypeFieldInstance {
3356 #[serde(flatten)]
3357 pub work_item_type_field_instance_base: WorkItemTypeFieldInstanceBase,
3358 #[doc = "The list of field allowed values."]
3359 #[serde(
3360 rename = "allowedValues",
3361 default,
3362 deserialize_with = "crate::serde::deserialize_null_as_default",
3363 skip_serializing_if = "Vec::is_empty"
3364 )]
3365 pub allowed_values: Vec<String>,
3366 #[doc = "Represents the default value of the field."]
3367 #[serde(
3368 rename = "defaultValue",
3369 default,
3370 skip_serializing_if = "Option::is_none"
3371 )]
3372 pub default_value: Option<String>,
3373}
3374impl WorkItemTypeFieldInstance {
3375 pub fn new() -> Self {
3376 Self::default()
3377 }
3378}
3379#[doc = "Base field instance for workItemType fields."]
3380#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
3381pub struct WorkItemTypeFieldInstanceBase {
3382 #[serde(flatten)]
3383 pub work_item_field_reference: WorkItemFieldReference,
3384 #[doc = "Indicates whether field value is always required."]
3385 #[serde(
3386 rename = "alwaysRequired",
3387 default,
3388 skip_serializing_if = "Option::is_none"
3389 )]
3390 pub always_required: Option<bool>,
3391 #[doc = "The list of dependent fields."]
3392 #[serde(
3393 rename = "dependentFields",
3394 default,
3395 deserialize_with = "crate::serde::deserialize_null_as_default",
3396 skip_serializing_if = "Vec::is_empty"
3397 )]
3398 pub dependent_fields: Vec<WorkItemFieldReference>,
3399 #[doc = "Gets the help text for the field."]
3400 #[serde(rename = "helpText", default, skip_serializing_if = "Option::is_none")]
3401 pub help_text: Option<String>,
3402}
3403impl WorkItemTypeFieldInstanceBase {
3404 pub fn new() -> Self {
3405 Self::default()
3406 }
3407}
3408#[doc = "Field Instance of a workItemype with detailed references."]
3409#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
3410pub struct WorkItemTypeFieldWithReferences {
3411 #[serde(flatten)]
3412 pub work_item_type_field_instance_base: WorkItemTypeFieldInstanceBase,
3413 #[doc = "The list of field allowed values."]
3414 #[serde(
3415 rename = "allowedValues",
3416 default,
3417 deserialize_with = "crate::serde::deserialize_null_as_default",
3418 skip_serializing_if = "Vec::is_empty"
3419 )]
3420 pub allowed_values: Vec<serde_json::Value>,
3421 #[doc = "Represents the default value of the field."]
3422 #[serde(
3423 rename = "defaultValue",
3424 default,
3425 skip_serializing_if = "Option::is_none"
3426 )]
3427 pub default_value: Option<serde_json::Value>,
3428}
3429impl WorkItemTypeFieldWithReferences {
3430 pub fn new() -> Self {
3431 Self::default()
3432 }
3433}
3434#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
3435pub struct WorkItemTypeFieldWithReferencesList {
3436 #[serde(default, skip_serializing_if = "Option::is_none")]
3437 pub count: Option<i32>,
3438 #[serde(
3439 default,
3440 deserialize_with = "crate::serde::deserialize_null_as_default",
3441 skip_serializing_if = "Vec::is_empty"
3442 )]
3443 pub value: Vec<WorkItemTypeFieldWithReferences>,
3444}
3445impl WorkItemTypeFieldWithReferencesList {
3446 pub fn new() -> Self {
3447 Self::default()
3448 }
3449}
3450#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
3451pub struct WorkItemTypeList {
3452 #[serde(default, skip_serializing_if = "Option::is_none")]
3453 pub count: Option<i32>,
3454 #[serde(
3455 default,
3456 deserialize_with = "crate::serde::deserialize_null_as_default",
3457 skip_serializing_if = "Vec::is_empty"
3458 )]
3459 pub value: Vec<WorkItemType>,
3460}
3461impl WorkItemTypeList {
3462 pub fn new() -> Self {
3463 Self::default()
3464 }
3465}
3466#[doc = "Reference to a work item type."]
3467#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
3468pub struct WorkItemTypeReference {
3469 #[serde(flatten)]
3470 pub work_item_tracking_resource_reference: WorkItemTrackingResourceReference,
3471 #[doc = "Name of the work item type."]
3472 #[serde(default, skip_serializing_if = "Option::is_none")]
3473 pub name: Option<String>,
3474}
3475impl WorkItemTypeReference {
3476 pub fn new(work_item_tracking_resource_reference: WorkItemTrackingResourceReference) -> Self {
3477 Self {
3478 work_item_tracking_resource_reference,
3479 name: None,
3480 }
3481 }
3482}
3483#[doc = "State colors for a work item type"]
3484#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
3485pub struct WorkItemTypeStateColors {
3486 #[doc = "Work item type state colors"]
3487 #[serde(
3488 rename = "stateColors",
3489 default,
3490 deserialize_with = "crate::serde::deserialize_null_as_default",
3491 skip_serializing_if = "Vec::is_empty"
3492 )]
3493 pub state_colors: Vec<WorkItemStateColor>,
3494 #[doc = "Work item type name"]
3495 #[serde(
3496 rename = "workItemTypeName",
3497 default,
3498 skip_serializing_if = "Option::is_none"
3499 )]
3500 pub work_item_type_name: Option<String>,
3501}
3502impl WorkItemTypeStateColors {
3503 pub fn new() -> Self {
3504 Self::default()
3505 }
3506}
3507#[doc = "Describes a work item type template."]
3508#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
3509pub struct WorkItemTypeTemplate {
3510 #[doc = "XML template in string format."]
3511 #[serde(default, skip_serializing_if = "Option::is_none")]
3512 pub template: Option<String>,
3513}
3514impl WorkItemTypeTemplate {
3515 pub fn new() -> Self {
3516 Self::default()
3517 }
3518}
3519#[doc = "Describes a update work item type template request body."]
3520#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
3521pub struct WorkItemTypeTemplateUpdateModel {
3522 #[doc = "Describes the type of the action for the update request."]
3523 #[serde(
3524 rename = "actionType",
3525 default,
3526 skip_serializing_if = "Option::is_none"
3527 )]
3528 pub action_type: Option<work_item_type_template_update_model::ActionType>,
3529 #[doc = "Methodology to which the template belongs, eg. Agile, Scrum, CMMI."]
3530 #[serde(default, skip_serializing_if = "Option::is_none")]
3531 pub methodology: Option<String>,
3532 #[doc = "String representation of the work item type template."]
3533 #[serde(default, skip_serializing_if = "Option::is_none")]
3534 pub template: Option<String>,
3535 #[doc = "The type of the template described in the request body."]
3536 #[serde(
3537 rename = "templateType",
3538 default,
3539 skip_serializing_if = "Option::is_none"
3540 )]
3541 pub template_type: Option<work_item_type_template_update_model::TemplateType>,
3542}
3543impl WorkItemTypeTemplateUpdateModel {
3544 pub fn new() -> Self {
3545 Self::default()
3546 }
3547}
3548pub mod work_item_type_template_update_model {
3549 use super::*;
3550 #[doc = "Describes the type of the action for the update request."]
3551 #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
3552 pub enum ActionType {
3553 #[serde(rename = "import")]
3554 Import,
3555 #[serde(rename = "validate")]
3556 Validate,
3557 }
3558 #[doc = "The type of the template described in the request body."]
3559 #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
3560 pub enum TemplateType {
3561 #[serde(rename = "workItemType")]
3562 WorkItemType,
3563 #[serde(rename = "globalWorkflow")]
3564 GlobalWorkflow,
3565 }
3566}
3567#[doc = "Describes an update to a work item."]
3568#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
3569pub struct WorkItemUpdate {
3570 #[serde(flatten)]
3571 pub work_item_tracking_resource: WorkItemTrackingResource,
3572 #[doc = "List of updates to fields."]
3573 #[serde(default, skip_serializing_if = "Option::is_none")]
3574 pub fields: Option<serde_json::Value>,
3575 #[doc = "ID of update."]
3576 #[serde(default, skip_serializing_if = "Option::is_none")]
3577 pub id: Option<i32>,
3578 #[doc = "Describes updates to a work item's relations."]
3579 #[serde(default, skip_serializing_if = "Option::is_none")]
3580 pub relations: Option<WorkItemRelationUpdates>,
3581 #[doc = "The revision number of work item update."]
3582 #[serde(default, skip_serializing_if = "Option::is_none")]
3583 pub rev: Option<i32>,
3584 #[serde(rename = "revisedBy", default, skip_serializing_if = "Option::is_none")]
3585 pub revised_by: Option<IdentityReference>,
3586 #[doc = "The work item updates revision date."]
3587 #[serde(
3588 rename = "revisedDate",
3589 default,
3590 skip_serializing_if = "Option::is_none",
3591 with = "crate::date_time::rfc3339::option"
3592 )]
3593 pub revised_date: Option<time::OffsetDateTime>,
3594 #[doc = "The work item ID."]
3595 #[serde(
3596 rename = "workItemId",
3597 default,
3598 skip_serializing_if = "Option::is_none"
3599 )]
3600 pub work_item_id: Option<i32>,
3601}
3602impl WorkItemUpdate {
3603 pub fn new(work_item_tracking_resource: WorkItemTrackingResource) -> Self {
3604 Self {
3605 work_item_tracking_resource,
3606 fields: None,
3607 id: None,
3608 relations: None,
3609 rev: None,
3610 revised_by: None,
3611 revised_date: None,
3612 work_item_id: None,
3613 }
3614 }
3615}
3616#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
3617pub struct WorkItemUpdateList {
3618 #[serde(default, skip_serializing_if = "Option::is_none")]
3619 pub count: Option<i32>,
3620 #[serde(
3621 default,
3622 deserialize_with = "crate::serde::deserialize_null_as_default",
3623 skip_serializing_if = "Vec::is_empty"
3624 )]
3625 pub value: Vec<WorkItemUpdate>,
3626}
3627impl WorkItemUpdateList {
3628 pub fn new() -> Self {
3629 Self::default()
3630 }
3631}