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
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
// This file was generated by code-gen. DO NOT EDIT MANUALLY!
///Deprecated: use the drive collection instead.
#[derive(Debug, Clone, ::serde::Deserialize, ::serde::Serialize)]
pub struct TeamDrive {
#[serde(rename = "backgroundImageFile")]
///An image file and cropping parameters from which a background image for this Team Drive is set. This is a write only field; it can only be set on `drive.teamdrives.update` requests that don't set `themeId`. When specified, all fields of the `backgroundImageFile` must be set.
pub background_image_file: team_drive_background_image_file_additional::BackgroundImageFile,
#[serde(rename = "backgroundImageLink")]
///A short-lived link to this Team Drive's background image.
pub background_image_link: ::alloc::string::String,
#[serde(rename = "capabilities")]
///Capabilities the current user has on this Team Drive.
pub capabilities: team_drive_capabilities_additional::Capabilities,
#[serde(rename = "colorRgb")]
///The color of this Team Drive as an RGB hex string. It can only be set on a `drive.teamdrives.update` request that does not set `themeId`.
pub color_rgb: ::alloc::string::String,
#[serde(rename = "createdTime")]
///The time at which the Team Drive was created (RFC 3339 date-time).
pub created_time: ::alloc::string::String,
#[serde(rename = "id")]
///The ID of this Team Drive which is also the ID of the top level folder of this Team Drive.
pub id: ::alloc::string::String,
#[serde(rename = "kind")]
///Identifies what kind of resource this is. Value: the fixed string `"drive#teamDrive"`.
pub kind: ::alloc::string::String,
#[serde(rename = "name")]
///The name of this Team Drive.
pub name: ::alloc::string::String,
#[serde(rename = "orgUnitId")]
///The organizational unit of this shared drive. This field is only populated on `drives.list` responses when the `useDomainAdminAccess` parameter is set to `true`.
pub org_unit_id: ::alloc::string::String,
#[serde(rename = "restrictions")]
///A set of restrictions that apply to this Team Drive or items inside this Team Drive.
pub restrictions: team_drive_restrictions_additional::Restrictions,
#[serde(rename = "themeId")]
///The ID of the theme from which the background image and color will be set. The set of possible `teamDriveThemes` can be retrieved from a `drive.about.get` response. When not specified on a `drive.teamdrives.create` request, a random theme is chosen from which the background image and color are set. This is a write-only field; it can only be set on requests that don't set `colorRgb` or `backgroundImageFile`.
pub theme_id: ::alloc::string::String,
}
///Deprecated: use the drive collection instead.
#[derive(Debug, Clone, ::serde::Deserialize, ::serde::Serialize, Default)]
pub struct TeamDrivePartial {
#[serde(rename = "backgroundImageFile")]
#[serde(skip_serializing_if = "::core::option::Option::is_none")]
///An image file and cropping parameters from which a background image for this Team Drive is set. This is a write only field; it can only be set on `drive.teamdrives.update` requests that don't set `themeId`. When specified, all fields of the `backgroundImageFile` must be set.
pub background_image_file: ::core::option::Option<
team_drive_background_image_file_additional::BackgroundImageFilePartial,
>,
#[serde(rename = "backgroundImageLink")]
#[serde(skip_serializing_if = "::core::option::Option::is_none")]
///A short-lived link to this Team Drive's background image.
pub background_image_link: ::core::option::Option<::alloc::string::String>,
#[serde(rename = "capabilities")]
#[serde(skip_serializing_if = "::core::option::Option::is_none")]
///Capabilities the current user has on this Team Drive.
pub capabilities: ::core::option::Option<
team_drive_capabilities_additional::CapabilitiesPartial,
>,
#[serde(rename = "colorRgb")]
#[serde(skip_serializing_if = "::core::option::Option::is_none")]
///The color of this Team Drive as an RGB hex string. It can only be set on a `drive.teamdrives.update` request that does not set `themeId`.
pub color_rgb: ::core::option::Option<::alloc::string::String>,
#[serde(rename = "createdTime")]
#[serde(skip_serializing_if = "::core::option::Option::is_none")]
///The time at which the Team Drive was created (RFC 3339 date-time).
pub created_time: ::core::option::Option<::alloc::string::String>,
#[serde(rename = "id")]
#[serde(skip_serializing_if = "::core::option::Option::is_none")]
///The ID of this Team Drive which is also the ID of the top level folder of this Team Drive.
pub id: ::core::option::Option<::alloc::string::String>,
#[serde(rename = "kind")]
#[serde(skip_serializing_if = "::core::option::Option::is_none")]
///Identifies what kind of resource this is. Value: the fixed string `"drive#teamDrive"`.
pub kind: ::core::option::Option<::alloc::string::String>,
#[serde(rename = "name")]
#[serde(skip_serializing_if = "::core::option::Option::is_none")]
///The name of this Team Drive.
pub name: ::core::option::Option<::alloc::string::String>,
#[serde(rename = "orgUnitId")]
#[serde(skip_serializing_if = "::core::option::Option::is_none")]
///The organizational unit of this shared drive. This field is only populated on `drives.list` responses when the `useDomainAdminAccess` parameter is set to `true`.
pub org_unit_id: ::core::option::Option<::alloc::string::String>,
#[serde(rename = "restrictions")]
#[serde(skip_serializing_if = "::core::option::Option::is_none")]
///A set of restrictions that apply to this Team Drive or items inside this Team Drive.
pub restrictions: ::core::option::Option<
team_drive_restrictions_additional::RestrictionsPartial,
>,
#[serde(rename = "themeId")]
#[serde(skip_serializing_if = "::core::option::Option::is_none")]
///The ID of the theme from which the background image and color will be set. The set of possible `teamDriveThemes` can be retrieved from a `drive.about.get` response. When not specified on a `drive.teamdrives.create` request, a random theme is chosen from which the background image and color are set. This is a write-only field; it can only be set on requests that don't set `colorRgb` or `backgroundImageFile`.
pub theme_id: ::core::option::Option<::alloc::string::String>,
}
pub mod team_drive_background_image_file_additional {
use super::*;
///An image file and cropping parameters from which a background image for this Team Drive is set. This is a write only field; it can only be set on `drive.teamdrives.update` requests that don't set `themeId`. When specified, all fields of the `backgroundImageFile` must be set.
#[derive(Debug, Clone, ::serde::Deserialize, ::serde::Serialize)]
pub struct BackgroundImageFile {
#[serde(rename = "id")]
///The ID of an image file in Drive to use for the background image.
pub id: ::alloc::string::String,
#[serde(rename = "width")]
///The width of the cropped image in the closed range of 0 to 1. This value represents the width of the cropped image divided by the width of the entire image. The height is computed by applying a width to height aspect ratio of 80 to 9. The resulting image must be at least 1280 pixels wide and 144 pixels high.
pub width: ::core::primitive::f32,
#[serde(rename = "xCoordinate")]
///The X coordinate of the upper left corner of the cropping area in the background image. This is a value in the closed range of 0 to 1. This value represents the horizontal distance from the left side of the entire image to the left side of the cropping area divided by the width of the entire image.
pub x_coordinate: ::core::primitive::f32,
#[serde(rename = "yCoordinate")]
///The Y coordinate of the upper left corner of the cropping area in the background image. This is a value in the closed range of 0 to 1. This value represents the vertical distance from the top side of the entire image to the top side of the cropping area divided by the height of the entire image.
pub y_coordinate: ::core::primitive::f32,
}
///An image file and cropping parameters from which a background image for this Team Drive is set. This is a write only field; it can only be set on `drive.teamdrives.update` requests that don't set `themeId`. When specified, all fields of the `backgroundImageFile` must be set.
#[derive(Debug, Clone, ::serde::Deserialize, ::serde::Serialize, Default)]
pub struct BackgroundImageFilePartial {
#[serde(rename = "id")]
#[serde(skip_serializing_if = "::core::option::Option::is_none")]
///The ID of an image file in Drive to use for the background image.
pub id: ::core::option::Option<::alloc::string::String>,
#[serde(rename = "width")]
#[serde(skip_serializing_if = "::core::option::Option::is_none")]
///The width of the cropped image in the closed range of 0 to 1. This value represents the width of the cropped image divided by the width of the entire image. The height is computed by applying a width to height aspect ratio of 80 to 9. The resulting image must be at least 1280 pixels wide and 144 pixels high.
pub width: ::core::option::Option<::core::primitive::f32>,
#[serde(rename = "xCoordinate")]
#[serde(skip_serializing_if = "::core::option::Option::is_none")]
///The X coordinate of the upper left corner of the cropping area in the background image. This is a value in the closed range of 0 to 1. This value represents the horizontal distance from the left side of the entire image to the left side of the cropping area divided by the width of the entire image.
pub x_coordinate: ::core::option::Option<::core::primitive::f32>,
#[serde(rename = "yCoordinate")]
#[serde(skip_serializing_if = "::core::option::Option::is_none")]
///The Y coordinate of the upper left corner of the cropping area in the background image. This is a value in the closed range of 0 to 1. This value represents the vertical distance from the top side of the entire image to the top side of the cropping area divided by the height of the entire image.
pub y_coordinate: ::core::option::Option<::core::primitive::f32>,
}
}
pub mod team_drive_capabilities_additional {
use super::*;
///Capabilities the current user has on this Team Drive.
#[derive(Debug, Clone, ::serde::Deserialize, ::serde::Serialize)]
pub struct Capabilities {
#[serde(rename = "canAddChildren")]
///Whether the current user can add children to folders in this Team Drive.
pub can_add_children: ::core::primitive::bool,
#[serde(rename = "canChangeCopyRequiresWriterPermissionRestriction")]
///Whether the current user can change the `copyRequiresWriterPermission` restriction of this Team Drive.
pub can_change_copy_requires_writer_permission_restriction: ::core::primitive::bool,
#[serde(rename = "canChangeDomainUsersOnlyRestriction")]
///Whether the current user can change the `domainUsersOnly` restriction of this Team Drive.
pub can_change_domain_users_only_restriction: ::core::primitive::bool,
#[serde(rename = "canChangeDownloadRestriction")]
///Whether the current user can change organizer-applied download restrictions of this shared drive.
pub can_change_download_restriction: ::core::primitive::bool,
#[serde(
rename = "canChangeSharingFoldersRequiresOrganizerPermissionRestriction"
)]
///Whether the current user can change the `sharingFoldersRequiresOrganizerPermission` restriction of this Team Drive.
pub can_change_sharing_folders_requires_organizer_permission_restriction: ::core::primitive::bool,
#[serde(rename = "canChangeTeamDriveBackground")]
///Whether the current user can change the background of this Team Drive.
pub can_change_team_drive_background: ::core::primitive::bool,
#[serde(rename = "canChangeTeamMembersOnlyRestriction")]
///Whether the current user can change the `teamMembersOnly` restriction of this Team Drive.
pub can_change_team_members_only_restriction: ::core::primitive::bool,
#[serde(rename = "canComment")]
///Whether the current user can comment on files in this Team Drive.
pub can_comment: ::core::primitive::bool,
#[serde(rename = "canCopy")]
///Whether the current user can copy files in this Team Drive.
pub can_copy: ::core::primitive::bool,
#[serde(rename = "canDeleteChildren")]
///Whether the current user can delete children from folders in this Team Drive.
pub can_delete_children: ::core::primitive::bool,
#[serde(rename = "canDeleteTeamDrive")]
///Whether the current user can delete this Team Drive. Attempting to delete the Team Drive may still fail if there are untrashed items inside the Team Drive.
pub can_delete_team_drive: ::core::primitive::bool,
#[serde(rename = "canDownload")]
///Whether the current user can download files in this Team Drive.
pub can_download: ::core::primitive::bool,
#[serde(rename = "canEdit")]
///Whether the current user can edit files in this Team Drive
pub can_edit: ::core::primitive::bool,
#[serde(rename = "canListChildren")]
///Whether the current user can list the children of folders in this Team Drive.
pub can_list_children: ::core::primitive::bool,
#[serde(rename = "canManageMembers")]
///Whether the current user can add members to this Team Drive or remove them or change their role.
pub can_manage_members: ::core::primitive::bool,
#[serde(rename = "canReadRevisions")]
///Whether the current user can read the revisions resource of files in this Team Drive.
pub can_read_revisions: ::core::primitive::bool,
#[serde(rename = "canRemoveChildren")]
///Deprecated: Use `canDeleteChildren` or `canTrashChildren` instead.
pub can_remove_children: ::core::primitive::bool,
#[serde(rename = "canRename")]
///Whether the current user can rename files or folders in this Team Drive.
pub can_rename: ::core::primitive::bool,
#[serde(rename = "canRenameTeamDrive")]
///Whether the current user can rename this Team Drive.
pub can_rename_team_drive: ::core::primitive::bool,
#[serde(rename = "canResetTeamDriveRestrictions")]
///Whether the current user can reset the Team Drive restrictions to defaults.
pub can_reset_team_drive_restrictions: ::core::primitive::bool,
#[serde(rename = "canShare")]
///Whether the current user can share files or folders in this Team Drive.
pub can_share: ::core::primitive::bool,
#[serde(rename = "canTrashChildren")]
///Whether the current user can trash children from folders in this Team Drive.
pub can_trash_children: ::core::primitive::bool,
}
///Capabilities the current user has on this Team Drive.
#[derive(Debug, Clone, ::serde::Deserialize, ::serde::Serialize, Default)]
pub struct CapabilitiesPartial {
#[serde(rename = "canAddChildren")]
#[serde(skip_serializing_if = "::core::option::Option::is_none")]
///Whether the current user can add children to folders in this Team Drive.
pub can_add_children: ::core::option::Option<::core::primitive::bool>,
#[serde(rename = "canChangeCopyRequiresWriterPermissionRestriction")]
#[serde(skip_serializing_if = "::core::option::Option::is_none")]
///Whether the current user can change the `copyRequiresWriterPermission` restriction of this Team Drive.
pub can_change_copy_requires_writer_permission_restriction: ::core::option::Option<
::core::primitive::bool,
>,
#[serde(rename = "canChangeDomainUsersOnlyRestriction")]
#[serde(skip_serializing_if = "::core::option::Option::is_none")]
///Whether the current user can change the `domainUsersOnly` restriction of this Team Drive.
pub can_change_domain_users_only_restriction: ::core::option::Option<
::core::primitive::bool,
>,
#[serde(rename = "canChangeDownloadRestriction")]
#[serde(skip_serializing_if = "::core::option::Option::is_none")]
///Whether the current user can change organizer-applied download restrictions of this shared drive.
pub can_change_download_restriction: ::core::option::Option<
::core::primitive::bool,
>,
#[serde(
rename = "canChangeSharingFoldersRequiresOrganizerPermissionRestriction"
)]
#[serde(skip_serializing_if = "::core::option::Option::is_none")]
///Whether the current user can change the `sharingFoldersRequiresOrganizerPermission` restriction of this Team Drive.
pub can_change_sharing_folders_requires_organizer_permission_restriction: ::core::option::Option<
::core::primitive::bool,
>,
#[serde(rename = "canChangeTeamDriveBackground")]
#[serde(skip_serializing_if = "::core::option::Option::is_none")]
///Whether the current user can change the background of this Team Drive.
pub can_change_team_drive_background: ::core::option::Option<
::core::primitive::bool,
>,
#[serde(rename = "canChangeTeamMembersOnlyRestriction")]
#[serde(skip_serializing_if = "::core::option::Option::is_none")]
///Whether the current user can change the `teamMembersOnly` restriction of this Team Drive.
pub can_change_team_members_only_restriction: ::core::option::Option<
::core::primitive::bool,
>,
#[serde(rename = "canComment")]
#[serde(skip_serializing_if = "::core::option::Option::is_none")]
///Whether the current user can comment on files in this Team Drive.
pub can_comment: ::core::option::Option<::core::primitive::bool>,
#[serde(rename = "canCopy")]
#[serde(skip_serializing_if = "::core::option::Option::is_none")]
///Whether the current user can copy files in this Team Drive.
pub can_copy: ::core::option::Option<::core::primitive::bool>,
#[serde(rename = "canDeleteChildren")]
#[serde(skip_serializing_if = "::core::option::Option::is_none")]
///Whether the current user can delete children from folders in this Team Drive.
pub can_delete_children: ::core::option::Option<::core::primitive::bool>,
#[serde(rename = "canDeleteTeamDrive")]
#[serde(skip_serializing_if = "::core::option::Option::is_none")]
///Whether the current user can delete this Team Drive. Attempting to delete the Team Drive may still fail if there are untrashed items inside the Team Drive.
pub can_delete_team_drive: ::core::option::Option<::core::primitive::bool>,
#[serde(rename = "canDownload")]
#[serde(skip_serializing_if = "::core::option::Option::is_none")]
///Whether the current user can download files in this Team Drive.
pub can_download: ::core::option::Option<::core::primitive::bool>,
#[serde(rename = "canEdit")]
#[serde(skip_serializing_if = "::core::option::Option::is_none")]
///Whether the current user can edit files in this Team Drive
pub can_edit: ::core::option::Option<::core::primitive::bool>,
#[serde(rename = "canListChildren")]
#[serde(skip_serializing_if = "::core::option::Option::is_none")]
///Whether the current user can list the children of folders in this Team Drive.
pub can_list_children: ::core::option::Option<::core::primitive::bool>,
#[serde(rename = "canManageMembers")]
#[serde(skip_serializing_if = "::core::option::Option::is_none")]
///Whether the current user can add members to this Team Drive or remove them or change their role.
pub can_manage_members: ::core::option::Option<::core::primitive::bool>,
#[serde(rename = "canReadRevisions")]
#[serde(skip_serializing_if = "::core::option::Option::is_none")]
///Whether the current user can read the revisions resource of files in this Team Drive.
pub can_read_revisions: ::core::option::Option<::core::primitive::bool>,
#[serde(rename = "canRemoveChildren")]
#[serde(skip_serializing_if = "::core::option::Option::is_none")]
///Deprecated: Use `canDeleteChildren` or `canTrashChildren` instead.
pub can_remove_children: ::core::option::Option<::core::primitive::bool>,
#[serde(rename = "canRename")]
#[serde(skip_serializing_if = "::core::option::Option::is_none")]
///Whether the current user can rename files or folders in this Team Drive.
pub can_rename: ::core::option::Option<::core::primitive::bool>,
#[serde(rename = "canRenameTeamDrive")]
#[serde(skip_serializing_if = "::core::option::Option::is_none")]
///Whether the current user can rename this Team Drive.
pub can_rename_team_drive: ::core::option::Option<::core::primitive::bool>,
#[serde(rename = "canResetTeamDriveRestrictions")]
#[serde(skip_serializing_if = "::core::option::Option::is_none")]
///Whether the current user can reset the Team Drive restrictions to defaults.
pub can_reset_team_drive_restrictions: ::core::option::Option<
::core::primitive::bool,
>,
#[serde(rename = "canShare")]
#[serde(skip_serializing_if = "::core::option::Option::is_none")]
///Whether the current user can share files or folders in this Team Drive.
pub can_share: ::core::option::Option<::core::primitive::bool>,
#[serde(rename = "canTrashChildren")]
#[serde(skip_serializing_if = "::core::option::Option::is_none")]
///Whether the current user can trash children from folders in this Team Drive.
pub can_trash_children: ::core::option::Option<::core::primitive::bool>,
}
}
pub mod team_drive_restrictions_additional {
use super::*;
///A set of restrictions that apply to this Team Drive or items inside this Team Drive.
#[derive(Debug, Clone, ::serde::Deserialize, ::serde::Serialize)]
pub struct Restrictions {
#[serde(rename = "adminManagedRestrictions")]
///Whether administrative privileges on this Team Drive are required to modify restrictions.
pub admin_managed_restrictions: ::core::primitive::bool,
#[serde(rename = "copyRequiresWriterPermission")]
///Whether the options to copy, print, or download files inside this Team Drive, should be disabled for readers and commenters. When this restriction is set to `true`, it will override the similarly named field to `true` for any file inside this Team Drive.
pub copy_requires_writer_permission: ::core::primitive::bool,
#[serde(rename = "domainUsersOnly")]
///Whether access to this Team Drive and items inside this Team Drive is restricted to users of the domain to which this Team Drive belongs. This restriction may be overridden by other sharing policies controlled outside of this Team Drive.
pub domain_users_only: ::core::primitive::bool,
#[serde(rename = "downloadRestriction")]
pub download_restriction: ::alloc::boxed::Box<
crate::discovery::schemas::download_restriction::DownloadRestriction,
>,
#[serde(rename = "sharingFoldersRequiresOrganizerPermission")]
///If true, only users with the organizer role can share folders. If false, users with either the organizer role or the file organizer role can share folders.
pub sharing_folders_requires_organizer_permission: ::core::primitive::bool,
#[serde(rename = "teamMembersOnly")]
///Whether access to items inside this Team Drive is restricted to members of this Team Drive.
pub team_members_only: ::core::primitive::bool,
}
///A set of restrictions that apply to this Team Drive or items inside this Team Drive.
#[derive(Debug, Clone, ::serde::Deserialize, ::serde::Serialize, Default)]
pub struct RestrictionsPartial {
#[serde(rename = "adminManagedRestrictions")]
#[serde(skip_serializing_if = "::core::option::Option::is_none")]
///Whether administrative privileges on this Team Drive are required to modify restrictions.
pub admin_managed_restrictions: ::core::option::Option<::core::primitive::bool>,
#[serde(rename = "copyRequiresWriterPermission")]
#[serde(skip_serializing_if = "::core::option::Option::is_none")]
///Whether the options to copy, print, or download files inside this Team Drive, should be disabled for readers and commenters. When this restriction is set to `true`, it will override the similarly named field to `true` for any file inside this Team Drive.
pub copy_requires_writer_permission: ::core::option::Option<
::core::primitive::bool,
>,
#[serde(rename = "domainUsersOnly")]
#[serde(skip_serializing_if = "::core::option::Option::is_none")]
///Whether access to this Team Drive and items inside this Team Drive is restricted to users of the domain to which this Team Drive belongs. This restriction may be overridden by other sharing policies controlled outside of this Team Drive.
pub domain_users_only: ::core::option::Option<::core::primitive::bool>,
#[serde(rename = "downloadRestriction")]
#[serde(skip_serializing_if = "::core::option::Option::is_none")]
pub download_restriction: ::core::option::Option<
::alloc::boxed::Box<
crate::discovery::schemas::download_restriction::DownloadRestrictionPartial,
>,
>,
#[serde(rename = "sharingFoldersRequiresOrganizerPermission")]
#[serde(skip_serializing_if = "::core::option::Option::is_none")]
///If true, only users with the organizer role can share folders. If false, users with either the organizer role or the file organizer role can share folders.
pub sharing_folders_requires_organizer_permission: ::core::option::Option<
::core::primitive::bool,
>,
#[serde(rename = "teamMembersOnly")]
#[serde(skip_serializing_if = "::core::option::Option::is_none")]
///Whether access to items inside this Team Drive is restricted to members of this Team Drive.
pub team_members_only: ::core::option::Option<::core::primitive::bool>,
}
}