1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
// GENERATED CODE

use crate::api_default_imports::*;
use crate::extended_properties::*;
use crate::users::*;

api_client!(
    CalendarsApiClient,
    CalendarsIdApiClient,
    ResourceIdentity::Calendars
);

impl CalendarsApiClient {
    post!(
        doc: "Create calendar",
        name: create_calendars,
        path: "/calendars",
        body: true
    );
    get!(
        doc: "List calendars",
        name: list_calendars,
        path: "/calendars"
    );
    get!(
        doc: "Get the number of the resource",
        name: get_calendars_count,
        path: "/calendars/$count"
    );
}

impl CalendarsIdApiClient {
    api_client_link!(events, EventsApiClient);
    api_client_link_id!(calendar_view, CalendarViewIdApiClient);
    api_client_link_id!(event, EventsIdApiClient);
    api_client_link!(extended_properties, ExtendedPropertiesApiClient);
    api_client_link!(calendar_views, CalendarViewApiClient);

    delete!(
        doc: "Delete navigation property calendars for users",
        name: delete_calendars,
        path: "/calendars/{{RID}}"
    );
    get!(
        doc: "Get calendars from users",
        name: get_calendars,
        path: "/calendars/{{RID}}"
    );
    patch!(
        doc: "Update the navigation property calendars in users",
        name: update_calendars,
        path: "/calendars/{{RID}}",
        body: true
    );
    get!(
        doc: "Invoke function allowedCalendarSharingRoles",
        name: allowed_calendar_sharing_roles,
        path: "/calendars/{{RID}}/allowedCalendarSharingRoles(User='{{id}}')",
        params: user
    );
    post!(
        doc: "Create calendarPermission",
        name: create_calendar_permissions,
        path: "/calendars/{{RID}}/calendarPermissions",
        body: true
    );
    get!(
        doc: "Get calendarPermissions from users",
        name: list_calendar_permissions,
        path: "/calendars/{{RID}}/calendarPermissions"
    );
    get!(
        doc: "Get the number of the resource",
        name: get_calendar_permissions_count,
        path: "/calendars/{{RID}}/calendarPermissions/$count"
    );
    delete!(
        doc: "Delete navigation property calendarPermissions for users",
        name: delete_calendar_permissions,
        path: "/calendars/{{RID}}/calendarPermissions/{{id}}",
        params: calendar_permission_id
    );
    get!(
        doc: "Get calendarPermissions from users",
        name: get_calendar_permissions,
        path: "/calendars/{{RID}}/calendarPermissions/{{id}}",
        params: calendar_permission_id
    );
    patch!(
        doc: "Update the navigation property calendarPermissions in users",
        name: update_calendar_permissions,
        path: "/calendars/{{RID}}/calendarPermissions/{{id}}",
        body: true,
        params: calendar_permission_id
    );
    post!(
        doc: "Create event",
        name: create_events,
        path: "/calendars/{{RID}}/events",
        body: true
    );
    get!(
        doc: "List events",
        name: list_events,
        path: "/calendars/{{RID}}/events"
    );
    get!(
        doc: "Get the number of the resource",
        name: get_events_count,
        path: "/calendars/{{RID}}/events/$count"
    );
    get!(
        doc: "Invoke function delta",
        name: delta,
        path: "/calendars/{{RID}}/events/delta()"
    );
    delete!(
        doc: "Delete navigation property events for users",
        name: delete_events,
        path: "/calendars/{{RID}}/events/{{id}}",
        params: event_id
    );
    get!(
        doc: "Get events from users",
        name: get_events,
        path: "/calendars/{{RID}}/events/{{id}}",
        params: event_id
    );
    patch!(
        doc: "Update the navigation property events in users",
        name: update_events,
        path: "/calendars/{{RID}}/events/{{id}}",
        body: true,
        params: event_id
    );
    post!(
        doc: "Invoke action accept",
        name: accept,
        path: "/calendars/{{RID}}/events/{{id}}/accept",
        body: true,
        params: event_id
    );
    post!(
        doc: "Add attachment",
        name: create_attachments,
        path: "/calendars/{{RID}}/events/{{id}}/attachments",
        body: true,
        params: event_id
    );
    get!(
        doc: "List attachments",
        name: list_attachments,
        path: "/calendars/{{RID}}/events/{{id}}/attachments",
        params: event_id
    );
    get!(
        doc: "Get the number of the resource",
        name: get_attachments_count,
        path: "/calendars/{{RID}}/events/{{id}}/attachments/$count",
        params: event_id
    );
    post!(
        doc: "Invoke action createUploadSession",
        name: create_upload_session,
        path: "/calendars/{{RID}}/events/{{id}}/attachments/createUploadSession",
        body: true,
        params: event_id
    );
    delete!(
        doc: "Delete navigation property attachments for users",
        name: delete_attachments,
        path: "/calendars/{{RID}}/events/{{id}}/attachments/{{id2}}",
        params: event_id, attachment_id
    );
    get!(
        doc: "Get attachments from users",
        name: get_attachments,
        path: "/calendars/{{RID}}/events/{{id}}/attachments/{{id2}}",
        params: event_id, attachment_id
    );
    get!(
        doc: "Get calendar from users",
        name: get_calendar,
        path: "/calendars/{{RID}}/events/{{id}}/calendar",
        params: event_id
    );
    post!(
        doc: "Invoke action cancel",
        name: cancel,
        path: "/calendars/{{RID}}/events/{{id}}/cancel",
        body: true,
        params: event_id
    );
    post!(
        doc: "Invoke action decline",
        name: decline,
        path: "/calendars/{{RID}}/events/{{id}}/decline",
        body: true,
        params: event_id
    );
    post!(
        doc: "Invoke action dismissReminder",
        name: dismiss_reminder,
        path: "/calendars/{{RID}}/events/{{id}}/dismissReminder",
        params: event_id
    );
    post!(
        doc: "Create open extension",
        name: create_extensions,
        path: "/calendars/{{RID}}/events/{{id}}/extensions",
        body: true,
        params: event_id
    );
    get!(
        doc: "Get extensions from users",
        name: list_extensions,
        path: "/calendars/{{RID}}/events/{{id}}/extensions",
        params: event_id
    );
    get!(
        doc: "Get the number of the resource",
        name: get_extensions_count,
        path: "/calendars/{{RID}}/events/{{id}}/extensions/$count",
        params: event_id
    );
    delete!(
        doc: "Delete navigation property extensions for users",
        name: delete_extensions,
        path: "/calendars/{{RID}}/events/{{id}}/extensions/{{id2}}",
        params: event_id, extension_id
    );
    get!(
        doc: "Get extensions from users",
        name: get_extensions,
        path: "/calendars/{{RID}}/events/{{id}}/extensions/{{id2}}",
        params: event_id, extension_id
    );
    patch!(
        doc: "Update the navigation property extensions in users",
        name: update_extensions,
        path: "/calendars/{{RID}}/events/{{id}}/extensions/{{id2}}",
        body: true,
        params: event_id, extension_id
    );
    post!(
        doc: "Invoke action forward",
        name: forward,
        path: "/calendars/{{RID}}/events/{{id}}/forward",
        body: true,
        params: event_id
    );
    post!(
        doc: "Invoke action snoozeReminder",
        name: snooze_reminder,
        path: "/calendars/{{RID}}/events/{{id}}/snoozeReminder",
        body: true,
        params: event_id
    );
    post!(
        doc: "Invoke action tentativelyAccept",
        name: tentatively_accept,
        path: "/calendars/{{RID}}/events/{{id}}/tentativelyAccept",
        body: true,
        params: event_id
    );
    post!(
        doc: "Invoke action getSchedule",
        name: get_schedule,
        path: "/calendars/{{RID}}/getSchedule",
        body: true
    );
}