@@ -10,14 +10,26 @@ use crate::{
10
10
OperationResponse , ResponseClass , MESSAGES_NS_URI ,
11
11
} ;
12
12
13
- /// The request for update regarding the folder hierarchy in a mailbox.
13
+ /// A request for a list of folders which have been created, updated, or deleted
14
+ /// server-side.
14
15
///
15
16
/// See <https://learn.microsoft.com/en-us/exchange/client-developer/web-service-reference/syncfolderhierarchy>
16
17
#[ derive( Debug , XmlSerialize ) ]
17
18
#[ xml_struct( default_ns = MESSAGES_NS_URI ) ]
18
19
pub struct SyncFolderHierarchy {
20
+ /// A description of the information to be included in the response for each
21
+ /// changed folder.
19
22
pub folder_shape : FolderShape ,
23
+
24
+ /// The ID of the folder to sync.
20
25
pub sync_folder_id : Option < BaseFolderId > ,
26
+
27
+ /// The synchronization state after which to list changes.
28
+ ///
29
+ /// If `None`, the response will include `Create` changes for each folder
30
+ /// which is a descendant of the requested folder.
31
+ ///
32
+ /// See <https://learn.microsoft.com/en-us/exchange/client-developer/web-service-reference/syncstate-ex15websvcsotherref>
21
33
pub sync_state : Option < String > ,
22
34
}
23
35
@@ -31,7 +43,7 @@ impl EnvelopeBodyContents for SyncFolderHierarchy {
31
43
}
32
44
}
33
45
34
- /// The response to a SyncFolderHierarchy request.
46
+ /// A response to a [` SyncFolderHierarchy`] request.
35
47
///
36
48
/// See <https://learn.microsoft.com/en-us/exchange/client-developer/web-service-reference/syncfolderhierarchyresponse>
37
49
#[ derive( Debug , Deserialize ) ]
@@ -48,27 +60,40 @@ impl EnvelopeBodyContents for SyncFolderHierarchyResponse {
48
60
}
49
61
}
50
62
51
- /// A collection of response messages from a SyncFolderHierarchy response.
63
+ /// A collection of responses for individual entities within a request.
64
+ ///
65
+ /// See <https://learn.microsoft.com/en-us/exchange/client-developer/web-service-reference/responsemessages>
52
66
#[ derive( Debug , Deserialize ) ]
53
67
#[ serde( rename_all = "PascalCase" ) ]
54
68
pub struct ResponseMessages {
55
69
pub sync_folder_hierarchy_response_message : Vec < SyncFolderHierarchyResponseMessage > ,
56
70
}
57
71
58
- /// A message in a SyncFolderHierarchy response .
72
+ /// A response to a request for an individual folder within a [` SyncFolderHierarchy`] operation .
59
73
///
60
74
/// See <https://learn.microsoft.com/en-us/exchange/client-developer/web-service-reference/syncfolderhierarchyresponsemessage>
61
75
#[ derive( Debug , Deserialize ) ]
62
76
#[ serde( rename_all = "PascalCase" ) ]
63
77
pub struct SyncFolderHierarchyResponseMessage {
78
+ /// The success value of the corresponding request.
64
79
#[ serde( rename = "@ResponseClass" ) ]
65
80
pub response_class : ResponseClass ,
81
+
82
+ /// An identifier for the synchronization state following application of the
83
+ /// changes included in this response.
66
84
pub sync_state : String ,
85
+
86
+ /// Whether all relevant folder changes have been synchronized following
87
+ /// this response.
67
88
pub includes_last_folder_in_range : bool ,
89
+
90
+ /// The collection of changes between the prior synchronization state and
91
+ /// the one represented by this response.
68
92
pub changes : Changes ,
69
93
}
70
94
71
- /// The changes that happened since the last folder hierachy sync.
95
+ /// A sequentially-ordered collection of folder creations, updates, and
96
+ /// deletions.
72
97
///
73
98
/// See <https://learn.microsoft.com/en-us/exchange/client-developer/web-service-reference/changes-hierarchy>
74
99
#[ derive( Debug , Deserialize ) ]
@@ -77,29 +102,34 @@ pub struct Changes {
77
102
pub inner : Vec < Change > ,
78
103
}
79
104
80
- /// A single change described in a SyncFolderHierarchy response message .
105
+ /// A server-side change to a folder .
81
106
///
82
107
/// See <https://learn.microsoft.com/en-us/exchange/client-developer/web-service-reference/changes-hierarchy>
83
108
#[ derive( Debug , Deserialize ) ]
84
109
pub enum Change {
85
- /// A folder to create .
110
+ /// A creation of a folder .
86
111
///
87
112
/// See <https://learn.microsoft.com/en-us/exchange/client-developer/web-service-reference/create-foldersync>
88
113
Create {
114
+ /// The state of the folder upon creation.
89
115
#[ serde( rename = "$value" ) ]
90
116
folder : Folder ,
91
117
} ,
92
118
93
- /// A folder to update .
119
+ /// An update to a folder .
94
120
///
95
121
/// See <https://learn.microsoft.com/en-us/exchange/client-developer/web-service-reference/update-foldersync>
96
122
Update {
123
+ /// The updated state of the folder.
97
124
#[ serde( rename = "$value" ) ]
98
125
folder : Folder ,
99
126
} ,
100
127
101
- /// A folder to delete .
128
+ /// A deletion of a folder .
102
129
///
103
130
/// See <https://learn.microsoft.com/en-us/exchange/client-developer/web-service-reference/delete-foldersync>
104
- Delete ( FolderId ) ,
131
+ Delete (
132
+ /// The EWS ID for the deleted folder.
133
+ FolderId
134
+ ) ,
105
135
}
0 commit comments