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#[doc = "Class that describes a request to add a field in a work item type."]
9#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
10pub struct AddProcessWorkItemTypeFieldRequest {
11 #[doc = "The list of field allowed values."]
12 #[serde(
13 rename = "allowedValues",
14 default,
15 deserialize_with = "crate::serde::deserialize_null_as_default",
16 skip_serializing_if = "Vec::is_empty"
17 )]
18 pub allowed_values: Vec<String>,
19 #[doc = "Allow setting field value to a group identity. Only applies to identity fields."]
20 #[serde(
21 rename = "allowGroups",
22 default,
23 skip_serializing_if = "Option::is_none"
24 )]
25 pub allow_groups: Option<bool>,
26 #[doc = "The default value of the field."]
27 #[serde(
28 rename = "defaultValue",
29 default,
30 skip_serializing_if = "Option::is_none"
31 )]
32 pub default_value: Option<serde_json::Value>,
33 #[doc = "If true the field cannot be edited."]
34 #[serde(rename = "readOnly", default, skip_serializing_if = "Option::is_none")]
35 pub read_only: Option<bool>,
36 #[doc = "Reference name of the field."]
37 #[serde(
38 rename = "referenceName",
39 default,
40 skip_serializing_if = "Option::is_none"
41 )]
42 pub reference_name: Option<String>,
43 #[doc = "If true the field cannot be empty."]
44 #[serde(default, skip_serializing_if = "Option::is_none")]
45 pub required: Option<bool>,
46}
47impl AddProcessWorkItemTypeFieldRequest {
48 pub fn new() -> Self {
49 Self::default()
50 }
51}
52#[doc = "Represent a control in the form."]
53#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
54pub struct Control {
55 #[doc = "Properties of a work item form contribution"]
56 #[serde(default, skip_serializing_if = "Option::is_none")]
57 pub contribution: Option<WitContribution>,
58 #[doc = "Type of the control."]
59 #[serde(
60 rename = "controlType",
61 default,
62 skip_serializing_if = "Option::is_none"
63 )]
64 pub control_type: Option<String>,
65 #[doc = "Height of the control, for html controls."]
66 #[serde(default, skip_serializing_if = "Option::is_none")]
67 pub height: Option<i32>,
68 #[doc = "The id for the layout node."]
69 #[serde(default, skip_serializing_if = "Option::is_none")]
70 pub id: Option<String>,
71 #[doc = "A value indicating whether this layout node has been inherited. from a parent layout. This is expected to only be only set by the combiner."]
72 #[serde(default, skip_serializing_if = "Option::is_none")]
73 pub inherited: Option<bool>,
74 #[doc = "A value indicating if the layout node is contribution or not."]
75 #[serde(
76 rename = "isContribution",
77 default,
78 skip_serializing_if = "Option::is_none"
79 )]
80 pub is_contribution: Option<bool>,
81 #[doc = "Label for the field."]
82 #[serde(default, skip_serializing_if = "Option::is_none")]
83 pub label: Option<String>,
84 #[doc = "Inner text of the control."]
85 #[serde(default, skip_serializing_if = "Option::is_none")]
86 pub metadata: Option<String>,
87 #[doc = "Order in which the control should appear in its group."]
88 #[serde(default, skip_serializing_if = "Option::is_none")]
89 pub order: Option<i32>,
90 #[doc = "A value indicating whether this layout node has been overridden . by a child layout."]
91 #[serde(default, skip_serializing_if = "Option::is_none")]
92 pub overridden: Option<bool>,
93 #[doc = "A value indicating if the control is readonly."]
94 #[serde(rename = "readOnly", default, skip_serializing_if = "Option::is_none")]
95 pub read_only: Option<bool>,
96 #[doc = "A value indicating if the control should be hidden or not."]
97 #[serde(default, skip_serializing_if = "Option::is_none")]
98 pub visible: Option<bool>,
99 #[doc = "Watermark text for the textbox."]
100 #[serde(default, skip_serializing_if = "Option::is_none")]
101 pub watermark: Option<String>,
102}
103impl Control {
104 pub fn new() -> Self {
105 Self::default()
106 }
107}
108#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
109pub struct ControlList {
110 #[serde(default, skip_serializing_if = "Option::is_none")]
111 pub count: Option<i32>,
112 #[serde(
113 default,
114 deserialize_with = "crate::serde::deserialize_null_as_default",
115 skip_serializing_if = "Vec::is_empty"
116 )]
117 pub value: Vec<Control>,
118}
119impl ControlList {
120 pub fn new() -> Self {
121 Self::default()
122 }
123}
124#[doc = "Describes a process being created."]
125#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
126pub struct CreateProcessModel {
127 #[doc = "Description of the process"]
128 #[serde(default, skip_serializing_if = "Option::is_none")]
129 pub description: Option<String>,
130 #[doc = "Name of the process"]
131 #[serde(default, skip_serializing_if = "Option::is_none")]
132 pub name: Option<String>,
133 #[doc = "The ID of the parent process"]
134 #[serde(
135 rename = "parentProcessTypeId",
136 default,
137 skip_serializing_if = "Option::is_none"
138 )]
139 pub parent_process_type_id: Option<String>,
140 #[doc = "Reference name of process being created. If not specified, server will assign a unique reference name"]
141 #[serde(
142 rename = "referenceName",
143 default,
144 skip_serializing_if = "Option::is_none"
145 )]
146 pub reference_name: Option<String>,
147}
148impl CreateProcessModel {
149 pub fn new() -> Self {
150 Self::default()
151 }
152}
153#[doc = "Request object/class for creating a rule on a work item type."]
154#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
155pub struct CreateProcessRuleRequest {
156 #[doc = "List of actions to take when the rule is triggered."]
157 #[serde(
158 default,
159 deserialize_with = "crate::serde::deserialize_null_as_default",
160 skip_serializing_if = "Vec::is_empty"
161 )]
162 pub actions: Vec<RuleAction>,
163 #[doc = "List of conditions when the rule should be triggered."]
164 #[serde(
165 default,
166 deserialize_with = "crate::serde::deserialize_null_as_default",
167 skip_serializing_if = "Vec::is_empty"
168 )]
169 pub conditions: Vec<RuleCondition>,
170 #[doc = "Indicates if the rule is disabled."]
171 #[serde(
172 rename = "isDisabled",
173 default,
174 skip_serializing_if = "Option::is_none"
175 )]
176 pub is_disabled: Option<bool>,
177 #[doc = "Name for the rule."]
178 #[serde(default, skip_serializing_if = "Option::is_none")]
179 pub name: Option<String>,
180}
181impl CreateProcessRuleRequest {
182 pub fn new() -> Self {
183 Self::default()
184 }
185}
186#[doc = "Class for create work item type request"]
187#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
188pub struct CreateProcessWorkItemTypeRequest {
189 #[doc = "Color hexadecimal code to represent the work item type"]
190 #[serde(default, skip_serializing_if = "Option::is_none")]
191 pub color: Option<String>,
192 #[doc = "Description of the work item type"]
193 #[serde(default, skip_serializing_if = "Option::is_none")]
194 pub description: Option<String>,
195 #[doc = "Icon to represent the work item type"]
196 #[serde(default, skip_serializing_if = "Option::is_none")]
197 pub icon: Option<String>,
198 #[doc = "Parent work item type for work item type"]
199 #[serde(
200 rename = "inheritsFrom",
201 default,
202 skip_serializing_if = "Option::is_none"
203 )]
204 pub inherits_from: Option<String>,
205 #[doc = "True if the work item type need to be disabled"]
206 #[serde(
207 rename = "isDisabled",
208 default,
209 skip_serializing_if = "Option::is_none"
210 )]
211 pub is_disabled: Option<bool>,
212 #[doc = "Name of work item type"]
213 #[serde(default, skip_serializing_if = "Option::is_none")]
214 pub name: Option<String>,
215}
216impl CreateProcessWorkItemTypeRequest {
217 pub fn new() -> Self {
218 Self::default()
219 }
220}
221#[doc = "Represents the extensions part of the layout"]
222#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
223pub struct Extension {
224 #[doc = "Id of the extension"]
225 #[serde(default, skip_serializing_if = "Option::is_none")]
226 pub id: Option<String>,
227}
228impl Extension {
229 pub fn new() -> Self {
230 Self::default()
231 }
232}
233#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
234pub struct FieldModel {
235 #[serde(default, skip_serializing_if = "Option::is_none")]
236 pub description: Option<String>,
237 #[serde(default, skip_serializing_if = "Option::is_none")]
238 pub id: Option<String>,
239 #[serde(
240 rename = "isIdentity",
241 default,
242 skip_serializing_if = "Option::is_none"
243 )]
244 pub is_identity: Option<bool>,
245 #[serde(rename = "isLocked", default, skip_serializing_if = "Option::is_none")]
246 pub is_locked: Option<bool>,
247 #[serde(default, skip_serializing_if = "Option::is_none")]
248 pub name: Option<String>,
249 #[serde(rename = "type", default, skip_serializing_if = "Option::is_none")]
250 pub type_: Option<field_model::Type>,
251 #[serde(default, skip_serializing_if = "Option::is_none")]
252 pub url: Option<String>,
253}
254impl FieldModel {
255 pub fn new() -> Self {
256 Self::default()
257 }
258}
259pub mod field_model {
260 use super::*;
261 #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
262 pub enum Type {
263 #[serde(rename = "string")]
264 String,
265 #[serde(rename = "integer")]
266 Integer,
267 #[serde(rename = "dateTime")]
268 DateTime,
269 #[serde(rename = "plainText")]
270 PlainText,
271 #[serde(rename = "html")]
272 Html,
273 #[serde(rename = "treePath")]
274 TreePath,
275 #[serde(rename = "history")]
276 History,
277 #[serde(rename = "double")]
278 Double,
279 #[serde(rename = "guid")]
280 Guid,
281 #[serde(rename = "boolean")]
282 Boolean,
283 #[serde(rename = "identity")]
284 Identity,
285 #[serde(rename = "picklistInteger")]
286 PicklistInteger,
287 #[serde(rename = "picklistString")]
288 PicklistString,
289 #[serde(rename = "picklistDouble")]
290 PicklistDouble,
291 }
292}
293#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
294pub struct FieldRuleModel {
295 #[serde(
296 default,
297 deserialize_with = "crate::serde::deserialize_null_as_default",
298 skip_serializing_if = "Vec::is_empty"
299 )]
300 pub actions: Vec<RuleActionModel>,
301 #[serde(
302 default,
303 deserialize_with = "crate::serde::deserialize_null_as_default",
304 skip_serializing_if = "Vec::is_empty"
305 )]
306 pub conditions: Vec<RuleConditionModel>,
307 #[serde(
308 rename = "friendlyName",
309 default,
310 skip_serializing_if = "Option::is_none"
311 )]
312 pub friendly_name: Option<String>,
313 #[serde(default, skip_serializing_if = "Option::is_none")]
314 pub id: Option<String>,
315 #[serde(
316 rename = "isDisabled",
317 default,
318 skip_serializing_if = "Option::is_none"
319 )]
320 pub is_disabled: Option<bool>,
321 #[serde(rename = "isSystem", default, skip_serializing_if = "Option::is_none")]
322 pub is_system: Option<bool>,
323}
324impl FieldRuleModel {
325 pub fn new() -> Self {
326 Self::default()
327 }
328}
329#[doc = "Describes the layout of a work item type"]
330#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
331pub struct FormLayout {
332 #[doc = "Gets and sets extensions list."]
333 #[serde(
334 default,
335 deserialize_with = "crate::serde::deserialize_null_as_default",
336 skip_serializing_if = "Vec::is_empty"
337 )]
338 pub extensions: Vec<Extension>,
339 #[doc = "Top level tabs of the layout."]
340 #[serde(
341 default,
342 deserialize_with = "crate::serde::deserialize_null_as_default",
343 skip_serializing_if = "Vec::is_empty"
344 )]
345 pub pages: Vec<Page>,
346 #[doc = "Headers controls of the layout."]
347 #[serde(
348 rename = "systemControls",
349 default,
350 deserialize_with = "crate::serde::deserialize_null_as_default",
351 skip_serializing_if = "Vec::is_empty"
352 )]
353 pub system_controls: Vec<Control>,
354}
355impl FormLayout {
356 pub fn new() -> Self {
357 Self::default()
358 }
359}
360#[doc = "Represent a group in the form that holds controls in it."]
361#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
362pub struct Group {
363 #[doc = "Properties of a work item form contribution"]
364 #[serde(default, skip_serializing_if = "Option::is_none")]
365 pub contribution: Option<WitContribution>,
366 #[doc = "Controls to be put in the group."]
367 #[serde(
368 default,
369 deserialize_with = "crate::serde::deserialize_null_as_default",
370 skip_serializing_if = "Vec::is_empty"
371 )]
372 pub controls: Vec<Control>,
373 #[doc = "The height for the contribution."]
374 #[serde(default, skip_serializing_if = "Option::is_none")]
375 pub height: Option<i32>,
376 #[doc = "The id for the layout node."]
377 #[serde(default, skip_serializing_if = "Option::is_none")]
378 pub id: Option<String>,
379 #[doc = "A value indicating whether this layout node has been inherited from a parent layout. This is expected to only be only set by the combiner."]
380 #[serde(default, skip_serializing_if = "Option::is_none")]
381 pub inherited: Option<bool>,
382 #[doc = "A value indicating if the layout node is contribution are not."]
383 #[serde(
384 rename = "isContribution",
385 default,
386 skip_serializing_if = "Option::is_none"
387 )]
388 pub is_contribution: Option<bool>,
389 #[doc = "Label for the group."]
390 #[serde(default, skip_serializing_if = "Option::is_none")]
391 pub label: Option<String>,
392 #[doc = "Order in which the group should appear in the section."]
393 #[serde(default, skip_serializing_if = "Option::is_none")]
394 pub order: Option<i32>,
395 #[doc = "A value indicating whether this layout node has been overridden by a child layout."]
396 #[serde(default, skip_serializing_if = "Option::is_none")]
397 pub overridden: Option<bool>,
398 #[doc = "A value indicating if the group should be hidden or not."]
399 #[serde(default, skip_serializing_if = "Option::is_none")]
400 pub visible: Option<bool>,
401}
402impl Group {
403 pub fn new() -> Self {
404 Self::default()
405 }
406}
407#[doc = "Class that describes the work item state is hidden."]
408#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
409pub struct HideStateModel {
410 #[doc = "Returns 'true', if workitem state is hidden, 'false' otherwise."]
411 #[serde(default, skip_serializing_if = "Option::is_none")]
412 pub hidden: Option<bool>,
413}
414impl HideStateModel {
415 pub fn new() -> Self {
416 Self::default()
417 }
418}
419#[doc = "Describes a page in the work item form layout"]
420#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
421pub struct Page {
422 #[doc = "Properties of a work item form contribution"]
423 #[serde(default, skip_serializing_if = "Option::is_none")]
424 pub contribution: Option<WitContribution>,
425 #[doc = "The id for the layout node."]
426 #[serde(default, skip_serializing_if = "Option::is_none")]
427 pub id: Option<String>,
428 #[doc = "A value indicating whether this layout node has been inherited from a parent layout. This is expected to only be only set by the combiner."]
429 #[serde(default, skip_serializing_if = "Option::is_none")]
430 pub inherited: Option<bool>,
431 #[doc = "A value indicating if the layout node is contribution are not."]
432 #[serde(
433 rename = "isContribution",
434 default,
435 skip_serializing_if = "Option::is_none"
436 )]
437 pub is_contribution: Option<bool>,
438 #[doc = "The label for the page."]
439 #[serde(default, skip_serializing_if = "Option::is_none")]
440 pub label: Option<String>,
441 #[doc = "A value indicating whether any user operations are permitted on this page and the contents of this page"]
442 #[serde(default, skip_serializing_if = "Option::is_none")]
443 pub locked: Option<bool>,
444 #[doc = "Order in which the page should appear in the layout."]
445 #[serde(default, skip_serializing_if = "Option::is_none")]
446 pub order: Option<i32>,
447 #[doc = "A value indicating whether this layout node has been overridden by a child layout."]
448 #[serde(default, skip_serializing_if = "Option::is_none")]
449 pub overridden: Option<bool>,
450 #[doc = "The icon for the page."]
451 #[serde(rename = "pageType", default, skip_serializing_if = "Option::is_none")]
452 pub page_type: Option<page::PageType>,
453 #[doc = "The sections of the page."]
454 #[serde(
455 default,
456 deserialize_with = "crate::serde::deserialize_null_as_default",
457 skip_serializing_if = "Vec::is_empty"
458 )]
459 pub sections: Vec<Section>,
460 #[doc = "A value indicating if the page should be hidden or not."]
461 #[serde(default, skip_serializing_if = "Option::is_none")]
462 pub visible: Option<bool>,
463}
464impl Page {
465 pub fn new() -> Self {
466 Self::default()
467 }
468}
469pub mod page {
470 use super::*;
471 #[doc = "The icon for the page."]
472 #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
473 pub enum PageType {
474 #[serde(rename = "custom")]
475 Custom,
476 #[serde(rename = "history")]
477 History,
478 #[serde(rename = "links")]
479 Links,
480 #[serde(rename = "attachments")]
481 Attachments,
482 }
483}
484#[doc = "Picklist."]
485#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
486pub struct PickList {
487 #[serde(flatten)]
488 pub pick_list_metadata: PickListMetadata,
489 #[doc = "A list of PicklistItemModel."]
490 #[serde(
491 default,
492 deserialize_with = "crate::serde::deserialize_null_as_default",
493 skip_serializing_if = "Vec::is_empty"
494 )]
495 pub items: Vec<String>,
496}
497impl PickList {
498 pub fn new() -> Self {
499 Self::default()
500 }
501}
502#[doc = "Metadata for picklist."]
503#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
504pub struct PickListMetadata {
505 #[doc = "ID of the picklist"]
506 #[serde(default, skip_serializing_if = "Option::is_none")]
507 pub id: Option<String>,
508 #[doc = "Indicates whether items outside of suggested list are allowed"]
509 #[serde(
510 rename = "isSuggested",
511 default,
512 skip_serializing_if = "Option::is_none"
513 )]
514 pub is_suggested: Option<bool>,
515 #[doc = "Name of the picklist"]
516 #[serde(default, skip_serializing_if = "Option::is_none")]
517 pub name: Option<String>,
518 #[doc = "DataType of picklist"]
519 #[serde(rename = "type", default, skip_serializing_if = "Option::is_none")]
520 pub type_: Option<String>,
521 #[doc = "Url of the picklist"]
522 #[serde(default, skip_serializing_if = "Option::is_none")]
523 pub url: Option<String>,
524}
525impl PickListMetadata {
526 pub fn new() -> Self {
527 Self::default()
528 }
529}
530#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
531pub struct PickListMetadataList {
532 #[serde(default, skip_serializing_if = "Option::is_none")]
533 pub count: Option<i32>,
534 #[serde(
535 default,
536 deserialize_with = "crate::serde::deserialize_null_as_default",
537 skip_serializing_if = "Vec::is_empty"
538 )]
539 pub value: Vec<PickListMetadata>,
540}
541impl PickListMetadataList {
542 pub fn new() -> Self {
543 Self::default()
544 }
545}
546#[doc = "Process Behavior Model."]
547#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
548pub struct ProcessBehavior {
549 #[doc = "Color."]
550 #[serde(default, skip_serializing_if = "Option::is_none")]
551 pub color: Option<String>,
552 #[doc = "Indicates the type of customization on this work item. System behaviors are inherited from parent process but not modified. Inherited behaviors are modified behaviors that were inherited from parent process. Custom behaviors are behaviors created by user in current process."]
553 #[serde(default, skip_serializing_if = "Option::is_none")]
554 pub customization: Option<process_behavior::Customization>,
555 #[doc = ". Description"]
556 #[serde(default, skip_serializing_if = "Option::is_none")]
557 pub description: Option<String>,
558 #[doc = "Process Behavior Fields."]
559 #[serde(
560 default,
561 deserialize_with = "crate::serde::deserialize_null_as_default",
562 skip_serializing_if = "Vec::is_empty"
563 )]
564 pub fields: Vec<ProcessBehaviorField>,
565 #[doc = "Process behavior Reference."]
566 #[serde(default, skip_serializing_if = "Option::is_none")]
567 pub inherits: Option<ProcessBehaviorReference>,
568 #[doc = "Behavior Name."]
569 #[serde(default, skip_serializing_if = "Option::is_none")]
570 pub name: Option<String>,
571 #[doc = "Rank of the behavior"]
572 #[serde(default, skip_serializing_if = "Option::is_none")]
573 pub rank: Option<i32>,
574 #[doc = "Behavior Id"]
575 #[serde(
576 rename = "referenceName",
577 default,
578 skip_serializing_if = "Option::is_none"
579 )]
580 pub reference_name: Option<String>,
581 #[doc = "Url of the behavior."]
582 #[serde(default, skip_serializing_if = "Option::is_none")]
583 pub url: Option<String>,
584}
585impl ProcessBehavior {
586 pub fn new() -> Self {
587 Self::default()
588 }
589}
590pub mod process_behavior {
591 use super::*;
592 #[doc = "Indicates the type of customization on this work item. System behaviors are inherited from parent process but not modified. Inherited behaviors are modified behaviors that were inherited from parent process. Custom behaviors are behaviors created by user in current process."]
593 #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
594 pub enum Customization {
595 #[serde(rename = "system")]
596 System,
597 #[serde(rename = "inherited")]
598 Inherited,
599 #[serde(rename = "custom")]
600 Custom,
601 }
602}
603#[doc = "Process Behavior Create Payload."]
604#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
605pub struct ProcessBehaviorCreateRequest {
606 #[doc = "Color."]
607 #[serde(default, skip_serializing_if = "Option::is_none")]
608 pub color: Option<String>,
609 #[doc = "Parent behavior id."]
610 #[serde(default, skip_serializing_if = "Option::is_none")]
611 pub inherits: Option<String>,
612 #[doc = "Name of the behavior."]
613 #[serde(default, skip_serializing_if = "Option::is_none")]
614 pub name: Option<String>,
615 #[doc = "ReferenceName is optional, if not specified will be auto-generated."]
616 #[serde(
617 rename = "referenceName",
618 default,
619 skip_serializing_if = "Option::is_none"
620 )]
621 pub reference_name: Option<String>,
622}
623impl ProcessBehaviorCreateRequest {
624 pub fn new() -> Self {
625 Self::default()
626 }
627}
628#[doc = "Process Behavior Field."]
629#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
630pub struct ProcessBehaviorField {
631 #[doc = "Name of the field."]
632 #[serde(default, skip_serializing_if = "Option::is_none")]
633 pub name: Option<String>,
634 #[doc = "Reference name of the field."]
635 #[serde(
636 rename = "referenceName",
637 default,
638 skip_serializing_if = "Option::is_none"
639 )]
640 pub reference_name: Option<String>,
641 #[doc = "Url to field."]
642 #[serde(default, skip_serializing_if = "Option::is_none")]
643 pub url: Option<String>,
644}
645impl ProcessBehaviorField {
646 pub fn new() -> Self {
647 Self::default()
648 }
649}
650#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
651pub struct ProcessBehaviorList {
652 #[serde(default, skip_serializing_if = "Option::is_none")]
653 pub count: Option<i32>,
654 #[serde(
655 default,
656 deserialize_with = "crate::serde::deserialize_null_as_default",
657 skip_serializing_if = "Vec::is_empty"
658 )]
659 pub value: Vec<ProcessBehavior>,
660}
661impl ProcessBehaviorList {
662 pub fn new() -> Self {
663 Self::default()
664 }
665}
666#[doc = "Process behavior Reference."]
667#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
668pub struct ProcessBehaviorReference {
669 #[doc = "Id of a Behavior."]
670 #[serde(
671 rename = "behaviorRefName",
672 default,
673 skip_serializing_if = "Option::is_none"
674 )]
675 pub behavior_ref_name: Option<String>,
676 #[doc = "Url to behavior."]
677 #[serde(default, skip_serializing_if = "Option::is_none")]
678 pub url: Option<String>,
679}
680impl ProcessBehaviorReference {
681 pub fn new() -> Self {
682 Self::default()
683 }
684}
685#[doc = "Process Behavior Replace Payload."]
686#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
687pub struct ProcessBehaviorUpdateRequest {
688 #[doc = "Color."]
689 #[serde(default, skip_serializing_if = "Option::is_none")]
690 pub color: Option<String>,
691 #[doc = "Behavior Name."]
692 #[serde(default, skip_serializing_if = "Option::is_none")]
693 pub name: Option<String>,
694}
695impl ProcessBehaviorUpdateRequest {
696 pub fn new() -> Self {
697 Self::default()
698 }
699}
700#[doc = "Process."]
701#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
702pub struct ProcessInfo {
703 #[doc = "Indicates the type of customization on this process. System Process is default process. Inherited Process is modified process that was System process before."]
704 #[serde(
705 rename = "customizationType",
706 default,
707 skip_serializing_if = "Option::is_none"
708 )]
709 pub customization_type: Option<process_info::CustomizationType>,
710 #[doc = "Description of the process."]
711 #[serde(default, skip_serializing_if = "Option::is_none")]
712 pub description: Option<String>,
713 #[doc = "Is the process default."]
714 #[serde(rename = "isDefault", default, skip_serializing_if = "Option::is_none")]
715 pub is_default: Option<bool>,
716 #[doc = "Is the process enabled."]
717 #[serde(rename = "isEnabled", default, skip_serializing_if = "Option::is_none")]
718 pub is_enabled: Option<bool>,
719 #[doc = "Name of the process."]
720 #[serde(default, skip_serializing_if = "Option::is_none")]
721 pub name: Option<String>,
722 #[doc = "ID of the parent process."]
723 #[serde(
724 rename = "parentProcessTypeId",
725 default,
726 skip_serializing_if = "Option::is_none"
727 )]
728 pub parent_process_type_id: Option<String>,
729 #[doc = "Projects in this process to which the user is subscribed to."]
730 #[serde(
731 default,
732 deserialize_with = "crate::serde::deserialize_null_as_default",
733 skip_serializing_if = "Vec::is_empty"
734 )]
735 pub projects: Vec<ProjectReference>,
736 #[doc = "Reference name of the process."]
737 #[serde(
738 rename = "referenceName",
739 default,
740 skip_serializing_if = "Option::is_none"
741 )]
742 pub reference_name: Option<String>,
743 #[doc = "The ID of the process."]
744 #[serde(rename = "typeId", default, skip_serializing_if = "Option::is_none")]
745 pub type_id: Option<String>,
746}
747impl ProcessInfo {
748 pub fn new() -> Self {
749 Self::default()
750 }
751}
752pub mod process_info {
753 use super::*;
754 #[doc = "Indicates the type of customization on this process. System Process is default process. Inherited Process is modified process that was System process before."]
755 #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
756 pub enum CustomizationType {
757 #[serde(rename = "system")]
758 System,
759 #[serde(rename = "inherited")]
760 Inherited,
761 #[serde(rename = "custom")]
762 Custom,
763 }
764}
765#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
766pub struct ProcessInfoList {
767 #[serde(default, skip_serializing_if = "Option::is_none")]
768 pub count: Option<i32>,
769 #[serde(
770 default,
771 deserialize_with = "crate::serde::deserialize_null_as_default",
772 skip_serializing_if = "Vec::is_empty"
773 )]
774 pub value: Vec<ProcessInfo>,
775}
776impl ProcessInfoList {
777 pub fn new() -> Self {
778 Self::default()
779 }
780}
781#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
782pub struct ProcessModel {
783 #[doc = "Description of the process"]
784 #[serde(default, skip_serializing_if = "Option::is_none")]
785 pub description: Option<String>,
786 #[doc = "Name of the process"]
787 #[serde(default, skip_serializing_if = "Option::is_none")]
788 pub name: Option<String>,
789 #[doc = "Projects in this process"]
790 #[serde(
791 default,
792 deserialize_with = "crate::serde::deserialize_null_as_default",
793 skip_serializing_if = "Vec::is_empty"
794 )]
795 pub projects: Vec<ProjectReference>,
796 #[doc = "Properties of the process."]
797 #[serde(default, skip_serializing_if = "Option::is_none")]
798 pub properties: Option<ProcessProperties>,
799 #[doc = "Reference name of the process"]
800 #[serde(
801 rename = "referenceName",
802 default,
803 skip_serializing_if = "Option::is_none"
804 )]
805 pub reference_name: Option<String>,
806 #[doc = "The ID of the process"]
807 #[serde(rename = "typeId", default, skip_serializing_if = "Option::is_none")]
808 pub type_id: Option<String>,
809}
810impl ProcessModel {
811 pub fn new() -> Self {
812 Self::default()
813 }
814}
815#[doc = "Properties of the process."]
816#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
817pub struct ProcessProperties {
818 #[doc = "Class of the process."]
819 #[serde(default, skip_serializing_if = "Option::is_none")]
820 pub class: Option<process_properties::Class>,
821 #[doc = "Is the process default process."]
822 #[serde(rename = "isDefault", default, skip_serializing_if = "Option::is_none")]
823 pub is_default: Option<bool>,
824 #[doc = "Is the process enabled."]
825 #[serde(rename = "isEnabled", default, skip_serializing_if = "Option::is_none")]
826 pub is_enabled: Option<bool>,
827 #[doc = "ID of the parent process."]
828 #[serde(
829 rename = "parentProcessTypeId",
830 default,
831 skip_serializing_if = "Option::is_none"
832 )]
833 pub parent_process_type_id: Option<String>,
834 #[doc = "Version of the process."]
835 #[serde(default, skip_serializing_if = "Option::is_none")]
836 pub version: Option<String>,
837}
838impl ProcessProperties {
839 pub fn new() -> Self {
840 Self::default()
841 }
842}
843pub mod process_properties {
844 use super::*;
845 #[doc = "Class of the process."]
846 #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
847 pub enum Class {
848 #[serde(rename = "system")]
849 System,
850 #[serde(rename = "derived")]
851 Derived,
852 #[serde(rename = "custom")]
853 Custom,
854 }
855}
856#[doc = "Process Rule Response."]
857#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
858pub struct ProcessRule {
859 #[serde(flatten)]
860 pub create_process_rule_request: CreateProcessRuleRequest,
861 #[doc = "Indicates if the rule is system generated or created by user."]
862 #[serde(
863 rename = "customizationType",
864 default,
865 skip_serializing_if = "Option::is_none"
866 )]
867 pub customization_type: Option<process_rule::CustomizationType>,
868 #[doc = "Id to uniquely identify the rule."]
869 #[serde(default, skip_serializing_if = "Option::is_none")]
870 pub id: Option<String>,
871 #[doc = "Resource Url."]
872 #[serde(default, skip_serializing_if = "Option::is_none")]
873 pub url: Option<String>,
874}
875impl ProcessRule {
876 pub fn new() -> Self {
877 Self::default()
878 }
879}
880pub mod process_rule {
881 use super::*;
882 #[doc = "Indicates if the rule is system generated or created by user."]
883 #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
884 pub enum CustomizationType {
885 #[serde(rename = "system")]
886 System,
887 #[serde(rename = "inherited")]
888 Inherited,
889 #[serde(rename = "custom")]
890 Custom,
891 }
892}
893#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
894pub struct ProcessRuleList {
895 #[serde(default, skip_serializing_if = "Option::is_none")]
896 pub count: Option<i32>,
897 #[serde(
898 default,
899 deserialize_with = "crate::serde::deserialize_null_as_default",
900 skip_serializing_if = "Vec::is_empty"
901 )]
902 pub value: Vec<ProcessRule>,
903}
904impl ProcessRuleList {
905 pub fn new() -> Self {
906 Self::default()
907 }
908}
909#[doc = "Class that describes a work item type object"]
910#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
911pub struct ProcessWorkItemType {
912 #[serde(
913 default,
914 deserialize_with = "crate::serde::deserialize_null_as_default",
915 skip_serializing_if = "Vec::is_empty"
916 )]
917 pub behaviors: Vec<WorkItemTypeBehavior>,
918 #[doc = "Color hexadecimal code to represent the work item type"]
919 #[serde(default, skip_serializing_if = "Option::is_none")]
920 pub color: Option<String>,
921 #[doc = "Indicates the type of customization on this work item System work item types are inherited from parent process but not modified Inherited work item types are modified work item that were inherited from parent process Custom work item types are work item types that were created in the current process"]
922 #[serde(default, skip_serializing_if = "Option::is_none")]
923 pub customization: Option<process_work_item_type::Customization>,
924 #[doc = "Description of the work item type"]
925 #[serde(default, skip_serializing_if = "Option::is_none")]
926 pub description: Option<String>,
927 #[doc = "Icon to represent the work item typ"]
928 #[serde(default, skip_serializing_if = "Option::is_none")]
929 pub icon: Option<String>,
930 #[doc = "Reference name of the parent work item type"]
931 #[serde(default, skip_serializing_if = "Option::is_none")]
932 pub inherits: Option<String>,
933 #[doc = "Indicates if a work item type is disabled"]
934 #[serde(
935 rename = "isDisabled",
936 default,
937 skip_serializing_if = "Option::is_none"
938 )]
939 pub is_disabled: Option<bool>,
940 #[doc = "Describes the layout of a work item type"]
941 #[serde(default, skip_serializing_if = "Option::is_none")]
942 pub layout: Option<FormLayout>,
943 #[doc = "Name of the work item type"]
944 #[serde(default, skip_serializing_if = "Option::is_none")]
945 pub name: Option<String>,
946 #[doc = "Reference name of work item type"]
947 #[serde(
948 rename = "referenceName",
949 default,
950 skip_serializing_if = "Option::is_none"
951 )]
952 pub reference_name: Option<String>,
953 #[serde(
954 default,
955 deserialize_with = "crate::serde::deserialize_null_as_default",
956 skip_serializing_if = "Vec::is_empty"
957 )]
958 pub states: Vec<WorkItemStateResultModel>,
959 #[doc = "Url of the work item type"]
960 #[serde(default, skip_serializing_if = "Option::is_none")]
961 pub url: Option<String>,
962}
963impl ProcessWorkItemType {
964 pub fn new() -> Self {
965 Self::default()
966 }
967}
968pub mod process_work_item_type {
969 use super::*;
970 #[doc = "Indicates the type of customization on this work item System work item types are inherited from parent process but not modified Inherited work item types are modified work item that were inherited from parent process Custom work item types are work item types that were created in the current process"]
971 #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
972 pub enum Customization {
973 #[serde(rename = "system")]
974 System,
975 #[serde(rename = "inherited")]
976 Inherited,
977 #[serde(rename = "custom")]
978 Custom,
979 }
980}
981#[doc = "Class that describes a field in a work item type and its properties."]
982#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
983pub struct ProcessWorkItemTypeField {
984 #[doc = "The list of field allowed values."]
985 #[serde(
986 rename = "allowedValues",
987 default,
988 deserialize_with = "crate::serde::deserialize_null_as_default",
989 skip_serializing_if = "Vec::is_empty"
990 )]
991 pub allowed_values: Vec<serde_json::Value>,
992 #[doc = "Allow setting field value to a group identity. Only applies to identity fields."]
993 #[serde(
994 rename = "allowGroups",
995 default,
996 skip_serializing_if = "Option::is_none"
997 )]
998 pub allow_groups: Option<bool>,
999 #[doc = "Indicates the type of customization on this work item."]
1000 #[serde(default, skip_serializing_if = "Option::is_none")]
1001 pub customization: Option<process_work_item_type_field::Customization>,
1002 #[doc = "The default value of the field."]
1003 #[serde(
1004 rename = "defaultValue",
1005 default,
1006 skip_serializing_if = "Option::is_none"
1007 )]
1008 pub default_value: Option<serde_json::Value>,
1009 #[doc = "Description of the field."]
1010 #[serde(default, skip_serializing_if = "Option::is_none")]
1011 pub description: Option<String>,
1012 #[doc = "Information about field definition being locked for editing"]
1013 #[serde(rename = "isLocked", default, skip_serializing_if = "Option::is_none")]
1014 pub is_locked: Option<bool>,
1015 #[doc = "Name of the field."]
1016 #[serde(default, skip_serializing_if = "Option::is_none")]
1017 pub name: Option<String>,
1018 #[doc = "If true the field cannot be edited."]
1019 #[serde(rename = "readOnly", default, skip_serializing_if = "Option::is_none")]
1020 pub read_only: Option<bool>,
1021 #[doc = "Reference name of the field."]
1022 #[serde(
1023 rename = "referenceName",
1024 default,
1025 skip_serializing_if = "Option::is_none"
1026 )]
1027 pub reference_name: Option<String>,
1028 #[doc = "If true the field cannot be empty."]
1029 #[serde(default, skip_serializing_if = "Option::is_none")]
1030 pub required: Option<bool>,
1031 #[doc = "Type of the field."]
1032 #[serde(rename = "type", default, skip_serializing_if = "Option::is_none")]
1033 pub type_: Option<process_work_item_type_field::Type>,
1034 #[doc = "Resource URL of the field."]
1035 #[serde(default, skip_serializing_if = "Option::is_none")]
1036 pub url: Option<String>,
1037}
1038impl ProcessWorkItemTypeField {
1039 pub fn new() -> Self {
1040 Self::default()
1041 }
1042}
1043pub mod process_work_item_type_field {
1044 use super::*;
1045 #[doc = "Indicates the type of customization on this work item."]
1046 #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
1047 pub enum Customization {
1048 #[serde(rename = "system")]
1049 System,
1050 #[serde(rename = "inherited")]
1051 Inherited,
1052 #[serde(rename = "custom")]
1053 Custom,
1054 }
1055 #[doc = "Type of the field."]
1056 #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
1057 pub enum Type {
1058 #[serde(rename = "string")]
1059 String,
1060 #[serde(rename = "integer")]
1061 Integer,
1062 #[serde(rename = "dateTime")]
1063 DateTime,
1064 #[serde(rename = "plainText")]
1065 PlainText,
1066 #[serde(rename = "html")]
1067 Html,
1068 #[serde(rename = "treePath")]
1069 TreePath,
1070 #[serde(rename = "history")]
1071 History,
1072 #[serde(rename = "double")]
1073 Double,
1074 #[serde(rename = "guid")]
1075 Guid,
1076 #[serde(rename = "boolean")]
1077 Boolean,
1078 #[serde(rename = "identity")]
1079 Identity,
1080 #[serde(rename = "picklistInteger")]
1081 PicklistInteger,
1082 #[serde(rename = "picklistString")]
1083 PicklistString,
1084 #[serde(rename = "picklistDouble")]
1085 PicklistDouble,
1086 }
1087}
1088#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
1089pub struct ProcessWorkItemTypeFieldList {
1090 #[serde(default, skip_serializing_if = "Option::is_none")]
1091 pub count: Option<i32>,
1092 #[serde(
1093 default,
1094 deserialize_with = "crate::serde::deserialize_null_as_default",
1095 skip_serializing_if = "Vec::is_empty"
1096 )]
1097 pub value: Vec<ProcessWorkItemTypeField>,
1098}
1099impl ProcessWorkItemTypeFieldList {
1100 pub fn new() -> Self {
1101 Self::default()
1102 }
1103}
1104#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
1105pub struct ProcessWorkItemTypeList {
1106 #[serde(default, skip_serializing_if = "Option::is_none")]
1107 pub count: Option<i32>,
1108 #[serde(
1109 default,
1110 deserialize_with = "crate::serde::deserialize_null_as_default",
1111 skip_serializing_if = "Vec::is_empty"
1112 )]
1113 pub value: Vec<ProcessWorkItemType>,
1114}
1115impl ProcessWorkItemTypeList {
1116 pub fn new() -> Self {
1117 Self::default()
1118 }
1119}
1120#[doc = "Defines the project reference class."]
1121#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
1122pub struct ProjectReference {
1123 #[doc = "Description of the project"]
1124 #[serde(default, skip_serializing_if = "Option::is_none")]
1125 pub description: Option<String>,
1126 #[doc = "The ID of the project"]
1127 #[serde(default, skip_serializing_if = "Option::is_none")]
1128 pub id: Option<String>,
1129 #[doc = "Name of the project"]
1130 #[serde(default, skip_serializing_if = "Option::is_none")]
1131 pub name: Option<String>,
1132 #[doc = "Url of the project"]
1133 #[serde(default, skip_serializing_if = "Option::is_none")]
1134 pub url: Option<String>,
1135}
1136impl ProjectReference {
1137 pub fn new() -> Self {
1138 Self::default()
1139 }
1140}
1141#[doc = "Action to take when the rule is triggered."]
1142#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
1143pub struct RuleAction {
1144 #[doc = "Type of action to take when the rule is triggered."]
1145 #[serde(
1146 rename = "actionType",
1147 default,
1148 skip_serializing_if = "Option::is_none"
1149 )]
1150 pub action_type: Option<rule_action::ActionType>,
1151 #[doc = "Field on which the action should be taken."]
1152 #[serde(
1153 rename = "targetField",
1154 default,
1155 skip_serializing_if = "Option::is_none"
1156 )]
1157 pub target_field: Option<String>,
1158 #[doc = "Value to apply on target field, once the action is taken."]
1159 #[serde(default, skip_serializing_if = "Option::is_none")]
1160 pub value: Option<String>,
1161}
1162impl RuleAction {
1163 pub fn new() -> Self {
1164 Self::default()
1165 }
1166}
1167pub mod rule_action {
1168 use super::*;
1169 #[doc = "Type of action to take when the rule is triggered."]
1170 #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
1171 pub enum ActionType {
1172 #[serde(rename = "makeRequired")]
1173 MakeRequired,
1174 #[serde(rename = "makeReadOnly")]
1175 MakeReadOnly,
1176 #[serde(rename = "setDefaultValue")]
1177 SetDefaultValue,
1178 #[serde(rename = "setDefaultFromClock")]
1179 SetDefaultFromClock,
1180 #[serde(rename = "setDefaultFromCurrentUser")]
1181 SetDefaultFromCurrentUser,
1182 #[serde(rename = "setDefaultFromField")]
1183 SetDefaultFromField,
1184 #[serde(rename = "copyValue")]
1185 CopyValue,
1186 #[serde(rename = "copyFromClock")]
1187 CopyFromClock,
1188 #[serde(rename = "copyFromCurrentUser")]
1189 CopyFromCurrentUser,
1190 #[serde(rename = "copyFromField")]
1191 CopyFromField,
1192 #[serde(rename = "setValueToEmpty")]
1193 SetValueToEmpty,
1194 #[serde(rename = "copyFromServerClock")]
1195 CopyFromServerClock,
1196 #[serde(rename = "copyFromServerCurrentUser")]
1197 CopyFromServerCurrentUser,
1198 #[serde(rename = "hideTargetField")]
1199 HideTargetField,
1200 #[serde(rename = "disallowValue")]
1201 DisallowValue,
1202 }
1203}
1204#[doc = "Action to take when the rule is triggered."]
1205#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
1206pub struct RuleActionModel {
1207 #[serde(
1208 rename = "actionType",
1209 default,
1210 skip_serializing_if = "Option::is_none"
1211 )]
1212 pub action_type: Option<String>,
1213 #[serde(
1214 rename = "targetField",
1215 default,
1216 skip_serializing_if = "Option::is_none"
1217 )]
1218 pub target_field: Option<String>,
1219 #[serde(default, skip_serializing_if = "Option::is_none")]
1220 pub value: Option<String>,
1221}
1222impl RuleActionModel {
1223 pub fn new() -> Self {
1224 Self::default()
1225 }
1226}
1227#[doc = "Defines a condition on a field when the rule should be triggered."]
1228#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
1229pub struct RuleCondition {
1230 #[doc = "Type of condition. $When. This condition limits the execution of its children to cases when another field has a particular value, i.e. when the Is value of the referenced field is equal to the given literal value. $WhenNot.This condition limits the execution of its children to cases when another field does not have a particular value, i.e.when the Is value of the referenced field is not equal to the given literal value. $WhenChanged.This condition limits the execution of its children to cases when another field has changed, i.e.when the Is value of the referenced field is not equal to the Was value of that field. $WhenNotChanged.This condition limits the execution of its children to cases when another field has not changed, i.e.when the Is value of the referenced field is equal to the Was value of that field."]
1231 #[serde(
1232 rename = "conditionType",
1233 default,
1234 skip_serializing_if = "Option::is_none"
1235 )]
1236 pub condition_type: Option<rule_condition::ConditionType>,
1237 #[doc = "Field that defines condition."]
1238 #[serde(default, skip_serializing_if = "Option::is_none")]
1239 pub field: Option<String>,
1240 #[doc = "Value of field to define the condition for rule."]
1241 #[serde(default, skip_serializing_if = "Option::is_none")]
1242 pub value: Option<String>,
1243}
1244impl RuleCondition {
1245 pub fn new() -> Self {
1246 Self::default()
1247 }
1248}
1249pub mod rule_condition {
1250 use super::*;
1251 #[doc = "Type of condition. $When. This condition limits the execution of its children to cases when another field has a particular value, i.e. when the Is value of the referenced field is equal to the given literal value. $WhenNot.This condition limits the execution of its children to cases when another field does not have a particular value, i.e.when the Is value of the referenced field is not equal to the given literal value. $WhenChanged.This condition limits the execution of its children to cases when another field has changed, i.e.when the Is value of the referenced field is not equal to the Was value of that field. $WhenNotChanged.This condition limits the execution of its children to cases when another field has not changed, i.e.when the Is value of the referenced field is equal to the Was value of that field."]
1252 #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
1253 pub enum ConditionType {
1254 #[serde(rename = "when")]
1255 When,
1256 #[serde(rename = "whenNot")]
1257 WhenNot,
1258 #[serde(rename = "whenChanged")]
1259 WhenChanged,
1260 #[serde(rename = "whenNotChanged")]
1261 WhenNotChanged,
1262 #[serde(rename = "whenWas")]
1263 WhenWas,
1264 #[serde(rename = "whenStateChangedTo")]
1265 WhenStateChangedTo,
1266 #[serde(rename = "whenStateChangedFromAndTo")]
1267 WhenStateChangedFromAndTo,
1268 #[serde(rename = "whenWorkItemIsCreated")]
1269 WhenWorkItemIsCreated,
1270 #[serde(rename = "whenValueIsDefined")]
1271 WhenValueIsDefined,
1272 #[serde(rename = "whenValueIsNotDefined")]
1273 WhenValueIsNotDefined,
1274 #[serde(rename = "whenCurrentUserIsMemberOfGroup")]
1275 WhenCurrentUserIsMemberOfGroup,
1276 #[serde(rename = "whenCurrentUserIsNotMemberOfGroup")]
1277 WhenCurrentUserIsNotMemberOfGroup,
1278 }
1279}
1280#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
1281pub struct RuleConditionModel {
1282 #[serde(
1283 rename = "conditionType",
1284 default,
1285 skip_serializing_if = "Option::is_none"
1286 )]
1287 pub condition_type: Option<String>,
1288 #[serde(default, skip_serializing_if = "Option::is_none")]
1289 pub field: Option<String>,
1290 #[serde(default, skip_serializing_if = "Option::is_none")]
1291 pub value: Option<String>,
1292}
1293impl RuleConditionModel {
1294 pub fn new() -> Self {
1295 Self::default()
1296 }
1297}
1298#[doc = "Defines a section of the work item form layout"]
1299#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
1300pub struct Section {
1301 #[doc = "List of child groups in this section"]
1302 #[serde(
1303 default,
1304 deserialize_with = "crate::serde::deserialize_null_as_default",
1305 skip_serializing_if = "Vec::is_empty"
1306 )]
1307 pub groups: Vec<Group>,
1308 #[doc = "The id for the layout node."]
1309 #[serde(default, skip_serializing_if = "Option::is_none")]
1310 pub id: Option<String>,
1311 #[doc = "A value indicating whether this layout node has been overridden by a child layout."]
1312 #[serde(default, skip_serializing_if = "Option::is_none")]
1313 pub overridden: Option<bool>,
1314}
1315impl Section {
1316 pub fn new() -> Self {
1317 Self::default()
1318 }
1319}
1320#[doc = "Describes a request to update a process"]
1321#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
1322pub struct UpdateProcessModel {
1323 #[doc = "New description of the process"]
1324 #[serde(default, skip_serializing_if = "Option::is_none")]
1325 pub description: Option<String>,
1326 #[doc = "If true new projects will use this process by default"]
1327 #[serde(rename = "isDefault", default, skip_serializing_if = "Option::is_none")]
1328 pub is_default: Option<bool>,
1329 #[doc = "If false the process will be disabled and cannot be used to create projects"]
1330 #[serde(rename = "isEnabled", default, skip_serializing_if = "Option::is_none")]
1331 pub is_enabled: Option<bool>,
1332 #[doc = "New name of the process"]
1333 #[serde(default, skip_serializing_if = "Option::is_none")]
1334 pub name: Option<String>,
1335}
1336impl UpdateProcessModel {
1337 pub fn new() -> Self {
1338 Self::default()
1339 }
1340}
1341#[doc = "Request class/object to update the rule."]
1342#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
1343pub struct UpdateProcessRuleRequest {
1344 #[serde(flatten)]
1345 pub create_process_rule_request: CreateProcessRuleRequest,
1346 #[doc = "Id to uniquely identify the rule."]
1347 #[serde(default, skip_serializing_if = "Option::is_none")]
1348 pub id: Option<String>,
1349}
1350impl UpdateProcessRuleRequest {
1351 pub fn new() -> Self {
1352 Self::default()
1353 }
1354}
1355#[doc = "Class to describe a request that updates a field's properties in a work item type."]
1356#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
1357pub struct UpdateProcessWorkItemTypeFieldRequest {
1358 #[doc = "The list of field allowed values."]
1359 #[serde(
1360 rename = "allowedValues",
1361 default,
1362 deserialize_with = "crate::serde::deserialize_null_as_default",
1363 skip_serializing_if = "Vec::is_empty"
1364 )]
1365 pub allowed_values: Vec<String>,
1366 #[doc = "Allow setting field value to a group identity. Only applies to identity fields."]
1367 #[serde(
1368 rename = "allowGroups",
1369 default,
1370 skip_serializing_if = "Option::is_none"
1371 )]
1372 pub allow_groups: Option<bool>,
1373 #[doc = "The default value of the field."]
1374 #[serde(
1375 rename = "defaultValue",
1376 default,
1377 skip_serializing_if = "Option::is_none"
1378 )]
1379 pub default_value: Option<serde_json::Value>,
1380 #[doc = "If true the field cannot be edited."]
1381 #[serde(rename = "readOnly", default, skip_serializing_if = "Option::is_none")]
1382 pub read_only: Option<bool>,
1383 #[doc = "The default value of the field."]
1384 #[serde(default, skip_serializing_if = "Option::is_none")]
1385 pub required: Option<bool>,
1386}
1387impl UpdateProcessWorkItemTypeFieldRequest {
1388 pub fn new() -> Self {
1389 Self::default()
1390 }
1391}
1392#[doc = "Class for update request on a work item type"]
1393#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
1394pub struct UpdateProcessWorkItemTypeRequest {
1395 #[doc = "Color of the work item type"]
1396 #[serde(default, skip_serializing_if = "Option::is_none")]
1397 pub color: Option<String>,
1398 #[doc = "Description of the work item type"]
1399 #[serde(default, skip_serializing_if = "Option::is_none")]
1400 pub description: Option<String>,
1401 #[doc = "Icon of the work item type"]
1402 #[serde(default, skip_serializing_if = "Option::is_none")]
1403 pub icon: Option<String>,
1404 #[doc = "If set will disable the work item type"]
1405 #[serde(
1406 rename = "isDisabled",
1407 default,
1408 skip_serializing_if = "Option::is_none"
1409 )]
1410 pub is_disabled: Option<bool>,
1411}
1412impl UpdateProcessWorkItemTypeRequest {
1413 pub fn new() -> Self {
1414 Self::default()
1415 }
1416}
1417#[doc = "This class is used to serialize collections as a single JSON object on the wire."]
1418#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
1419pub struct VssJsonCollectionWrapper {
1420 #[serde(flatten)]
1421 pub vss_json_collection_wrapper_base: VssJsonCollectionWrapperBase,
1422 #[doc = "The serialized item."]
1423 #[serde(default, skip_serializing_if = "Option::is_none")]
1424 pub value: Option<String>,
1425}
1426impl VssJsonCollectionWrapper {
1427 pub fn new() -> Self {
1428 Self::default()
1429 }
1430}
1431#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
1432pub struct VssJsonCollectionWrapperBase {
1433 #[doc = "The number of serialized items."]
1434 #[serde(default, skip_serializing_if = "Option::is_none")]
1435 pub count: Option<i32>,
1436}
1437impl VssJsonCollectionWrapperBase {
1438 pub fn new() -> Self {
1439 Self::default()
1440 }
1441}
1442#[doc = "Properties of a work item form contribution"]
1443#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
1444pub struct WitContribution {
1445 #[doc = "The id for the contribution."]
1446 #[serde(
1447 rename = "contributionId",
1448 default,
1449 skip_serializing_if = "Option::is_none"
1450 )]
1451 pub contribution_id: Option<String>,
1452 #[doc = "The height for the contribution."]
1453 #[serde(default, skip_serializing_if = "Option::is_none")]
1454 pub height: Option<i32>,
1455 #[doc = "A dictionary holding key value pairs for contribution inputs."]
1456 #[serde(default, skip_serializing_if = "Option::is_none")]
1457 pub inputs: Option<serde_json::Value>,
1458 #[doc = "A value indicating if the contribution should be show on deleted workItem."]
1459 #[serde(
1460 rename = "showOnDeletedWorkItem",
1461 default,
1462 skip_serializing_if = "Option::is_none"
1463 )]
1464 pub show_on_deleted_work_item: Option<bool>,
1465}
1466impl WitContribution {
1467 pub fn new() -> Self {
1468 Self::default()
1469 }
1470}
1471#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
1472pub struct WorkItemBehavior {
1473 #[serde(rename = "abstract", default, skip_serializing_if = "Option::is_none")]
1474 pub abstract_: Option<bool>,
1475 #[serde(default, skip_serializing_if = "Option::is_none")]
1476 pub color: Option<String>,
1477 #[serde(default, skip_serializing_if = "Option::is_none")]
1478 pub description: Option<String>,
1479 #[serde(
1480 default,
1481 deserialize_with = "crate::serde::deserialize_null_as_default",
1482 skip_serializing_if = "Vec::is_empty"
1483 )]
1484 pub fields: Vec<WorkItemBehaviorField>,
1485 #[serde(default, skip_serializing_if = "Option::is_none")]
1486 pub id: Option<String>,
1487 #[doc = "Reference to the behavior of a work item type."]
1488 #[serde(default, skip_serializing_if = "Option::is_none")]
1489 pub inherits: Option<WorkItemBehaviorReference>,
1490 #[serde(default, skip_serializing_if = "Option::is_none")]
1491 pub name: Option<String>,
1492 #[serde(default, skip_serializing_if = "Option::is_none")]
1493 pub overriden: Option<bool>,
1494 #[serde(default, skip_serializing_if = "Option::is_none")]
1495 pub rank: Option<i32>,
1496 #[serde(default, skip_serializing_if = "Option::is_none")]
1497 pub url: Option<String>,
1498}
1499impl WorkItemBehavior {
1500 pub fn new() -> Self {
1501 Self::default()
1502 }
1503}
1504#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
1505pub struct WorkItemBehaviorField {
1506 #[serde(
1507 rename = "behaviorFieldId",
1508 default,
1509 skip_serializing_if = "Option::is_none"
1510 )]
1511 pub behavior_field_id: Option<String>,
1512 #[serde(default, skip_serializing_if = "Option::is_none")]
1513 pub id: Option<String>,
1514 #[serde(default, skip_serializing_if = "Option::is_none")]
1515 pub url: Option<String>,
1516}
1517impl WorkItemBehaviorField {
1518 pub fn new() -> Self {
1519 Self::default()
1520 }
1521}
1522#[doc = "Reference to the behavior of a work item type."]
1523#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
1524pub struct WorkItemBehaviorReference {
1525 #[doc = "The ID of the reference behavior."]
1526 #[serde(default, skip_serializing_if = "Option::is_none")]
1527 pub id: Option<String>,
1528 #[doc = "The url of the reference behavior."]
1529 #[serde(default, skip_serializing_if = "Option::is_none")]
1530 pub url: Option<String>,
1531}
1532impl WorkItemBehaviorReference {
1533 pub fn new() -> Self {
1534 Self::default()
1535 }
1536}
1537#[doc = "Class That represents a work item state input."]
1538#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
1539pub struct WorkItemStateInputModel {
1540 #[doc = "Color of the state"]
1541 #[serde(default, skip_serializing_if = "Option::is_none")]
1542 pub color: Option<String>,
1543 #[doc = "Name of the state"]
1544 #[serde(default, skip_serializing_if = "Option::is_none")]
1545 pub name: Option<String>,
1546 #[doc = "Order in which state should appear"]
1547 #[serde(default, skip_serializing_if = "Option::is_none")]
1548 pub order: Option<i32>,
1549 #[doc = "Category of the state"]
1550 #[serde(
1551 rename = "stateCategory",
1552 default,
1553 skip_serializing_if = "Option::is_none"
1554 )]
1555 pub state_category: Option<String>,
1556}
1557impl WorkItemStateInputModel {
1558 pub fn new() -> Self {
1559 Self::default()
1560 }
1561}
1562#[doc = "Class that represents a work item state result."]
1563#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
1564pub struct WorkItemStateResultModel {
1565 #[doc = "Work item state color."]
1566 #[serde(default, skip_serializing_if = "Option::is_none")]
1567 pub color: Option<String>,
1568 #[doc = "Work item state customization type."]
1569 #[serde(
1570 rename = "customizationType",
1571 default,
1572 skip_serializing_if = "Option::is_none"
1573 )]
1574 pub customization_type: Option<work_item_state_result_model::CustomizationType>,
1575 #[doc = "If the Work item state is hidden."]
1576 #[serde(default, skip_serializing_if = "Option::is_none")]
1577 pub hidden: Option<bool>,
1578 #[doc = "Id of the Workitemstate."]
1579 #[serde(default, skip_serializing_if = "Option::is_none")]
1580 pub id: Option<String>,
1581 #[doc = "Work item state name."]
1582 #[serde(default, skip_serializing_if = "Option::is_none")]
1583 pub name: Option<String>,
1584 #[doc = "Work item state order."]
1585 #[serde(default, skip_serializing_if = "Option::is_none")]
1586 pub order: Option<i32>,
1587 #[doc = "Work item state statecategory."]
1588 #[serde(
1589 rename = "stateCategory",
1590 default,
1591 skip_serializing_if = "Option::is_none"
1592 )]
1593 pub state_category: Option<String>,
1594 #[doc = "Work item state url."]
1595 #[serde(default, skip_serializing_if = "Option::is_none")]
1596 pub url: Option<String>,
1597}
1598impl WorkItemStateResultModel {
1599 pub fn new() -> Self {
1600 Self::default()
1601 }
1602}
1603pub mod work_item_state_result_model {
1604 use super::*;
1605 #[doc = "Work item state customization type."]
1606 #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
1607 pub enum CustomizationType {
1608 #[serde(rename = "system")]
1609 System,
1610 #[serde(rename = "inherited")]
1611 Inherited,
1612 #[serde(rename = "custom")]
1613 Custom,
1614 }
1615}
1616#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
1617pub struct WorkItemStateResultModelList {
1618 #[serde(default, skip_serializing_if = "Option::is_none")]
1619 pub count: Option<i32>,
1620 #[serde(
1621 default,
1622 deserialize_with = "crate::serde::deserialize_null_as_default",
1623 skip_serializing_if = "Vec::is_empty"
1624 )]
1625 pub value: Vec<WorkItemStateResultModel>,
1626}
1627impl WorkItemStateResultModelList {
1628 pub fn new() -> Self {
1629 Self::default()
1630 }
1631}
1632#[doc = "Association between a work item type and it's behavior"]
1633#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
1634pub struct WorkItemTypeBehavior {
1635 #[doc = "Reference to the behavior of a work item type."]
1636 #[serde(default, skip_serializing_if = "Option::is_none")]
1637 pub behavior: Option<WorkItemBehaviorReference>,
1638 #[doc = "If true the work item type is the default work item type in the behavior"]
1639 #[serde(rename = "isDefault", default, skip_serializing_if = "Option::is_none")]
1640 pub is_default: Option<bool>,
1641 #[doc = "If true the work item type is the default work item type in the parent behavior"]
1642 #[serde(
1643 rename = "isLegacyDefault",
1644 default,
1645 skip_serializing_if = "Option::is_none"
1646 )]
1647 pub is_legacy_default: Option<bool>,
1648 #[doc = "URL of the work item type behavior"]
1649 #[serde(default, skip_serializing_if = "Option::is_none")]
1650 pub url: Option<String>,
1651}
1652impl WorkItemTypeBehavior {
1653 pub fn new() -> Self {
1654 Self::default()
1655 }
1656}
1657#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
1658pub struct WorkItemTypeBehaviorList {
1659 #[serde(default, skip_serializing_if = "Option::is_none")]
1660 pub count: Option<i32>,
1661 #[serde(
1662 default,
1663 deserialize_with = "crate::serde::deserialize_null_as_default",
1664 skip_serializing_if = "Vec::is_empty"
1665 )]
1666 pub value: Vec<WorkItemTypeBehavior>,
1667}
1668impl WorkItemTypeBehaviorList {
1669 pub fn new() -> Self {
1670 Self::default()
1671 }
1672}
1673#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
1674pub struct WorkItemTypeModel {
1675 #[serde(
1676 default,
1677 deserialize_with = "crate::serde::deserialize_null_as_default",
1678 skip_serializing_if = "Vec::is_empty"
1679 )]
1680 pub behaviors: Vec<WorkItemTypeBehavior>,
1681 #[serde(default, skip_serializing_if = "Option::is_none")]
1682 pub class: Option<work_item_type_model::Class>,
1683 #[serde(default, skip_serializing_if = "Option::is_none")]
1684 pub color: Option<String>,
1685 #[serde(default, skip_serializing_if = "Option::is_none")]
1686 pub description: Option<String>,
1687 #[serde(default, skip_serializing_if = "Option::is_none")]
1688 pub icon: Option<String>,
1689 #[serde(default, skip_serializing_if = "Option::is_none")]
1690 pub id: Option<String>,
1691 #[doc = "Parent WIT Id/Internal ReferenceName that it inherits from"]
1692 #[serde(default, skip_serializing_if = "Option::is_none")]
1693 pub inherits: Option<String>,
1694 #[serde(
1695 rename = "isDisabled",
1696 default,
1697 skip_serializing_if = "Option::is_none"
1698 )]
1699 pub is_disabled: Option<bool>,
1700 #[doc = "Describes the layout of a work item type"]
1701 #[serde(default, skip_serializing_if = "Option::is_none")]
1702 pub layout: Option<FormLayout>,
1703 #[serde(default, skip_serializing_if = "Option::is_none")]
1704 pub name: Option<String>,
1705 #[serde(
1706 default,
1707 deserialize_with = "crate::serde::deserialize_null_as_default",
1708 skip_serializing_if = "Vec::is_empty"
1709 )]
1710 pub states: Vec<WorkItemStateResultModel>,
1711 #[serde(default, skip_serializing_if = "Option::is_none")]
1712 pub url: Option<String>,
1713}
1714impl WorkItemTypeModel {
1715 pub fn new() -> Self {
1716 Self::default()
1717 }
1718}
1719pub mod work_item_type_model {
1720 use super::*;
1721 #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
1722 pub enum Class {
1723 #[serde(rename = "system")]
1724 System,
1725 #[serde(rename = "derived")]
1726 Derived,
1727 #[serde(rename = "custom")]
1728 Custom,
1729 }
1730}