azure_devops_rust_api/tfvc/
models.rs

1// Copyright (c) Microsoft Corporation.
2// Licensed under the MIT License.
3#![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 AssociatedWorkItem {
10    #[serde(
11        rename = "assignedTo",
12        default,
13        skip_serializing_if = "Option::is_none"
14    )]
15    pub assigned_to: Option<String>,
16    #[doc = "Id of associated the work item."]
17    #[serde(default, skip_serializing_if = "Option::is_none")]
18    pub id: Option<i32>,
19    #[serde(default, skip_serializing_if = "Option::is_none")]
20    pub state: Option<String>,
21    #[serde(default, skip_serializing_if = "Option::is_none")]
22    pub title: Option<String>,
23    #[doc = "REST Url of the work item."]
24    #[serde(default, skip_serializing_if = "Option::is_none")]
25    pub url: Option<String>,
26    #[serde(rename = "webUrl", default, skip_serializing_if = "Option::is_none")]
27    pub web_url: Option<String>,
28    #[serde(
29        rename = "workItemType",
30        default,
31        skip_serializing_if = "Option::is_none"
32    )]
33    pub work_item_type: Option<String>,
34}
35impl AssociatedWorkItem {
36    pub fn new() -> Self {
37        Self::default()
38    }
39}
40#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
41pub struct AssociatedWorkItemList {
42    #[serde(default, skip_serializing_if = "Option::is_none")]
43    pub count: Option<i32>,
44    #[serde(
45        default,
46        deserialize_with = "crate::serde::deserialize_null_as_default",
47        skip_serializing_if = "Vec::is_empty"
48    )]
49    pub value: Vec<AssociatedWorkItem>,
50}
51impl AssociatedWorkItemList {
52    pub fn new() -> Self {
53        Self::default()
54    }
55}
56#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
57pub struct Change {
58    #[doc = "The type of change that was made to the item."]
59    #[serde(
60        rename = "changeType",
61        default,
62        skip_serializing_if = "Option::is_none"
63    )]
64    pub change_type: Option<change::ChangeType>,
65    #[doc = "Current version."]
66    #[serde(default, skip_serializing_if = "Option::is_none")]
67    pub item: Option<String>,
68    #[serde(
69        rename = "newContent",
70        default,
71        skip_serializing_if = "Option::is_none"
72    )]
73    pub new_content: Option<ItemContent>,
74    #[doc = "Path of the item on the server."]
75    #[serde(
76        rename = "sourceServerItem",
77        default,
78        skip_serializing_if = "Option::is_none"
79    )]
80    pub source_server_item: Option<String>,
81    #[doc = "URL to retrieve the item."]
82    #[serde(default, skip_serializing_if = "Option::is_none")]
83    pub url: Option<String>,
84}
85impl Change {
86    pub fn new() -> Self {
87        Self::default()
88    }
89}
90pub mod change {
91    use super::*;
92    #[doc = "The type of change that was made to the item."]
93    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
94    pub enum ChangeType {
95        #[serde(rename = "none")]
96        None,
97        #[serde(rename = "add")]
98        Add,
99        #[serde(rename = "edit")]
100        Edit,
101        #[serde(rename = "encoding")]
102        Encoding,
103        #[serde(rename = "rename")]
104        Rename,
105        #[serde(rename = "delete")]
106        Delete,
107        #[serde(rename = "undelete")]
108        Undelete,
109        #[serde(rename = "branch")]
110        Branch,
111        #[serde(rename = "merge")]
112        Merge,
113        #[serde(rename = "lock")]
114        Lock,
115        #[serde(rename = "rollback")]
116        Rollback,
117        #[serde(rename = "sourceRename")]
118        SourceRename,
119        #[serde(rename = "targetRename")]
120        TargetRename,
121        #[serde(rename = "property")]
122        Property,
123        #[serde(rename = "all")]
124        All,
125    }
126}
127#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
128pub struct CheckinNote {
129    #[serde(default, skip_serializing_if = "Option::is_none")]
130    pub name: Option<String>,
131    #[serde(default, skip_serializing_if = "Option::is_none")]
132    pub value: Option<String>,
133}
134impl CheckinNote {
135    pub fn new() -> Self {
136        Self::default()
137    }
138}
139#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
140pub struct FileContentMetadata {
141    #[serde(
142        rename = "contentType",
143        default,
144        skip_serializing_if = "Option::is_none"
145    )]
146    pub content_type: Option<String>,
147    #[serde(default, skip_serializing_if = "Option::is_none")]
148    pub encoding: Option<i32>,
149    #[serde(default, skip_serializing_if = "Option::is_none")]
150    pub extension: Option<String>,
151    #[serde(rename = "fileName", default, skip_serializing_if = "Option::is_none")]
152    pub file_name: Option<String>,
153    #[serde(rename = "isBinary", default, skip_serializing_if = "Option::is_none")]
154    pub is_binary: Option<bool>,
155    #[serde(rename = "isImage", default, skip_serializing_if = "Option::is_none")]
156    pub is_image: Option<bool>,
157    #[serde(rename = "vsLink", default, skip_serializing_if = "Option::is_none")]
158    pub vs_link: Option<String>,
159}
160impl FileContentMetadata {
161    pub fn new() -> Self {
162        Self::default()
163    }
164}
165#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
166pub struct GitRepository {
167    #[doc = "The class to represent a collection of REST reference links."]
168    #[serde(rename = "_links", default, skip_serializing_if = "Option::is_none")]
169    pub links: Option<ReferenceLinks>,
170    #[serde(
171        rename = "defaultBranch",
172        default,
173        skip_serializing_if = "Option::is_none"
174    )]
175    pub default_branch: Option<String>,
176    #[serde(default, skip_serializing_if = "Option::is_none")]
177    pub id: Option<String>,
178    #[doc = "True if the repository is disabled. False otherwise."]
179    #[serde(
180        rename = "isDisabled",
181        default,
182        skip_serializing_if = "Option::is_none"
183    )]
184    pub is_disabled: Option<bool>,
185    #[doc = "True if the repository was created as a fork."]
186    #[serde(rename = "isFork", default, skip_serializing_if = "Option::is_none")]
187    pub is_fork: Option<bool>,
188    #[doc = "True if the repository is in maintenance. False otherwise."]
189    #[serde(
190        rename = "isInMaintenance",
191        default,
192        skip_serializing_if = "Option::is_none"
193    )]
194    pub is_in_maintenance: Option<bool>,
195    #[serde(default, skip_serializing_if = "Option::is_none")]
196    pub name: Option<String>,
197    #[serde(
198        rename = "parentRepository",
199        default,
200        skip_serializing_if = "Option::is_none"
201    )]
202    pub parent_repository: Option<GitRepositoryRef>,
203    #[doc = "Represents a shallow reference to a TeamProject."]
204    #[serde(default, skip_serializing_if = "Option::is_none")]
205    pub project: Option<TeamProjectReference>,
206    #[serde(rename = "remoteUrl", default, skip_serializing_if = "Option::is_none")]
207    pub remote_url: Option<String>,
208    #[doc = "Compressed size (bytes) of the repository."]
209    #[serde(default, skip_serializing_if = "Option::is_none")]
210    pub size: Option<i64>,
211    #[serde(rename = "sshUrl", default, skip_serializing_if = "Option::is_none")]
212    pub ssh_url: Option<String>,
213    #[serde(default, skip_serializing_if = "Option::is_none")]
214    pub url: Option<String>,
215    #[serde(
216        rename = "validRemoteUrls",
217        default,
218        deserialize_with = "crate::serde::deserialize_null_as_default",
219        skip_serializing_if = "Vec::is_empty"
220    )]
221    pub valid_remote_urls: Vec<String>,
222    #[serde(rename = "webUrl", default, skip_serializing_if = "Option::is_none")]
223    pub web_url: Option<String>,
224}
225impl GitRepository {
226    pub fn new() -> Self {
227        Self::default()
228    }
229}
230#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
231pub struct GitRepositoryRef {
232    #[doc = "Reference object for a TeamProjectCollection."]
233    #[serde(default, skip_serializing_if = "Option::is_none")]
234    pub collection: Option<TeamProjectCollectionReference>,
235    #[serde(default, skip_serializing_if = "Option::is_none")]
236    pub id: Option<String>,
237    #[doc = "True if the repository was created as a fork"]
238    #[serde(rename = "isFork", default, skip_serializing_if = "Option::is_none")]
239    pub is_fork: Option<bool>,
240    #[serde(default, skip_serializing_if = "Option::is_none")]
241    pub name: Option<String>,
242    #[doc = "Represents a shallow reference to a TeamProject."]
243    #[serde(default, skip_serializing_if = "Option::is_none")]
244    pub project: Option<TeamProjectReference>,
245    #[serde(rename = "remoteUrl", default, skip_serializing_if = "Option::is_none")]
246    pub remote_url: Option<String>,
247    #[serde(rename = "sshUrl", default, skip_serializing_if = "Option::is_none")]
248    pub ssh_url: Option<String>,
249    #[serde(default, skip_serializing_if = "Option::is_none")]
250    pub url: Option<String>,
251}
252impl GitRepositoryRef {
253    pub fn new() -> Self {
254        Self::default()
255    }
256}
257#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
258pub struct GraphSubjectBase {
259    #[doc = "Links"]
260    #[serde(rename = "_links", default, skip_serializing_if = "Option::is_none")]
261    pub links: Option<serde_json::Value>,
262    #[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."]
263    #[serde(default, skip_serializing_if = "Option::is_none")]
264    pub descriptor: Option<String>,
265    #[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."]
266    #[serde(
267        rename = "displayName",
268        default,
269        skip_serializing_if = "Option::is_none"
270    )]
271    pub display_name: Option<String>,
272    #[doc = "This url is the full route to the source resource of this graph subject."]
273    #[serde(default, skip_serializing_if = "Option::is_none")]
274    pub url: Option<String>,
275}
276impl GraphSubjectBase {
277    pub fn new() -> Self {
278        Self::default()
279    }
280}
281#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
282pub struct IdentityRef {
283    #[serde(flatten)]
284    pub graph_subject_base: GraphSubjectBase,
285    #[doc = "Deprecated - Can be retrieved by querying the Graph user referenced in the \"self\" entry of the IdentityRef \"_links\" dictionary"]
286    #[serde(
287        rename = "directoryAlias",
288        default,
289        skip_serializing_if = "Option::is_none"
290    )]
291    pub directory_alias: Option<String>,
292    #[serde(default, skip_serializing_if = "Option::is_none")]
293    pub id: Option<String>,
294    #[doc = "Deprecated - Available in the \"avatar\" entry of the IdentityRef \"_links\" dictionary"]
295    #[serde(rename = "imageUrl", default, skip_serializing_if = "Option::is_none")]
296    pub image_url: Option<String>,
297    #[doc = "Deprecated - Can be retrieved by querying the Graph membership state referenced in the \"membershipState\" entry of the GraphUser \"_links\" dictionary"]
298    #[serde(default, skip_serializing_if = "Option::is_none")]
299    pub inactive: Option<bool>,
300    #[doc = "Deprecated - Can be inferred from the subject type of the descriptor (Descriptor.IsAadUserType/Descriptor.IsAadGroupType)"]
301    #[serde(
302        rename = "isAadIdentity",
303        default,
304        skip_serializing_if = "Option::is_none"
305    )]
306    pub is_aad_identity: Option<bool>,
307    #[doc = "Deprecated - Can be inferred from the subject type of the descriptor (Descriptor.IsGroupType)"]
308    #[serde(
309        rename = "isContainer",
310        default,
311        skip_serializing_if = "Option::is_none"
312    )]
313    pub is_container: Option<bool>,
314    #[serde(
315        rename = "isDeletedInOrigin",
316        default,
317        skip_serializing_if = "Option::is_none"
318    )]
319    pub is_deleted_in_origin: Option<bool>,
320    #[doc = "Deprecated - not in use in most preexisting implementations of ToIdentityRef"]
321    #[serde(
322        rename = "profileUrl",
323        default,
324        skip_serializing_if = "Option::is_none"
325    )]
326    pub profile_url: Option<String>,
327    #[doc = "Deprecated - use Domain+PrincipalName instead"]
328    #[serde(
329        rename = "uniqueName",
330        default,
331        skip_serializing_if = "Option::is_none"
332    )]
333    pub unique_name: Option<String>,
334}
335impl IdentityRef {
336    pub fn new() -> Self {
337        Self::default()
338    }
339}
340#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
341pub struct ItemContent {
342    #[serde(default, skip_serializing_if = "Option::is_none")]
343    pub content: Option<String>,
344    #[serde(
345        rename = "contentType",
346        default,
347        skip_serializing_if = "Option::is_none"
348    )]
349    pub content_type: Option<item_content::ContentType>,
350}
351impl ItemContent {
352    pub fn new() -> Self {
353        Self::default()
354    }
355}
356pub mod item_content {
357    use super::*;
358    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
359    pub enum ContentType {
360        #[serde(rename = "rawText")]
361        RawText,
362        #[serde(rename = "base64Encoded")]
363        Base64Encoded,
364    }
365}
366#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
367pub struct ItemModel {
368    #[doc = "The class to represent a collection of REST reference links."]
369    #[serde(rename = "_links", default, skip_serializing_if = "Option::is_none")]
370    pub links: Option<ReferenceLinks>,
371    #[serde(default, skip_serializing_if = "Option::is_none")]
372    pub content: Option<String>,
373    #[serde(
374        rename = "contentMetadata",
375        default,
376        skip_serializing_if = "Option::is_none"
377    )]
378    pub content_metadata: Option<FileContentMetadata>,
379    #[serde(rename = "isFolder", default, skip_serializing_if = "Option::is_none")]
380    pub is_folder: Option<bool>,
381    #[serde(rename = "isSymLink", default, skip_serializing_if = "Option::is_none")]
382    pub is_sym_link: Option<bool>,
383    #[serde(default, skip_serializing_if = "Option::is_none")]
384    pub path: Option<String>,
385    #[serde(default, skip_serializing_if = "Option::is_none")]
386    pub url: Option<String>,
387}
388impl ItemModel {
389    pub fn new() -> Self {
390        Self::default()
391    }
392}
393#[doc = "The class to represent a collection of REST reference links."]
394#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
395pub struct ReferenceLinks {
396    #[doc = "The readonly view of the links.  Because Reference links are readonly, we only want to expose them as read only."]
397    #[serde(default, skip_serializing_if = "Option::is_none")]
398    pub links: Option<serde_json::Value>,
399}
400impl ReferenceLinks {
401    pub fn new() -> Self {
402        Self::default()
403    }
404}
405#[doc = "Reference object for a TeamProjectCollection."]
406#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
407pub struct TeamProjectCollectionReference {
408    #[doc = "Collection avatar Url."]
409    #[serde(rename = "avatarUrl", default, skip_serializing_if = "Option::is_none")]
410    pub avatar_url: Option<String>,
411    #[doc = "Collection Id."]
412    #[serde(default, skip_serializing_if = "Option::is_none")]
413    pub id: Option<String>,
414    #[doc = "Collection Name."]
415    #[serde(default, skip_serializing_if = "Option::is_none")]
416    pub name: Option<String>,
417    #[doc = "Collection REST Url."]
418    #[serde(default, skip_serializing_if = "Option::is_none")]
419    pub url: Option<String>,
420}
421impl TeamProjectCollectionReference {
422    pub fn new() -> Self {
423        Self::default()
424    }
425}
426#[doc = "Represents a shallow reference to a TeamProject."]
427#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
428pub struct TeamProjectReference {
429    #[doc = "Project abbreviation."]
430    #[serde(default, skip_serializing_if = "Option::is_none")]
431    pub abbreviation: Option<String>,
432    #[doc = "Url to default team identity image."]
433    #[serde(
434        rename = "defaultTeamImageUrl",
435        default,
436        skip_serializing_if = "Option::is_none"
437    )]
438    pub default_team_image_url: Option<String>,
439    #[doc = "The project's description (if any)."]
440    #[serde(default, skip_serializing_if = "Option::is_none")]
441    pub description: Option<String>,
442    #[doc = "Project identifier."]
443    #[serde(default, skip_serializing_if = "Option::is_none")]
444    pub id: Option<String>,
445    #[doc = "Project last update time."]
446    #[serde(
447        rename = "lastUpdateTime",
448        default,
449        skip_serializing_if = "Option::is_none",
450        with = "crate::date_time::rfc3339::option"
451    )]
452    pub last_update_time: Option<time::OffsetDateTime>,
453    #[doc = "Project name."]
454    pub name: String,
455    #[doc = "Project revision."]
456    #[serde(default, skip_serializing_if = "Option::is_none")]
457    pub revision: Option<i64>,
458    #[doc = "Project state."]
459    #[serde(default, skip_serializing_if = "Option::is_none")]
460    pub state: Option<team_project_reference::State>,
461    #[doc = "Url to the full version of the object."]
462    #[serde(default, skip_serializing_if = "Option::is_none")]
463    pub url: Option<String>,
464    #[doc = "Project visibility."]
465    pub visibility: team_project_reference::Visibility,
466}
467impl TeamProjectReference {
468    pub fn new(name: String, visibility: team_project_reference::Visibility) -> Self {
469        Self {
470            abbreviation: None,
471            default_team_image_url: None,
472            description: None,
473            id: None,
474            last_update_time: None,
475            name,
476            revision: None,
477            state: None,
478            url: None,
479            visibility,
480        }
481    }
482}
483pub mod team_project_reference {
484    use super::*;
485    #[doc = "Project state."]
486    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
487    pub enum State {
488        #[serde(rename = "deleting")]
489        Deleting,
490        #[serde(rename = "new")]
491        New,
492        #[serde(rename = "wellFormed")]
493        WellFormed,
494        #[serde(rename = "createPending")]
495        CreatePending,
496        #[serde(rename = "all")]
497        All,
498        #[serde(rename = "unchanged")]
499        Unchanged,
500        #[serde(rename = "deleted")]
501        Deleted,
502    }
503    #[doc = "Project visibility."]
504    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
505    pub enum Visibility {
506        #[serde(rename = "private")]
507        Private,
508        #[serde(rename = "public")]
509        Public,
510        #[serde(rename = "organization")]
511        Organization,
512        #[serde(rename = "unchanged")]
513        Unchanged,
514    }
515}
516#[doc = "Class representing a branch object."]
517#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
518pub struct TfvcBranch {
519    #[serde(flatten)]
520    pub tfvc_branch_ref: TfvcBranchRef,
521    #[doc = "List of children for the branch."]
522    #[serde(
523        default,
524        deserialize_with = "crate::serde::deserialize_null_as_default",
525        skip_serializing_if = "Vec::is_empty"
526    )]
527    pub children: Vec<TfvcBranch>,
528    #[doc = "List of branch mappings."]
529    #[serde(
530        default,
531        deserialize_with = "crate::serde::deserialize_null_as_default",
532        skip_serializing_if = "Vec::is_empty"
533    )]
534    pub mappings: Vec<TfvcBranchMapping>,
535    #[doc = "This is the shallow branchref class."]
536    #[serde(default, skip_serializing_if = "Option::is_none")]
537    pub parent: Option<TfvcShallowBranchRef>,
538    #[doc = "List of paths of the related branches."]
539    #[serde(
540        rename = "relatedBranches",
541        default,
542        deserialize_with = "crate::serde::deserialize_null_as_default",
543        skip_serializing_if = "Vec::is_empty"
544    )]
545    pub related_branches: Vec<TfvcShallowBranchRef>,
546}
547impl TfvcBranch {
548    pub fn new() -> Self {
549        Self::default()
550    }
551}
552#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
553pub struct TfvcBranchList {
554    #[serde(default, skip_serializing_if = "Option::is_none")]
555    pub count: Option<i32>,
556    #[serde(
557        default,
558        deserialize_with = "crate::serde::deserialize_null_as_default",
559        skip_serializing_if = "Vec::is_empty"
560    )]
561    pub value: Vec<TfvcBranch>,
562}
563impl TfvcBranchList {
564    pub fn new() -> Self {
565        Self::default()
566    }
567}
568#[doc = "A branch mapping."]
569#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
570pub struct TfvcBranchMapping {
571    #[doc = "Depth of the branch."]
572    #[serde(default, skip_serializing_if = "Option::is_none")]
573    pub depth: Option<String>,
574    #[doc = "Server item for the branch."]
575    #[serde(
576        rename = "serverItem",
577        default,
578        skip_serializing_if = "Option::is_none"
579    )]
580    pub server_item: Option<String>,
581    #[doc = "Type of the branch."]
582    #[serde(rename = "type", default, skip_serializing_if = "Option::is_none")]
583    pub type_: Option<String>,
584}
585impl TfvcBranchMapping {
586    pub fn new() -> Self {
587        Self::default()
588    }
589}
590#[doc = "Metadata for a branchref."]
591#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
592pub struct TfvcBranchRef {
593    #[serde(flatten)]
594    pub tfvc_shallow_branch_ref: TfvcShallowBranchRef,
595    #[doc = "Links"]
596    #[serde(rename = "_links", default, skip_serializing_if = "Option::is_none")]
597    pub links: Option<serde_json::Value>,
598    #[doc = "Creation date of the branch."]
599    #[serde(
600        rename = "createdDate",
601        default,
602        skip_serializing_if = "Option::is_none",
603        with = "crate::date_time::rfc3339::option"
604    )]
605    pub created_date: Option<time::OffsetDateTime>,
606    #[doc = "Branch description."]
607    #[serde(default, skip_serializing_if = "Option::is_none")]
608    pub description: Option<String>,
609    #[doc = "Is the branch deleted?"]
610    #[serde(rename = "isDeleted", default, skip_serializing_if = "Option::is_none")]
611    pub is_deleted: Option<bool>,
612    #[serde(default, skip_serializing_if = "Option::is_none")]
613    pub owner: Option<IdentityRef>,
614    #[doc = "URL to retrieve the item."]
615    #[serde(default, skip_serializing_if = "Option::is_none")]
616    pub url: Option<String>,
617}
618impl TfvcBranchRef {
619    pub fn new() -> Self {
620        Self::default()
621    }
622}
623#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
624pub struct TfvcBranchRefList {
625    #[serde(default, skip_serializing_if = "Option::is_none")]
626    pub count: Option<i32>,
627    #[serde(
628        default,
629        deserialize_with = "crate::serde::deserialize_null_as_default",
630        skip_serializing_if = "Vec::is_empty"
631    )]
632    pub value: Vec<TfvcBranchRef>,
633}
634impl TfvcBranchRefList {
635    pub fn new() -> Self {
636        Self::default()
637    }
638}
639#[doc = "A change."]
640#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
641pub struct TfvcChange {
642    #[serde(flatten)]
643    pub change: Change,
644    #[doc = "List of merge sources in case of rename or branch creation."]
645    #[serde(
646        rename = "mergeSources",
647        default,
648        deserialize_with = "crate::serde::deserialize_null_as_default",
649        skip_serializing_if = "Vec::is_empty"
650    )]
651    pub merge_sources: Vec<TfvcMergeSource>,
652    #[doc = "Version at which a (shelved) change was pended against"]
653    #[serde(
654        rename = "pendingVersion",
655        default,
656        skip_serializing_if = "Option::is_none"
657    )]
658    pub pending_version: Option<i32>,
659}
660impl TfvcChange {
661    pub fn new() -> Self {
662        Self::default()
663    }
664}
665#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
666pub struct TfvcChangeList {
667    #[serde(default, skip_serializing_if = "Option::is_none")]
668    pub count: Option<i32>,
669    #[serde(
670        default,
671        deserialize_with = "crate::serde::deserialize_null_as_default",
672        skip_serializing_if = "Vec::is_empty"
673    )]
674    pub value: Vec<TfvcChange>,
675}
676impl TfvcChangeList {
677    pub fn new() -> Self {
678        Self::default()
679    }
680}
681#[doc = "A collection of changes."]
682#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
683pub struct TfvcChangeset {
684    #[serde(flatten)]
685    pub tfvc_changeset_ref: TfvcChangesetRef,
686    #[doc = "Changeset Account Id also known as Organization Id."]
687    #[serde(rename = "accountId", default, skip_serializing_if = "Option::is_none")]
688    pub account_id: Option<String>,
689    #[doc = "List of associated changes."]
690    #[serde(
691        default,
692        deserialize_with = "crate::serde::deserialize_null_as_default",
693        skip_serializing_if = "Vec::is_empty"
694    )]
695    pub changes: Vec<TfvcChange>,
696    #[doc = "List of Checkin Notes for the changeset."]
697    #[serde(
698        rename = "checkinNotes",
699        default,
700        deserialize_with = "crate::serde::deserialize_null_as_default",
701        skip_serializing_if = "Vec::is_empty"
702    )]
703    pub checkin_notes: Vec<CheckinNote>,
704    #[doc = "Changeset collection Id."]
705    #[serde(
706        rename = "collectionId",
707        default,
708        skip_serializing_if = "Option::is_none"
709    )]
710    pub collection_id: Option<String>,
711    #[doc = "True if more changes are available."]
712    #[serde(
713        rename = "hasMoreChanges",
714        default,
715        skip_serializing_if = "Option::is_none"
716    )]
717    pub has_more_changes: Option<bool>,
718    #[doc = "Information on the policy override."]
719    #[serde(
720        rename = "policyOverride",
721        default,
722        skip_serializing_if = "Option::is_none"
723    )]
724    pub policy_override: Option<TfvcPolicyOverrideInfo>,
725    #[doc = "Team Project Ids for the changeset."]
726    #[serde(
727        rename = "teamProjectIds",
728        default,
729        deserialize_with = "crate::serde::deserialize_null_as_default",
730        skip_serializing_if = "Vec::is_empty"
731    )]
732    pub team_project_ids: Vec<String>,
733    #[doc = "List of work items associated with the changeset."]
734    #[serde(
735        rename = "workItems",
736        default,
737        deserialize_with = "crate::serde::deserialize_null_as_default",
738        skip_serializing_if = "Vec::is_empty"
739    )]
740    pub work_items: Vec<AssociatedWorkItem>,
741}
742impl TfvcChangeset {
743    pub fn new() -> Self {
744        Self::default()
745    }
746}
747#[doc = "Metadata for a changeset."]
748#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
749pub struct TfvcChangesetRef {
750    #[doc = "Links"]
751    #[serde(rename = "_links", default, skip_serializing_if = "Option::is_none")]
752    pub links: Option<serde_json::Value>,
753    #[serde(default, skip_serializing_if = "Option::is_none")]
754    pub author: Option<IdentityRef>,
755    #[doc = "Changeset Id."]
756    #[serde(
757        rename = "changesetId",
758        default,
759        skip_serializing_if = "Option::is_none"
760    )]
761    pub changeset_id: Option<i32>,
762    #[serde(
763        rename = "checkedInBy",
764        default,
765        skip_serializing_if = "Option::is_none"
766    )]
767    pub checked_in_by: Option<IdentityRef>,
768    #[doc = "Comment for the changeset."]
769    #[serde(default, skip_serializing_if = "Option::is_none")]
770    pub comment: Option<String>,
771    #[doc = "Was the Comment result truncated?"]
772    #[serde(
773        rename = "commentTruncated",
774        default,
775        skip_serializing_if = "Option::is_none"
776    )]
777    pub comment_truncated: Option<bool>,
778    #[doc = "Creation date of the changeset."]
779    #[serde(
780        rename = "createdDate",
781        default,
782        skip_serializing_if = "Option::is_none",
783        with = "crate::date_time::rfc3339::option"
784    )]
785    pub created_date: Option<time::OffsetDateTime>,
786    #[doc = "URL to retrieve the item."]
787    #[serde(default, skip_serializing_if = "Option::is_none")]
788    pub url: Option<String>,
789}
790impl TfvcChangesetRef {
791    pub fn new() -> Self {
792        Self::default()
793    }
794}
795#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
796pub struct TfvcChangesetRefList {
797    #[serde(default, skip_serializing_if = "Option::is_none")]
798    pub count: Option<i32>,
799    #[serde(
800        default,
801        deserialize_with = "crate::serde::deserialize_null_as_default",
802        skip_serializing_if = "Vec::is_empty"
803    )]
804    pub value: Vec<TfvcChangesetRef>,
805}
806impl TfvcChangesetRefList {
807    pub fn new() -> Self {
808        Self::default()
809    }
810}
811#[doc = "Criteria used in a search for change lists."]
812#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
813pub struct TfvcChangesetSearchCriteria {
814    #[doc = "Alias or display name of user who made the changes."]
815    #[serde(default, skip_serializing_if = "Option::is_none")]
816    pub author: Option<String>,
817    #[doc = "Whether or not to follow renames for the given item being queried."]
818    #[serde(
819        rename = "followRenames",
820        default,
821        skip_serializing_if = "Option::is_none"
822    )]
823    pub follow_renames: Option<bool>,
824    #[doc = "If provided, only include changesets created after this date (string)."]
825    #[serde(rename = "fromDate", default, skip_serializing_if = "Option::is_none")]
826    pub from_date: Option<String>,
827    #[doc = "If provided, only include changesets after this changesetID."]
828    #[serde(rename = "fromId", default, skip_serializing_if = "Option::is_none")]
829    pub from_id: Option<i32>,
830    #[doc = "Whether to include the _links field on the shallow references."]
831    #[serde(
832        rename = "includeLinks",
833        default,
834        skip_serializing_if = "Option::is_none"
835    )]
836    pub include_links: Option<bool>,
837    #[doc = "Path of item to search under."]
838    #[serde(rename = "itemPath", default, skip_serializing_if = "Option::is_none")]
839    pub item_path: Option<String>,
840    #[serde(
841        default,
842        deserialize_with = "crate::serde::deserialize_null_as_default",
843        skip_serializing_if = "Vec::is_empty"
844    )]
845    pub mappings: Vec<TfvcMappingFilter>,
846    #[doc = "If provided, only include changesets created before this date (string)."]
847    #[serde(rename = "toDate", default, skip_serializing_if = "Option::is_none")]
848    pub to_date: Option<String>,
849    #[doc = "If provided, a version descriptor for the latest change list to include."]
850    #[serde(rename = "toId", default, skip_serializing_if = "Option::is_none")]
851    pub to_id: Option<i32>,
852}
853impl TfvcChangesetSearchCriteria {
854    pub fn new() -> Self {
855        Self::default()
856    }
857}
858#[doc = "Request body for Get batched changesets."]
859#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
860pub struct TfvcChangesetsRequestData {
861    #[doc = "List of changeset Ids."]
862    #[serde(
863        rename = "changesetIds",
864        default,
865        deserialize_with = "crate::serde::deserialize_null_as_default",
866        skip_serializing_if = "Vec::is_empty"
867    )]
868    pub changeset_ids: Vec<i32>,
869    #[doc = "Max length of the comment."]
870    #[serde(
871        rename = "commentLength",
872        default,
873        skip_serializing_if = "Option::is_none"
874    )]
875    pub comment_length: Option<i32>,
876    #[doc = "Whether to include the _links field on the shallow references"]
877    #[serde(
878        rename = "includeLinks",
879        default,
880        skip_serializing_if = "Option::is_none"
881    )]
882    pub include_links: Option<bool>,
883}
884impl TfvcChangesetsRequestData {
885    pub fn new() -> Self {
886        Self::default()
887    }
888}
889#[doc = "Metadata for an item."]
890#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
891pub struct TfvcItem {
892    #[serde(flatten)]
893    pub item_model: ItemModel,
894    #[doc = "Item changed datetime."]
895    #[serde(
896        rename = "changeDate",
897        default,
898        skip_serializing_if = "Option::is_none",
899        with = "crate::date_time::rfc3339::option"
900    )]
901    pub change_date: Option<time::OffsetDateTime>,
902    #[doc = "Greater than 0 if item is deleted."]
903    #[serde(
904        rename = "deletionId",
905        default,
906        skip_serializing_if = "Option::is_none"
907    )]
908    pub deletion_id: Option<i32>,
909    #[doc = "File encoding from database, -1 represents binary."]
910    #[serde(default, skip_serializing_if = "Option::is_none")]
911    pub encoding: Option<i32>,
912    #[doc = "MD5 hash as a base 64 string, applies to files only."]
913    #[serde(rename = "hashValue", default, skip_serializing_if = "Option::is_none")]
914    pub hash_value: Option<String>,
915    #[doc = "True if item is a branch."]
916    #[serde(rename = "isBranch", default, skip_serializing_if = "Option::is_none")]
917    pub is_branch: Option<bool>,
918    #[doc = "True if there is a change pending."]
919    #[serde(
920        rename = "isPendingChange",
921        default,
922        skip_serializing_if = "Option::is_none"
923    )]
924    pub is_pending_change: Option<bool>,
925    #[doc = "The size of the file, if applicable."]
926    #[serde(default, skip_serializing_if = "Option::is_none")]
927    pub size: Option<i64>,
928    #[doc = "Changeset version Id."]
929    #[serde(default, skip_serializing_if = "Option::is_none")]
930    pub version: Option<i32>,
931}
932impl TfvcItem {
933    pub fn new() -> Self {
934        Self::default()
935    }
936}
937#[doc = "Item path and Version descriptor properties"]
938#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
939pub struct TfvcItemDescriptor {
940    #[doc = "Item path."]
941    #[serde(default, skip_serializing_if = "Option::is_none")]
942    pub path: Option<String>,
943    #[doc = "Defaults to OneLevel."]
944    #[serde(
945        rename = "recursionLevel",
946        default,
947        skip_serializing_if = "Option::is_none"
948    )]
949    pub recursion_level: Option<tfvc_item_descriptor::RecursionLevel>,
950    #[doc = "Specify the desired version, can be null or empty string only if VersionType is latest or tip."]
951    #[serde(default, skip_serializing_if = "Option::is_none")]
952    pub version: Option<String>,
953    #[doc = "Defaults to None."]
954    #[serde(
955        rename = "versionOption",
956        default,
957        skip_serializing_if = "Option::is_none"
958    )]
959    pub version_option: Option<tfvc_item_descriptor::VersionOption>,
960    #[doc = "Defaults to Latest."]
961    #[serde(
962        rename = "versionType",
963        default,
964        skip_serializing_if = "Option::is_none"
965    )]
966    pub version_type: Option<tfvc_item_descriptor::VersionType>,
967}
968impl TfvcItemDescriptor {
969    pub fn new() -> Self {
970        Self::default()
971    }
972}
973pub mod tfvc_item_descriptor {
974    use super::*;
975    #[doc = "Defaults to OneLevel."]
976    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
977    pub enum RecursionLevel {
978        #[serde(rename = "none")]
979        None,
980        #[serde(rename = "oneLevel")]
981        OneLevel,
982        #[serde(rename = "oneLevelPlusNestedEmptyFolders")]
983        OneLevelPlusNestedEmptyFolders,
984        #[serde(rename = "full")]
985        Full,
986    }
987    #[doc = "Defaults to None."]
988    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
989    pub enum VersionOption {
990        #[serde(rename = "none")]
991        None,
992        #[serde(rename = "previous")]
993        Previous,
994        #[serde(rename = "useRename")]
995        UseRename,
996    }
997    #[doc = "Defaults to Latest."]
998    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
999    pub enum VersionType {
1000        #[serde(rename = "none")]
1001        None,
1002        #[serde(rename = "changeset")]
1003        Changeset,
1004        #[serde(rename = "shelveset")]
1005        Shelveset,
1006        #[serde(rename = "change")]
1007        Change,
1008        #[serde(rename = "date")]
1009        Date,
1010        #[serde(rename = "latest")]
1011        Latest,
1012        #[serde(rename = "tip")]
1013        Tip,
1014        #[serde(rename = "mergeSource")]
1015        MergeSource,
1016    }
1017}
1018#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
1019pub struct TfvcItemList {
1020    #[serde(default, skip_serializing_if = "Option::is_none")]
1021    pub count: Option<i32>,
1022    #[serde(
1023        default,
1024        deserialize_with = "crate::serde::deserialize_null_as_default",
1025        skip_serializing_if = "Vec::is_empty"
1026    )]
1027    pub value: Vec<TfvcItem>,
1028}
1029impl TfvcItemList {
1030    pub fn new() -> Self {
1031        Self::default()
1032    }
1033}
1034#[doc = "Request body used by Get Items Batch"]
1035#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
1036pub struct TfvcItemRequestData {
1037    #[doc = "If true, include metadata about the file type"]
1038    #[serde(
1039        rename = "includeContentMetadata",
1040        default,
1041        skip_serializing_if = "Option::is_none"
1042    )]
1043    pub include_content_metadata: Option<bool>,
1044    #[doc = "Whether to include the _links field on the shallow references"]
1045    #[serde(
1046        rename = "includeLinks",
1047        default,
1048        skip_serializing_if = "Option::is_none"
1049    )]
1050    pub include_links: Option<bool>,
1051    #[serde(
1052        rename = "itemDescriptors",
1053        default,
1054        deserialize_with = "crate::serde::deserialize_null_as_default",
1055        skip_serializing_if = "Vec::is_empty"
1056    )]
1057    pub item_descriptors: Vec<TfvcItemDescriptor>,
1058}
1059impl TfvcItemRequestData {
1060    pub fn new() -> Self {
1061        Self::default()
1062    }
1063}
1064#[doc = "Metadata for a label."]
1065#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
1066pub struct TfvcLabel {
1067    #[serde(flatten)]
1068    pub tfvc_label_ref: TfvcLabelRef,
1069    #[doc = "List of items."]
1070    #[serde(
1071        default,
1072        deserialize_with = "crate::serde::deserialize_null_as_default",
1073        skip_serializing_if = "Vec::is_empty"
1074    )]
1075    pub items: Vec<TfvcItem>,
1076}
1077impl TfvcLabel {
1078    pub fn new() -> Self {
1079        Self::default()
1080    }
1081}
1082#[doc = "Metadata for a Label."]
1083#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
1084pub struct TfvcLabelRef {
1085    #[doc = "Links"]
1086    #[serde(rename = "_links", default, skip_serializing_if = "Option::is_none")]
1087    pub links: Option<serde_json::Value>,
1088    #[doc = "Label description."]
1089    #[serde(default, skip_serializing_if = "Option::is_none")]
1090    pub description: Option<String>,
1091    #[doc = "Label Id."]
1092    #[serde(default, skip_serializing_if = "Option::is_none")]
1093    pub id: Option<i32>,
1094    #[doc = "Label scope."]
1095    #[serde(
1096        rename = "labelScope",
1097        default,
1098        skip_serializing_if = "Option::is_none"
1099    )]
1100    pub label_scope: Option<String>,
1101    #[doc = "Last modified datetime for the label."]
1102    #[serde(
1103        rename = "modifiedDate",
1104        default,
1105        skip_serializing_if = "Option::is_none",
1106        with = "crate::date_time::rfc3339::option"
1107    )]
1108    pub modified_date: Option<time::OffsetDateTime>,
1109    #[doc = "Label name."]
1110    #[serde(default, skip_serializing_if = "Option::is_none")]
1111    pub name: Option<String>,
1112    #[serde(default, skip_serializing_if = "Option::is_none")]
1113    pub owner: Option<IdentityRef>,
1114    #[doc = "Label Url."]
1115    #[serde(default, skip_serializing_if = "Option::is_none")]
1116    pub url: Option<String>,
1117}
1118impl TfvcLabelRef {
1119    pub fn new() -> Self {
1120        Self::default()
1121    }
1122}
1123#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
1124pub struct TfvcLabelRefList {
1125    #[serde(default, skip_serializing_if = "Option::is_none")]
1126    pub count: Option<i32>,
1127    #[serde(
1128        default,
1129        deserialize_with = "crate::serde::deserialize_null_as_default",
1130        skip_serializing_if = "Vec::is_empty"
1131    )]
1132    pub value: Vec<TfvcLabelRef>,
1133}
1134impl TfvcLabelRefList {
1135    pub fn new() -> Self {
1136        Self::default()
1137    }
1138}
1139#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
1140pub struct TfvcLabelRequestData {
1141    #[doc = "Whether to include the _links field on the shallow references"]
1142    #[serde(
1143        rename = "includeLinks",
1144        default,
1145        skip_serializing_if = "Option::is_none"
1146    )]
1147    pub include_links: Option<bool>,
1148    #[serde(
1149        rename = "itemLabelFilter",
1150        default,
1151        skip_serializing_if = "Option::is_none"
1152    )]
1153    pub item_label_filter: Option<String>,
1154    #[serde(
1155        rename = "labelScope",
1156        default,
1157        skip_serializing_if = "Option::is_none"
1158    )]
1159    pub label_scope: Option<String>,
1160    #[serde(
1161        rename = "maxItemCount",
1162        default,
1163        skip_serializing_if = "Option::is_none"
1164    )]
1165    pub max_item_count: Option<i32>,
1166    #[serde(default, skip_serializing_if = "Option::is_none")]
1167    pub name: Option<String>,
1168    #[serde(default, skip_serializing_if = "Option::is_none")]
1169    pub owner: Option<String>,
1170}
1171impl TfvcLabelRequestData {
1172    pub fn new() -> Self {
1173        Self::default()
1174    }
1175}
1176#[doc = "MappingFilter can be used to include or exclude specific paths."]
1177#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
1178pub struct TfvcMappingFilter {
1179    #[doc = "True if ServerPath should be excluded."]
1180    #[serde(default, skip_serializing_if = "Option::is_none")]
1181    pub exclude: Option<bool>,
1182    #[doc = "Path to be included or excluded."]
1183    #[serde(
1184        rename = "serverPath",
1185        default,
1186        skip_serializing_if = "Option::is_none"
1187    )]
1188    pub server_path: Option<String>,
1189}
1190impl TfvcMappingFilter {
1191    pub fn new() -> Self {
1192        Self::default()
1193    }
1194}
1195#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
1196pub struct TfvcMergeSource {
1197    #[doc = "Indicates if this a rename source. If false, it is a merge source."]
1198    #[serde(rename = "isRename", default, skip_serializing_if = "Option::is_none")]
1199    pub is_rename: Option<bool>,
1200    #[doc = "The server item of the merge source."]
1201    #[serde(
1202        rename = "serverItem",
1203        default,
1204        skip_serializing_if = "Option::is_none"
1205    )]
1206    pub server_item: Option<String>,
1207    #[doc = "Start of the version range."]
1208    #[serde(
1209        rename = "versionFrom",
1210        default,
1211        skip_serializing_if = "Option::is_none"
1212    )]
1213    pub version_from: Option<i32>,
1214    #[doc = "End of the version range."]
1215    #[serde(rename = "versionTo", default, skip_serializing_if = "Option::is_none")]
1216    pub version_to: Option<i32>,
1217}
1218impl TfvcMergeSource {
1219    pub fn new() -> Self {
1220        Self::default()
1221    }
1222}
1223#[doc = "Policy failure information."]
1224#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
1225pub struct TfvcPolicyFailureInfo {
1226    #[doc = "Policy failure message."]
1227    #[serde(default, skip_serializing_if = "Option::is_none")]
1228    pub message: Option<String>,
1229    #[doc = "Name of the policy that failed."]
1230    #[serde(
1231        rename = "policyName",
1232        default,
1233        skip_serializing_if = "Option::is_none"
1234    )]
1235    pub policy_name: Option<String>,
1236}
1237impl TfvcPolicyFailureInfo {
1238    pub fn new() -> Self {
1239        Self::default()
1240    }
1241}
1242#[doc = "Information on the policy override."]
1243#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
1244pub struct TfvcPolicyOverrideInfo {
1245    #[doc = "Overidden policy comment."]
1246    #[serde(default, skip_serializing_if = "Option::is_none")]
1247    pub comment: Option<String>,
1248    #[doc = "Information on the failed policy that was overridden."]
1249    #[serde(
1250        rename = "policyFailures",
1251        default,
1252        deserialize_with = "crate::serde::deserialize_null_as_default",
1253        skip_serializing_if = "Vec::is_empty"
1254    )]
1255    pub policy_failures: Vec<TfvcPolicyFailureInfo>,
1256}
1257impl TfvcPolicyOverrideInfo {
1258    pub fn new() -> Self {
1259        Self::default()
1260    }
1261}
1262#[doc = "This is the shallow branchref class."]
1263#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
1264pub struct TfvcShallowBranchRef {
1265    #[doc = "Path for the branch."]
1266    #[serde(default, skip_serializing_if = "Option::is_none")]
1267    pub path: Option<String>,
1268}
1269impl TfvcShallowBranchRef {
1270    pub fn new() -> Self {
1271        Self::default()
1272    }
1273}
1274#[doc = "Metadata for a shelveset."]
1275#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
1276pub struct TfvcShelveset {
1277    #[serde(flatten)]
1278    pub tfvc_shelveset_ref: TfvcShelvesetRef,
1279    #[doc = "List of changes."]
1280    #[serde(
1281        default,
1282        deserialize_with = "crate::serde::deserialize_null_as_default",
1283        skip_serializing_if = "Vec::is_empty"
1284    )]
1285    pub changes: Vec<TfvcChange>,
1286    #[doc = "List of checkin notes."]
1287    #[serde(
1288        default,
1289        deserialize_with = "crate::serde::deserialize_null_as_default",
1290        skip_serializing_if = "Vec::is_empty"
1291    )]
1292    pub notes: Vec<CheckinNote>,
1293    #[doc = "Information on the policy override."]
1294    #[serde(
1295        rename = "policyOverride",
1296        default,
1297        skip_serializing_if = "Option::is_none"
1298    )]
1299    pub policy_override: Option<TfvcPolicyOverrideInfo>,
1300    #[doc = "List of associated workitems."]
1301    #[serde(
1302        rename = "workItems",
1303        default,
1304        deserialize_with = "crate::serde::deserialize_null_as_default",
1305        skip_serializing_if = "Vec::is_empty"
1306    )]
1307    pub work_items: Vec<AssociatedWorkItem>,
1308}
1309impl TfvcShelveset {
1310    pub fn new() -> Self {
1311        Self::default()
1312    }
1313}
1314#[doc = "Metadata for a shallow shelveset."]
1315#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
1316pub struct TfvcShelvesetRef {
1317    #[doc = "Links"]
1318    #[serde(rename = "_links", default, skip_serializing_if = "Option::is_none")]
1319    pub links: Option<serde_json::Value>,
1320    #[doc = "Shelveset comment."]
1321    #[serde(default, skip_serializing_if = "Option::is_none")]
1322    pub comment: Option<String>,
1323    #[doc = "Shelveset comment truncated as applicable."]
1324    #[serde(
1325        rename = "commentTruncated",
1326        default,
1327        skip_serializing_if = "Option::is_none"
1328    )]
1329    pub comment_truncated: Option<bool>,
1330    #[doc = "Shelveset create date."]
1331    #[serde(
1332        rename = "createdDate",
1333        default,
1334        skip_serializing_if = "Option::is_none",
1335        with = "crate::date_time::rfc3339::option"
1336    )]
1337    pub created_date: Option<time::OffsetDateTime>,
1338    #[doc = "Shelveset Id."]
1339    #[serde(default, skip_serializing_if = "Option::is_none")]
1340    pub id: Option<String>,
1341    #[doc = "Shelveset name."]
1342    #[serde(default, skip_serializing_if = "Option::is_none")]
1343    pub name: Option<String>,
1344    #[serde(default, skip_serializing_if = "Option::is_none")]
1345    pub owner: Option<IdentityRef>,
1346    #[doc = "Shelveset Url."]
1347    #[serde(default, skip_serializing_if = "Option::is_none")]
1348    pub url: Option<String>,
1349}
1350impl TfvcShelvesetRef {
1351    pub fn new() -> Self {
1352        Self::default()
1353    }
1354}
1355#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
1356pub struct TfvcShelvesetRefList {
1357    #[serde(default, skip_serializing_if = "Option::is_none")]
1358    pub count: Option<i32>,
1359    #[serde(
1360        default,
1361        deserialize_with = "crate::serde::deserialize_null_as_default",
1362        skip_serializing_if = "Vec::is_empty"
1363    )]
1364    pub value: Vec<TfvcShelvesetRef>,
1365}
1366impl TfvcShelvesetRefList {
1367    pub fn new() -> Self {
1368        Self::default()
1369    }
1370}
1371#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
1372pub struct TfvcShelvesetRequestData {
1373    #[doc = "Whether to include policyOverride and notes Only applies when requesting a single deep shelveset"]
1374    #[serde(
1375        rename = "includeDetails",
1376        default,
1377        skip_serializing_if = "Option::is_none"
1378    )]
1379    pub include_details: Option<bool>,
1380    #[doc = "Whether to include the _links field on the shallow references. Does not apply when requesting a single deep shelveset object. Links will always be included in the deep shelveset."]
1381    #[serde(
1382        rename = "includeLinks",
1383        default,
1384        skip_serializing_if = "Option::is_none"
1385    )]
1386    pub include_links: Option<bool>,
1387    #[doc = "Whether to include workItems"]
1388    #[serde(
1389        rename = "includeWorkItems",
1390        default,
1391        skip_serializing_if = "Option::is_none"
1392    )]
1393    pub include_work_items: Option<bool>,
1394    #[doc = "Max number of changes to include"]
1395    #[serde(
1396        rename = "maxChangeCount",
1397        default,
1398        skip_serializing_if = "Option::is_none"
1399    )]
1400    pub max_change_count: Option<i32>,
1401    #[doc = "Max length of comment"]
1402    #[serde(
1403        rename = "maxCommentLength",
1404        default,
1405        skip_serializing_if = "Option::is_none"
1406    )]
1407    pub max_comment_length: Option<i32>,
1408    #[doc = "Shelveset name"]
1409    #[serde(default, skip_serializing_if = "Option::is_none")]
1410    pub name: Option<String>,
1411    #[doc = "Owner's ID. Could be a name or a guid."]
1412    #[serde(default, skip_serializing_if = "Option::is_none")]
1413    pub owner: Option<String>,
1414}
1415impl TfvcShelvesetRequestData {
1416    pub fn new() -> Self {
1417        Self::default()
1418    }
1419}
1420#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
1421pub struct TfvcStatistics {
1422    #[doc = "Id of the last changeset the stats are based on."]
1423    #[serde(
1424        rename = "changesetId",
1425        default,
1426        skip_serializing_if = "Option::is_none"
1427    )]
1428    pub changeset_id: Option<i32>,
1429    #[doc = "Count of files at the requested scope."]
1430    #[serde(
1431        rename = "fileCountTotal",
1432        default,
1433        skip_serializing_if = "Option::is_none"
1434    )]
1435    pub file_count_total: Option<i64>,
1436}
1437impl TfvcStatistics {
1438    pub fn new() -> Self {
1439        Self::default()
1440    }
1441}
1442#[doc = "Version descriptor properties."]
1443#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
1444pub struct TfvcVersionDescriptor {
1445    #[doc = "Version object."]
1446    #[serde(default, skip_serializing_if = "Option::is_none")]
1447    pub version: Option<String>,
1448    #[serde(
1449        rename = "versionOption",
1450        default,
1451        skip_serializing_if = "Option::is_none"
1452    )]
1453    pub version_option: Option<tfvc_version_descriptor::VersionOption>,
1454    #[serde(
1455        rename = "versionType",
1456        default,
1457        skip_serializing_if = "Option::is_none"
1458    )]
1459    pub version_type: Option<tfvc_version_descriptor::VersionType>,
1460}
1461impl TfvcVersionDescriptor {
1462    pub fn new() -> Self {
1463        Self::default()
1464    }
1465}
1466pub mod tfvc_version_descriptor {
1467    use super::*;
1468    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
1469    pub enum VersionOption {
1470        #[serde(rename = "none")]
1471        None,
1472        #[serde(rename = "previous")]
1473        Previous,
1474        #[serde(rename = "useRename")]
1475        UseRename,
1476    }
1477    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
1478    pub enum VersionType {
1479        #[serde(rename = "none")]
1480        None,
1481        #[serde(rename = "changeset")]
1482        Changeset,
1483        #[serde(rename = "shelveset")]
1484        Shelveset,
1485        #[serde(rename = "change")]
1486        Change,
1487        #[serde(rename = "date")]
1488        Date,
1489        #[serde(rename = "latest")]
1490        Latest,
1491        #[serde(rename = "tip")]
1492        Tip,
1493        #[serde(rename = "mergeSource")]
1494        MergeSource,
1495    }
1496}
1497#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
1498pub struct VersionControlProjectInfo {
1499    #[serde(
1500        rename = "defaultSourceControlType",
1501        default,
1502        skip_serializing_if = "Option::is_none"
1503    )]
1504    pub default_source_control_type: Option<version_control_project_info::DefaultSourceControlType>,
1505    #[doc = "Represents a shallow reference to a TeamProject."]
1506    #[serde(default, skip_serializing_if = "Option::is_none")]
1507    pub project: Option<TeamProjectReference>,
1508    #[serde(
1509        rename = "supportsGit",
1510        default,
1511        skip_serializing_if = "Option::is_none"
1512    )]
1513    pub supports_git: Option<bool>,
1514    #[serde(
1515        rename = "supportsTFVC",
1516        default,
1517        skip_serializing_if = "Option::is_none"
1518    )]
1519    pub supports_tfvc: Option<bool>,
1520}
1521impl VersionControlProjectInfo {
1522    pub fn new() -> Self {
1523        Self::default()
1524    }
1525}
1526pub mod version_control_project_info {
1527    use super::*;
1528    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
1529    pub enum DefaultSourceControlType {
1530        #[serde(rename = "tfvc")]
1531        Tfvc,
1532        #[serde(rename = "git")]
1533        Git,
1534    }
1535}
1536#[doc = "This class is used to serialize collections as a single JSON object on the wire."]
1537#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
1538pub struct VssJsonCollectionWrapper {
1539    #[serde(flatten)]
1540    pub vss_json_collection_wrapper_base: VssJsonCollectionWrapperBase,
1541    #[doc = "The serialized item."]
1542    #[serde(default, skip_serializing_if = "Option::is_none")]
1543    pub value: Option<String>,
1544}
1545impl VssJsonCollectionWrapper {
1546    pub fn new() -> Self {
1547        Self::default()
1548    }
1549}
1550#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
1551pub struct VssJsonCollectionWrapperBase {
1552    #[doc = "The number of serialized items."]
1553    #[serde(default, skip_serializing_if = "Option::is_none")]
1554    pub count: Option<i32>,
1555}
1556impl VssJsonCollectionWrapperBase {
1557    pub fn new() -> Self {
1558        Self::default()
1559    }
1560}