OLD | NEW |
1 // This is a generated file (see the discoveryapis_generator project). | 1 // This is a generated file (see the discoveryapis_generator project). |
2 | 2 |
3 library googleapis.admin.directory_v1; | 3 library googleapis.admin.directory_v1; |
4 | 4 |
5 import 'dart:core' as core; | 5 import 'dart:core' as core; |
6 import 'dart:collection' as collection; | 6 import 'dart:collection' as collection; |
7 import 'dart:async' as async; | 7 import 'dart:async' as async; |
8 import 'dart:convert' as convert; | 8 import 'dart:convert' as convert; |
9 | 9 |
10 import 'package:_discoveryapis_commons/_discoveryapis_commons.dart' as commons; | 10 import 'package:_discoveryapis_commons/_discoveryapis_commons.dart' as commons; |
11 import 'package:http/http.dart' as http; | 11 import 'package:http/http.dart' as http; |
12 | 12 |
13 export 'package:_discoveryapis_commons/_discoveryapis_commons.dart' show | 13 export 'package:_discoveryapis_commons/_discoveryapis_commons.dart' |
14 ApiRequestError, DetailedApiRequestError; | 14 show ApiRequestError, DetailedApiRequestError; |
15 | 15 |
16 const core.String USER_AGENT = 'dart-api-client admin/directory_v1'; | 16 const core.String USER_AGENT = 'dart-api-client admin/directory_v1'; |
17 | 17 |
18 /** | 18 /// The Admin SDK Directory API lets you view and manage enterprise resources |
19 * The Admin SDK Directory API lets you view and manage enterprise resources | 19 /// such as users and groups, administrative notifications, security features, |
20 * such as users and groups, administrative notifications, security features, | 20 /// and more. |
21 * and more. | |
22 */ | |
23 class AdminApi { | 21 class AdminApi { |
24 /** View and manage customer related information */ | 22 /// View and manage customer related information |
25 static const AdminDirectoryCustomerScope = "https://www.googleapis.com/auth/ad
min.directory.customer"; | 23 static const AdminDirectoryCustomerScope = |
| 24 "https://www.googleapis.com/auth/admin.directory.customer"; |
26 | 25 |
27 /** View customer related information */ | 26 /// View customer related information |
28 static const AdminDirectoryCustomerReadonlyScope = "https://www.googleapis.com
/auth/admin.directory.customer.readonly"; | 27 static const AdminDirectoryCustomerReadonlyScope = |
| 28 "https://www.googleapis.com/auth/admin.directory.customer.readonly"; |
29 | 29 |
30 /** View and manage your Chrome OS devices' metadata */ | 30 /// View and manage your Chrome OS devices' metadata |
31 static const AdminDirectoryDeviceChromeosScope = "https://www.googleapis.com/a
uth/admin.directory.device.chromeos"; | 31 static const AdminDirectoryDeviceChromeosScope = |
| 32 "https://www.googleapis.com/auth/admin.directory.device.chromeos"; |
32 | 33 |
33 /** View your Chrome OS devices' metadata */ | 34 /// View your Chrome OS devices' metadata |
34 static const AdminDirectoryDeviceChromeosReadonlyScope = "https://www.googleap
is.com/auth/admin.directory.device.chromeos.readonly"; | 35 static const AdminDirectoryDeviceChromeosReadonlyScope = |
| 36 "https://www.googleapis.com/auth/admin.directory.device.chromeos.readonly"
; |
35 | 37 |
36 /** View and manage your mobile devices' metadata */ | 38 /// View and manage your mobile devices' metadata |
37 static const AdminDirectoryDeviceMobileScope = "https://www.googleapis.com/aut
h/admin.directory.device.mobile"; | 39 static const AdminDirectoryDeviceMobileScope = |
| 40 "https://www.googleapis.com/auth/admin.directory.device.mobile"; |
38 | 41 |
39 /** Manage your mobile devices by performing administrative tasks */ | 42 /// Manage your mobile devices by performing administrative tasks |
40 static const AdminDirectoryDeviceMobileActionScope = "https://www.googleapis.c
om/auth/admin.directory.device.mobile.action"; | 43 static const AdminDirectoryDeviceMobileActionScope = |
| 44 "https://www.googleapis.com/auth/admin.directory.device.mobile.action"; |
41 | 45 |
42 /** View your mobile devices' metadata */ | 46 /// View your mobile devices' metadata |
43 static const AdminDirectoryDeviceMobileReadonlyScope = "https://www.googleapis
.com/auth/admin.directory.device.mobile.readonly"; | 47 static const AdminDirectoryDeviceMobileReadonlyScope = |
| 48 "https://www.googleapis.com/auth/admin.directory.device.mobile.readonly"; |
44 | 49 |
45 /** View and manage the provisioning of domains for your customers */ | 50 /// View and manage the provisioning of domains for your customers |
46 static const AdminDirectoryDomainScope = "https://www.googleapis.com/auth/admi
n.directory.domain"; | 51 static const AdminDirectoryDomainScope = |
| 52 "https://www.googleapis.com/auth/admin.directory.domain"; |
47 | 53 |
48 /** View domains related to your customers */ | 54 /// View domains related to your customers |
49 static const AdminDirectoryDomainReadonlyScope = "https://www.googleapis.com/a
uth/admin.directory.domain.readonly"; | 55 static const AdminDirectoryDomainReadonlyScope = |
| 56 "https://www.googleapis.com/auth/admin.directory.domain.readonly"; |
50 | 57 |
51 /** View and manage the provisioning of groups on your domain */ | 58 /// View and manage the provisioning of groups on your domain |
52 static const AdminDirectoryGroupScope = "https://www.googleapis.com/auth/admin
.directory.group"; | 59 static const AdminDirectoryGroupScope = |
| 60 "https://www.googleapis.com/auth/admin.directory.group"; |
53 | 61 |
54 /** View and manage group subscriptions on your domain */ | 62 /// View and manage group subscriptions on your domain |
55 static const AdminDirectoryGroupMemberScope = "https://www.googleapis.com/auth
/admin.directory.group.member"; | 63 static const AdminDirectoryGroupMemberScope = |
| 64 "https://www.googleapis.com/auth/admin.directory.group.member"; |
56 | 65 |
57 /** View group subscriptions on your domain */ | 66 /// View group subscriptions on your domain |
58 static const AdminDirectoryGroupMemberReadonlyScope = "https://www.googleapis.
com/auth/admin.directory.group.member.readonly"; | 67 static const AdminDirectoryGroupMemberReadonlyScope = |
| 68 "https://www.googleapis.com/auth/admin.directory.group.member.readonly"; |
59 | 69 |
60 /** View groups on your domain */ | 70 /// View groups on your domain |
61 static const AdminDirectoryGroupReadonlyScope = "https://www.googleapis.com/au
th/admin.directory.group.readonly"; | 71 static const AdminDirectoryGroupReadonlyScope = |
| 72 "https://www.googleapis.com/auth/admin.directory.group.readonly"; |
62 | 73 |
63 /** View and manage notifications received on your domain */ | 74 /// View and manage notifications received on your domain |
64 static const AdminDirectoryNotificationsScope = "https://www.googleapis.com/au
th/admin.directory.notifications"; | 75 static const AdminDirectoryNotificationsScope = |
| 76 "https://www.googleapis.com/auth/admin.directory.notifications"; |
65 | 77 |
66 /** View and manage organization units on your domain */ | 78 /// View and manage organization units on your domain |
67 static const AdminDirectoryOrgunitScope = "https://www.googleapis.com/auth/adm
in.directory.orgunit"; | 79 static const AdminDirectoryOrgunitScope = |
| 80 "https://www.googleapis.com/auth/admin.directory.orgunit"; |
68 | 81 |
69 /** View organization units on your domain */ | 82 /// View organization units on your domain |
70 static const AdminDirectoryOrgunitReadonlyScope = "https://www.googleapis.com/
auth/admin.directory.orgunit.readonly"; | 83 static const AdminDirectoryOrgunitReadonlyScope = |
| 84 "https://www.googleapis.com/auth/admin.directory.orgunit.readonly"; |
71 | 85 |
72 /** View and manage the provisioning of calendar resources on your domain */ | 86 /// View and manage the provisioning of calendar resources on your domain |
73 static const AdminDirectoryResourceCalendarScope = "https://www.googleapis.com
/auth/admin.directory.resource.calendar"; | 87 static const AdminDirectoryResourceCalendarScope = |
| 88 "https://www.googleapis.com/auth/admin.directory.resource.calendar"; |
74 | 89 |
75 /** View calendar resources on your domain */ | 90 /// View calendar resources on your domain |
76 static const AdminDirectoryResourceCalendarReadonlyScope = "https://www.google
apis.com/auth/admin.directory.resource.calendar.readonly"; | 91 static const AdminDirectoryResourceCalendarReadonlyScope = |
| 92 "https://www.googleapis.com/auth/admin.directory.resource.calendar.readonl
y"; |
77 | 93 |
78 /** Manage delegated admin roles for your domain */ | 94 /// Manage delegated admin roles for your domain |
79 static const AdminDirectoryRolemanagementScope = "https://www.googleapis.com/a
uth/admin.directory.rolemanagement"; | 95 static const AdminDirectoryRolemanagementScope = |
| 96 "https://www.googleapis.com/auth/admin.directory.rolemanagement"; |
80 | 97 |
81 /** View delegated admin roles for your domain */ | 98 /// View delegated admin roles for your domain |
82 static const AdminDirectoryRolemanagementReadonlyScope = "https://www.googleap
is.com/auth/admin.directory.rolemanagement.readonly"; | 99 static const AdminDirectoryRolemanagementReadonlyScope = |
| 100 "https://www.googleapis.com/auth/admin.directory.rolemanagement.readonly"; |
83 | 101 |
84 /** View and manage the provisioning of users on your domain */ | 102 /// View and manage the provisioning of users on your domain |
85 static const AdminDirectoryUserScope = "https://www.googleapis.com/auth/admin.
directory.user"; | 103 static const AdminDirectoryUserScope = |
| 104 "https://www.googleapis.com/auth/admin.directory.user"; |
86 | 105 |
87 /** View and manage user aliases on your domain */ | 106 /// View and manage user aliases on your domain |
88 static const AdminDirectoryUserAliasScope = "https://www.googleapis.com/auth/a
dmin.directory.user.alias"; | 107 static const AdminDirectoryUserAliasScope = |
| 108 "https://www.googleapis.com/auth/admin.directory.user.alias"; |
89 | 109 |
90 /** View user aliases on your domain */ | 110 /// View user aliases on your domain |
91 static const AdminDirectoryUserAliasReadonlyScope = "https://www.googleapis.co
m/auth/admin.directory.user.alias.readonly"; | 111 static const AdminDirectoryUserAliasReadonlyScope = |
| 112 "https://www.googleapis.com/auth/admin.directory.user.alias.readonly"; |
92 | 113 |
93 /** View users on your domain */ | 114 /// View users on your domain |
94 static const AdminDirectoryUserReadonlyScope = "https://www.googleapis.com/aut
h/admin.directory.user.readonly"; | 115 static const AdminDirectoryUserReadonlyScope = |
| 116 "https://www.googleapis.com/auth/admin.directory.user.readonly"; |
95 | 117 |
96 /** Manage data access permissions for users on your domain */ | 118 /// Manage data access permissions for users on your domain |
97 static const AdminDirectoryUserSecurityScope = "https://www.googleapis.com/aut
h/admin.directory.user.security"; | 119 static const AdminDirectoryUserSecurityScope = |
| 120 "https://www.googleapis.com/auth/admin.directory.user.security"; |
98 | 121 |
99 /** View and manage the provisioning of user schemas on your domain */ | 122 /// View and manage the provisioning of user schemas on your domain |
100 static const AdminDirectoryUserschemaScope = "https://www.googleapis.com/auth/
admin.directory.userschema"; | 123 static const AdminDirectoryUserschemaScope = |
| 124 "https://www.googleapis.com/auth/admin.directory.userschema"; |
101 | 125 |
102 /** View user schemas on your domain */ | 126 /// View user schemas on your domain |
103 static const AdminDirectoryUserschemaReadonlyScope = "https://www.googleapis.c
om/auth/admin.directory.userschema.readonly"; | 127 static const AdminDirectoryUserschemaReadonlyScope = |
104 | 128 "https://www.googleapis.com/auth/admin.directory.userschema.readonly"; |
105 | 129 |
106 final commons.ApiRequester _requester; | 130 final commons.ApiRequester _requester; |
107 | 131 |
108 AspsResourceApi get asps => new AspsResourceApi(_requester); | 132 AspsResourceApi get asps => new AspsResourceApi(_requester); |
109 ChannelsResourceApi get channels => new ChannelsResourceApi(_requester); | 133 ChannelsResourceApi get channels => new ChannelsResourceApi(_requester); |
110 ChromeosdevicesResourceApi get chromeosdevices => new ChromeosdevicesResourceA
pi(_requester); | 134 ChromeosdevicesResourceApi get chromeosdevices => |
| 135 new ChromeosdevicesResourceApi(_requester); |
111 CustomersResourceApi get customers => new CustomersResourceApi(_requester); | 136 CustomersResourceApi get customers => new CustomersResourceApi(_requester); |
112 DomainAliasesResourceApi get domainAliases => new DomainAliasesResourceApi(_re
quester); | 137 DomainAliasesResourceApi get domainAliases => |
| 138 new DomainAliasesResourceApi(_requester); |
113 DomainsResourceApi get domains => new DomainsResourceApi(_requester); | 139 DomainsResourceApi get domains => new DomainsResourceApi(_requester); |
114 GroupsResourceApi get groups => new GroupsResourceApi(_requester); | 140 GroupsResourceApi get groups => new GroupsResourceApi(_requester); |
115 MembersResourceApi get members => new MembersResourceApi(_requester); | 141 MembersResourceApi get members => new MembersResourceApi(_requester); |
116 MobiledevicesResourceApi get mobiledevices => new MobiledevicesResourceApi(_re
quester); | 142 MobiledevicesResourceApi get mobiledevices => |
117 NotificationsResourceApi get notifications => new NotificationsResourceApi(_re
quester); | 143 new MobiledevicesResourceApi(_requester); |
| 144 NotificationsResourceApi get notifications => |
| 145 new NotificationsResourceApi(_requester); |
118 OrgunitsResourceApi get orgunits => new OrgunitsResourceApi(_requester); | 146 OrgunitsResourceApi get orgunits => new OrgunitsResourceApi(_requester); |
119 PrivilegesResourceApi get privileges => new PrivilegesResourceApi(_requester); | 147 PrivilegesResourceApi get privileges => new PrivilegesResourceApi(_requester); |
120 ResourcesResourceApi get resources => new ResourcesResourceApi(_requester); | 148 ResourcesResourceApi get resources => new ResourcesResourceApi(_requester); |
121 RoleAssignmentsResourceApi get roleAssignments => new RoleAssignmentsResourceA
pi(_requester); | 149 RoleAssignmentsResourceApi get roleAssignments => |
| 150 new RoleAssignmentsResourceApi(_requester); |
122 RolesResourceApi get roles => new RolesResourceApi(_requester); | 151 RolesResourceApi get roles => new RolesResourceApi(_requester); |
123 SchemasResourceApi get schemas => new SchemasResourceApi(_requester); | 152 SchemasResourceApi get schemas => new SchemasResourceApi(_requester); |
124 TokensResourceApi get tokens => new TokensResourceApi(_requester); | 153 TokensResourceApi get tokens => new TokensResourceApi(_requester); |
125 UsersResourceApi get users => new UsersResourceApi(_requester); | 154 UsersResourceApi get users => new UsersResourceApi(_requester); |
126 VerificationCodesResourceApi get verificationCodes => new VerificationCodesRes
ourceApi(_requester); | 155 VerificationCodesResourceApi get verificationCodes => |
| 156 new VerificationCodesResourceApi(_requester); |
127 | 157 |
128 AdminApi(http.Client client, {core.String rootUrl: "https://www.googleapis.com
/", core.String servicePath: "admin/directory/v1/"}) : | 158 AdminApi(http.Client client, |
129 _requester = new commons.ApiRequester(client, rootUrl, servicePath, USER_A
GENT); | 159 {core.String rootUrl: "https://www.googleapis.com/", |
| 160 core.String servicePath: "admin/directory/v1/"}) |
| 161 : _requester = |
| 162 new commons.ApiRequester(client, rootUrl, servicePath, USER_AGENT); |
130 } | 163 } |
131 | 164 |
132 | |
133 class AspsResourceApi { | 165 class AspsResourceApi { |
134 final commons.ApiRequester _requester; | 166 final commons.ApiRequester _requester; |
135 | 167 |
136 AspsResourceApi(commons.ApiRequester client) : | 168 AspsResourceApi(commons.ApiRequester client) : _requester = client; |
137 _requester = client; | |
138 | 169 |
139 /** | 170 /// Delete an ASP issued by a user. |
140 * Delete an ASP issued by a user. | 171 /// |
141 * | 172 /// Request parameters: |
142 * Request parameters: | 173 /// |
143 * | 174 /// [userKey] - Identifies the user in the API request. The value can be the |
144 * [userKey] - Identifies the user in the API request. The value can be the | 175 /// user's primary email address, alias email address, or unique user ID. |
145 * user's primary email address, alias email address, or unique user ID. | 176 /// |
146 * | 177 /// [codeId] - The unique ID of the ASP to be deleted. |
147 * [codeId] - The unique ID of the ASP to be deleted. | 178 /// |
148 * | 179 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
149 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 180 /// an error. |
150 * error. | 181 /// |
151 * | 182 /// If the used [http.Client] completes with an error when making a REST |
152 * If the used [http.Client] completes with an error when making a REST call, | 183 /// call, this method will complete with the same error. |
153 * this method will complete with the same error. | |
154 */ | |
155 async.Future delete(core.String userKey, core.int codeId) { | 184 async.Future delete(core.String userKey, core.int codeId) { |
156 var _url = null; | 185 var _url = null; |
157 var _queryParams = new core.Map(); | 186 var _queryParams = new core.Map(); |
158 var _uploadMedia = null; | 187 var _uploadMedia = null; |
159 var _uploadOptions = null; | 188 var _uploadOptions = null; |
160 var _downloadOptions = commons.DownloadOptions.Metadata; | 189 var _downloadOptions = commons.DownloadOptions.Metadata; |
161 var _body = null; | 190 var _body = null; |
162 | 191 |
163 if (userKey == null) { | 192 if (userKey == null) { |
164 throw new core.ArgumentError("Parameter userKey is required."); | 193 throw new core.ArgumentError("Parameter userKey is required."); |
165 } | 194 } |
166 if (codeId == null) { | 195 if (codeId == null) { |
167 throw new core.ArgumentError("Parameter codeId is required."); | 196 throw new core.ArgumentError("Parameter codeId is required."); |
168 } | 197 } |
169 | 198 |
170 _downloadOptions = null; | 199 _downloadOptions = null; |
171 | 200 |
172 _url = 'users/' + commons.Escaper.ecapeVariable('$userKey') + '/asps/' + com
mons.Escaper.ecapeVariable('$codeId'); | 201 _url = 'users/' + |
| 202 commons.Escaper.ecapeVariable('$userKey') + |
| 203 '/asps/' + |
| 204 commons.Escaper.ecapeVariable('$codeId'); |
173 | 205 |
174 var _response = _requester.request(_url, | 206 var _response = _requester.request(_url, "DELETE", |
175 "DELETE", | 207 body: _body, |
176 body: _body, | 208 queryParams: _queryParams, |
177 queryParams: _queryParams, | 209 uploadOptions: _uploadOptions, |
178 uploadOptions: _uploadOptions, | 210 uploadMedia: _uploadMedia, |
179 uploadMedia: _uploadMedia, | 211 downloadOptions: _downloadOptions); |
180 downloadOptions: _downloadOptions); | |
181 return _response.then((data) => null); | 212 return _response.then((data) => null); |
182 } | 213 } |
183 | 214 |
184 /** | 215 /// Get information about an ASP issued by a user. |
185 * Get information about an ASP issued by a user. | 216 /// |
186 * | 217 /// Request parameters: |
187 * Request parameters: | 218 /// |
188 * | 219 /// [userKey] - Identifies the user in the API request. The value can be the |
189 * [userKey] - Identifies the user in the API request. The value can be the | 220 /// user's primary email address, alias email address, or unique user ID. |
190 * user's primary email address, alias email address, or unique user ID. | 221 /// |
191 * | 222 /// [codeId] - The unique ID of the ASP. |
192 * [codeId] - The unique ID of the ASP. | 223 /// |
193 * | 224 /// Completes with a [Asp]. |
194 * Completes with a [Asp]. | 225 /// |
195 * | 226 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
196 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 227 /// an error. |
197 * error. | 228 /// |
198 * | 229 /// If the used [http.Client] completes with an error when making a REST |
199 * If the used [http.Client] completes with an error when making a REST call, | 230 /// call, this method will complete with the same error. |
200 * this method will complete with the same error. | |
201 */ | |
202 async.Future<Asp> get(core.String userKey, core.int codeId) { | 231 async.Future<Asp> get(core.String userKey, core.int codeId) { |
203 var _url = null; | 232 var _url = null; |
204 var _queryParams = new core.Map(); | 233 var _queryParams = new core.Map(); |
205 var _uploadMedia = null; | 234 var _uploadMedia = null; |
206 var _uploadOptions = null; | 235 var _uploadOptions = null; |
207 var _downloadOptions = commons.DownloadOptions.Metadata; | 236 var _downloadOptions = commons.DownloadOptions.Metadata; |
208 var _body = null; | 237 var _body = null; |
209 | 238 |
210 if (userKey == null) { | 239 if (userKey == null) { |
211 throw new core.ArgumentError("Parameter userKey is required."); | 240 throw new core.ArgumentError("Parameter userKey is required."); |
212 } | 241 } |
213 if (codeId == null) { | 242 if (codeId == null) { |
214 throw new core.ArgumentError("Parameter codeId is required."); | 243 throw new core.ArgumentError("Parameter codeId is required."); |
215 } | 244 } |
216 | 245 |
217 _url = 'users/' + commons.Escaper.ecapeVariable('$userKey') + '/asps/' + com
mons.Escaper.ecapeVariable('$codeId'); | 246 _url = 'users/' + |
| 247 commons.Escaper.ecapeVariable('$userKey') + |
| 248 '/asps/' + |
| 249 commons.Escaper.ecapeVariable('$codeId'); |
218 | 250 |
219 var _response = _requester.request(_url, | 251 var _response = _requester.request(_url, "GET", |
220 "GET", | 252 body: _body, |
221 body: _body, | 253 queryParams: _queryParams, |
222 queryParams: _queryParams, | 254 uploadOptions: _uploadOptions, |
223 uploadOptions: _uploadOptions, | 255 uploadMedia: _uploadMedia, |
224 uploadMedia: _uploadMedia, | 256 downloadOptions: _downloadOptions); |
225 downloadOptions: _downloadOptions); | |
226 return _response.then((data) => new Asp.fromJson(data)); | 257 return _response.then((data) => new Asp.fromJson(data)); |
227 } | 258 } |
228 | 259 |
229 /** | 260 /// List the ASPs issued by a user. |
230 * List the ASPs issued by a user. | 261 /// |
231 * | 262 /// Request parameters: |
232 * Request parameters: | 263 /// |
233 * | 264 /// [userKey] - Identifies the user in the API request. The value can be the |
234 * [userKey] - Identifies the user in the API request. The value can be the | 265 /// user's primary email address, alias email address, or unique user ID. |
235 * user's primary email address, alias email address, or unique user ID. | 266 /// |
236 * | 267 /// Completes with a [Asps]. |
237 * Completes with a [Asps]. | 268 /// |
238 * | 269 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
239 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 270 /// an error. |
240 * error. | 271 /// |
241 * | 272 /// If the used [http.Client] completes with an error when making a REST |
242 * If the used [http.Client] completes with an error when making a REST call, | 273 /// call, this method will complete with the same error. |
243 * this method will complete with the same error. | |
244 */ | |
245 async.Future<Asps> list(core.String userKey) { | 274 async.Future<Asps> list(core.String userKey) { |
246 var _url = null; | 275 var _url = null; |
247 var _queryParams = new core.Map(); | 276 var _queryParams = new core.Map(); |
248 var _uploadMedia = null; | 277 var _uploadMedia = null; |
249 var _uploadOptions = null; | 278 var _uploadOptions = null; |
250 var _downloadOptions = commons.DownloadOptions.Metadata; | 279 var _downloadOptions = commons.DownloadOptions.Metadata; |
251 var _body = null; | 280 var _body = null; |
252 | 281 |
253 if (userKey == null) { | 282 if (userKey == null) { |
254 throw new core.ArgumentError("Parameter userKey is required."); | 283 throw new core.ArgumentError("Parameter userKey is required."); |
255 } | 284 } |
256 | 285 |
257 _url = 'users/' + commons.Escaper.ecapeVariable('$userKey') + '/asps'; | 286 _url = 'users/' + commons.Escaper.ecapeVariable('$userKey') + '/asps'; |
258 | 287 |
259 var _response = _requester.request(_url, | 288 var _response = _requester.request(_url, "GET", |
260 "GET", | 289 body: _body, |
261 body: _body, | 290 queryParams: _queryParams, |
262 queryParams: _queryParams, | 291 uploadOptions: _uploadOptions, |
263 uploadOptions: _uploadOptions, | 292 uploadMedia: _uploadMedia, |
264 uploadMedia: _uploadMedia, | 293 downloadOptions: _downloadOptions); |
265 downloadOptions: _downloadOptions); | |
266 return _response.then((data) => new Asps.fromJson(data)); | 294 return _response.then((data) => new Asps.fromJson(data)); |
267 } | 295 } |
268 | |
269 } | 296 } |
270 | 297 |
271 | |
272 class ChannelsResourceApi { | 298 class ChannelsResourceApi { |
273 final commons.ApiRequester _requester; | 299 final commons.ApiRequester _requester; |
274 | 300 |
275 ChannelsResourceApi(commons.ApiRequester client) : | 301 ChannelsResourceApi(commons.ApiRequester client) : _requester = client; |
276 _requester = client; | |
277 | 302 |
278 /** | 303 /// Stop watching resources through this channel |
279 * Stop watching resources through this channel | 304 /// |
280 * | 305 /// [request] - The metadata request object. |
281 * [request] - The metadata request object. | 306 /// |
282 * | 307 /// Request parameters: |
283 * Request parameters: | 308 /// |
284 * | 309 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
285 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 310 /// an error. |
286 * error. | 311 /// |
287 * | 312 /// If the used [http.Client] completes with an error when making a REST |
288 * If the used [http.Client] completes with an error when making a REST call, | 313 /// call, this method will complete with the same error. |
289 * this method will complete with the same error. | |
290 */ | |
291 async.Future stop(Channel request) { | 314 async.Future stop(Channel request) { |
292 var _url = null; | 315 var _url = null; |
293 var _queryParams = new core.Map(); | 316 var _queryParams = new core.Map(); |
294 var _uploadMedia = null; | 317 var _uploadMedia = null; |
295 var _uploadOptions = null; | 318 var _uploadOptions = null; |
296 var _downloadOptions = commons.DownloadOptions.Metadata; | 319 var _downloadOptions = commons.DownloadOptions.Metadata; |
297 var _body = null; | 320 var _body = null; |
298 | 321 |
299 if (request != null) { | 322 if (request != null) { |
300 _body = convert.JSON.encode((request).toJson()); | 323 _body = convert.JSON.encode((request).toJson()); |
301 } | 324 } |
302 | 325 |
303 _downloadOptions = null; | 326 _downloadOptions = null; |
304 | 327 |
305 _url = '/admin/directory_v1/channels/stop'; | 328 _url = '/admin/directory_v1/channels/stop'; |
306 | 329 |
307 var _response = _requester.request(_url, | 330 var _response = _requester.request(_url, "POST", |
308 "POST", | 331 body: _body, |
309 body: _body, | 332 queryParams: _queryParams, |
310 queryParams: _queryParams, | 333 uploadOptions: _uploadOptions, |
311 uploadOptions: _uploadOptions, | 334 uploadMedia: _uploadMedia, |
312 uploadMedia: _uploadMedia, | 335 downloadOptions: _downloadOptions); |
313 downloadOptions: _downloadOptions); | |
314 return _response.then((data) => null); | 336 return _response.then((data) => null); |
315 } | 337 } |
316 | |
317 } | 338 } |
318 | 339 |
319 | |
320 class ChromeosdevicesResourceApi { | 340 class ChromeosdevicesResourceApi { |
321 final commons.ApiRequester _requester; | 341 final commons.ApiRequester _requester; |
322 | 342 |
323 ChromeosdevicesResourceApi(commons.ApiRequester client) : | 343 ChromeosdevicesResourceApi(commons.ApiRequester client) : _requester = client; |
324 _requester = client; | |
325 | 344 |
326 /** | 345 /// Take action on Chrome OS Device |
327 * Take action on Chrome OS Device | 346 /// |
328 * | 347 /// [request] - The metadata request object. |
329 * [request] - The metadata request object. | 348 /// |
330 * | 349 /// Request parameters: |
331 * Request parameters: | 350 /// |
332 * | 351 /// [customerId] - Immutable ID of the G Suite account |
333 * [customerId] - Immutable ID of the G Suite account | 352 /// |
334 * | 353 /// [resourceId] - Immutable ID of Chrome OS Device |
335 * [resourceId] - Immutable ID of Chrome OS Device | 354 /// |
336 * | 355 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
337 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 356 /// an error. |
338 * error. | 357 /// |
339 * | 358 /// If the used [http.Client] completes with an error when making a REST |
340 * If the used [http.Client] completes with an error when making a REST call, | 359 /// call, this method will complete with the same error. |
341 * this method will complete with the same error. | 360 async.Future action(ChromeOsDeviceAction request, core.String customerId, |
342 */ | 361 core.String resourceId) { |
343 async.Future action(ChromeOsDeviceAction request, core.String customerId, core
.String resourceId) { | |
344 var _url = null; | 362 var _url = null; |
345 var _queryParams = new core.Map(); | 363 var _queryParams = new core.Map(); |
346 var _uploadMedia = null; | 364 var _uploadMedia = null; |
347 var _uploadOptions = null; | 365 var _uploadOptions = null; |
348 var _downloadOptions = commons.DownloadOptions.Metadata; | 366 var _downloadOptions = commons.DownloadOptions.Metadata; |
349 var _body = null; | 367 var _body = null; |
350 | 368 |
351 if (request != null) { | 369 if (request != null) { |
352 _body = convert.JSON.encode((request).toJson()); | 370 _body = convert.JSON.encode((request).toJson()); |
353 } | 371 } |
354 if (customerId == null) { | 372 if (customerId == null) { |
355 throw new core.ArgumentError("Parameter customerId is required."); | 373 throw new core.ArgumentError("Parameter customerId is required."); |
356 } | 374 } |
357 if (resourceId == null) { | 375 if (resourceId == null) { |
358 throw new core.ArgumentError("Parameter resourceId is required."); | 376 throw new core.ArgumentError("Parameter resourceId is required."); |
359 } | 377 } |
360 | 378 |
361 _downloadOptions = null; | 379 _downloadOptions = null; |
362 | 380 |
363 _url = 'customer/' + commons.Escaper.ecapeVariable('$customerId') + '/device
s/chromeos/' + commons.Escaper.ecapeVariable('$resourceId') + '/action'; | 381 _url = 'customer/' + |
| 382 commons.Escaper.ecapeVariable('$customerId') + |
| 383 '/devices/chromeos/' + |
| 384 commons.Escaper.ecapeVariable('$resourceId') + |
| 385 '/action'; |
364 | 386 |
365 var _response = _requester.request(_url, | 387 var _response = _requester.request(_url, "POST", |
366 "POST", | 388 body: _body, |
367 body: _body, | 389 queryParams: _queryParams, |
368 queryParams: _queryParams, | 390 uploadOptions: _uploadOptions, |
369 uploadOptions: _uploadOptions, | 391 uploadMedia: _uploadMedia, |
370 uploadMedia: _uploadMedia, | 392 downloadOptions: _downloadOptions); |
371 downloadOptions: _downloadOptions); | |
372 return _response.then((data) => null); | 393 return _response.then((data) => null); |
373 } | 394 } |
374 | 395 |
375 /** | 396 /// Retrieve Chrome OS Device |
376 * Retrieve Chrome OS Device | 397 /// |
377 * | 398 /// Request parameters: |
378 * Request parameters: | 399 /// |
379 * | 400 /// [customerId] - Immutable ID of the G Suite account |
380 * [customerId] - Immutable ID of the G Suite account | 401 /// |
381 * | 402 /// [deviceId] - Immutable ID of Chrome OS Device |
382 * [deviceId] - Immutable ID of Chrome OS Device | 403 /// |
383 * | 404 /// [projection] - Restrict information returned to a set of selected fields. |
384 * [projection] - Restrict information returned to a set of selected fields. | 405 /// Possible string values are: |
385 * Possible string values are: | 406 /// - "BASIC" : Includes only the basic metadata fields (e.g., deviceId, |
386 * - "BASIC" : Includes only the basic metadata fields (e.g., deviceId, | 407 /// serialNumber, status, and user) |
387 * serialNumber, status, and user) | 408 /// - "FULL" : Includes all metadata fields |
388 * - "FULL" : Includes all metadata fields | 409 /// |
389 * | 410 /// Completes with a [ChromeOsDevice]. |
390 * Completes with a [ChromeOsDevice]. | 411 /// |
391 * | 412 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
392 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 413 /// an error. |
393 * error. | 414 /// |
394 * | 415 /// If the used [http.Client] completes with an error when making a REST |
395 * If the used [http.Client] completes with an error when making a REST call, | 416 /// call, this method will complete with the same error. |
396 * this method will complete with the same error. | 417 async.Future<ChromeOsDevice> get(core.String customerId, core.String deviceId, |
397 */ | 418 {core.String projection}) { |
398 async.Future<ChromeOsDevice> get(core.String customerId, core.String deviceId,
{core.String projection}) { | |
399 var _url = null; | 419 var _url = null; |
400 var _queryParams = new core.Map(); | 420 var _queryParams = new core.Map(); |
401 var _uploadMedia = null; | 421 var _uploadMedia = null; |
402 var _uploadOptions = null; | 422 var _uploadOptions = null; |
403 var _downloadOptions = commons.DownloadOptions.Metadata; | 423 var _downloadOptions = commons.DownloadOptions.Metadata; |
404 var _body = null; | 424 var _body = null; |
405 | 425 |
406 if (customerId == null) { | 426 if (customerId == null) { |
407 throw new core.ArgumentError("Parameter customerId is required."); | 427 throw new core.ArgumentError("Parameter customerId is required."); |
408 } | 428 } |
409 if (deviceId == null) { | 429 if (deviceId == null) { |
410 throw new core.ArgumentError("Parameter deviceId is required."); | 430 throw new core.ArgumentError("Parameter deviceId is required."); |
411 } | 431 } |
412 if (projection != null) { | 432 if (projection != null) { |
413 _queryParams["projection"] = [projection]; | 433 _queryParams["projection"] = [projection]; |
414 } | 434 } |
415 | 435 |
416 _url = 'customer/' + commons.Escaper.ecapeVariable('$customerId') + '/device
s/chromeos/' + commons.Escaper.ecapeVariable('$deviceId'); | 436 _url = 'customer/' + |
| 437 commons.Escaper.ecapeVariable('$customerId') + |
| 438 '/devices/chromeos/' + |
| 439 commons.Escaper.ecapeVariable('$deviceId'); |
417 | 440 |
418 var _response = _requester.request(_url, | 441 var _response = _requester.request(_url, "GET", |
419 "GET", | 442 body: _body, |
420 body: _body, | 443 queryParams: _queryParams, |
421 queryParams: _queryParams, | 444 uploadOptions: _uploadOptions, |
422 uploadOptions: _uploadOptions, | 445 uploadMedia: _uploadMedia, |
423 uploadMedia: _uploadMedia, | 446 downloadOptions: _downloadOptions); |
424 downloadOptions: _downloadOptions); | |
425 return _response.then((data) => new ChromeOsDevice.fromJson(data)); | 447 return _response.then((data) => new ChromeOsDevice.fromJson(data)); |
426 } | 448 } |
427 | 449 |
428 /** | 450 /// Retrieve all Chrome OS Devices of a customer (paginated) |
429 * Retrieve all Chrome OS Devices of a customer (paginated) | 451 /// |
430 * | 452 /// Request parameters: |
431 * Request parameters: | 453 /// |
432 * | 454 /// [customerId] - Immutable ID of the G Suite account |
433 * [customerId] - Immutable ID of the G Suite account | 455 /// |
434 * | 456 /// [maxResults] - Maximum number of results to return. Default is 100 |
435 * [maxResults] - Maximum number of results to return. Default is 100 | 457 /// |
436 * | 458 /// [orderBy] - Column to use for sorting results |
437 * [orderBy] - Column to use for sorting results | 459 /// Possible string values are: |
438 * Possible string values are: | 460 /// - "annotatedLocation" : Chromebook location as annotated by the |
439 * - "annotatedLocation" : Chromebook location as annotated by the | 461 /// administrator. |
440 * administrator. | 462 /// - "annotatedUser" : Chromebook user as annotated by administrator. |
441 * - "annotatedUser" : Chromebook user as annotated by administrator. | 463 /// - "lastSync" : Chromebook last sync. |
442 * - "lastSync" : Chromebook last sync. | 464 /// - "notes" : Chromebook notes as annotated by the administrator. |
443 * - "notes" : Chromebook notes as annotated by the administrator. | 465 /// - "serialNumber" : Chromebook Serial Number. |
444 * - "serialNumber" : Chromebook Serial Number. | 466 /// - "status" : Chromebook status. |
445 * - "status" : Chromebook status. | 467 /// - "supportEndDate" : Chromebook support end date. |
446 * - "supportEndDate" : Chromebook support end date. | 468 /// |
447 * | 469 /// [orgUnitPath] - Full path of the organization unit or its Id |
448 * [orgUnitPath] - Full path of the organization unit or its Id | 470 /// |
449 * | 471 /// [pageToken] - Token to specify next page in the list |
450 * [pageToken] - Token to specify next page in the list | 472 /// |
451 * | 473 /// [projection] - Restrict information returned to a set of selected fields. |
452 * [projection] - Restrict information returned to a set of selected fields. | 474 /// Possible string values are: |
453 * Possible string values are: | 475 /// - "BASIC" : Includes only the basic metadata fields (e.g., deviceId, |
454 * - "BASIC" : Includes only the basic metadata fields (e.g., deviceId, | 476 /// serialNumber, status, and user) |
455 * serialNumber, status, and user) | 477 /// - "FULL" : Includes all metadata fields |
456 * - "FULL" : Includes all metadata fields | 478 /// |
457 * | 479 /// [query] - Search string in the format given at |
458 * [query] - Search string in the format given at | 480 /// http://support.google.com/chromeos/a/bin/answer.py?hl=en&answer=1698333 |
459 * http://support.google.com/chromeos/a/bin/answer.py?hl=en&answer=1698333 | 481 /// |
460 * | 482 /// [sortOrder] - Whether to return results in ascending or descending order. |
461 * [sortOrder] - Whether to return results in ascending or descending order. | 483 /// Only of use when orderBy is also used |
462 * Only of use when orderBy is also used | 484 /// Possible string values are: |
463 * Possible string values are: | 485 /// - "ASCENDING" : Ascending order. |
464 * - "ASCENDING" : Ascending order. | 486 /// - "DESCENDING" : Descending order. |
465 * - "DESCENDING" : Descending order. | 487 /// |
466 * | 488 /// Completes with a [ChromeOsDevices]. |
467 * Completes with a [ChromeOsDevices]. | 489 /// |
468 * | 490 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
469 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 491 /// an error. |
470 * error. | 492 /// |
471 * | 493 /// If the used [http.Client] completes with an error when making a REST |
472 * If the used [http.Client] completes with an error when making a REST call, | 494 /// call, this method will complete with the same error. |
473 * this method will complete with the same error. | 495 async.Future<ChromeOsDevices> list(core.String customerId, |
474 */ | 496 {core.int maxResults, |
475 async.Future<ChromeOsDevices> list(core.String customerId, {core.int maxResult
s, core.String orderBy, core.String orgUnitPath, core.String pageToken, core.Str
ing projection, core.String query, core.String sortOrder}) { | 497 core.String orderBy, |
| 498 core.String orgUnitPath, |
| 499 core.String pageToken, |
| 500 core.String projection, |
| 501 core.String query, |
| 502 core.String sortOrder}) { |
476 var _url = null; | 503 var _url = null; |
477 var _queryParams = new core.Map(); | 504 var _queryParams = new core.Map(); |
478 var _uploadMedia = null; | 505 var _uploadMedia = null; |
479 var _uploadOptions = null; | 506 var _uploadOptions = null; |
480 var _downloadOptions = commons.DownloadOptions.Metadata; | 507 var _downloadOptions = commons.DownloadOptions.Metadata; |
481 var _body = null; | 508 var _body = null; |
482 | 509 |
483 if (customerId == null) { | 510 if (customerId == null) { |
484 throw new core.ArgumentError("Parameter customerId is required."); | 511 throw new core.ArgumentError("Parameter customerId is required."); |
485 } | 512 } |
(...skipping 12 matching lines...) Expand all Loading... |
498 if (projection != null) { | 525 if (projection != null) { |
499 _queryParams["projection"] = [projection]; | 526 _queryParams["projection"] = [projection]; |
500 } | 527 } |
501 if (query != null) { | 528 if (query != null) { |
502 _queryParams["query"] = [query]; | 529 _queryParams["query"] = [query]; |
503 } | 530 } |
504 if (sortOrder != null) { | 531 if (sortOrder != null) { |
505 _queryParams["sortOrder"] = [sortOrder]; | 532 _queryParams["sortOrder"] = [sortOrder]; |
506 } | 533 } |
507 | 534 |
508 _url = 'customer/' + commons.Escaper.ecapeVariable('$customerId') + '/device
s/chromeos'; | 535 _url = 'customer/' + |
| 536 commons.Escaper.ecapeVariable('$customerId') + |
| 537 '/devices/chromeos'; |
509 | 538 |
510 var _response = _requester.request(_url, | 539 var _response = _requester.request(_url, "GET", |
511 "GET", | 540 body: _body, |
512 body: _body, | 541 queryParams: _queryParams, |
513 queryParams: _queryParams, | 542 uploadOptions: _uploadOptions, |
514 uploadOptions: _uploadOptions, | 543 uploadMedia: _uploadMedia, |
515 uploadMedia: _uploadMedia, | 544 downloadOptions: _downloadOptions); |
516 downloadOptions: _downloadOptions); | |
517 return _response.then((data) => new ChromeOsDevices.fromJson(data)); | 545 return _response.then((data) => new ChromeOsDevices.fromJson(data)); |
518 } | 546 } |
519 | 547 |
520 /** | 548 /// Move or insert multiple Chrome OS Devices to Organization Unit |
521 * Move or insert multiple Chrome OS Devices to Organization Unit | 549 /// |
522 * | 550 /// [request] - The metadata request object. |
523 * [request] - The metadata request object. | 551 /// |
524 * | 552 /// Request parameters: |
525 * Request parameters: | 553 /// |
526 * | 554 /// [customerId] - Immutable ID of the G Suite account |
527 * [customerId] - Immutable ID of the G Suite account | 555 /// |
528 * | 556 /// [orgUnitPath] - Full path of the target organization unit or its Id |
529 * [orgUnitPath] - Full path of the target organization unit or its Id | 557 /// |
530 * | 558 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
531 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 559 /// an error. |
532 * error. | 560 /// |
533 * | 561 /// If the used [http.Client] completes with an error when making a REST |
534 * If the used [http.Client] completes with an error when making a REST call, | 562 /// call, this method will complete with the same error. |
535 * this method will complete with the same error. | 563 async.Future moveDevicesToOu(ChromeOsMoveDevicesToOu request, |
536 */ | 564 core.String customerId, core.String orgUnitPath) { |
537 async.Future moveDevicesToOu(ChromeOsMoveDevicesToOu request, core.String cust
omerId, core.String orgUnitPath) { | |
538 var _url = null; | 565 var _url = null; |
539 var _queryParams = new core.Map(); | 566 var _queryParams = new core.Map(); |
540 var _uploadMedia = null; | 567 var _uploadMedia = null; |
541 var _uploadOptions = null; | 568 var _uploadOptions = null; |
542 var _downloadOptions = commons.DownloadOptions.Metadata; | 569 var _downloadOptions = commons.DownloadOptions.Metadata; |
543 var _body = null; | 570 var _body = null; |
544 | 571 |
545 if (request != null) { | 572 if (request != null) { |
546 _body = convert.JSON.encode((request).toJson()); | 573 _body = convert.JSON.encode((request).toJson()); |
547 } | 574 } |
548 if (customerId == null) { | 575 if (customerId == null) { |
549 throw new core.ArgumentError("Parameter customerId is required."); | 576 throw new core.ArgumentError("Parameter customerId is required."); |
550 } | 577 } |
551 if (orgUnitPath == null) { | 578 if (orgUnitPath == null) { |
552 throw new core.ArgumentError("Parameter orgUnitPath is required."); | 579 throw new core.ArgumentError("Parameter orgUnitPath is required."); |
553 } | 580 } |
554 _queryParams["orgUnitPath"] = [orgUnitPath]; | 581 _queryParams["orgUnitPath"] = [orgUnitPath]; |
555 | 582 |
556 _downloadOptions = null; | 583 _downloadOptions = null; |
557 | 584 |
558 _url = 'customer/' + commons.Escaper.ecapeVariable('$customerId') + '/device
s/chromeos/moveDevicesToOu'; | 585 _url = 'customer/' + |
| 586 commons.Escaper.ecapeVariable('$customerId') + |
| 587 '/devices/chromeos/moveDevicesToOu'; |
559 | 588 |
560 var _response = _requester.request(_url, | 589 var _response = _requester.request(_url, "POST", |
561 "POST", | 590 body: _body, |
562 body: _body, | 591 queryParams: _queryParams, |
563 queryParams: _queryParams, | 592 uploadOptions: _uploadOptions, |
564 uploadOptions: _uploadOptions, | 593 uploadMedia: _uploadMedia, |
565 uploadMedia: _uploadMedia, | 594 downloadOptions: _downloadOptions); |
566 downloadOptions: _downloadOptions); | |
567 return _response.then((data) => null); | 595 return _response.then((data) => null); |
568 } | 596 } |
569 | 597 |
570 /** | 598 /// Update Chrome OS Device. This method supports patch semantics. |
571 * Update Chrome OS Device. This method supports patch semantics. | 599 /// |
572 * | 600 /// [request] - The metadata request object. |
573 * [request] - The metadata request object. | 601 /// |
574 * | 602 /// Request parameters: |
575 * Request parameters: | 603 /// |
576 * | 604 /// [customerId] - Immutable ID of the G Suite account |
577 * [customerId] - Immutable ID of the G Suite account | 605 /// |
578 * | 606 /// [deviceId] - Immutable ID of Chrome OS Device |
579 * [deviceId] - Immutable ID of Chrome OS Device | 607 /// |
580 * | 608 /// [projection] - Restrict information returned to a set of selected fields. |
581 * [projection] - Restrict information returned to a set of selected fields. | 609 /// Possible string values are: |
582 * Possible string values are: | 610 /// - "BASIC" : Includes only the basic metadata fields (e.g., deviceId, |
583 * - "BASIC" : Includes only the basic metadata fields (e.g., deviceId, | 611 /// serialNumber, status, and user) |
584 * serialNumber, status, and user) | 612 /// - "FULL" : Includes all metadata fields |
585 * - "FULL" : Includes all metadata fields | 613 /// |
586 * | 614 /// Completes with a [ChromeOsDevice]. |
587 * Completes with a [ChromeOsDevice]. | 615 /// |
588 * | 616 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
589 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 617 /// an error. |
590 * error. | 618 /// |
591 * | 619 /// If the used [http.Client] completes with an error when making a REST |
592 * If the used [http.Client] completes with an error when making a REST call, | 620 /// call, this method will complete with the same error. |
593 * this method will complete with the same error. | 621 async.Future<ChromeOsDevice> patch( |
594 */ | 622 ChromeOsDevice request, core.String customerId, core.String deviceId, |
595 async.Future<ChromeOsDevice> patch(ChromeOsDevice request, core.String custome
rId, core.String deviceId, {core.String projection}) { | 623 {core.String projection}) { |
596 var _url = null; | 624 var _url = null; |
597 var _queryParams = new core.Map(); | 625 var _queryParams = new core.Map(); |
598 var _uploadMedia = null; | 626 var _uploadMedia = null; |
599 var _uploadOptions = null; | 627 var _uploadOptions = null; |
600 var _downloadOptions = commons.DownloadOptions.Metadata; | 628 var _downloadOptions = commons.DownloadOptions.Metadata; |
601 var _body = null; | 629 var _body = null; |
602 | 630 |
603 if (request != null) { | 631 if (request != null) { |
604 _body = convert.JSON.encode((request).toJson()); | 632 _body = convert.JSON.encode((request).toJson()); |
605 } | 633 } |
606 if (customerId == null) { | 634 if (customerId == null) { |
607 throw new core.ArgumentError("Parameter customerId is required."); | 635 throw new core.ArgumentError("Parameter customerId is required."); |
608 } | 636 } |
609 if (deviceId == null) { | 637 if (deviceId == null) { |
610 throw new core.ArgumentError("Parameter deviceId is required."); | 638 throw new core.ArgumentError("Parameter deviceId is required."); |
611 } | 639 } |
612 if (projection != null) { | 640 if (projection != null) { |
613 _queryParams["projection"] = [projection]; | 641 _queryParams["projection"] = [projection]; |
614 } | 642 } |
615 | 643 |
616 _url = 'customer/' + commons.Escaper.ecapeVariable('$customerId') + '/device
s/chromeos/' + commons.Escaper.ecapeVariable('$deviceId'); | 644 _url = 'customer/' + |
| 645 commons.Escaper.ecapeVariable('$customerId') + |
| 646 '/devices/chromeos/' + |
| 647 commons.Escaper.ecapeVariable('$deviceId'); |
617 | 648 |
618 var _response = _requester.request(_url, | 649 var _response = _requester.request(_url, "PATCH", |
619 "PATCH", | 650 body: _body, |
620 body: _body, | 651 queryParams: _queryParams, |
621 queryParams: _queryParams, | 652 uploadOptions: _uploadOptions, |
622 uploadOptions: _uploadOptions, | 653 uploadMedia: _uploadMedia, |
623 uploadMedia: _uploadMedia, | 654 downloadOptions: _downloadOptions); |
624 downloadOptions: _downloadOptions); | |
625 return _response.then((data) => new ChromeOsDevice.fromJson(data)); | 655 return _response.then((data) => new ChromeOsDevice.fromJson(data)); |
626 } | 656 } |
627 | 657 |
628 /** | 658 /// Update Chrome OS Device |
629 * Update Chrome OS Device | 659 /// |
630 * | 660 /// [request] - The metadata request object. |
631 * [request] - The metadata request object. | 661 /// |
632 * | 662 /// Request parameters: |
633 * Request parameters: | 663 /// |
634 * | 664 /// [customerId] - Immutable ID of the G Suite account |
635 * [customerId] - Immutable ID of the G Suite account | 665 /// |
636 * | 666 /// [deviceId] - Immutable ID of Chrome OS Device |
637 * [deviceId] - Immutable ID of Chrome OS Device | 667 /// |
638 * | 668 /// [projection] - Restrict information returned to a set of selected fields. |
639 * [projection] - Restrict information returned to a set of selected fields. | 669 /// Possible string values are: |
640 * Possible string values are: | 670 /// - "BASIC" : Includes only the basic metadata fields (e.g., deviceId, |
641 * - "BASIC" : Includes only the basic metadata fields (e.g., deviceId, | 671 /// serialNumber, status, and user) |
642 * serialNumber, status, and user) | 672 /// - "FULL" : Includes all metadata fields |
643 * - "FULL" : Includes all metadata fields | 673 /// |
644 * | 674 /// Completes with a [ChromeOsDevice]. |
645 * Completes with a [ChromeOsDevice]. | 675 /// |
646 * | 676 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
647 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 677 /// an error. |
648 * error. | 678 /// |
649 * | 679 /// If the used [http.Client] completes with an error when making a REST |
650 * If the used [http.Client] completes with an error when making a REST call, | 680 /// call, this method will complete with the same error. |
651 * this method will complete with the same error. | 681 async.Future<ChromeOsDevice> update( |
652 */ | 682 ChromeOsDevice request, core.String customerId, core.String deviceId, |
653 async.Future<ChromeOsDevice> update(ChromeOsDevice request, core.String custom
erId, core.String deviceId, {core.String projection}) { | 683 {core.String projection}) { |
654 var _url = null; | 684 var _url = null; |
655 var _queryParams = new core.Map(); | 685 var _queryParams = new core.Map(); |
656 var _uploadMedia = null; | 686 var _uploadMedia = null; |
657 var _uploadOptions = null; | 687 var _uploadOptions = null; |
658 var _downloadOptions = commons.DownloadOptions.Metadata; | 688 var _downloadOptions = commons.DownloadOptions.Metadata; |
659 var _body = null; | 689 var _body = null; |
660 | 690 |
661 if (request != null) { | 691 if (request != null) { |
662 _body = convert.JSON.encode((request).toJson()); | 692 _body = convert.JSON.encode((request).toJson()); |
663 } | 693 } |
664 if (customerId == null) { | 694 if (customerId == null) { |
665 throw new core.ArgumentError("Parameter customerId is required."); | 695 throw new core.ArgumentError("Parameter customerId is required."); |
666 } | 696 } |
667 if (deviceId == null) { | 697 if (deviceId == null) { |
668 throw new core.ArgumentError("Parameter deviceId is required."); | 698 throw new core.ArgumentError("Parameter deviceId is required."); |
669 } | 699 } |
670 if (projection != null) { | 700 if (projection != null) { |
671 _queryParams["projection"] = [projection]; | 701 _queryParams["projection"] = [projection]; |
672 } | 702 } |
673 | 703 |
674 _url = 'customer/' + commons.Escaper.ecapeVariable('$customerId') + '/device
s/chromeos/' + commons.Escaper.ecapeVariable('$deviceId'); | 704 _url = 'customer/' + |
| 705 commons.Escaper.ecapeVariable('$customerId') + |
| 706 '/devices/chromeos/' + |
| 707 commons.Escaper.ecapeVariable('$deviceId'); |
675 | 708 |
676 var _response = _requester.request(_url, | 709 var _response = _requester.request(_url, "PUT", |
677 "PUT", | 710 body: _body, |
678 body: _body, | 711 queryParams: _queryParams, |
679 queryParams: _queryParams, | 712 uploadOptions: _uploadOptions, |
680 uploadOptions: _uploadOptions, | 713 uploadMedia: _uploadMedia, |
681 uploadMedia: _uploadMedia, | 714 downloadOptions: _downloadOptions); |
682 downloadOptions: _downloadOptions); | |
683 return _response.then((data) => new ChromeOsDevice.fromJson(data)); | 715 return _response.then((data) => new ChromeOsDevice.fromJson(data)); |
684 } | 716 } |
685 | |
686 } | 717 } |
687 | 718 |
688 | |
689 class CustomersResourceApi { | 719 class CustomersResourceApi { |
690 final commons.ApiRequester _requester; | 720 final commons.ApiRequester _requester; |
691 | 721 |
692 CustomersResourceApi(commons.ApiRequester client) : | 722 CustomersResourceApi(commons.ApiRequester client) : _requester = client; |
693 _requester = client; | |
694 | 723 |
695 /** | 724 /// Retrieves a customer. |
696 * Retrieves a customer. | 725 /// |
697 * | 726 /// Request parameters: |
698 * Request parameters: | 727 /// |
699 * | 728 /// [customerKey] - Id of the customer to be retrieved |
700 * [customerKey] - Id of the customer to be retrieved | 729 /// |
701 * | 730 /// Completes with a [Customer]. |
702 * Completes with a [Customer]. | 731 /// |
703 * | 732 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
704 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 733 /// an error. |
705 * error. | 734 /// |
706 * | 735 /// If the used [http.Client] completes with an error when making a REST |
707 * If the used [http.Client] completes with an error when making a REST call, | 736 /// call, this method will complete with the same error. |
708 * this method will complete with the same error. | |
709 */ | |
710 async.Future<Customer> get(core.String customerKey) { | 737 async.Future<Customer> get(core.String customerKey) { |
711 var _url = null; | 738 var _url = null; |
712 var _queryParams = new core.Map(); | 739 var _queryParams = new core.Map(); |
713 var _uploadMedia = null; | 740 var _uploadMedia = null; |
714 var _uploadOptions = null; | 741 var _uploadOptions = null; |
715 var _downloadOptions = commons.DownloadOptions.Metadata; | 742 var _downloadOptions = commons.DownloadOptions.Metadata; |
716 var _body = null; | 743 var _body = null; |
717 | 744 |
718 if (customerKey == null) { | 745 if (customerKey == null) { |
719 throw new core.ArgumentError("Parameter customerKey is required."); | 746 throw new core.ArgumentError("Parameter customerKey is required."); |
720 } | 747 } |
721 | 748 |
722 _url = 'customers/' + commons.Escaper.ecapeVariable('$customerKey'); | 749 _url = 'customers/' + commons.Escaper.ecapeVariable('$customerKey'); |
723 | 750 |
724 var _response = _requester.request(_url, | 751 var _response = _requester.request(_url, "GET", |
725 "GET", | 752 body: _body, |
726 body: _body, | 753 queryParams: _queryParams, |
727 queryParams: _queryParams, | 754 uploadOptions: _uploadOptions, |
728 uploadOptions: _uploadOptions, | 755 uploadMedia: _uploadMedia, |
729 uploadMedia: _uploadMedia, | 756 downloadOptions: _downloadOptions); |
730 downloadOptions: _downloadOptions); | |
731 return _response.then((data) => new Customer.fromJson(data)); | 757 return _response.then((data) => new Customer.fromJson(data)); |
732 } | 758 } |
733 | 759 |
734 /** | 760 /// Updates a customer. This method supports patch semantics. |
735 * Updates a customer. This method supports patch semantics. | 761 /// |
736 * | 762 /// [request] - The metadata request object. |
737 * [request] - The metadata request object. | 763 /// |
738 * | 764 /// Request parameters: |
739 * Request parameters: | 765 /// |
740 * | 766 /// [customerKey] - Id of the customer to be updated |
741 * [customerKey] - Id of the customer to be updated | 767 /// |
742 * | 768 /// Completes with a [Customer]. |
743 * Completes with a [Customer]. | 769 /// |
744 * | 770 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
745 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 771 /// an error. |
746 * error. | 772 /// |
747 * | 773 /// If the used [http.Client] completes with an error when making a REST |
748 * If the used [http.Client] completes with an error when making a REST call, | 774 /// call, this method will complete with the same error. |
749 * this method will complete with the same error. | |
750 */ | |
751 async.Future<Customer> patch(Customer request, core.String customerKey) { | 775 async.Future<Customer> patch(Customer request, core.String customerKey) { |
752 var _url = null; | 776 var _url = null; |
753 var _queryParams = new core.Map(); | 777 var _queryParams = new core.Map(); |
754 var _uploadMedia = null; | 778 var _uploadMedia = null; |
755 var _uploadOptions = null; | 779 var _uploadOptions = null; |
756 var _downloadOptions = commons.DownloadOptions.Metadata; | 780 var _downloadOptions = commons.DownloadOptions.Metadata; |
757 var _body = null; | 781 var _body = null; |
758 | 782 |
759 if (request != null) { | 783 if (request != null) { |
760 _body = convert.JSON.encode((request).toJson()); | 784 _body = convert.JSON.encode((request).toJson()); |
761 } | 785 } |
762 if (customerKey == null) { | 786 if (customerKey == null) { |
763 throw new core.ArgumentError("Parameter customerKey is required."); | 787 throw new core.ArgumentError("Parameter customerKey is required."); |
764 } | 788 } |
765 | 789 |
766 _url = 'customers/' + commons.Escaper.ecapeVariable('$customerKey'); | 790 _url = 'customers/' + commons.Escaper.ecapeVariable('$customerKey'); |
767 | 791 |
768 var _response = _requester.request(_url, | 792 var _response = _requester.request(_url, "PATCH", |
769 "PATCH", | 793 body: _body, |
770 body: _body, | 794 queryParams: _queryParams, |
771 queryParams: _queryParams, | 795 uploadOptions: _uploadOptions, |
772 uploadOptions: _uploadOptions, | 796 uploadMedia: _uploadMedia, |
773 uploadMedia: _uploadMedia, | 797 downloadOptions: _downloadOptions); |
774 downloadOptions: _downloadOptions); | |
775 return _response.then((data) => new Customer.fromJson(data)); | 798 return _response.then((data) => new Customer.fromJson(data)); |
776 } | 799 } |
777 | 800 |
778 /** | 801 /// Updates a customer. |
779 * Updates a customer. | 802 /// |
780 * | 803 /// [request] - The metadata request object. |
781 * [request] - The metadata request object. | 804 /// |
782 * | 805 /// Request parameters: |
783 * Request parameters: | 806 /// |
784 * | 807 /// [customerKey] - Id of the customer to be updated |
785 * [customerKey] - Id of the customer to be updated | 808 /// |
786 * | 809 /// Completes with a [Customer]. |
787 * Completes with a [Customer]. | 810 /// |
788 * | 811 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
789 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 812 /// an error. |
790 * error. | 813 /// |
791 * | 814 /// If the used [http.Client] completes with an error when making a REST |
792 * If the used [http.Client] completes with an error when making a REST call, | 815 /// call, this method will complete with the same error. |
793 * this method will complete with the same error. | |
794 */ | |
795 async.Future<Customer> update(Customer request, core.String customerKey) { | 816 async.Future<Customer> update(Customer request, core.String customerKey) { |
796 var _url = null; | 817 var _url = null; |
797 var _queryParams = new core.Map(); | 818 var _queryParams = new core.Map(); |
798 var _uploadMedia = null; | 819 var _uploadMedia = null; |
799 var _uploadOptions = null; | 820 var _uploadOptions = null; |
800 var _downloadOptions = commons.DownloadOptions.Metadata; | 821 var _downloadOptions = commons.DownloadOptions.Metadata; |
801 var _body = null; | 822 var _body = null; |
802 | 823 |
803 if (request != null) { | 824 if (request != null) { |
804 _body = convert.JSON.encode((request).toJson()); | 825 _body = convert.JSON.encode((request).toJson()); |
805 } | 826 } |
806 if (customerKey == null) { | 827 if (customerKey == null) { |
807 throw new core.ArgumentError("Parameter customerKey is required."); | 828 throw new core.ArgumentError("Parameter customerKey is required."); |
808 } | 829 } |
809 | 830 |
810 _url = 'customers/' + commons.Escaper.ecapeVariable('$customerKey'); | 831 _url = 'customers/' + commons.Escaper.ecapeVariable('$customerKey'); |
811 | 832 |
812 var _response = _requester.request(_url, | 833 var _response = _requester.request(_url, "PUT", |
813 "PUT", | 834 body: _body, |
814 body: _body, | 835 queryParams: _queryParams, |
815 queryParams: _queryParams, | 836 uploadOptions: _uploadOptions, |
816 uploadOptions: _uploadOptions, | 837 uploadMedia: _uploadMedia, |
817 uploadMedia: _uploadMedia, | 838 downloadOptions: _downloadOptions); |
818 downloadOptions: _downloadOptions); | |
819 return _response.then((data) => new Customer.fromJson(data)); | 839 return _response.then((data) => new Customer.fromJson(data)); |
820 } | 840 } |
821 | |
822 } | 841 } |
823 | 842 |
824 | |
825 class DomainAliasesResourceApi { | 843 class DomainAliasesResourceApi { |
826 final commons.ApiRequester _requester; | 844 final commons.ApiRequester _requester; |
827 | 845 |
828 DomainAliasesResourceApi(commons.ApiRequester client) : | 846 DomainAliasesResourceApi(commons.ApiRequester client) : _requester = client; |
829 _requester = client; | |
830 | 847 |
831 /** | 848 /// Deletes a Domain Alias of the customer. |
832 * Deletes a Domain Alias of the customer. | 849 /// |
833 * | 850 /// Request parameters: |
834 * Request parameters: | 851 /// |
835 * | 852 /// [customer] - Immutable ID of the G Suite account. |
836 * [customer] - Immutable ID of the G Suite account. | 853 /// |
837 * | 854 /// [domainAliasName] - Name of domain alias to be retrieved. |
838 * [domainAliasName] - Name of domain alias to be retrieved. | 855 /// |
839 * | 856 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
840 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 857 /// an error. |
841 * error. | 858 /// |
842 * | 859 /// If the used [http.Client] completes with an error when making a REST |
843 * If the used [http.Client] completes with an error when making a REST call, | 860 /// call, this method will complete with the same error. |
844 * this method will complete with the same error. | |
845 */ | |
846 async.Future delete(core.String customer, core.String domainAliasName) { | 861 async.Future delete(core.String customer, core.String domainAliasName) { |
847 var _url = null; | 862 var _url = null; |
848 var _queryParams = new core.Map(); | 863 var _queryParams = new core.Map(); |
849 var _uploadMedia = null; | 864 var _uploadMedia = null; |
850 var _uploadOptions = null; | 865 var _uploadOptions = null; |
851 var _downloadOptions = commons.DownloadOptions.Metadata; | 866 var _downloadOptions = commons.DownloadOptions.Metadata; |
852 var _body = null; | 867 var _body = null; |
853 | 868 |
854 if (customer == null) { | 869 if (customer == null) { |
855 throw new core.ArgumentError("Parameter customer is required."); | 870 throw new core.ArgumentError("Parameter customer is required."); |
856 } | 871 } |
857 if (domainAliasName == null) { | 872 if (domainAliasName == null) { |
858 throw new core.ArgumentError("Parameter domainAliasName is required."); | 873 throw new core.ArgumentError("Parameter domainAliasName is required."); |
859 } | 874 } |
860 | 875 |
861 _downloadOptions = null; | 876 _downloadOptions = null; |
862 | 877 |
863 _url = 'customer/' + commons.Escaper.ecapeVariable('$customer') + '/domainal
iases/' + commons.Escaper.ecapeVariable('$domainAliasName'); | 878 _url = 'customer/' + |
| 879 commons.Escaper.ecapeVariable('$customer') + |
| 880 '/domainaliases/' + |
| 881 commons.Escaper.ecapeVariable('$domainAliasName'); |
864 | 882 |
865 var _response = _requester.request(_url, | 883 var _response = _requester.request(_url, "DELETE", |
866 "DELETE", | 884 body: _body, |
867 body: _body, | 885 queryParams: _queryParams, |
868 queryParams: _queryParams, | 886 uploadOptions: _uploadOptions, |
869 uploadOptions: _uploadOptions, | 887 uploadMedia: _uploadMedia, |
870 uploadMedia: _uploadMedia, | 888 downloadOptions: _downloadOptions); |
871 downloadOptions: _downloadOptions); | |
872 return _response.then((data) => null); | 889 return _response.then((data) => null); |
873 } | 890 } |
874 | 891 |
875 /** | 892 /// Retrieves a domain alias of the customer. |
876 * Retrieves a domain alias of the customer. | 893 /// |
877 * | 894 /// Request parameters: |
878 * Request parameters: | 895 /// |
879 * | 896 /// [customer] - Immutable ID of the G Suite account. |
880 * [customer] - Immutable ID of the G Suite account. | 897 /// |
881 * | 898 /// [domainAliasName] - Name of domain alias to be retrieved. |
882 * [domainAliasName] - Name of domain alias to be retrieved. | 899 /// |
883 * | 900 /// Completes with a [DomainAlias]. |
884 * Completes with a [DomainAlias]. | 901 /// |
885 * | 902 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
886 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 903 /// an error. |
887 * error. | 904 /// |
888 * | 905 /// If the used [http.Client] completes with an error when making a REST |
889 * If the used [http.Client] completes with an error when making a REST call, | 906 /// call, this method will complete with the same error. |
890 * this method will complete with the same error. | 907 async.Future<DomainAlias> get( |
891 */ | 908 core.String customer, core.String domainAliasName) { |
892 async.Future<DomainAlias> get(core.String customer, core.String domainAliasNam
e) { | |
893 var _url = null; | 909 var _url = null; |
894 var _queryParams = new core.Map(); | 910 var _queryParams = new core.Map(); |
895 var _uploadMedia = null; | 911 var _uploadMedia = null; |
896 var _uploadOptions = null; | 912 var _uploadOptions = null; |
897 var _downloadOptions = commons.DownloadOptions.Metadata; | 913 var _downloadOptions = commons.DownloadOptions.Metadata; |
898 var _body = null; | 914 var _body = null; |
899 | 915 |
900 if (customer == null) { | 916 if (customer == null) { |
901 throw new core.ArgumentError("Parameter customer is required."); | 917 throw new core.ArgumentError("Parameter customer is required."); |
902 } | 918 } |
903 if (domainAliasName == null) { | 919 if (domainAliasName == null) { |
904 throw new core.ArgumentError("Parameter domainAliasName is required."); | 920 throw new core.ArgumentError("Parameter domainAliasName is required."); |
905 } | 921 } |
906 | 922 |
907 _url = 'customer/' + commons.Escaper.ecapeVariable('$customer') + '/domainal
iases/' + commons.Escaper.ecapeVariable('$domainAliasName'); | 923 _url = 'customer/' + |
| 924 commons.Escaper.ecapeVariable('$customer') + |
| 925 '/domainaliases/' + |
| 926 commons.Escaper.ecapeVariable('$domainAliasName'); |
908 | 927 |
909 var _response = _requester.request(_url, | 928 var _response = _requester.request(_url, "GET", |
910 "GET", | 929 body: _body, |
911 body: _body, | 930 queryParams: _queryParams, |
912 queryParams: _queryParams, | 931 uploadOptions: _uploadOptions, |
913 uploadOptions: _uploadOptions, | 932 uploadMedia: _uploadMedia, |
914 uploadMedia: _uploadMedia, | 933 downloadOptions: _downloadOptions); |
915 downloadOptions: _downloadOptions); | |
916 return _response.then((data) => new DomainAlias.fromJson(data)); | 934 return _response.then((data) => new DomainAlias.fromJson(data)); |
917 } | 935 } |
918 | 936 |
919 /** | 937 /// Inserts a Domain alias of the customer. |
920 * Inserts a Domain alias of the customer. | 938 /// |
921 * | 939 /// [request] - The metadata request object. |
922 * [request] - The metadata request object. | 940 /// |
923 * | 941 /// Request parameters: |
924 * Request parameters: | 942 /// |
925 * | 943 /// [customer] - Immutable ID of the G Suite account. |
926 * [customer] - Immutable ID of the G Suite account. | 944 /// |
927 * | 945 /// Completes with a [DomainAlias]. |
928 * Completes with a [DomainAlias]. | 946 /// |
929 * | 947 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
930 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 948 /// an error. |
931 * error. | 949 /// |
932 * | 950 /// If the used [http.Client] completes with an error when making a REST |
933 * If the used [http.Client] completes with an error when making a REST call, | 951 /// call, this method will complete with the same error. |
934 * this method will complete with the same error. | |
935 */ | |
936 async.Future<DomainAlias> insert(DomainAlias request, core.String customer) { | 952 async.Future<DomainAlias> insert(DomainAlias request, core.String customer) { |
937 var _url = null; | 953 var _url = null; |
938 var _queryParams = new core.Map(); | 954 var _queryParams = new core.Map(); |
939 var _uploadMedia = null; | 955 var _uploadMedia = null; |
940 var _uploadOptions = null; | 956 var _uploadOptions = null; |
941 var _downloadOptions = commons.DownloadOptions.Metadata; | 957 var _downloadOptions = commons.DownloadOptions.Metadata; |
942 var _body = null; | 958 var _body = null; |
943 | 959 |
944 if (request != null) { | 960 if (request != null) { |
945 _body = convert.JSON.encode((request).toJson()); | 961 _body = convert.JSON.encode((request).toJson()); |
946 } | 962 } |
947 if (customer == null) { | 963 if (customer == null) { |
948 throw new core.ArgumentError("Parameter customer is required."); | 964 throw new core.ArgumentError("Parameter customer is required."); |
949 } | 965 } |
950 | 966 |
951 _url = 'customer/' + commons.Escaper.ecapeVariable('$customer') + '/domainal
iases'; | 967 _url = 'customer/' + |
| 968 commons.Escaper.ecapeVariable('$customer') + |
| 969 '/domainaliases'; |
952 | 970 |
953 var _response = _requester.request(_url, | 971 var _response = _requester.request(_url, "POST", |
954 "POST", | 972 body: _body, |
955 body: _body, | 973 queryParams: _queryParams, |
956 queryParams: _queryParams, | 974 uploadOptions: _uploadOptions, |
957 uploadOptions: _uploadOptions, | 975 uploadMedia: _uploadMedia, |
958 uploadMedia: _uploadMedia, | 976 downloadOptions: _downloadOptions); |
959 downloadOptions: _downloadOptions); | |
960 return _response.then((data) => new DomainAlias.fromJson(data)); | 977 return _response.then((data) => new DomainAlias.fromJson(data)); |
961 } | 978 } |
962 | 979 |
963 /** | 980 /// Lists the domain aliases of the customer. |
964 * Lists the domain aliases of the customer. | 981 /// |
965 * | 982 /// Request parameters: |
966 * Request parameters: | 983 /// |
967 * | 984 /// [customer] - Immutable ID of the G Suite account. |
968 * [customer] - Immutable ID of the G Suite account. | 985 /// |
969 * | 986 /// [parentDomainName] - Name of the parent domain for which domain aliases |
970 * [parentDomainName] - Name of the parent domain for which domain aliases are | 987 /// are to be fetched. |
971 * to be fetched. | 988 /// |
972 * | 989 /// Completes with a [DomainAliases]. |
973 * Completes with a [DomainAliases]. | 990 /// |
974 * | 991 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
975 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 992 /// an error. |
976 * error. | 993 /// |
977 * | 994 /// If the used [http.Client] completes with an error when making a REST |
978 * If the used [http.Client] completes with an error when making a REST call, | 995 /// call, this method will complete with the same error. |
979 * this method will complete with the same error. | 996 async.Future<DomainAliases> list(core.String customer, |
980 */ | 997 {core.String parentDomainName}) { |
981 async.Future<DomainAliases> list(core.String customer, {core.String parentDoma
inName}) { | |
982 var _url = null; | 998 var _url = null; |
983 var _queryParams = new core.Map(); | 999 var _queryParams = new core.Map(); |
984 var _uploadMedia = null; | 1000 var _uploadMedia = null; |
985 var _uploadOptions = null; | 1001 var _uploadOptions = null; |
986 var _downloadOptions = commons.DownloadOptions.Metadata; | 1002 var _downloadOptions = commons.DownloadOptions.Metadata; |
987 var _body = null; | 1003 var _body = null; |
988 | 1004 |
989 if (customer == null) { | 1005 if (customer == null) { |
990 throw new core.ArgumentError("Parameter customer is required."); | 1006 throw new core.ArgumentError("Parameter customer is required."); |
991 } | 1007 } |
992 if (parentDomainName != null) { | 1008 if (parentDomainName != null) { |
993 _queryParams["parentDomainName"] = [parentDomainName]; | 1009 _queryParams["parentDomainName"] = [parentDomainName]; |
994 } | 1010 } |
995 | 1011 |
996 _url = 'customer/' + commons.Escaper.ecapeVariable('$customer') + '/domainal
iases'; | 1012 _url = 'customer/' + |
| 1013 commons.Escaper.ecapeVariable('$customer') + |
| 1014 '/domainaliases'; |
997 | 1015 |
998 var _response = _requester.request(_url, | 1016 var _response = _requester.request(_url, "GET", |
999 "GET", | 1017 body: _body, |
1000 body: _body, | 1018 queryParams: _queryParams, |
1001 queryParams: _queryParams, | 1019 uploadOptions: _uploadOptions, |
1002 uploadOptions: _uploadOptions, | 1020 uploadMedia: _uploadMedia, |
1003 uploadMedia: _uploadMedia, | 1021 downloadOptions: _downloadOptions); |
1004 downloadOptions: _downloadOptions); | |
1005 return _response.then((data) => new DomainAliases.fromJson(data)); | 1022 return _response.then((data) => new DomainAliases.fromJson(data)); |
1006 } | 1023 } |
1007 | |
1008 } | 1024 } |
1009 | 1025 |
1010 | |
1011 class DomainsResourceApi { | 1026 class DomainsResourceApi { |
1012 final commons.ApiRequester _requester; | 1027 final commons.ApiRequester _requester; |
1013 | 1028 |
1014 DomainsResourceApi(commons.ApiRequester client) : | 1029 DomainsResourceApi(commons.ApiRequester client) : _requester = client; |
1015 _requester = client; | |
1016 | 1030 |
1017 /** | 1031 /// Deletes a domain of the customer. |
1018 * Deletes a domain of the customer. | 1032 /// |
1019 * | 1033 /// Request parameters: |
1020 * Request parameters: | 1034 /// |
1021 * | 1035 /// [customer] - Immutable ID of the G Suite account. |
1022 * [customer] - Immutable ID of the G Suite account. | 1036 /// |
1023 * | 1037 /// [domainName] - Name of domain to be deleted |
1024 * [domainName] - Name of domain to be deleted | 1038 /// |
1025 * | 1039 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
1026 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 1040 /// an error. |
1027 * error. | 1041 /// |
1028 * | 1042 /// If the used [http.Client] completes with an error when making a REST |
1029 * If the used [http.Client] completes with an error when making a REST call, | 1043 /// call, this method will complete with the same error. |
1030 * this method will complete with the same error. | |
1031 */ | |
1032 async.Future delete(core.String customer, core.String domainName) { | 1044 async.Future delete(core.String customer, core.String domainName) { |
1033 var _url = null; | 1045 var _url = null; |
1034 var _queryParams = new core.Map(); | 1046 var _queryParams = new core.Map(); |
1035 var _uploadMedia = null; | 1047 var _uploadMedia = null; |
1036 var _uploadOptions = null; | 1048 var _uploadOptions = null; |
1037 var _downloadOptions = commons.DownloadOptions.Metadata; | 1049 var _downloadOptions = commons.DownloadOptions.Metadata; |
1038 var _body = null; | 1050 var _body = null; |
1039 | 1051 |
1040 if (customer == null) { | 1052 if (customer == null) { |
1041 throw new core.ArgumentError("Parameter customer is required."); | 1053 throw new core.ArgumentError("Parameter customer is required."); |
1042 } | 1054 } |
1043 if (domainName == null) { | 1055 if (domainName == null) { |
1044 throw new core.ArgumentError("Parameter domainName is required."); | 1056 throw new core.ArgumentError("Parameter domainName is required."); |
1045 } | 1057 } |
1046 | 1058 |
1047 _downloadOptions = null; | 1059 _downloadOptions = null; |
1048 | 1060 |
1049 _url = 'customer/' + commons.Escaper.ecapeVariable('$customer') + '/domains/
' + commons.Escaper.ecapeVariable('$domainName'); | 1061 _url = 'customer/' + |
| 1062 commons.Escaper.ecapeVariable('$customer') + |
| 1063 '/domains/' + |
| 1064 commons.Escaper.ecapeVariable('$domainName'); |
1050 | 1065 |
1051 var _response = _requester.request(_url, | 1066 var _response = _requester.request(_url, "DELETE", |
1052 "DELETE", | 1067 body: _body, |
1053 body: _body, | 1068 queryParams: _queryParams, |
1054 queryParams: _queryParams, | 1069 uploadOptions: _uploadOptions, |
1055 uploadOptions: _uploadOptions, | 1070 uploadMedia: _uploadMedia, |
1056 uploadMedia: _uploadMedia, | 1071 downloadOptions: _downloadOptions); |
1057 downloadOptions: _downloadOptions); | |
1058 return _response.then((data) => null); | 1072 return _response.then((data) => null); |
1059 } | 1073 } |
1060 | 1074 |
1061 /** | 1075 /// Retrieves a domain of the customer. |
1062 * Retrieves a domain of the customer. | 1076 /// |
1063 * | 1077 /// Request parameters: |
1064 * Request parameters: | 1078 /// |
1065 * | 1079 /// [customer] - Immutable ID of the G Suite account. |
1066 * [customer] - Immutable ID of the G Suite account. | 1080 /// |
1067 * | 1081 /// [domainName] - Name of domain to be retrieved |
1068 * [domainName] - Name of domain to be retrieved | 1082 /// |
1069 * | 1083 /// Completes with a [Domains]. |
1070 * Completes with a [Domains]. | 1084 /// |
1071 * | 1085 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
1072 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 1086 /// an error. |
1073 * error. | 1087 /// |
1074 * | 1088 /// If the used [http.Client] completes with an error when making a REST |
1075 * If the used [http.Client] completes with an error when making a REST call, | 1089 /// call, this method will complete with the same error. |
1076 * this method will complete with the same error. | |
1077 */ | |
1078 async.Future<Domains> get(core.String customer, core.String domainName) { | 1090 async.Future<Domains> get(core.String customer, core.String domainName) { |
1079 var _url = null; | 1091 var _url = null; |
1080 var _queryParams = new core.Map(); | 1092 var _queryParams = new core.Map(); |
1081 var _uploadMedia = null; | 1093 var _uploadMedia = null; |
1082 var _uploadOptions = null; | 1094 var _uploadOptions = null; |
1083 var _downloadOptions = commons.DownloadOptions.Metadata; | 1095 var _downloadOptions = commons.DownloadOptions.Metadata; |
1084 var _body = null; | 1096 var _body = null; |
1085 | 1097 |
1086 if (customer == null) { | 1098 if (customer == null) { |
1087 throw new core.ArgumentError("Parameter customer is required."); | 1099 throw new core.ArgumentError("Parameter customer is required."); |
1088 } | 1100 } |
1089 if (domainName == null) { | 1101 if (domainName == null) { |
1090 throw new core.ArgumentError("Parameter domainName is required."); | 1102 throw new core.ArgumentError("Parameter domainName is required."); |
1091 } | 1103 } |
1092 | 1104 |
1093 _url = 'customer/' + commons.Escaper.ecapeVariable('$customer') + '/domains/
' + commons.Escaper.ecapeVariable('$domainName'); | 1105 _url = 'customer/' + |
| 1106 commons.Escaper.ecapeVariable('$customer') + |
| 1107 '/domains/' + |
| 1108 commons.Escaper.ecapeVariable('$domainName'); |
1094 | 1109 |
1095 var _response = _requester.request(_url, | 1110 var _response = _requester.request(_url, "GET", |
1096 "GET", | 1111 body: _body, |
1097 body: _body, | 1112 queryParams: _queryParams, |
1098 queryParams: _queryParams, | 1113 uploadOptions: _uploadOptions, |
1099 uploadOptions: _uploadOptions, | 1114 uploadMedia: _uploadMedia, |
1100 uploadMedia: _uploadMedia, | 1115 downloadOptions: _downloadOptions); |
1101 downloadOptions: _downloadOptions); | |
1102 return _response.then((data) => new Domains.fromJson(data)); | 1116 return _response.then((data) => new Domains.fromJson(data)); |
1103 } | 1117 } |
1104 | 1118 |
1105 /** | 1119 /// Inserts a domain of the customer. |
1106 * Inserts a domain of the customer. | 1120 /// |
1107 * | 1121 /// [request] - The metadata request object. |
1108 * [request] - The metadata request object. | 1122 /// |
1109 * | 1123 /// Request parameters: |
1110 * Request parameters: | 1124 /// |
1111 * | 1125 /// [customer] - Immutable ID of the G Suite account. |
1112 * [customer] - Immutable ID of the G Suite account. | 1126 /// |
1113 * | 1127 /// Completes with a [Domains]. |
1114 * Completes with a [Domains]. | 1128 /// |
1115 * | 1129 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
1116 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 1130 /// an error. |
1117 * error. | 1131 /// |
1118 * | 1132 /// If the used [http.Client] completes with an error when making a REST |
1119 * If the used [http.Client] completes with an error when making a REST call, | 1133 /// call, this method will complete with the same error. |
1120 * this method will complete with the same error. | |
1121 */ | |
1122 async.Future<Domains> insert(Domains request, core.String customer) { | 1134 async.Future<Domains> insert(Domains request, core.String customer) { |
1123 var _url = null; | 1135 var _url = null; |
1124 var _queryParams = new core.Map(); | 1136 var _queryParams = new core.Map(); |
1125 var _uploadMedia = null; | 1137 var _uploadMedia = null; |
1126 var _uploadOptions = null; | 1138 var _uploadOptions = null; |
1127 var _downloadOptions = commons.DownloadOptions.Metadata; | 1139 var _downloadOptions = commons.DownloadOptions.Metadata; |
1128 var _body = null; | 1140 var _body = null; |
1129 | 1141 |
1130 if (request != null) { | 1142 if (request != null) { |
1131 _body = convert.JSON.encode((request).toJson()); | 1143 _body = convert.JSON.encode((request).toJson()); |
1132 } | 1144 } |
1133 if (customer == null) { | 1145 if (customer == null) { |
1134 throw new core.ArgumentError("Parameter customer is required."); | 1146 throw new core.ArgumentError("Parameter customer is required."); |
1135 } | 1147 } |
1136 | 1148 |
1137 _url = 'customer/' + commons.Escaper.ecapeVariable('$customer') + '/domains'
; | 1149 _url = |
| 1150 'customer/' + commons.Escaper.ecapeVariable('$customer') + '/domains'; |
1138 | 1151 |
1139 var _response = _requester.request(_url, | 1152 var _response = _requester.request(_url, "POST", |
1140 "POST", | 1153 body: _body, |
1141 body: _body, | 1154 queryParams: _queryParams, |
1142 queryParams: _queryParams, | 1155 uploadOptions: _uploadOptions, |
1143 uploadOptions: _uploadOptions, | 1156 uploadMedia: _uploadMedia, |
1144 uploadMedia: _uploadMedia, | 1157 downloadOptions: _downloadOptions); |
1145 downloadOptions: _downloadOptions); | |
1146 return _response.then((data) => new Domains.fromJson(data)); | 1158 return _response.then((data) => new Domains.fromJson(data)); |
1147 } | 1159 } |
1148 | 1160 |
1149 /** | 1161 /// Lists the domains of the customer. |
1150 * Lists the domains of the customer. | 1162 /// |
1151 * | 1163 /// Request parameters: |
1152 * Request parameters: | 1164 /// |
1153 * | 1165 /// [customer] - Immutable ID of the G Suite account. |
1154 * [customer] - Immutable ID of the G Suite account. | 1166 /// |
1155 * | 1167 /// Completes with a [Domains2]. |
1156 * Completes with a [Domains2]. | 1168 /// |
1157 * | 1169 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
1158 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 1170 /// an error. |
1159 * error. | 1171 /// |
1160 * | 1172 /// If the used [http.Client] completes with an error when making a REST |
1161 * If the used [http.Client] completes with an error when making a REST call, | 1173 /// call, this method will complete with the same error. |
1162 * this method will complete with the same error. | |
1163 */ | |
1164 async.Future<Domains2> list(core.String customer) { | 1174 async.Future<Domains2> list(core.String customer) { |
1165 var _url = null; | 1175 var _url = null; |
1166 var _queryParams = new core.Map(); | 1176 var _queryParams = new core.Map(); |
1167 var _uploadMedia = null; | 1177 var _uploadMedia = null; |
1168 var _uploadOptions = null; | 1178 var _uploadOptions = null; |
1169 var _downloadOptions = commons.DownloadOptions.Metadata; | 1179 var _downloadOptions = commons.DownloadOptions.Metadata; |
1170 var _body = null; | 1180 var _body = null; |
1171 | 1181 |
1172 if (customer == null) { | 1182 if (customer == null) { |
1173 throw new core.ArgumentError("Parameter customer is required."); | 1183 throw new core.ArgumentError("Parameter customer is required."); |
1174 } | 1184 } |
1175 | 1185 |
1176 _url = 'customer/' + commons.Escaper.ecapeVariable('$customer') + '/domains'
; | 1186 _url = |
| 1187 'customer/' + commons.Escaper.ecapeVariable('$customer') + '/domains'; |
1177 | 1188 |
1178 var _response = _requester.request(_url, | 1189 var _response = _requester.request(_url, "GET", |
1179 "GET", | 1190 body: _body, |
1180 body: _body, | 1191 queryParams: _queryParams, |
1181 queryParams: _queryParams, | 1192 uploadOptions: _uploadOptions, |
1182 uploadOptions: _uploadOptions, | 1193 uploadMedia: _uploadMedia, |
1183 uploadMedia: _uploadMedia, | 1194 downloadOptions: _downloadOptions); |
1184 downloadOptions: _downloadOptions); | |
1185 return _response.then((data) => new Domains2.fromJson(data)); | 1195 return _response.then((data) => new Domains2.fromJson(data)); |
1186 } | 1196 } |
1187 | |
1188 } | 1197 } |
1189 | 1198 |
1190 | |
1191 class GroupsResourceApi { | 1199 class GroupsResourceApi { |
1192 final commons.ApiRequester _requester; | 1200 final commons.ApiRequester _requester; |
1193 | 1201 |
1194 GroupsAliasesResourceApi get aliases => new GroupsAliasesResourceApi(_requeste
r); | 1202 GroupsAliasesResourceApi get aliases => |
| 1203 new GroupsAliasesResourceApi(_requester); |
1195 | 1204 |
1196 GroupsResourceApi(commons.ApiRequester client) : | 1205 GroupsResourceApi(commons.ApiRequester client) : _requester = client; |
1197 _requester = client; | |
1198 | 1206 |
1199 /** | 1207 /// Delete Group |
1200 * Delete Group | 1208 /// |
1201 * | 1209 /// Request parameters: |
1202 * Request parameters: | 1210 /// |
1203 * | 1211 /// [groupKey] - Email or immutable Id of the group |
1204 * [groupKey] - Email or immutable Id of the group | 1212 /// |
1205 * | 1213 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
1206 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 1214 /// an error. |
1207 * error. | 1215 /// |
1208 * | 1216 /// If the used [http.Client] completes with an error when making a REST |
1209 * If the used [http.Client] completes with an error when making a REST call, | 1217 /// call, this method will complete with the same error. |
1210 * this method will complete with the same error. | |
1211 */ | |
1212 async.Future delete(core.String groupKey) { | 1218 async.Future delete(core.String groupKey) { |
1213 var _url = null; | 1219 var _url = null; |
1214 var _queryParams = new core.Map(); | 1220 var _queryParams = new core.Map(); |
1215 var _uploadMedia = null; | 1221 var _uploadMedia = null; |
1216 var _uploadOptions = null; | 1222 var _uploadOptions = null; |
1217 var _downloadOptions = commons.DownloadOptions.Metadata; | 1223 var _downloadOptions = commons.DownloadOptions.Metadata; |
1218 var _body = null; | 1224 var _body = null; |
1219 | 1225 |
1220 if (groupKey == null) { | 1226 if (groupKey == null) { |
1221 throw new core.ArgumentError("Parameter groupKey is required."); | 1227 throw new core.ArgumentError("Parameter groupKey is required."); |
1222 } | 1228 } |
1223 | 1229 |
1224 _downloadOptions = null; | 1230 _downloadOptions = null; |
1225 | 1231 |
1226 _url = 'groups/' + commons.Escaper.ecapeVariable('$groupKey'); | 1232 _url = 'groups/' + commons.Escaper.ecapeVariable('$groupKey'); |
1227 | 1233 |
1228 var _response = _requester.request(_url, | 1234 var _response = _requester.request(_url, "DELETE", |
1229 "DELETE", | 1235 body: _body, |
1230 body: _body, | 1236 queryParams: _queryParams, |
1231 queryParams: _queryParams, | 1237 uploadOptions: _uploadOptions, |
1232 uploadOptions: _uploadOptions, | 1238 uploadMedia: _uploadMedia, |
1233 uploadMedia: _uploadMedia, | 1239 downloadOptions: _downloadOptions); |
1234 downloadOptions: _downloadOptions); | |
1235 return _response.then((data) => null); | 1240 return _response.then((data) => null); |
1236 } | 1241 } |
1237 | 1242 |
1238 /** | 1243 /// Retrieve Group |
1239 * Retrieve Group | 1244 /// |
1240 * | 1245 /// Request parameters: |
1241 * Request parameters: | 1246 /// |
1242 * | 1247 /// [groupKey] - Email or immutable Id of the group |
1243 * [groupKey] - Email or immutable Id of the group | 1248 /// |
1244 * | 1249 /// Completes with a [Group]. |
1245 * Completes with a [Group]. | 1250 /// |
1246 * | 1251 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
1247 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 1252 /// an error. |
1248 * error. | 1253 /// |
1249 * | 1254 /// If the used [http.Client] completes with an error when making a REST |
1250 * If the used [http.Client] completes with an error when making a REST call, | 1255 /// call, this method will complete with the same error. |
1251 * this method will complete with the same error. | |
1252 */ | |
1253 async.Future<Group> get(core.String groupKey) { | 1256 async.Future<Group> get(core.String groupKey) { |
1254 var _url = null; | 1257 var _url = null; |
1255 var _queryParams = new core.Map(); | 1258 var _queryParams = new core.Map(); |
1256 var _uploadMedia = null; | 1259 var _uploadMedia = null; |
1257 var _uploadOptions = null; | 1260 var _uploadOptions = null; |
1258 var _downloadOptions = commons.DownloadOptions.Metadata; | 1261 var _downloadOptions = commons.DownloadOptions.Metadata; |
1259 var _body = null; | 1262 var _body = null; |
1260 | 1263 |
1261 if (groupKey == null) { | 1264 if (groupKey == null) { |
1262 throw new core.ArgumentError("Parameter groupKey is required."); | 1265 throw new core.ArgumentError("Parameter groupKey is required."); |
1263 } | 1266 } |
1264 | 1267 |
1265 _url = 'groups/' + commons.Escaper.ecapeVariable('$groupKey'); | 1268 _url = 'groups/' + commons.Escaper.ecapeVariable('$groupKey'); |
1266 | 1269 |
1267 var _response = _requester.request(_url, | 1270 var _response = _requester.request(_url, "GET", |
1268 "GET", | 1271 body: _body, |
1269 body: _body, | 1272 queryParams: _queryParams, |
1270 queryParams: _queryParams, | 1273 uploadOptions: _uploadOptions, |
1271 uploadOptions: _uploadOptions, | 1274 uploadMedia: _uploadMedia, |
1272 uploadMedia: _uploadMedia, | 1275 downloadOptions: _downloadOptions); |
1273 downloadOptions: _downloadOptions); | |
1274 return _response.then((data) => new Group.fromJson(data)); | 1276 return _response.then((data) => new Group.fromJson(data)); |
1275 } | 1277 } |
1276 | 1278 |
1277 /** | 1279 /// Create Group |
1278 * Create Group | 1280 /// |
1279 * | 1281 /// [request] - The metadata request object. |
1280 * [request] - The metadata request object. | 1282 /// |
1281 * | 1283 /// Request parameters: |
1282 * Request parameters: | 1284 /// |
1283 * | 1285 /// Completes with a [Group]. |
1284 * Completes with a [Group]. | 1286 /// |
1285 * | 1287 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
1286 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 1288 /// an error. |
1287 * error. | 1289 /// |
1288 * | 1290 /// If the used [http.Client] completes with an error when making a REST |
1289 * If the used [http.Client] completes with an error when making a REST call, | 1291 /// call, this method will complete with the same error. |
1290 * this method will complete with the same error. | |
1291 */ | |
1292 async.Future<Group> insert(Group request) { | 1292 async.Future<Group> insert(Group request) { |
1293 var _url = null; | 1293 var _url = null; |
1294 var _queryParams = new core.Map(); | 1294 var _queryParams = new core.Map(); |
1295 var _uploadMedia = null; | 1295 var _uploadMedia = null; |
1296 var _uploadOptions = null; | 1296 var _uploadOptions = null; |
1297 var _downloadOptions = commons.DownloadOptions.Metadata; | 1297 var _downloadOptions = commons.DownloadOptions.Metadata; |
1298 var _body = null; | 1298 var _body = null; |
1299 | 1299 |
1300 if (request != null) { | 1300 if (request != null) { |
1301 _body = convert.JSON.encode((request).toJson()); | 1301 _body = convert.JSON.encode((request).toJson()); |
1302 } | 1302 } |
1303 | 1303 |
1304 _url = 'groups'; | 1304 _url = 'groups'; |
1305 | 1305 |
1306 var _response = _requester.request(_url, | 1306 var _response = _requester.request(_url, "POST", |
1307 "POST", | 1307 body: _body, |
1308 body: _body, | 1308 queryParams: _queryParams, |
1309 queryParams: _queryParams, | 1309 uploadOptions: _uploadOptions, |
1310 uploadOptions: _uploadOptions, | 1310 uploadMedia: _uploadMedia, |
1311 uploadMedia: _uploadMedia, | 1311 downloadOptions: _downloadOptions); |
1312 downloadOptions: _downloadOptions); | |
1313 return _response.then((data) => new Group.fromJson(data)); | 1312 return _response.then((data) => new Group.fromJson(data)); |
1314 } | 1313 } |
1315 | 1314 |
1316 /** | 1315 /// Retrieve all groups in a domain (paginated) |
1317 * Retrieve all groups in a domain (paginated) | 1316 /// |
1318 * | 1317 /// Request parameters: |
1319 * Request parameters: | 1318 /// |
1320 * | 1319 /// [customer] - Immutable ID of the G Suite account. In case of |
1321 * [customer] - Immutable ID of the G Suite account. In case of multi-domain, | 1320 /// multi-domain, to fetch all groups for a customer, fill this field instead |
1322 * to fetch all groups for a customer, fill this field instead of domain. | 1321 /// of domain. |
1323 * | 1322 /// |
1324 * [domain] - Name of the domain. Fill this field to get groups from only this | 1323 /// [domain] - Name of the domain. Fill this field to get groups from only |
1325 * domain. To return all groups in a multi-domain fill customer field instead. | 1324 /// this domain. To return all groups in a multi-domain fill customer field |
1326 * | 1325 /// instead. |
1327 * [maxResults] - Maximum number of results to return. Default is 200 | 1326 /// |
1328 * | 1327 /// [maxResults] - Maximum number of results to return. Default is 200 |
1329 * [pageToken] - Token to specify next page in the list | 1328 /// |
1330 * | 1329 /// [pageToken] - Token to specify next page in the list |
1331 * [userKey] - Email or immutable Id of the user if only those groups are to | 1330 /// |
1332 * be listed, the given user is a member of. If Id, it should match with id of | 1331 /// [userKey] - Email or immutable Id of the user if only those groups are to |
1333 * user object | 1332 /// be listed, the given user is a member of. If Id, it should match with id |
1334 * | 1333 /// of user object |
1335 * Completes with a [Groups]. | 1334 /// |
1336 * | 1335 /// Completes with a [Groups]. |
1337 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 1336 /// |
1338 * error. | 1337 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
1339 * | 1338 /// an error. |
1340 * If the used [http.Client] completes with an error when making a REST call, | 1339 /// |
1341 * this method will complete with the same error. | 1340 /// If the used [http.Client] completes with an error when making a REST |
1342 */ | 1341 /// call, this method will complete with the same error. |
1343 async.Future<Groups> list({core.String customer, core.String domain, core.int
maxResults, core.String pageToken, core.String userKey}) { | 1342 async.Future<Groups> list( |
| 1343 {core.String customer, |
| 1344 core.String domain, |
| 1345 core.int maxResults, |
| 1346 core.String pageToken, |
| 1347 core.String userKey}) { |
1344 var _url = null; | 1348 var _url = null; |
1345 var _queryParams = new core.Map(); | 1349 var _queryParams = new core.Map(); |
1346 var _uploadMedia = null; | 1350 var _uploadMedia = null; |
1347 var _uploadOptions = null; | 1351 var _uploadOptions = null; |
1348 var _downloadOptions = commons.DownloadOptions.Metadata; | 1352 var _downloadOptions = commons.DownloadOptions.Metadata; |
1349 var _body = null; | 1353 var _body = null; |
1350 | 1354 |
1351 if (customer != null) { | 1355 if (customer != null) { |
1352 _queryParams["customer"] = [customer]; | 1356 _queryParams["customer"] = [customer]; |
1353 } | 1357 } |
1354 if (domain != null) { | 1358 if (domain != null) { |
1355 _queryParams["domain"] = [domain]; | 1359 _queryParams["domain"] = [domain]; |
1356 } | 1360 } |
1357 if (maxResults != null) { | 1361 if (maxResults != null) { |
1358 _queryParams["maxResults"] = ["${maxResults}"]; | 1362 _queryParams["maxResults"] = ["${maxResults}"]; |
1359 } | 1363 } |
1360 if (pageToken != null) { | 1364 if (pageToken != null) { |
1361 _queryParams["pageToken"] = [pageToken]; | 1365 _queryParams["pageToken"] = [pageToken]; |
1362 } | 1366 } |
1363 if (userKey != null) { | 1367 if (userKey != null) { |
1364 _queryParams["userKey"] = [userKey]; | 1368 _queryParams["userKey"] = [userKey]; |
1365 } | 1369 } |
1366 | 1370 |
1367 _url = 'groups'; | 1371 _url = 'groups'; |
1368 | 1372 |
1369 var _response = _requester.request(_url, | 1373 var _response = _requester.request(_url, "GET", |
1370 "GET", | 1374 body: _body, |
1371 body: _body, | 1375 queryParams: _queryParams, |
1372 queryParams: _queryParams, | 1376 uploadOptions: _uploadOptions, |
1373 uploadOptions: _uploadOptions, | 1377 uploadMedia: _uploadMedia, |
1374 uploadMedia: _uploadMedia, | 1378 downloadOptions: _downloadOptions); |
1375 downloadOptions: _downloadOptions); | |
1376 return _response.then((data) => new Groups.fromJson(data)); | 1379 return _response.then((data) => new Groups.fromJson(data)); |
1377 } | 1380 } |
1378 | 1381 |
1379 /** | 1382 /// Update Group. This method supports patch semantics. |
1380 * Update Group. This method supports patch semantics. | 1383 /// |
1381 * | 1384 /// [request] - The metadata request object. |
1382 * [request] - The metadata request object. | 1385 /// |
1383 * | 1386 /// Request parameters: |
1384 * Request parameters: | 1387 /// |
1385 * | 1388 /// [groupKey] - Email or immutable Id of the group. If Id, it should match |
1386 * [groupKey] - Email or immutable Id of the group. If Id, it should match | 1389 /// with id of group object |
1387 * with id of group object | 1390 /// |
1388 * | 1391 /// Completes with a [Group]. |
1389 * Completes with a [Group]. | 1392 /// |
1390 * | 1393 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
1391 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 1394 /// an error. |
1392 * error. | 1395 /// |
1393 * | 1396 /// If the used [http.Client] completes with an error when making a REST |
1394 * If the used [http.Client] completes with an error when making a REST call, | 1397 /// call, this method will complete with the same error. |
1395 * this method will complete with the same error. | |
1396 */ | |
1397 async.Future<Group> patch(Group request, core.String groupKey) { | 1398 async.Future<Group> patch(Group request, core.String groupKey) { |
1398 var _url = null; | 1399 var _url = null; |
1399 var _queryParams = new core.Map(); | 1400 var _queryParams = new core.Map(); |
1400 var _uploadMedia = null; | 1401 var _uploadMedia = null; |
1401 var _uploadOptions = null; | 1402 var _uploadOptions = null; |
1402 var _downloadOptions = commons.DownloadOptions.Metadata; | 1403 var _downloadOptions = commons.DownloadOptions.Metadata; |
1403 var _body = null; | 1404 var _body = null; |
1404 | 1405 |
1405 if (request != null) { | 1406 if (request != null) { |
1406 _body = convert.JSON.encode((request).toJson()); | 1407 _body = convert.JSON.encode((request).toJson()); |
1407 } | 1408 } |
1408 if (groupKey == null) { | 1409 if (groupKey == null) { |
1409 throw new core.ArgumentError("Parameter groupKey is required."); | 1410 throw new core.ArgumentError("Parameter groupKey is required."); |
1410 } | 1411 } |
1411 | 1412 |
1412 _url = 'groups/' + commons.Escaper.ecapeVariable('$groupKey'); | 1413 _url = 'groups/' + commons.Escaper.ecapeVariable('$groupKey'); |
1413 | 1414 |
1414 var _response = _requester.request(_url, | 1415 var _response = _requester.request(_url, "PATCH", |
1415 "PATCH", | 1416 body: _body, |
1416 body: _body, | 1417 queryParams: _queryParams, |
1417 queryParams: _queryParams, | 1418 uploadOptions: _uploadOptions, |
1418 uploadOptions: _uploadOptions, | 1419 uploadMedia: _uploadMedia, |
1419 uploadMedia: _uploadMedia, | 1420 downloadOptions: _downloadOptions); |
1420 downloadOptions: _downloadOptions); | |
1421 return _response.then((data) => new Group.fromJson(data)); | 1421 return _response.then((data) => new Group.fromJson(data)); |
1422 } | 1422 } |
1423 | 1423 |
1424 /** | 1424 /// Update Group |
1425 * Update Group | 1425 /// |
1426 * | 1426 /// [request] - The metadata request object. |
1427 * [request] - The metadata request object. | 1427 /// |
1428 * | 1428 /// Request parameters: |
1429 * Request parameters: | 1429 /// |
1430 * | 1430 /// [groupKey] - Email or immutable Id of the group. If Id, it should match |
1431 * [groupKey] - Email or immutable Id of the group. If Id, it should match | 1431 /// with id of group object |
1432 * with id of group object | 1432 /// |
1433 * | 1433 /// Completes with a [Group]. |
1434 * Completes with a [Group]. | 1434 /// |
1435 * | 1435 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
1436 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 1436 /// an error. |
1437 * error. | 1437 /// |
1438 * | 1438 /// If the used [http.Client] completes with an error when making a REST |
1439 * If the used [http.Client] completes with an error when making a REST call, | 1439 /// call, this method will complete with the same error. |
1440 * this method will complete with the same error. | |
1441 */ | |
1442 async.Future<Group> update(Group request, core.String groupKey) { | 1440 async.Future<Group> update(Group request, core.String groupKey) { |
1443 var _url = null; | 1441 var _url = null; |
1444 var _queryParams = new core.Map(); | 1442 var _queryParams = new core.Map(); |
1445 var _uploadMedia = null; | 1443 var _uploadMedia = null; |
1446 var _uploadOptions = null; | 1444 var _uploadOptions = null; |
1447 var _downloadOptions = commons.DownloadOptions.Metadata; | 1445 var _downloadOptions = commons.DownloadOptions.Metadata; |
1448 var _body = null; | 1446 var _body = null; |
1449 | 1447 |
1450 if (request != null) { | 1448 if (request != null) { |
1451 _body = convert.JSON.encode((request).toJson()); | 1449 _body = convert.JSON.encode((request).toJson()); |
1452 } | 1450 } |
1453 if (groupKey == null) { | 1451 if (groupKey == null) { |
1454 throw new core.ArgumentError("Parameter groupKey is required."); | 1452 throw new core.ArgumentError("Parameter groupKey is required."); |
1455 } | 1453 } |
1456 | 1454 |
1457 _url = 'groups/' + commons.Escaper.ecapeVariable('$groupKey'); | 1455 _url = 'groups/' + commons.Escaper.ecapeVariable('$groupKey'); |
1458 | 1456 |
1459 var _response = _requester.request(_url, | 1457 var _response = _requester.request(_url, "PUT", |
1460 "PUT", | 1458 body: _body, |
1461 body: _body, | 1459 queryParams: _queryParams, |
1462 queryParams: _queryParams, | 1460 uploadOptions: _uploadOptions, |
1463 uploadOptions: _uploadOptions, | 1461 uploadMedia: _uploadMedia, |
1464 uploadMedia: _uploadMedia, | 1462 downloadOptions: _downloadOptions); |
1465 downloadOptions: _downloadOptions); | |
1466 return _response.then((data) => new Group.fromJson(data)); | 1463 return _response.then((data) => new Group.fromJson(data)); |
1467 } | 1464 } |
1468 | |
1469 } | 1465 } |
1470 | 1466 |
1471 | |
1472 class GroupsAliasesResourceApi { | 1467 class GroupsAliasesResourceApi { |
1473 final commons.ApiRequester _requester; | 1468 final commons.ApiRequester _requester; |
1474 | 1469 |
1475 GroupsAliasesResourceApi(commons.ApiRequester client) : | 1470 GroupsAliasesResourceApi(commons.ApiRequester client) : _requester = client; |
1476 _requester = client; | |
1477 | 1471 |
1478 /** | 1472 /// Remove a alias for the group |
1479 * Remove a alias for the group | 1473 /// |
1480 * | 1474 /// Request parameters: |
1481 * Request parameters: | 1475 /// |
1482 * | 1476 /// [groupKey] - Email or immutable Id of the group |
1483 * [groupKey] - Email or immutable Id of the group | 1477 /// |
1484 * | 1478 /// [alias] - The alias to be removed |
1485 * [alias] - The alias to be removed | 1479 /// |
1486 * | 1480 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
1487 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 1481 /// an error. |
1488 * error. | 1482 /// |
1489 * | 1483 /// If the used [http.Client] completes with an error when making a REST |
1490 * If the used [http.Client] completes with an error when making a REST call, | 1484 /// call, this method will complete with the same error. |
1491 * this method will complete with the same error. | |
1492 */ | |
1493 async.Future delete(core.String groupKey, core.String alias) { | 1485 async.Future delete(core.String groupKey, core.String alias) { |
1494 var _url = null; | 1486 var _url = null; |
1495 var _queryParams = new core.Map(); | 1487 var _queryParams = new core.Map(); |
1496 var _uploadMedia = null; | 1488 var _uploadMedia = null; |
1497 var _uploadOptions = null; | 1489 var _uploadOptions = null; |
1498 var _downloadOptions = commons.DownloadOptions.Metadata; | 1490 var _downloadOptions = commons.DownloadOptions.Metadata; |
1499 var _body = null; | 1491 var _body = null; |
1500 | 1492 |
1501 if (groupKey == null) { | 1493 if (groupKey == null) { |
1502 throw new core.ArgumentError("Parameter groupKey is required."); | 1494 throw new core.ArgumentError("Parameter groupKey is required."); |
1503 } | 1495 } |
1504 if (alias == null) { | 1496 if (alias == null) { |
1505 throw new core.ArgumentError("Parameter alias is required."); | 1497 throw new core.ArgumentError("Parameter alias is required."); |
1506 } | 1498 } |
1507 | 1499 |
1508 _downloadOptions = null; | 1500 _downloadOptions = null; |
1509 | 1501 |
1510 _url = 'groups/' + commons.Escaper.ecapeVariable('$groupKey') + '/aliases/'
+ commons.Escaper.ecapeVariable('$alias'); | 1502 _url = 'groups/' + |
| 1503 commons.Escaper.ecapeVariable('$groupKey') + |
| 1504 '/aliases/' + |
| 1505 commons.Escaper.ecapeVariable('$alias'); |
1511 | 1506 |
1512 var _response = _requester.request(_url, | 1507 var _response = _requester.request(_url, "DELETE", |
1513 "DELETE", | 1508 body: _body, |
1514 body: _body, | 1509 queryParams: _queryParams, |
1515 queryParams: _queryParams, | 1510 uploadOptions: _uploadOptions, |
1516 uploadOptions: _uploadOptions, | 1511 uploadMedia: _uploadMedia, |
1517 uploadMedia: _uploadMedia, | 1512 downloadOptions: _downloadOptions); |
1518 downloadOptions: _downloadOptions); | |
1519 return _response.then((data) => null); | 1513 return _response.then((data) => null); |
1520 } | 1514 } |
1521 | 1515 |
1522 /** | 1516 /// Add a alias for the group |
1523 * Add a alias for the group | 1517 /// |
1524 * | 1518 /// [request] - The metadata request object. |
1525 * [request] - The metadata request object. | 1519 /// |
1526 * | 1520 /// Request parameters: |
1527 * Request parameters: | 1521 /// |
1528 * | 1522 /// [groupKey] - Email or immutable Id of the group |
1529 * [groupKey] - Email or immutable Id of the group | 1523 /// |
1530 * | 1524 /// Completes with a [Alias]. |
1531 * Completes with a [Alias]. | 1525 /// |
1532 * | 1526 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
1533 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 1527 /// an error. |
1534 * error. | 1528 /// |
1535 * | 1529 /// If the used [http.Client] completes with an error when making a REST |
1536 * If the used [http.Client] completes with an error when making a REST call, | 1530 /// call, this method will complete with the same error. |
1537 * this method will complete with the same error. | |
1538 */ | |
1539 async.Future<Alias> insert(Alias request, core.String groupKey) { | 1531 async.Future<Alias> insert(Alias request, core.String groupKey) { |
1540 var _url = null; | 1532 var _url = null; |
1541 var _queryParams = new core.Map(); | 1533 var _queryParams = new core.Map(); |
1542 var _uploadMedia = null; | 1534 var _uploadMedia = null; |
1543 var _uploadOptions = null; | 1535 var _uploadOptions = null; |
1544 var _downloadOptions = commons.DownloadOptions.Metadata; | 1536 var _downloadOptions = commons.DownloadOptions.Metadata; |
1545 var _body = null; | 1537 var _body = null; |
1546 | 1538 |
1547 if (request != null) { | 1539 if (request != null) { |
1548 _body = convert.JSON.encode((request).toJson()); | 1540 _body = convert.JSON.encode((request).toJson()); |
1549 } | 1541 } |
1550 if (groupKey == null) { | 1542 if (groupKey == null) { |
1551 throw new core.ArgumentError("Parameter groupKey is required."); | 1543 throw new core.ArgumentError("Parameter groupKey is required."); |
1552 } | 1544 } |
1553 | 1545 |
1554 _url = 'groups/' + commons.Escaper.ecapeVariable('$groupKey') + '/aliases'; | 1546 _url = 'groups/' + commons.Escaper.ecapeVariable('$groupKey') + '/aliases'; |
1555 | 1547 |
1556 var _response = _requester.request(_url, | 1548 var _response = _requester.request(_url, "POST", |
1557 "POST", | 1549 body: _body, |
1558 body: _body, | 1550 queryParams: _queryParams, |
1559 queryParams: _queryParams, | 1551 uploadOptions: _uploadOptions, |
1560 uploadOptions: _uploadOptions, | 1552 uploadMedia: _uploadMedia, |
1561 uploadMedia: _uploadMedia, | 1553 downloadOptions: _downloadOptions); |
1562 downloadOptions: _downloadOptions); | |
1563 return _response.then((data) => new Alias.fromJson(data)); | 1554 return _response.then((data) => new Alias.fromJson(data)); |
1564 } | 1555 } |
1565 | 1556 |
1566 /** | 1557 /// List all aliases for a group |
1567 * List all aliases for a group | 1558 /// |
1568 * | 1559 /// Request parameters: |
1569 * Request parameters: | 1560 /// |
1570 * | 1561 /// [groupKey] - Email or immutable Id of the group |
1571 * [groupKey] - Email or immutable Id of the group | 1562 /// |
1572 * | 1563 /// Completes with a [Aliases]. |
1573 * Completes with a [Aliases]. | 1564 /// |
1574 * | 1565 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
1575 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 1566 /// an error. |
1576 * error. | 1567 /// |
1577 * | 1568 /// If the used [http.Client] completes with an error when making a REST |
1578 * If the used [http.Client] completes with an error when making a REST call, | 1569 /// call, this method will complete with the same error. |
1579 * this method will complete with the same error. | |
1580 */ | |
1581 async.Future<Aliases> list(core.String groupKey) { | 1570 async.Future<Aliases> list(core.String groupKey) { |
1582 var _url = null; | 1571 var _url = null; |
1583 var _queryParams = new core.Map(); | 1572 var _queryParams = new core.Map(); |
1584 var _uploadMedia = null; | 1573 var _uploadMedia = null; |
1585 var _uploadOptions = null; | 1574 var _uploadOptions = null; |
1586 var _downloadOptions = commons.DownloadOptions.Metadata; | 1575 var _downloadOptions = commons.DownloadOptions.Metadata; |
1587 var _body = null; | 1576 var _body = null; |
1588 | 1577 |
1589 if (groupKey == null) { | 1578 if (groupKey == null) { |
1590 throw new core.ArgumentError("Parameter groupKey is required."); | 1579 throw new core.ArgumentError("Parameter groupKey is required."); |
1591 } | 1580 } |
1592 | 1581 |
1593 _url = 'groups/' + commons.Escaper.ecapeVariable('$groupKey') + '/aliases'; | 1582 _url = 'groups/' + commons.Escaper.ecapeVariable('$groupKey') + '/aliases'; |
1594 | 1583 |
1595 var _response = _requester.request(_url, | 1584 var _response = _requester.request(_url, "GET", |
1596 "GET", | 1585 body: _body, |
1597 body: _body, | 1586 queryParams: _queryParams, |
1598 queryParams: _queryParams, | 1587 uploadOptions: _uploadOptions, |
1599 uploadOptions: _uploadOptions, | 1588 uploadMedia: _uploadMedia, |
1600 uploadMedia: _uploadMedia, | 1589 downloadOptions: _downloadOptions); |
1601 downloadOptions: _downloadOptions); | |
1602 return _response.then((data) => new Aliases.fromJson(data)); | 1590 return _response.then((data) => new Aliases.fromJson(data)); |
1603 } | 1591 } |
1604 | |
1605 } | 1592 } |
1606 | 1593 |
1607 | |
1608 class MembersResourceApi { | 1594 class MembersResourceApi { |
1609 final commons.ApiRequester _requester; | 1595 final commons.ApiRequester _requester; |
1610 | 1596 |
1611 MembersResourceApi(commons.ApiRequester client) : | 1597 MembersResourceApi(commons.ApiRequester client) : _requester = client; |
1612 _requester = client; | |
1613 | 1598 |
1614 /** | 1599 /// Remove membership. |
1615 * Remove membership. | 1600 /// |
1616 * | 1601 /// Request parameters: |
1617 * Request parameters: | 1602 /// |
1618 * | 1603 /// [groupKey] - Email or immutable Id of the group |
1619 * [groupKey] - Email or immutable Id of the group | 1604 /// |
1620 * | 1605 /// [memberKey] - Email or immutable Id of the member |
1621 * [memberKey] - Email or immutable Id of the member | 1606 /// |
1622 * | 1607 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
1623 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 1608 /// an error. |
1624 * error. | 1609 /// |
1625 * | 1610 /// If the used [http.Client] completes with an error when making a REST |
1626 * If the used [http.Client] completes with an error when making a REST call, | 1611 /// call, this method will complete with the same error. |
1627 * this method will complete with the same error. | |
1628 */ | |
1629 async.Future delete(core.String groupKey, core.String memberKey) { | 1612 async.Future delete(core.String groupKey, core.String memberKey) { |
1630 var _url = null; | 1613 var _url = null; |
1631 var _queryParams = new core.Map(); | 1614 var _queryParams = new core.Map(); |
1632 var _uploadMedia = null; | 1615 var _uploadMedia = null; |
1633 var _uploadOptions = null; | 1616 var _uploadOptions = null; |
1634 var _downloadOptions = commons.DownloadOptions.Metadata; | 1617 var _downloadOptions = commons.DownloadOptions.Metadata; |
1635 var _body = null; | 1618 var _body = null; |
1636 | 1619 |
1637 if (groupKey == null) { | 1620 if (groupKey == null) { |
1638 throw new core.ArgumentError("Parameter groupKey is required."); | 1621 throw new core.ArgumentError("Parameter groupKey is required."); |
1639 } | 1622 } |
1640 if (memberKey == null) { | 1623 if (memberKey == null) { |
1641 throw new core.ArgumentError("Parameter memberKey is required."); | 1624 throw new core.ArgumentError("Parameter memberKey is required."); |
1642 } | 1625 } |
1643 | 1626 |
1644 _downloadOptions = null; | 1627 _downloadOptions = null; |
1645 | 1628 |
1646 _url = 'groups/' + commons.Escaper.ecapeVariable('$groupKey') + '/members/'
+ commons.Escaper.ecapeVariable('$memberKey'); | 1629 _url = 'groups/' + |
| 1630 commons.Escaper.ecapeVariable('$groupKey') + |
| 1631 '/members/' + |
| 1632 commons.Escaper.ecapeVariable('$memberKey'); |
1647 | 1633 |
1648 var _response = _requester.request(_url, | 1634 var _response = _requester.request(_url, "DELETE", |
1649 "DELETE", | 1635 body: _body, |
1650 body: _body, | 1636 queryParams: _queryParams, |
1651 queryParams: _queryParams, | 1637 uploadOptions: _uploadOptions, |
1652 uploadOptions: _uploadOptions, | 1638 uploadMedia: _uploadMedia, |
1653 uploadMedia: _uploadMedia, | 1639 downloadOptions: _downloadOptions); |
1654 downloadOptions: _downloadOptions); | |
1655 return _response.then((data) => null); | 1640 return _response.then((data) => null); |
1656 } | 1641 } |
1657 | 1642 |
1658 /** | 1643 /// Retrieve Group Member |
1659 * Retrieve Group Member | 1644 /// |
1660 * | 1645 /// Request parameters: |
1661 * Request parameters: | 1646 /// |
1662 * | 1647 /// [groupKey] - Email or immutable Id of the group |
1663 * [groupKey] - Email or immutable Id of the group | 1648 /// |
1664 * | 1649 /// [memberKey] - Email or immutable Id of the member |
1665 * [memberKey] - Email or immutable Id of the member | 1650 /// |
1666 * | 1651 /// Completes with a [Member]. |
1667 * Completes with a [Member]. | 1652 /// |
1668 * | 1653 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
1669 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 1654 /// an error. |
1670 * error. | 1655 /// |
1671 * | 1656 /// If the used [http.Client] completes with an error when making a REST |
1672 * If the used [http.Client] completes with an error when making a REST call, | 1657 /// call, this method will complete with the same error. |
1673 * this method will complete with the same error. | |
1674 */ | |
1675 async.Future<Member> get(core.String groupKey, core.String memberKey) { | 1658 async.Future<Member> get(core.String groupKey, core.String memberKey) { |
1676 var _url = null; | 1659 var _url = null; |
1677 var _queryParams = new core.Map(); | 1660 var _queryParams = new core.Map(); |
1678 var _uploadMedia = null; | 1661 var _uploadMedia = null; |
1679 var _uploadOptions = null; | 1662 var _uploadOptions = null; |
1680 var _downloadOptions = commons.DownloadOptions.Metadata; | 1663 var _downloadOptions = commons.DownloadOptions.Metadata; |
1681 var _body = null; | 1664 var _body = null; |
1682 | 1665 |
1683 if (groupKey == null) { | 1666 if (groupKey == null) { |
1684 throw new core.ArgumentError("Parameter groupKey is required."); | 1667 throw new core.ArgumentError("Parameter groupKey is required."); |
1685 } | 1668 } |
1686 if (memberKey == null) { | 1669 if (memberKey == null) { |
1687 throw new core.ArgumentError("Parameter memberKey is required."); | 1670 throw new core.ArgumentError("Parameter memberKey is required."); |
1688 } | 1671 } |
1689 | 1672 |
1690 _url = 'groups/' + commons.Escaper.ecapeVariable('$groupKey') + '/members/'
+ commons.Escaper.ecapeVariable('$memberKey'); | 1673 _url = 'groups/' + |
| 1674 commons.Escaper.ecapeVariable('$groupKey') + |
| 1675 '/members/' + |
| 1676 commons.Escaper.ecapeVariable('$memberKey'); |
1691 | 1677 |
1692 var _response = _requester.request(_url, | 1678 var _response = _requester.request(_url, "GET", |
1693 "GET", | 1679 body: _body, |
1694 body: _body, | 1680 queryParams: _queryParams, |
1695 queryParams: _queryParams, | 1681 uploadOptions: _uploadOptions, |
1696 uploadOptions: _uploadOptions, | 1682 uploadMedia: _uploadMedia, |
1697 uploadMedia: _uploadMedia, | 1683 downloadOptions: _downloadOptions); |
1698 downloadOptions: _downloadOptions); | |
1699 return _response.then((data) => new Member.fromJson(data)); | 1684 return _response.then((data) => new Member.fromJson(data)); |
1700 } | 1685 } |
1701 | 1686 |
1702 /** | 1687 /// Add user to the specified group. |
1703 * Add user to the specified group. | 1688 /// |
1704 * | 1689 /// [request] - The metadata request object. |
1705 * [request] - The metadata request object. | 1690 /// |
1706 * | 1691 /// Request parameters: |
1707 * Request parameters: | 1692 /// |
1708 * | 1693 /// [groupKey] - Email or immutable Id of the group |
1709 * [groupKey] - Email or immutable Id of the group | 1694 /// |
1710 * | 1695 /// Completes with a [Member]. |
1711 * Completes with a [Member]. | 1696 /// |
1712 * | 1697 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
1713 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 1698 /// an error. |
1714 * error. | 1699 /// |
1715 * | 1700 /// If the used [http.Client] completes with an error when making a REST |
1716 * If the used [http.Client] completes with an error when making a REST call, | 1701 /// call, this method will complete with the same error. |
1717 * this method will complete with the same error. | |
1718 */ | |
1719 async.Future<Member> insert(Member request, core.String groupKey) { | 1702 async.Future<Member> insert(Member request, core.String groupKey) { |
1720 var _url = null; | 1703 var _url = null; |
1721 var _queryParams = new core.Map(); | 1704 var _queryParams = new core.Map(); |
1722 var _uploadMedia = null; | 1705 var _uploadMedia = null; |
1723 var _uploadOptions = null; | 1706 var _uploadOptions = null; |
1724 var _downloadOptions = commons.DownloadOptions.Metadata; | 1707 var _downloadOptions = commons.DownloadOptions.Metadata; |
1725 var _body = null; | 1708 var _body = null; |
1726 | 1709 |
1727 if (request != null) { | 1710 if (request != null) { |
1728 _body = convert.JSON.encode((request).toJson()); | 1711 _body = convert.JSON.encode((request).toJson()); |
1729 } | 1712 } |
1730 if (groupKey == null) { | 1713 if (groupKey == null) { |
1731 throw new core.ArgumentError("Parameter groupKey is required."); | 1714 throw new core.ArgumentError("Parameter groupKey is required."); |
1732 } | 1715 } |
1733 | 1716 |
1734 _url = 'groups/' + commons.Escaper.ecapeVariable('$groupKey') + '/members'; | 1717 _url = 'groups/' + commons.Escaper.ecapeVariable('$groupKey') + '/members'; |
1735 | 1718 |
1736 var _response = _requester.request(_url, | 1719 var _response = _requester.request(_url, "POST", |
1737 "POST", | 1720 body: _body, |
1738 body: _body, | 1721 queryParams: _queryParams, |
1739 queryParams: _queryParams, | 1722 uploadOptions: _uploadOptions, |
1740 uploadOptions: _uploadOptions, | 1723 uploadMedia: _uploadMedia, |
1741 uploadMedia: _uploadMedia, | 1724 downloadOptions: _downloadOptions); |
1742 downloadOptions: _downloadOptions); | |
1743 return _response.then((data) => new Member.fromJson(data)); | 1725 return _response.then((data) => new Member.fromJson(data)); |
1744 } | 1726 } |
1745 | 1727 |
1746 /** | 1728 /// Retrieve all members in a group (paginated) |
1747 * Retrieve all members in a group (paginated) | 1729 /// |
1748 * | 1730 /// Request parameters: |
1749 * Request parameters: | 1731 /// |
1750 * | 1732 /// [groupKey] - Email or immutable Id of the group |
1751 * [groupKey] - Email or immutable Id of the group | 1733 /// |
1752 * | 1734 /// [maxResults] - Maximum number of results to return. Default is 200 |
1753 * [maxResults] - Maximum number of results to return. Default is 200 | 1735 /// |
1754 * | 1736 /// [pageToken] - Token to specify next page in the list |
1755 * [pageToken] - Token to specify next page in the list | 1737 /// |
1756 * | 1738 /// [roles] - Comma separated role values to filter list results on. |
1757 * [roles] - Comma separated role values to filter list results on. | 1739 /// |
1758 * | 1740 /// Completes with a [Members]. |
1759 * Completes with a [Members]. | 1741 /// |
1760 * | 1742 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
1761 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 1743 /// an error. |
1762 * error. | 1744 /// |
1763 * | 1745 /// If the used [http.Client] completes with an error when making a REST |
1764 * If the used [http.Client] completes with an error when making a REST call, | 1746 /// call, this method will complete with the same error. |
1765 * this method will complete with the same error. | 1747 async.Future<Members> list(core.String groupKey, |
1766 */ | 1748 {core.int maxResults, core.String pageToken, core.String roles}) { |
1767 async.Future<Members> list(core.String groupKey, {core.int maxResults, core.St
ring pageToken, core.String roles}) { | |
1768 var _url = null; | 1749 var _url = null; |
1769 var _queryParams = new core.Map(); | 1750 var _queryParams = new core.Map(); |
1770 var _uploadMedia = null; | 1751 var _uploadMedia = null; |
1771 var _uploadOptions = null; | 1752 var _uploadOptions = null; |
1772 var _downloadOptions = commons.DownloadOptions.Metadata; | 1753 var _downloadOptions = commons.DownloadOptions.Metadata; |
1773 var _body = null; | 1754 var _body = null; |
1774 | 1755 |
1775 if (groupKey == null) { | 1756 if (groupKey == null) { |
1776 throw new core.ArgumentError("Parameter groupKey is required."); | 1757 throw new core.ArgumentError("Parameter groupKey is required."); |
1777 } | 1758 } |
1778 if (maxResults != null) { | 1759 if (maxResults != null) { |
1779 _queryParams["maxResults"] = ["${maxResults}"]; | 1760 _queryParams["maxResults"] = ["${maxResults}"]; |
1780 } | 1761 } |
1781 if (pageToken != null) { | 1762 if (pageToken != null) { |
1782 _queryParams["pageToken"] = [pageToken]; | 1763 _queryParams["pageToken"] = [pageToken]; |
1783 } | 1764 } |
1784 if (roles != null) { | 1765 if (roles != null) { |
1785 _queryParams["roles"] = [roles]; | 1766 _queryParams["roles"] = [roles]; |
1786 } | 1767 } |
1787 | 1768 |
1788 _url = 'groups/' + commons.Escaper.ecapeVariable('$groupKey') + '/members'; | 1769 _url = 'groups/' + commons.Escaper.ecapeVariable('$groupKey') + '/members'; |
1789 | 1770 |
1790 var _response = _requester.request(_url, | 1771 var _response = _requester.request(_url, "GET", |
1791 "GET", | 1772 body: _body, |
1792 body: _body, | 1773 queryParams: _queryParams, |
1793 queryParams: _queryParams, | 1774 uploadOptions: _uploadOptions, |
1794 uploadOptions: _uploadOptions, | 1775 uploadMedia: _uploadMedia, |
1795 uploadMedia: _uploadMedia, | 1776 downloadOptions: _downloadOptions); |
1796 downloadOptions: _downloadOptions); | |
1797 return _response.then((data) => new Members.fromJson(data)); | 1777 return _response.then((data) => new Members.fromJson(data)); |
1798 } | 1778 } |
1799 | 1779 |
1800 /** | 1780 /// Update membership of a user in the specified group. This method supports |
1801 * Update membership of a user in the specified group. This method supports | 1781 /// patch semantics. |
1802 * patch semantics. | 1782 /// |
1803 * | 1783 /// [request] - The metadata request object. |
1804 * [request] - The metadata request object. | 1784 /// |
1805 * | 1785 /// Request parameters: |
1806 * Request parameters: | 1786 /// |
1807 * | 1787 /// [groupKey] - Email or immutable Id of the group. If Id, it should match |
1808 * [groupKey] - Email or immutable Id of the group. If Id, it should match | 1788 /// with id of group object |
1809 * with id of group object | 1789 /// |
1810 * | 1790 /// [memberKey] - Email or immutable Id of the user. If Id, it should match |
1811 * [memberKey] - Email or immutable Id of the user. If Id, it should match | 1791 /// with id of member object |
1812 * with id of member object | 1792 /// |
1813 * | 1793 /// Completes with a [Member]. |
1814 * Completes with a [Member]. | 1794 /// |
1815 * | 1795 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
1816 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 1796 /// an error. |
1817 * error. | 1797 /// |
1818 * | 1798 /// If the used [http.Client] completes with an error when making a REST |
1819 * If the used [http.Client] completes with an error when making a REST call, | 1799 /// call, this method will complete with the same error. |
1820 * this method will complete with the same error. | 1800 async.Future<Member> patch( |
1821 */ | 1801 Member request, core.String groupKey, core.String memberKey) { |
1822 async.Future<Member> patch(Member request, core.String groupKey, core.String m
emberKey) { | |
1823 var _url = null; | 1802 var _url = null; |
1824 var _queryParams = new core.Map(); | 1803 var _queryParams = new core.Map(); |
1825 var _uploadMedia = null; | 1804 var _uploadMedia = null; |
1826 var _uploadOptions = null; | 1805 var _uploadOptions = null; |
1827 var _downloadOptions = commons.DownloadOptions.Metadata; | 1806 var _downloadOptions = commons.DownloadOptions.Metadata; |
1828 var _body = null; | 1807 var _body = null; |
1829 | 1808 |
1830 if (request != null) { | 1809 if (request != null) { |
1831 _body = convert.JSON.encode((request).toJson()); | 1810 _body = convert.JSON.encode((request).toJson()); |
1832 } | 1811 } |
1833 if (groupKey == null) { | 1812 if (groupKey == null) { |
1834 throw new core.ArgumentError("Parameter groupKey is required."); | 1813 throw new core.ArgumentError("Parameter groupKey is required."); |
1835 } | 1814 } |
1836 if (memberKey == null) { | 1815 if (memberKey == null) { |
1837 throw new core.ArgumentError("Parameter memberKey is required."); | 1816 throw new core.ArgumentError("Parameter memberKey is required."); |
1838 } | 1817 } |
1839 | 1818 |
1840 _url = 'groups/' + commons.Escaper.ecapeVariable('$groupKey') + '/members/'
+ commons.Escaper.ecapeVariable('$memberKey'); | 1819 _url = 'groups/' + |
| 1820 commons.Escaper.ecapeVariable('$groupKey') + |
| 1821 '/members/' + |
| 1822 commons.Escaper.ecapeVariable('$memberKey'); |
1841 | 1823 |
1842 var _response = _requester.request(_url, | 1824 var _response = _requester.request(_url, "PATCH", |
1843 "PATCH", | 1825 body: _body, |
1844 body: _body, | 1826 queryParams: _queryParams, |
1845 queryParams: _queryParams, | 1827 uploadOptions: _uploadOptions, |
1846 uploadOptions: _uploadOptions, | 1828 uploadMedia: _uploadMedia, |
1847 uploadMedia: _uploadMedia, | 1829 downloadOptions: _downloadOptions); |
1848 downloadOptions: _downloadOptions); | |
1849 return _response.then((data) => new Member.fromJson(data)); | 1830 return _response.then((data) => new Member.fromJson(data)); |
1850 } | 1831 } |
1851 | 1832 |
1852 /** | 1833 /// Update membership of a user in the specified group. |
1853 * Update membership of a user in the specified group. | 1834 /// |
1854 * | 1835 /// [request] - The metadata request object. |
1855 * [request] - The metadata request object. | 1836 /// |
1856 * | 1837 /// Request parameters: |
1857 * Request parameters: | 1838 /// |
1858 * | 1839 /// [groupKey] - Email or immutable Id of the group. If Id, it should match |
1859 * [groupKey] - Email or immutable Id of the group. If Id, it should match | 1840 /// with id of group object |
1860 * with id of group object | 1841 /// |
1861 * | 1842 /// [memberKey] - Email or immutable Id of the user. If Id, it should match |
1862 * [memberKey] - Email or immutable Id of the user. If Id, it should match | 1843 /// with id of member object |
1863 * with id of member object | 1844 /// |
1864 * | 1845 /// Completes with a [Member]. |
1865 * Completes with a [Member]. | 1846 /// |
1866 * | 1847 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
1867 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 1848 /// an error. |
1868 * error. | 1849 /// |
1869 * | 1850 /// If the used [http.Client] completes with an error when making a REST |
1870 * If the used [http.Client] completes with an error when making a REST call, | 1851 /// call, this method will complete with the same error. |
1871 * this method will complete with the same error. | 1852 async.Future<Member> update( |
1872 */ | 1853 Member request, core.String groupKey, core.String memberKey) { |
1873 async.Future<Member> update(Member request, core.String groupKey, core.String
memberKey) { | |
1874 var _url = null; | 1854 var _url = null; |
1875 var _queryParams = new core.Map(); | 1855 var _queryParams = new core.Map(); |
1876 var _uploadMedia = null; | 1856 var _uploadMedia = null; |
1877 var _uploadOptions = null; | 1857 var _uploadOptions = null; |
1878 var _downloadOptions = commons.DownloadOptions.Metadata; | 1858 var _downloadOptions = commons.DownloadOptions.Metadata; |
1879 var _body = null; | 1859 var _body = null; |
1880 | 1860 |
1881 if (request != null) { | 1861 if (request != null) { |
1882 _body = convert.JSON.encode((request).toJson()); | 1862 _body = convert.JSON.encode((request).toJson()); |
1883 } | 1863 } |
1884 if (groupKey == null) { | 1864 if (groupKey == null) { |
1885 throw new core.ArgumentError("Parameter groupKey is required."); | 1865 throw new core.ArgumentError("Parameter groupKey is required."); |
1886 } | 1866 } |
1887 if (memberKey == null) { | 1867 if (memberKey == null) { |
1888 throw new core.ArgumentError("Parameter memberKey is required."); | 1868 throw new core.ArgumentError("Parameter memberKey is required."); |
1889 } | 1869 } |
1890 | 1870 |
1891 _url = 'groups/' + commons.Escaper.ecapeVariable('$groupKey') + '/members/'
+ commons.Escaper.ecapeVariable('$memberKey'); | 1871 _url = 'groups/' + |
| 1872 commons.Escaper.ecapeVariable('$groupKey') + |
| 1873 '/members/' + |
| 1874 commons.Escaper.ecapeVariable('$memberKey'); |
1892 | 1875 |
1893 var _response = _requester.request(_url, | 1876 var _response = _requester.request(_url, "PUT", |
1894 "PUT", | 1877 body: _body, |
1895 body: _body, | 1878 queryParams: _queryParams, |
1896 queryParams: _queryParams, | 1879 uploadOptions: _uploadOptions, |
1897 uploadOptions: _uploadOptions, | 1880 uploadMedia: _uploadMedia, |
1898 uploadMedia: _uploadMedia, | 1881 downloadOptions: _downloadOptions); |
1899 downloadOptions: _downloadOptions); | |
1900 return _response.then((data) => new Member.fromJson(data)); | 1882 return _response.then((data) => new Member.fromJson(data)); |
1901 } | 1883 } |
1902 | |
1903 } | 1884 } |
1904 | 1885 |
1905 | |
1906 class MobiledevicesResourceApi { | 1886 class MobiledevicesResourceApi { |
1907 final commons.ApiRequester _requester; | 1887 final commons.ApiRequester _requester; |
1908 | 1888 |
1909 MobiledevicesResourceApi(commons.ApiRequester client) : | 1889 MobiledevicesResourceApi(commons.ApiRequester client) : _requester = client; |
1910 _requester = client; | |
1911 | 1890 |
1912 /** | 1891 /// Take action on Mobile Device |
1913 * Take action on Mobile Device | 1892 /// |
1914 * | 1893 /// [request] - The metadata request object. |
1915 * [request] - The metadata request object. | 1894 /// |
1916 * | 1895 /// Request parameters: |
1917 * Request parameters: | 1896 /// |
1918 * | 1897 /// [customerId] - Immutable ID of the G Suite account |
1919 * [customerId] - Immutable ID of the G Suite account | 1898 /// |
1920 * | 1899 /// [resourceId] - Immutable ID of Mobile Device |
1921 * [resourceId] - Immutable ID of Mobile Device | 1900 /// |
1922 * | 1901 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
1923 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 1902 /// an error. |
1924 * error. | 1903 /// |
1925 * | 1904 /// If the used [http.Client] completes with an error when making a REST |
1926 * If the used [http.Client] completes with an error when making a REST call, | 1905 /// call, this method will complete with the same error. |
1927 * this method will complete with the same error. | 1906 async.Future action(MobileDeviceAction request, core.String customerId, |
1928 */ | 1907 core.String resourceId) { |
1929 async.Future action(MobileDeviceAction request, core.String customerId, core.S
tring resourceId) { | |
1930 var _url = null; | 1908 var _url = null; |
1931 var _queryParams = new core.Map(); | 1909 var _queryParams = new core.Map(); |
1932 var _uploadMedia = null; | 1910 var _uploadMedia = null; |
1933 var _uploadOptions = null; | 1911 var _uploadOptions = null; |
1934 var _downloadOptions = commons.DownloadOptions.Metadata; | 1912 var _downloadOptions = commons.DownloadOptions.Metadata; |
1935 var _body = null; | 1913 var _body = null; |
1936 | 1914 |
1937 if (request != null) { | 1915 if (request != null) { |
1938 _body = convert.JSON.encode((request).toJson()); | 1916 _body = convert.JSON.encode((request).toJson()); |
1939 } | 1917 } |
1940 if (customerId == null) { | 1918 if (customerId == null) { |
1941 throw new core.ArgumentError("Parameter customerId is required."); | 1919 throw new core.ArgumentError("Parameter customerId is required."); |
1942 } | 1920 } |
1943 if (resourceId == null) { | 1921 if (resourceId == null) { |
1944 throw new core.ArgumentError("Parameter resourceId is required."); | 1922 throw new core.ArgumentError("Parameter resourceId is required."); |
1945 } | 1923 } |
1946 | 1924 |
1947 _downloadOptions = null; | 1925 _downloadOptions = null; |
1948 | 1926 |
1949 _url = 'customer/' + commons.Escaper.ecapeVariable('$customerId') + '/device
s/mobile/' + commons.Escaper.ecapeVariable('$resourceId') + '/action'; | 1927 _url = 'customer/' + |
| 1928 commons.Escaper.ecapeVariable('$customerId') + |
| 1929 '/devices/mobile/' + |
| 1930 commons.Escaper.ecapeVariable('$resourceId') + |
| 1931 '/action'; |
1950 | 1932 |
1951 var _response = _requester.request(_url, | 1933 var _response = _requester.request(_url, "POST", |
1952 "POST", | 1934 body: _body, |
1953 body: _body, | 1935 queryParams: _queryParams, |
1954 queryParams: _queryParams, | 1936 uploadOptions: _uploadOptions, |
1955 uploadOptions: _uploadOptions, | 1937 uploadMedia: _uploadMedia, |
1956 uploadMedia: _uploadMedia, | 1938 downloadOptions: _downloadOptions); |
1957 downloadOptions: _downloadOptions); | |
1958 return _response.then((data) => null); | 1939 return _response.then((data) => null); |
1959 } | 1940 } |
1960 | 1941 |
1961 /** | 1942 /// Delete Mobile Device |
1962 * Delete Mobile Device | 1943 /// |
1963 * | 1944 /// Request parameters: |
1964 * Request parameters: | 1945 /// |
1965 * | 1946 /// [customerId] - Immutable ID of the G Suite account |
1966 * [customerId] - Immutable ID of the G Suite account | 1947 /// |
1967 * | 1948 /// [resourceId] - Immutable ID of Mobile Device |
1968 * [resourceId] - Immutable ID of Mobile Device | 1949 /// |
1969 * | 1950 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
1970 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 1951 /// an error. |
1971 * error. | 1952 /// |
1972 * | 1953 /// If the used [http.Client] completes with an error when making a REST |
1973 * If the used [http.Client] completes with an error when making a REST call, | 1954 /// call, this method will complete with the same error. |
1974 * this method will complete with the same error. | |
1975 */ | |
1976 async.Future delete(core.String customerId, core.String resourceId) { | 1955 async.Future delete(core.String customerId, core.String resourceId) { |
1977 var _url = null; | 1956 var _url = null; |
1978 var _queryParams = new core.Map(); | 1957 var _queryParams = new core.Map(); |
1979 var _uploadMedia = null; | 1958 var _uploadMedia = null; |
1980 var _uploadOptions = null; | 1959 var _uploadOptions = null; |
1981 var _downloadOptions = commons.DownloadOptions.Metadata; | 1960 var _downloadOptions = commons.DownloadOptions.Metadata; |
1982 var _body = null; | 1961 var _body = null; |
1983 | 1962 |
1984 if (customerId == null) { | 1963 if (customerId == null) { |
1985 throw new core.ArgumentError("Parameter customerId is required."); | 1964 throw new core.ArgumentError("Parameter customerId is required."); |
1986 } | 1965 } |
1987 if (resourceId == null) { | 1966 if (resourceId == null) { |
1988 throw new core.ArgumentError("Parameter resourceId is required."); | 1967 throw new core.ArgumentError("Parameter resourceId is required."); |
1989 } | 1968 } |
1990 | 1969 |
1991 _downloadOptions = null; | 1970 _downloadOptions = null; |
1992 | 1971 |
1993 _url = 'customer/' + commons.Escaper.ecapeVariable('$customerId') + '/device
s/mobile/' + commons.Escaper.ecapeVariable('$resourceId'); | 1972 _url = 'customer/' + |
| 1973 commons.Escaper.ecapeVariable('$customerId') + |
| 1974 '/devices/mobile/' + |
| 1975 commons.Escaper.ecapeVariable('$resourceId'); |
1994 | 1976 |
1995 var _response = _requester.request(_url, | 1977 var _response = _requester.request(_url, "DELETE", |
1996 "DELETE", | 1978 body: _body, |
1997 body: _body, | 1979 queryParams: _queryParams, |
1998 queryParams: _queryParams, | 1980 uploadOptions: _uploadOptions, |
1999 uploadOptions: _uploadOptions, | 1981 uploadMedia: _uploadMedia, |
2000 uploadMedia: _uploadMedia, | 1982 downloadOptions: _downloadOptions); |
2001 downloadOptions: _downloadOptions); | |
2002 return _response.then((data) => null); | 1983 return _response.then((data) => null); |
2003 } | 1984 } |
2004 | 1985 |
2005 /** | 1986 /// Retrieve Mobile Device |
2006 * Retrieve Mobile Device | 1987 /// |
2007 * | 1988 /// Request parameters: |
2008 * Request parameters: | 1989 /// |
2009 * | 1990 /// [customerId] - Immutable ID of the G Suite account |
2010 * [customerId] - Immutable ID of the G Suite account | 1991 /// |
2011 * | 1992 /// [resourceId] - Immutable ID of Mobile Device |
2012 * [resourceId] - Immutable ID of Mobile Device | 1993 /// |
2013 * | 1994 /// [projection] - Restrict information returned to a set of selected fields. |
2014 * [projection] - Restrict information returned to a set of selected fields. | 1995 /// Possible string values are: |
2015 * Possible string values are: | 1996 /// - "BASIC" : Includes only the basic metadata fields (e.g., deviceId, |
2016 * - "BASIC" : Includes only the basic metadata fields (e.g., deviceId, model, | 1997 /// model, status, type, and status) |
2017 * status, type, and status) | 1998 /// - "FULL" : Includes all metadata fields |
2018 * - "FULL" : Includes all metadata fields | 1999 /// |
2019 * | 2000 /// Completes with a [MobileDevice]. |
2020 * Completes with a [MobileDevice]. | 2001 /// |
2021 * | 2002 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
2022 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 2003 /// an error. |
2023 * error. | 2004 /// |
2024 * | 2005 /// If the used [http.Client] completes with an error when making a REST |
2025 * If the used [http.Client] completes with an error when making a REST call, | 2006 /// call, this method will complete with the same error. |
2026 * this method will complete with the same error. | 2007 async.Future<MobileDevice> get(core.String customerId, core.String resourceId, |
2027 */ | 2008 {core.String projection}) { |
2028 async.Future<MobileDevice> get(core.String customerId, core.String resourceId,
{core.String projection}) { | |
2029 var _url = null; | 2009 var _url = null; |
2030 var _queryParams = new core.Map(); | 2010 var _queryParams = new core.Map(); |
2031 var _uploadMedia = null; | 2011 var _uploadMedia = null; |
2032 var _uploadOptions = null; | 2012 var _uploadOptions = null; |
2033 var _downloadOptions = commons.DownloadOptions.Metadata; | 2013 var _downloadOptions = commons.DownloadOptions.Metadata; |
2034 var _body = null; | 2014 var _body = null; |
2035 | 2015 |
2036 if (customerId == null) { | 2016 if (customerId == null) { |
2037 throw new core.ArgumentError("Parameter customerId is required."); | 2017 throw new core.ArgumentError("Parameter customerId is required."); |
2038 } | 2018 } |
2039 if (resourceId == null) { | 2019 if (resourceId == null) { |
2040 throw new core.ArgumentError("Parameter resourceId is required."); | 2020 throw new core.ArgumentError("Parameter resourceId is required."); |
2041 } | 2021 } |
2042 if (projection != null) { | 2022 if (projection != null) { |
2043 _queryParams["projection"] = [projection]; | 2023 _queryParams["projection"] = [projection]; |
2044 } | 2024 } |
2045 | 2025 |
2046 _url = 'customer/' + commons.Escaper.ecapeVariable('$customerId') + '/device
s/mobile/' + commons.Escaper.ecapeVariable('$resourceId'); | 2026 _url = 'customer/' + |
| 2027 commons.Escaper.ecapeVariable('$customerId') + |
| 2028 '/devices/mobile/' + |
| 2029 commons.Escaper.ecapeVariable('$resourceId'); |
2047 | 2030 |
2048 var _response = _requester.request(_url, | 2031 var _response = _requester.request(_url, "GET", |
2049 "GET", | 2032 body: _body, |
2050 body: _body, | 2033 queryParams: _queryParams, |
2051 queryParams: _queryParams, | 2034 uploadOptions: _uploadOptions, |
2052 uploadOptions: _uploadOptions, | 2035 uploadMedia: _uploadMedia, |
2053 uploadMedia: _uploadMedia, | 2036 downloadOptions: _downloadOptions); |
2054 downloadOptions: _downloadOptions); | |
2055 return _response.then((data) => new MobileDevice.fromJson(data)); | 2037 return _response.then((data) => new MobileDevice.fromJson(data)); |
2056 } | 2038 } |
2057 | 2039 |
2058 /** | 2040 /// Retrieve all Mobile Devices of a customer (paginated) |
2059 * Retrieve all Mobile Devices of a customer (paginated) | 2041 /// |
2060 * | 2042 /// Request parameters: |
2061 * Request parameters: | 2043 /// |
2062 * | 2044 /// [customerId] - Immutable ID of the G Suite account |
2063 * [customerId] - Immutable ID of the G Suite account | 2045 /// |
2064 * | 2046 /// [maxResults] - Maximum number of results to return. Default is 100 |
2065 * [maxResults] - Maximum number of results to return. Default is 100 | 2047 /// |
2066 * | 2048 /// [orderBy] - Column to use for sorting results |
2067 * [orderBy] - Column to use for sorting results | 2049 /// Possible string values are: |
2068 * Possible string values are: | 2050 /// - "deviceId" : Mobile Device serial number. |
2069 * - "deviceId" : Mobile Device serial number. | 2051 /// - "email" : Owner user email. |
2070 * - "email" : Owner user email. | 2052 /// - "lastSync" : Last policy settings sync date time of the device. |
2071 * - "lastSync" : Last policy settings sync date time of the device. | 2053 /// - "model" : Mobile Device model. |
2072 * - "model" : Mobile Device model. | 2054 /// - "name" : Owner user name. |
2073 * - "name" : Owner user name. | 2055 /// - "os" : Mobile operating system. |
2074 * - "os" : Mobile operating system. | 2056 /// - "status" : Status of the device. |
2075 * - "status" : Status of the device. | 2057 /// - "type" : Type of the device. |
2076 * - "type" : Type of the device. | 2058 /// |
2077 * | 2059 /// [pageToken] - Token to specify next page in the list |
2078 * [pageToken] - Token to specify next page in the list | 2060 /// |
2079 * | 2061 /// [projection] - Restrict information returned to a set of selected fields. |
2080 * [projection] - Restrict information returned to a set of selected fields. | 2062 /// Possible string values are: |
2081 * Possible string values are: | 2063 /// - "BASIC" : Includes only the basic metadata fields (e.g., deviceId, |
2082 * - "BASIC" : Includes only the basic metadata fields (e.g., deviceId, model, | 2064 /// model, status, type, and status) |
2083 * status, type, and status) | 2065 /// - "FULL" : Includes all metadata fields |
2084 * - "FULL" : Includes all metadata fields | 2066 /// |
2085 * | 2067 /// [query] - Search string in the format given at |
2086 * [query] - Search string in the format given at | 2068 /// http://support.google.com/a/bin/answer.py?hl=en&answer=1408863#search |
2087 * http://support.google.com/a/bin/answer.py?hl=en&answer=1408863#search | 2069 /// |
2088 * | 2070 /// [sortOrder] - Whether to return results in ascending or descending order. |
2089 * [sortOrder] - Whether to return results in ascending or descending order. | 2071 /// Only of use when orderBy is also used |
2090 * Only of use when orderBy is also used | 2072 /// Possible string values are: |
2091 * Possible string values are: | 2073 /// - "ASCENDING" : Ascending order. |
2092 * - "ASCENDING" : Ascending order. | 2074 /// - "DESCENDING" : Descending order. |
2093 * - "DESCENDING" : Descending order. | 2075 /// |
2094 * | 2076 /// Completes with a [MobileDevices]. |
2095 * Completes with a [MobileDevices]. | 2077 /// |
2096 * | 2078 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
2097 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 2079 /// an error. |
2098 * error. | 2080 /// |
2099 * | 2081 /// If the used [http.Client] completes with an error when making a REST |
2100 * If the used [http.Client] completes with an error when making a REST call, | 2082 /// call, this method will complete with the same error. |
2101 * this method will complete with the same error. | 2083 async.Future<MobileDevices> list(core.String customerId, |
2102 */ | 2084 {core.int maxResults, |
2103 async.Future<MobileDevices> list(core.String customerId, {core.int maxResults,
core.String orderBy, core.String pageToken, core.String projection, core.String
query, core.String sortOrder}) { | 2085 core.String orderBy, |
| 2086 core.String pageToken, |
| 2087 core.String projection, |
| 2088 core.String query, |
| 2089 core.String sortOrder}) { |
2104 var _url = null; | 2090 var _url = null; |
2105 var _queryParams = new core.Map(); | 2091 var _queryParams = new core.Map(); |
2106 var _uploadMedia = null; | 2092 var _uploadMedia = null; |
2107 var _uploadOptions = null; | 2093 var _uploadOptions = null; |
2108 var _downloadOptions = commons.DownloadOptions.Metadata; | 2094 var _downloadOptions = commons.DownloadOptions.Metadata; |
2109 var _body = null; | 2095 var _body = null; |
2110 | 2096 |
2111 if (customerId == null) { | 2097 if (customerId == null) { |
2112 throw new core.ArgumentError("Parameter customerId is required."); | 2098 throw new core.ArgumentError("Parameter customerId is required."); |
2113 } | 2099 } |
2114 if (maxResults != null) { | 2100 if (maxResults != null) { |
2115 _queryParams["maxResults"] = ["${maxResults}"]; | 2101 _queryParams["maxResults"] = ["${maxResults}"]; |
2116 } | 2102 } |
2117 if (orderBy != null) { | 2103 if (orderBy != null) { |
2118 _queryParams["orderBy"] = [orderBy]; | 2104 _queryParams["orderBy"] = [orderBy]; |
2119 } | 2105 } |
2120 if (pageToken != null) { | 2106 if (pageToken != null) { |
2121 _queryParams["pageToken"] = [pageToken]; | 2107 _queryParams["pageToken"] = [pageToken]; |
2122 } | 2108 } |
2123 if (projection != null) { | 2109 if (projection != null) { |
2124 _queryParams["projection"] = [projection]; | 2110 _queryParams["projection"] = [projection]; |
2125 } | 2111 } |
2126 if (query != null) { | 2112 if (query != null) { |
2127 _queryParams["query"] = [query]; | 2113 _queryParams["query"] = [query]; |
2128 } | 2114 } |
2129 if (sortOrder != null) { | 2115 if (sortOrder != null) { |
2130 _queryParams["sortOrder"] = [sortOrder]; | 2116 _queryParams["sortOrder"] = [sortOrder]; |
2131 } | 2117 } |
2132 | 2118 |
2133 _url = 'customer/' + commons.Escaper.ecapeVariable('$customerId') + '/device
s/mobile'; | 2119 _url = 'customer/' + |
| 2120 commons.Escaper.ecapeVariable('$customerId') + |
| 2121 '/devices/mobile'; |
2134 | 2122 |
2135 var _response = _requester.request(_url, | 2123 var _response = _requester.request(_url, "GET", |
2136 "GET", | 2124 body: _body, |
2137 body: _body, | 2125 queryParams: _queryParams, |
2138 queryParams: _queryParams, | 2126 uploadOptions: _uploadOptions, |
2139 uploadOptions: _uploadOptions, | 2127 uploadMedia: _uploadMedia, |
2140 uploadMedia: _uploadMedia, | 2128 downloadOptions: _downloadOptions); |
2141 downloadOptions: _downloadOptions); | |
2142 return _response.then((data) => new MobileDevices.fromJson(data)); | 2129 return _response.then((data) => new MobileDevices.fromJson(data)); |
2143 } | 2130 } |
2144 | |
2145 } | 2131 } |
2146 | 2132 |
2147 | |
2148 class NotificationsResourceApi { | 2133 class NotificationsResourceApi { |
2149 final commons.ApiRequester _requester; | 2134 final commons.ApiRequester _requester; |
2150 | 2135 |
2151 NotificationsResourceApi(commons.ApiRequester client) : | 2136 NotificationsResourceApi(commons.ApiRequester client) : _requester = client; |
2152 _requester = client; | |
2153 | 2137 |
2154 /** | 2138 /// Deletes a notification |
2155 * Deletes a notification | 2139 /// |
2156 * | 2140 /// Request parameters: |
2157 * Request parameters: | 2141 /// |
2158 * | 2142 /// [customer] - The unique ID for the customer's G Suite account. The |
2159 * [customer] - The unique ID for the customer's G Suite account. The | 2143 /// customerId is also returned as part of the Users resource. |
2160 * customerId is also returned as part of the Users resource. | 2144 /// |
2161 * | 2145 /// [notificationId] - The unique ID of the notification. |
2162 * [notificationId] - The unique ID of the notification. | 2146 /// |
2163 * | 2147 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
2164 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 2148 /// an error. |
2165 * error. | 2149 /// |
2166 * | 2150 /// If the used [http.Client] completes with an error when making a REST |
2167 * If the used [http.Client] completes with an error when making a REST call, | 2151 /// call, this method will complete with the same error. |
2168 * this method will complete with the same error. | |
2169 */ | |
2170 async.Future delete(core.String customer, core.String notificationId) { | 2152 async.Future delete(core.String customer, core.String notificationId) { |
2171 var _url = null; | 2153 var _url = null; |
2172 var _queryParams = new core.Map(); | 2154 var _queryParams = new core.Map(); |
2173 var _uploadMedia = null; | 2155 var _uploadMedia = null; |
2174 var _uploadOptions = null; | 2156 var _uploadOptions = null; |
2175 var _downloadOptions = commons.DownloadOptions.Metadata; | 2157 var _downloadOptions = commons.DownloadOptions.Metadata; |
2176 var _body = null; | 2158 var _body = null; |
2177 | 2159 |
2178 if (customer == null) { | 2160 if (customer == null) { |
2179 throw new core.ArgumentError("Parameter customer is required."); | 2161 throw new core.ArgumentError("Parameter customer is required."); |
2180 } | 2162 } |
2181 if (notificationId == null) { | 2163 if (notificationId == null) { |
2182 throw new core.ArgumentError("Parameter notificationId is required."); | 2164 throw new core.ArgumentError("Parameter notificationId is required."); |
2183 } | 2165 } |
2184 | 2166 |
2185 _downloadOptions = null; | 2167 _downloadOptions = null; |
2186 | 2168 |
2187 _url = 'customer/' + commons.Escaper.ecapeVariable('$customer') + '/notifica
tions/' + commons.Escaper.ecapeVariable('$notificationId'); | 2169 _url = 'customer/' + |
| 2170 commons.Escaper.ecapeVariable('$customer') + |
| 2171 '/notifications/' + |
| 2172 commons.Escaper.ecapeVariable('$notificationId'); |
2188 | 2173 |
2189 var _response = _requester.request(_url, | 2174 var _response = _requester.request(_url, "DELETE", |
2190 "DELETE", | 2175 body: _body, |
2191 body: _body, | 2176 queryParams: _queryParams, |
2192 queryParams: _queryParams, | 2177 uploadOptions: _uploadOptions, |
2193 uploadOptions: _uploadOptions, | 2178 uploadMedia: _uploadMedia, |
2194 uploadMedia: _uploadMedia, | 2179 downloadOptions: _downloadOptions); |
2195 downloadOptions: _downloadOptions); | |
2196 return _response.then((data) => null); | 2180 return _response.then((data) => null); |
2197 } | 2181 } |
2198 | 2182 |
2199 /** | 2183 /// Retrieves a notification. |
2200 * Retrieves a notification. | 2184 /// |
2201 * | 2185 /// Request parameters: |
2202 * Request parameters: | 2186 /// |
2203 * | 2187 /// [customer] - The unique ID for the customer's G Suite account. The |
2204 * [customer] - The unique ID for the customer's G Suite account. The | 2188 /// customerId is also returned as part of the Users resource. |
2205 * customerId is also returned as part of the Users resource. | 2189 /// |
2206 * | 2190 /// [notificationId] - The unique ID of the notification. |
2207 * [notificationId] - The unique ID of the notification. | 2191 /// |
2208 * | 2192 /// Completes with a [Notification]. |
2209 * Completes with a [Notification]. | 2193 /// |
2210 * | 2194 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
2211 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 2195 /// an error. |
2212 * error. | 2196 /// |
2213 * | 2197 /// If the used [http.Client] completes with an error when making a REST |
2214 * If the used [http.Client] completes with an error when making a REST call, | 2198 /// call, this method will complete with the same error. |
2215 * this method will complete with the same error. | 2199 async.Future<Notification> get( |
2216 */ | 2200 core.String customer, core.String notificationId) { |
2217 async.Future<Notification> get(core.String customer, core.String notificationI
d) { | |
2218 var _url = null; | 2201 var _url = null; |
2219 var _queryParams = new core.Map(); | 2202 var _queryParams = new core.Map(); |
2220 var _uploadMedia = null; | 2203 var _uploadMedia = null; |
2221 var _uploadOptions = null; | 2204 var _uploadOptions = null; |
2222 var _downloadOptions = commons.DownloadOptions.Metadata; | 2205 var _downloadOptions = commons.DownloadOptions.Metadata; |
2223 var _body = null; | 2206 var _body = null; |
2224 | 2207 |
2225 if (customer == null) { | 2208 if (customer == null) { |
2226 throw new core.ArgumentError("Parameter customer is required."); | 2209 throw new core.ArgumentError("Parameter customer is required."); |
2227 } | 2210 } |
2228 if (notificationId == null) { | 2211 if (notificationId == null) { |
2229 throw new core.ArgumentError("Parameter notificationId is required."); | 2212 throw new core.ArgumentError("Parameter notificationId is required."); |
2230 } | 2213 } |
2231 | 2214 |
2232 _url = 'customer/' + commons.Escaper.ecapeVariable('$customer') + '/notifica
tions/' + commons.Escaper.ecapeVariable('$notificationId'); | 2215 _url = 'customer/' + |
| 2216 commons.Escaper.ecapeVariable('$customer') + |
| 2217 '/notifications/' + |
| 2218 commons.Escaper.ecapeVariable('$notificationId'); |
2233 | 2219 |
2234 var _response = _requester.request(_url, | 2220 var _response = _requester.request(_url, "GET", |
2235 "GET", | 2221 body: _body, |
2236 body: _body, | 2222 queryParams: _queryParams, |
2237 queryParams: _queryParams, | 2223 uploadOptions: _uploadOptions, |
2238 uploadOptions: _uploadOptions, | 2224 uploadMedia: _uploadMedia, |
2239 uploadMedia: _uploadMedia, | 2225 downloadOptions: _downloadOptions); |
2240 downloadOptions: _downloadOptions); | |
2241 return _response.then((data) => new Notification.fromJson(data)); | 2226 return _response.then((data) => new Notification.fromJson(data)); |
2242 } | 2227 } |
2243 | 2228 |
2244 /** | 2229 /// Retrieves a list of notifications. |
2245 * Retrieves a list of notifications. | 2230 /// |
2246 * | 2231 /// Request parameters: |
2247 * Request parameters: | 2232 /// |
2248 * | 2233 /// [customer] - The unique ID for the customer's G Suite account. |
2249 * [customer] - The unique ID for the customer's G Suite account. | 2234 /// |
2250 * | 2235 /// [language] - The ISO 639-1 code of the language notifications are |
2251 * [language] - The ISO 639-1 code of the language notifications are returned | 2236 /// returned in. The default is English (en). |
2252 * in. The default is English (en). | 2237 /// |
2253 * | 2238 /// [maxResults] - Maximum number of notifications to return per page. The |
2254 * [maxResults] - Maximum number of notifications to return per page. The | 2239 /// default is 100. |
2255 * default is 100. | 2240 /// |
2256 * | 2241 /// [pageToken] - The token to specify the page of results to retrieve. |
2257 * [pageToken] - The token to specify the page of results to retrieve. | 2242 /// |
2258 * | 2243 /// Completes with a [Notifications]. |
2259 * Completes with a [Notifications]. | 2244 /// |
2260 * | 2245 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
2261 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 2246 /// an error. |
2262 * error. | 2247 /// |
2263 * | 2248 /// If the used [http.Client] completes with an error when making a REST |
2264 * If the used [http.Client] completes with an error when making a REST call, | 2249 /// call, this method will complete with the same error. |
2265 * this method will complete with the same error. | 2250 async.Future<Notifications> list(core.String customer, |
2266 */ | 2251 {core.String language, core.int maxResults, core.String pageToken}) { |
2267 async.Future<Notifications> list(core.String customer, {core.String language,
core.int maxResults, core.String pageToken}) { | |
2268 var _url = null; | 2252 var _url = null; |
2269 var _queryParams = new core.Map(); | 2253 var _queryParams = new core.Map(); |
2270 var _uploadMedia = null; | 2254 var _uploadMedia = null; |
2271 var _uploadOptions = null; | 2255 var _uploadOptions = null; |
2272 var _downloadOptions = commons.DownloadOptions.Metadata; | 2256 var _downloadOptions = commons.DownloadOptions.Metadata; |
2273 var _body = null; | 2257 var _body = null; |
2274 | 2258 |
2275 if (customer == null) { | 2259 if (customer == null) { |
2276 throw new core.ArgumentError("Parameter customer is required."); | 2260 throw new core.ArgumentError("Parameter customer is required."); |
2277 } | 2261 } |
2278 if (language != null) { | 2262 if (language != null) { |
2279 _queryParams["language"] = [language]; | 2263 _queryParams["language"] = [language]; |
2280 } | 2264 } |
2281 if (maxResults != null) { | 2265 if (maxResults != null) { |
2282 _queryParams["maxResults"] = ["${maxResults}"]; | 2266 _queryParams["maxResults"] = ["${maxResults}"]; |
2283 } | 2267 } |
2284 if (pageToken != null) { | 2268 if (pageToken != null) { |
2285 _queryParams["pageToken"] = [pageToken]; | 2269 _queryParams["pageToken"] = [pageToken]; |
2286 } | 2270 } |
2287 | 2271 |
2288 _url = 'customer/' + commons.Escaper.ecapeVariable('$customer') + '/notifica
tions'; | 2272 _url = 'customer/' + |
| 2273 commons.Escaper.ecapeVariable('$customer') + |
| 2274 '/notifications'; |
2289 | 2275 |
2290 var _response = _requester.request(_url, | 2276 var _response = _requester.request(_url, "GET", |
2291 "GET", | 2277 body: _body, |
2292 body: _body, | 2278 queryParams: _queryParams, |
2293 queryParams: _queryParams, | 2279 uploadOptions: _uploadOptions, |
2294 uploadOptions: _uploadOptions, | 2280 uploadMedia: _uploadMedia, |
2295 uploadMedia: _uploadMedia, | 2281 downloadOptions: _downloadOptions); |
2296 downloadOptions: _downloadOptions); | |
2297 return _response.then((data) => new Notifications.fromJson(data)); | 2282 return _response.then((data) => new Notifications.fromJson(data)); |
2298 } | 2283 } |
2299 | 2284 |
2300 /** | 2285 /// Updates a notification. This method supports patch semantics. |
2301 * Updates a notification. This method supports patch semantics. | 2286 /// |
2302 * | 2287 /// [request] - The metadata request object. |
2303 * [request] - The metadata request object. | 2288 /// |
2304 * | 2289 /// Request parameters: |
2305 * Request parameters: | 2290 /// |
2306 * | 2291 /// [customer] - The unique ID for the customer's G Suite account. |
2307 * [customer] - The unique ID for the customer's G Suite account. | 2292 /// |
2308 * | 2293 /// [notificationId] - The unique ID of the notification. |
2309 * [notificationId] - The unique ID of the notification. | 2294 /// |
2310 * | 2295 /// Completes with a [Notification]. |
2311 * Completes with a [Notification]. | 2296 /// |
2312 * | 2297 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
2313 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 2298 /// an error. |
2314 * error. | 2299 /// |
2315 * | 2300 /// If the used [http.Client] completes with an error when making a REST |
2316 * If the used [http.Client] completes with an error when making a REST call, | 2301 /// call, this method will complete with the same error. |
2317 * this method will complete with the same error. | 2302 async.Future<Notification> patch( |
2318 */ | 2303 Notification request, core.String customer, core.String notificationId) { |
2319 async.Future<Notification> patch(Notification request, core.String customer, c
ore.String notificationId) { | |
2320 var _url = null; | 2304 var _url = null; |
2321 var _queryParams = new core.Map(); | 2305 var _queryParams = new core.Map(); |
2322 var _uploadMedia = null; | 2306 var _uploadMedia = null; |
2323 var _uploadOptions = null; | 2307 var _uploadOptions = null; |
2324 var _downloadOptions = commons.DownloadOptions.Metadata; | 2308 var _downloadOptions = commons.DownloadOptions.Metadata; |
2325 var _body = null; | 2309 var _body = null; |
2326 | 2310 |
2327 if (request != null) { | 2311 if (request != null) { |
2328 _body = convert.JSON.encode((request).toJson()); | 2312 _body = convert.JSON.encode((request).toJson()); |
2329 } | 2313 } |
2330 if (customer == null) { | 2314 if (customer == null) { |
2331 throw new core.ArgumentError("Parameter customer is required."); | 2315 throw new core.ArgumentError("Parameter customer is required."); |
2332 } | 2316 } |
2333 if (notificationId == null) { | 2317 if (notificationId == null) { |
2334 throw new core.ArgumentError("Parameter notificationId is required."); | 2318 throw new core.ArgumentError("Parameter notificationId is required."); |
2335 } | 2319 } |
2336 | 2320 |
2337 _url = 'customer/' + commons.Escaper.ecapeVariable('$customer') + '/notifica
tions/' + commons.Escaper.ecapeVariable('$notificationId'); | 2321 _url = 'customer/' + |
| 2322 commons.Escaper.ecapeVariable('$customer') + |
| 2323 '/notifications/' + |
| 2324 commons.Escaper.ecapeVariable('$notificationId'); |
2338 | 2325 |
2339 var _response = _requester.request(_url, | 2326 var _response = _requester.request(_url, "PATCH", |
2340 "PATCH", | 2327 body: _body, |
2341 body: _body, | 2328 queryParams: _queryParams, |
2342 queryParams: _queryParams, | 2329 uploadOptions: _uploadOptions, |
2343 uploadOptions: _uploadOptions, | 2330 uploadMedia: _uploadMedia, |
2344 uploadMedia: _uploadMedia, | 2331 downloadOptions: _downloadOptions); |
2345 downloadOptions: _downloadOptions); | |
2346 return _response.then((data) => new Notification.fromJson(data)); | 2332 return _response.then((data) => new Notification.fromJson(data)); |
2347 } | 2333 } |
2348 | 2334 |
2349 /** | 2335 /// Updates a notification. |
2350 * Updates a notification. | 2336 /// |
2351 * | 2337 /// [request] - The metadata request object. |
2352 * [request] - The metadata request object. | 2338 /// |
2353 * | 2339 /// Request parameters: |
2354 * Request parameters: | 2340 /// |
2355 * | 2341 /// [customer] - The unique ID for the customer's G Suite account. |
2356 * [customer] - The unique ID for the customer's G Suite account. | 2342 /// |
2357 * | 2343 /// [notificationId] - The unique ID of the notification. |
2358 * [notificationId] - The unique ID of the notification. | 2344 /// |
2359 * | 2345 /// Completes with a [Notification]. |
2360 * Completes with a [Notification]. | 2346 /// |
2361 * | 2347 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
2362 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 2348 /// an error. |
2363 * error. | 2349 /// |
2364 * | 2350 /// If the used [http.Client] completes with an error when making a REST |
2365 * If the used [http.Client] completes with an error when making a REST call, | 2351 /// call, this method will complete with the same error. |
2366 * this method will complete with the same error. | 2352 async.Future<Notification> update( |
2367 */ | 2353 Notification request, core.String customer, core.String notificationId) { |
2368 async.Future<Notification> update(Notification request, core.String customer,
core.String notificationId) { | |
2369 var _url = null; | 2354 var _url = null; |
2370 var _queryParams = new core.Map(); | 2355 var _queryParams = new core.Map(); |
2371 var _uploadMedia = null; | 2356 var _uploadMedia = null; |
2372 var _uploadOptions = null; | 2357 var _uploadOptions = null; |
2373 var _downloadOptions = commons.DownloadOptions.Metadata; | 2358 var _downloadOptions = commons.DownloadOptions.Metadata; |
2374 var _body = null; | 2359 var _body = null; |
2375 | 2360 |
2376 if (request != null) { | 2361 if (request != null) { |
2377 _body = convert.JSON.encode((request).toJson()); | 2362 _body = convert.JSON.encode((request).toJson()); |
2378 } | 2363 } |
2379 if (customer == null) { | 2364 if (customer == null) { |
2380 throw new core.ArgumentError("Parameter customer is required."); | 2365 throw new core.ArgumentError("Parameter customer is required."); |
2381 } | 2366 } |
2382 if (notificationId == null) { | 2367 if (notificationId == null) { |
2383 throw new core.ArgumentError("Parameter notificationId is required."); | 2368 throw new core.ArgumentError("Parameter notificationId is required."); |
2384 } | 2369 } |
2385 | 2370 |
2386 _url = 'customer/' + commons.Escaper.ecapeVariable('$customer') + '/notifica
tions/' + commons.Escaper.ecapeVariable('$notificationId'); | 2371 _url = 'customer/' + |
| 2372 commons.Escaper.ecapeVariable('$customer') + |
| 2373 '/notifications/' + |
| 2374 commons.Escaper.ecapeVariable('$notificationId'); |
2387 | 2375 |
2388 var _response = _requester.request(_url, | 2376 var _response = _requester.request(_url, "PUT", |
2389 "PUT", | 2377 body: _body, |
2390 body: _body, | 2378 queryParams: _queryParams, |
2391 queryParams: _queryParams, | 2379 uploadOptions: _uploadOptions, |
2392 uploadOptions: _uploadOptions, | 2380 uploadMedia: _uploadMedia, |
2393 uploadMedia: _uploadMedia, | 2381 downloadOptions: _downloadOptions); |
2394 downloadOptions: _downloadOptions); | |
2395 return _response.then((data) => new Notification.fromJson(data)); | 2382 return _response.then((data) => new Notification.fromJson(data)); |
2396 } | 2383 } |
2397 | |
2398 } | 2384 } |
2399 | 2385 |
2400 | |
2401 class OrgunitsResourceApi { | 2386 class OrgunitsResourceApi { |
2402 final commons.ApiRequester _requester; | 2387 final commons.ApiRequester _requester; |
2403 | 2388 |
2404 OrgunitsResourceApi(commons.ApiRequester client) : | 2389 OrgunitsResourceApi(commons.ApiRequester client) : _requester = client; |
2405 _requester = client; | |
2406 | 2390 |
2407 /** | 2391 /// Remove Organization Unit |
2408 * Remove Organization Unit | 2392 /// |
2409 * | 2393 /// Request parameters: |
2410 * Request parameters: | 2394 /// |
2411 * | 2395 /// [customerId] - Immutable ID of the G Suite account |
2412 * [customerId] - Immutable ID of the G Suite account | 2396 /// |
2413 * | 2397 /// [orgUnitPath] - Full path of the organization unit or its Id |
2414 * [orgUnitPath] - Full path of the organization unit or its Id | 2398 /// |
2415 * | 2399 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
2416 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 2400 /// an error. |
2417 * error. | 2401 /// |
2418 * | 2402 /// If the used [http.Client] completes with an error when making a REST |
2419 * If the used [http.Client] completes with an error when making a REST call, | 2403 /// call, this method will complete with the same error. |
2420 * this method will complete with the same error. | 2404 async.Future delete( |
2421 */ | 2405 core.String customerId, core.List<core.String> orgUnitPath) { |
2422 async.Future delete(core.String customerId, core.List<core.String> orgUnitPath
) { | |
2423 var _url = null; | 2406 var _url = null; |
2424 var _queryParams = new core.Map(); | 2407 var _queryParams = new core.Map(); |
2425 var _uploadMedia = null; | 2408 var _uploadMedia = null; |
2426 var _uploadOptions = null; | 2409 var _uploadOptions = null; |
2427 var _downloadOptions = commons.DownloadOptions.Metadata; | 2410 var _downloadOptions = commons.DownloadOptions.Metadata; |
2428 var _body = null; | 2411 var _body = null; |
2429 | 2412 |
2430 if (customerId == null) { | 2413 if (customerId == null) { |
2431 throw new core.ArgumentError("Parameter customerId is required."); | 2414 throw new core.ArgumentError("Parameter customerId is required."); |
2432 } | 2415 } |
2433 if (orgUnitPath == null || orgUnitPath.isEmpty) { | 2416 if (orgUnitPath == null || orgUnitPath.isEmpty) { |
2434 throw new core.ArgumentError("Parameter orgUnitPath is required."); | 2417 throw new core.ArgumentError("Parameter orgUnitPath is required."); |
2435 } | 2418 } |
2436 | 2419 |
2437 _downloadOptions = null; | 2420 _downloadOptions = null; |
2438 | 2421 |
2439 _url = 'customer/' + commons.Escaper.ecapeVariable('$customerId') + '/orguni
ts' + '/' + (orgUnitPath).map((item) => commons.Escaper.ecapePathComponent(item)
).join('/'); | 2422 _url = 'customer/' + |
| 2423 commons.Escaper.ecapeVariable('$customerId') + |
| 2424 '/orgunits' + |
| 2425 '/' + |
| 2426 (orgUnitPath) |
| 2427 .map((item) => commons.Escaper.ecapePathComponent(item)) |
| 2428 .join('/'); |
2440 | 2429 |
2441 var _response = _requester.request(_url, | 2430 var _response = _requester.request(_url, "DELETE", |
2442 "DELETE", | 2431 body: _body, |
2443 body: _body, | 2432 queryParams: _queryParams, |
2444 queryParams: _queryParams, | 2433 uploadOptions: _uploadOptions, |
2445 uploadOptions: _uploadOptions, | 2434 uploadMedia: _uploadMedia, |
2446 uploadMedia: _uploadMedia, | 2435 downloadOptions: _downloadOptions); |
2447 downloadOptions: _downloadOptions); | |
2448 return _response.then((data) => null); | 2436 return _response.then((data) => null); |
2449 } | 2437 } |
2450 | 2438 |
2451 /** | 2439 /// Retrieve Organization Unit |
2452 * Retrieve Organization Unit | 2440 /// |
2453 * | 2441 /// Request parameters: |
2454 * Request parameters: | 2442 /// |
2455 * | 2443 /// [customerId] - Immutable ID of the G Suite account |
2456 * [customerId] - Immutable ID of the G Suite account | 2444 /// |
2457 * | 2445 /// [orgUnitPath] - Full path of the organization unit or its Id |
2458 * [orgUnitPath] - Full path of the organization unit or its Id | 2446 /// |
2459 * | 2447 /// Completes with a [OrgUnit]. |
2460 * Completes with a [OrgUnit]. | 2448 /// |
2461 * | 2449 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
2462 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 2450 /// an error. |
2463 * error. | 2451 /// |
2464 * | 2452 /// If the used [http.Client] completes with an error when making a REST |
2465 * If the used [http.Client] completes with an error when making a REST call, | 2453 /// call, this method will complete with the same error. |
2466 * this method will complete with the same error. | 2454 async.Future<OrgUnit> get( |
2467 */ | 2455 core.String customerId, core.List<core.String> orgUnitPath) { |
2468 async.Future<OrgUnit> get(core.String customerId, core.List<core.String> orgUn
itPath) { | |
2469 var _url = null; | 2456 var _url = null; |
2470 var _queryParams = new core.Map(); | 2457 var _queryParams = new core.Map(); |
2471 var _uploadMedia = null; | 2458 var _uploadMedia = null; |
2472 var _uploadOptions = null; | 2459 var _uploadOptions = null; |
2473 var _downloadOptions = commons.DownloadOptions.Metadata; | 2460 var _downloadOptions = commons.DownloadOptions.Metadata; |
2474 var _body = null; | 2461 var _body = null; |
2475 | 2462 |
2476 if (customerId == null) { | 2463 if (customerId == null) { |
2477 throw new core.ArgumentError("Parameter customerId is required."); | 2464 throw new core.ArgumentError("Parameter customerId is required."); |
2478 } | 2465 } |
2479 if (orgUnitPath == null || orgUnitPath.isEmpty) { | 2466 if (orgUnitPath == null || orgUnitPath.isEmpty) { |
2480 throw new core.ArgumentError("Parameter orgUnitPath is required."); | 2467 throw new core.ArgumentError("Parameter orgUnitPath is required."); |
2481 } | 2468 } |
2482 | 2469 |
2483 _url = 'customer/' + commons.Escaper.ecapeVariable('$customerId') + '/orguni
ts' + '/' + (orgUnitPath).map((item) => commons.Escaper.ecapePathComponent(item)
).join('/'); | 2470 _url = 'customer/' + |
| 2471 commons.Escaper.ecapeVariable('$customerId') + |
| 2472 '/orgunits' + |
| 2473 '/' + |
| 2474 (orgUnitPath) |
| 2475 .map((item) => commons.Escaper.ecapePathComponent(item)) |
| 2476 .join('/'); |
2484 | 2477 |
2485 var _response = _requester.request(_url, | 2478 var _response = _requester.request(_url, "GET", |
2486 "GET", | 2479 body: _body, |
2487 body: _body, | 2480 queryParams: _queryParams, |
2488 queryParams: _queryParams, | 2481 uploadOptions: _uploadOptions, |
2489 uploadOptions: _uploadOptions, | 2482 uploadMedia: _uploadMedia, |
2490 uploadMedia: _uploadMedia, | 2483 downloadOptions: _downloadOptions); |
2491 downloadOptions: _downloadOptions); | |
2492 return _response.then((data) => new OrgUnit.fromJson(data)); | 2484 return _response.then((data) => new OrgUnit.fromJson(data)); |
2493 } | 2485 } |
2494 | 2486 |
2495 /** | 2487 /// Add Organization Unit |
2496 * Add Organization Unit | 2488 /// |
2497 * | 2489 /// [request] - The metadata request object. |
2498 * [request] - The metadata request object. | 2490 /// |
2499 * | 2491 /// Request parameters: |
2500 * Request parameters: | 2492 /// |
2501 * | 2493 /// [customerId] - Immutable ID of the G Suite account |
2502 * [customerId] - Immutable ID of the G Suite account | 2494 /// |
2503 * | 2495 /// Completes with a [OrgUnit]. |
2504 * Completes with a [OrgUnit]. | 2496 /// |
2505 * | 2497 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
2506 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 2498 /// an error. |
2507 * error. | 2499 /// |
2508 * | 2500 /// If the used [http.Client] completes with an error when making a REST |
2509 * If the used [http.Client] completes with an error when making a REST call, | 2501 /// call, this method will complete with the same error. |
2510 * this method will complete with the same error. | |
2511 */ | |
2512 async.Future<OrgUnit> insert(OrgUnit request, core.String customerId) { | 2502 async.Future<OrgUnit> insert(OrgUnit request, core.String customerId) { |
2513 var _url = null; | 2503 var _url = null; |
2514 var _queryParams = new core.Map(); | 2504 var _queryParams = new core.Map(); |
2515 var _uploadMedia = null; | 2505 var _uploadMedia = null; |
2516 var _uploadOptions = null; | 2506 var _uploadOptions = null; |
2517 var _downloadOptions = commons.DownloadOptions.Metadata; | 2507 var _downloadOptions = commons.DownloadOptions.Metadata; |
2518 var _body = null; | 2508 var _body = null; |
2519 | 2509 |
2520 if (request != null) { | 2510 if (request != null) { |
2521 _body = convert.JSON.encode((request).toJson()); | 2511 _body = convert.JSON.encode((request).toJson()); |
2522 } | 2512 } |
2523 if (customerId == null) { | 2513 if (customerId == null) { |
2524 throw new core.ArgumentError("Parameter customerId is required."); | 2514 throw new core.ArgumentError("Parameter customerId is required."); |
2525 } | 2515 } |
2526 | 2516 |
2527 _url = 'customer/' + commons.Escaper.ecapeVariable('$customerId') + '/orguni
ts'; | 2517 _url = 'customer/' + |
| 2518 commons.Escaper.ecapeVariable('$customerId') + |
| 2519 '/orgunits'; |
2528 | 2520 |
2529 var _response = _requester.request(_url, | 2521 var _response = _requester.request(_url, "POST", |
2530 "POST", | 2522 body: _body, |
2531 body: _body, | 2523 queryParams: _queryParams, |
2532 queryParams: _queryParams, | 2524 uploadOptions: _uploadOptions, |
2533 uploadOptions: _uploadOptions, | 2525 uploadMedia: _uploadMedia, |
2534 uploadMedia: _uploadMedia, | 2526 downloadOptions: _downloadOptions); |
2535 downloadOptions: _downloadOptions); | |
2536 return _response.then((data) => new OrgUnit.fromJson(data)); | 2527 return _response.then((data) => new OrgUnit.fromJson(data)); |
2537 } | 2528 } |
2538 | 2529 |
2539 /** | 2530 /// Retrieve all Organization Units |
2540 * Retrieve all Organization Units | 2531 /// |
2541 * | 2532 /// Request parameters: |
2542 * Request parameters: | 2533 /// |
2543 * | 2534 /// [customerId] - Immutable ID of the G Suite account |
2544 * [customerId] - Immutable ID of the G Suite account | 2535 /// |
2545 * | 2536 /// [orgUnitPath] - the URL-encoded organization unit's path or its Id |
2546 * [orgUnitPath] - the URL-encoded organization unit's path or its Id | 2537 /// |
2547 * | 2538 /// [type] - Whether to return all sub-organizations or just immediate |
2548 * [type] - Whether to return all sub-organizations or just immediate children | 2539 /// children |
2549 * Possible string values are: | 2540 /// Possible string values are: |
2550 * - "all" : All sub-organization units. | 2541 /// - "all" : All sub-organization units. |
2551 * - "children" : Immediate children only (default). | 2542 /// - "children" : Immediate children only (default). |
2552 * | 2543 /// |
2553 * Completes with a [OrgUnits]. | 2544 /// Completes with a [OrgUnits]. |
2554 * | 2545 /// |
2555 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 2546 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
2556 * error. | 2547 /// an error. |
2557 * | 2548 /// |
2558 * If the used [http.Client] completes with an error when making a REST call, | 2549 /// If the used [http.Client] completes with an error when making a REST |
2559 * this method will complete with the same error. | 2550 /// call, this method will complete with the same error. |
2560 */ | 2551 async.Future<OrgUnits> list(core.String customerId, |
2561 async.Future<OrgUnits> list(core.String customerId, {core.String orgUnitPath,
core.String type}) { | 2552 {core.String orgUnitPath, core.String type}) { |
2562 var _url = null; | 2553 var _url = null; |
2563 var _queryParams = new core.Map(); | 2554 var _queryParams = new core.Map(); |
2564 var _uploadMedia = null; | 2555 var _uploadMedia = null; |
2565 var _uploadOptions = null; | 2556 var _uploadOptions = null; |
2566 var _downloadOptions = commons.DownloadOptions.Metadata; | 2557 var _downloadOptions = commons.DownloadOptions.Metadata; |
2567 var _body = null; | 2558 var _body = null; |
2568 | 2559 |
2569 if (customerId == null) { | 2560 if (customerId == null) { |
2570 throw new core.ArgumentError("Parameter customerId is required."); | 2561 throw new core.ArgumentError("Parameter customerId is required."); |
2571 } | 2562 } |
2572 if (orgUnitPath != null) { | 2563 if (orgUnitPath != null) { |
2573 _queryParams["orgUnitPath"] = [orgUnitPath]; | 2564 _queryParams["orgUnitPath"] = [orgUnitPath]; |
2574 } | 2565 } |
2575 if (type != null) { | 2566 if (type != null) { |
2576 _queryParams["type"] = [type]; | 2567 _queryParams["type"] = [type]; |
2577 } | 2568 } |
2578 | 2569 |
2579 _url = 'customer/' + commons.Escaper.ecapeVariable('$customerId') + '/orguni
ts'; | 2570 _url = 'customer/' + |
| 2571 commons.Escaper.ecapeVariable('$customerId') + |
| 2572 '/orgunits'; |
2580 | 2573 |
2581 var _response = _requester.request(_url, | 2574 var _response = _requester.request(_url, "GET", |
2582 "GET", | 2575 body: _body, |
2583 body: _body, | 2576 queryParams: _queryParams, |
2584 queryParams: _queryParams, | 2577 uploadOptions: _uploadOptions, |
2585 uploadOptions: _uploadOptions, | 2578 uploadMedia: _uploadMedia, |
2586 uploadMedia: _uploadMedia, | 2579 downloadOptions: _downloadOptions); |
2587 downloadOptions: _downloadOptions); | |
2588 return _response.then((data) => new OrgUnits.fromJson(data)); | 2580 return _response.then((data) => new OrgUnits.fromJson(data)); |
2589 } | 2581 } |
2590 | 2582 |
2591 /** | 2583 /// Update Organization Unit. This method supports patch semantics. |
2592 * Update Organization Unit. This method supports patch semantics. | 2584 /// |
2593 * | 2585 /// [request] - The metadata request object. |
2594 * [request] - The metadata request object. | 2586 /// |
2595 * | 2587 /// Request parameters: |
2596 * Request parameters: | 2588 /// |
2597 * | 2589 /// [customerId] - Immutable ID of the G Suite account |
2598 * [customerId] - Immutable ID of the G Suite account | 2590 /// |
2599 * | 2591 /// [orgUnitPath] - Full path of the organization unit or its Id |
2600 * [orgUnitPath] - Full path of the organization unit or its Id | 2592 /// |
2601 * | 2593 /// Completes with a [OrgUnit]. |
2602 * Completes with a [OrgUnit]. | 2594 /// |
2603 * | 2595 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
2604 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 2596 /// an error. |
2605 * error. | 2597 /// |
2606 * | 2598 /// If the used [http.Client] completes with an error when making a REST |
2607 * If the used [http.Client] completes with an error when making a REST call, | 2599 /// call, this method will complete with the same error. |
2608 * this method will complete with the same error. | 2600 async.Future<OrgUnit> patch(OrgUnit request, core.String customerId, |
2609 */ | 2601 core.List<core.String> orgUnitPath) { |
2610 async.Future<OrgUnit> patch(OrgUnit request, core.String customerId, core.List
<core.String> orgUnitPath) { | |
2611 var _url = null; | 2602 var _url = null; |
2612 var _queryParams = new core.Map(); | 2603 var _queryParams = new core.Map(); |
2613 var _uploadMedia = null; | 2604 var _uploadMedia = null; |
2614 var _uploadOptions = null; | 2605 var _uploadOptions = null; |
2615 var _downloadOptions = commons.DownloadOptions.Metadata; | 2606 var _downloadOptions = commons.DownloadOptions.Metadata; |
2616 var _body = null; | 2607 var _body = null; |
2617 | 2608 |
2618 if (request != null) { | 2609 if (request != null) { |
2619 _body = convert.JSON.encode((request).toJson()); | 2610 _body = convert.JSON.encode((request).toJson()); |
2620 } | 2611 } |
2621 if (customerId == null) { | 2612 if (customerId == null) { |
2622 throw new core.ArgumentError("Parameter customerId is required."); | 2613 throw new core.ArgumentError("Parameter customerId is required."); |
2623 } | 2614 } |
2624 if (orgUnitPath == null || orgUnitPath.isEmpty) { | 2615 if (orgUnitPath == null || orgUnitPath.isEmpty) { |
2625 throw new core.ArgumentError("Parameter orgUnitPath is required."); | 2616 throw new core.ArgumentError("Parameter orgUnitPath is required."); |
2626 } | 2617 } |
2627 | 2618 |
2628 _url = 'customer/' + commons.Escaper.ecapeVariable('$customerId') + '/orguni
ts' + '/' + (orgUnitPath).map((item) => commons.Escaper.ecapePathComponent(item)
).join('/'); | 2619 _url = 'customer/' + |
| 2620 commons.Escaper.ecapeVariable('$customerId') + |
| 2621 '/orgunits' + |
| 2622 '/' + |
| 2623 (orgUnitPath) |
| 2624 .map((item) => commons.Escaper.ecapePathComponent(item)) |
| 2625 .join('/'); |
2629 | 2626 |
2630 var _response = _requester.request(_url, | 2627 var _response = _requester.request(_url, "PATCH", |
2631 "PATCH", | 2628 body: _body, |
2632 body: _body, | 2629 queryParams: _queryParams, |
2633 queryParams: _queryParams, | 2630 uploadOptions: _uploadOptions, |
2634 uploadOptions: _uploadOptions, | 2631 uploadMedia: _uploadMedia, |
2635 uploadMedia: _uploadMedia, | 2632 downloadOptions: _downloadOptions); |
2636 downloadOptions: _downloadOptions); | |
2637 return _response.then((data) => new OrgUnit.fromJson(data)); | 2633 return _response.then((data) => new OrgUnit.fromJson(data)); |
2638 } | 2634 } |
2639 | 2635 |
2640 /** | 2636 /// Update Organization Unit |
2641 * Update Organization Unit | 2637 /// |
2642 * | 2638 /// [request] - The metadata request object. |
2643 * [request] - The metadata request object. | 2639 /// |
2644 * | 2640 /// Request parameters: |
2645 * Request parameters: | 2641 /// |
2646 * | 2642 /// [customerId] - Immutable ID of the G Suite account |
2647 * [customerId] - Immutable ID of the G Suite account | 2643 /// |
2648 * | 2644 /// [orgUnitPath] - Full path of the organization unit or its Id |
2649 * [orgUnitPath] - Full path of the organization unit or its Id | 2645 /// |
2650 * | 2646 /// Completes with a [OrgUnit]. |
2651 * Completes with a [OrgUnit]. | 2647 /// |
2652 * | 2648 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
2653 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 2649 /// an error. |
2654 * error. | 2650 /// |
2655 * | 2651 /// If the used [http.Client] completes with an error when making a REST |
2656 * If the used [http.Client] completes with an error when making a REST call, | 2652 /// call, this method will complete with the same error. |
2657 * this method will complete with the same error. | 2653 async.Future<OrgUnit> update(OrgUnit request, core.String customerId, |
2658 */ | 2654 core.List<core.String> orgUnitPath) { |
2659 async.Future<OrgUnit> update(OrgUnit request, core.String customerId, core.Lis
t<core.String> orgUnitPath) { | |
2660 var _url = null; | 2655 var _url = null; |
2661 var _queryParams = new core.Map(); | 2656 var _queryParams = new core.Map(); |
2662 var _uploadMedia = null; | 2657 var _uploadMedia = null; |
2663 var _uploadOptions = null; | 2658 var _uploadOptions = null; |
2664 var _downloadOptions = commons.DownloadOptions.Metadata; | 2659 var _downloadOptions = commons.DownloadOptions.Metadata; |
2665 var _body = null; | 2660 var _body = null; |
2666 | 2661 |
2667 if (request != null) { | 2662 if (request != null) { |
2668 _body = convert.JSON.encode((request).toJson()); | 2663 _body = convert.JSON.encode((request).toJson()); |
2669 } | 2664 } |
2670 if (customerId == null) { | 2665 if (customerId == null) { |
2671 throw new core.ArgumentError("Parameter customerId is required."); | 2666 throw new core.ArgumentError("Parameter customerId is required."); |
2672 } | 2667 } |
2673 if (orgUnitPath == null || orgUnitPath.isEmpty) { | 2668 if (orgUnitPath == null || orgUnitPath.isEmpty) { |
2674 throw new core.ArgumentError("Parameter orgUnitPath is required."); | 2669 throw new core.ArgumentError("Parameter orgUnitPath is required."); |
2675 } | 2670 } |
2676 | 2671 |
2677 _url = 'customer/' + commons.Escaper.ecapeVariable('$customerId') + '/orguni
ts' + '/' + (orgUnitPath).map((item) => commons.Escaper.ecapePathComponent(item)
).join('/'); | 2672 _url = 'customer/' + |
| 2673 commons.Escaper.ecapeVariable('$customerId') + |
| 2674 '/orgunits' + |
| 2675 '/' + |
| 2676 (orgUnitPath) |
| 2677 .map((item) => commons.Escaper.ecapePathComponent(item)) |
| 2678 .join('/'); |
2678 | 2679 |
2679 var _response = _requester.request(_url, | 2680 var _response = _requester.request(_url, "PUT", |
2680 "PUT", | 2681 body: _body, |
2681 body: _body, | 2682 queryParams: _queryParams, |
2682 queryParams: _queryParams, | 2683 uploadOptions: _uploadOptions, |
2683 uploadOptions: _uploadOptions, | 2684 uploadMedia: _uploadMedia, |
2684 uploadMedia: _uploadMedia, | 2685 downloadOptions: _downloadOptions); |
2685 downloadOptions: _downloadOptions); | |
2686 return _response.then((data) => new OrgUnit.fromJson(data)); | 2686 return _response.then((data) => new OrgUnit.fromJson(data)); |
2687 } | 2687 } |
2688 | |
2689 } | 2688 } |
2690 | 2689 |
2691 | |
2692 class PrivilegesResourceApi { | 2690 class PrivilegesResourceApi { |
2693 final commons.ApiRequester _requester; | 2691 final commons.ApiRequester _requester; |
2694 | 2692 |
2695 PrivilegesResourceApi(commons.ApiRequester client) : | 2693 PrivilegesResourceApi(commons.ApiRequester client) : _requester = client; |
2696 _requester = client; | |
2697 | 2694 |
2698 /** | 2695 /// Retrieves a paginated list of all privileges for a customer. |
2699 * Retrieves a paginated list of all privileges for a customer. | 2696 /// |
2700 * | 2697 /// Request parameters: |
2701 * Request parameters: | 2698 /// |
2702 * | 2699 /// [customer] - Immutable ID of the G Suite account. |
2703 * [customer] - Immutable ID of the G Suite account. | 2700 /// |
2704 * | 2701 /// Completes with a [Privileges]. |
2705 * Completes with a [Privileges]. | 2702 /// |
2706 * | 2703 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
2707 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 2704 /// an error. |
2708 * error. | 2705 /// |
2709 * | 2706 /// If the used [http.Client] completes with an error when making a REST |
2710 * If the used [http.Client] completes with an error when making a REST call, | 2707 /// call, this method will complete with the same error. |
2711 * this method will complete with the same error. | |
2712 */ | |
2713 async.Future<Privileges> list(core.String customer) { | 2708 async.Future<Privileges> list(core.String customer) { |
2714 var _url = null; | 2709 var _url = null; |
2715 var _queryParams = new core.Map(); | 2710 var _queryParams = new core.Map(); |
2716 var _uploadMedia = null; | 2711 var _uploadMedia = null; |
2717 var _uploadOptions = null; | 2712 var _uploadOptions = null; |
2718 var _downloadOptions = commons.DownloadOptions.Metadata; | 2713 var _downloadOptions = commons.DownloadOptions.Metadata; |
2719 var _body = null; | 2714 var _body = null; |
2720 | 2715 |
2721 if (customer == null) { | 2716 if (customer == null) { |
2722 throw new core.ArgumentError("Parameter customer is required."); | 2717 throw new core.ArgumentError("Parameter customer is required."); |
2723 } | 2718 } |
2724 | 2719 |
2725 _url = 'customer/' + commons.Escaper.ecapeVariable('$customer') + '/roles/AL
L/privileges'; | 2720 _url = 'customer/' + |
| 2721 commons.Escaper.ecapeVariable('$customer') + |
| 2722 '/roles/ALL/privileges'; |
2726 | 2723 |
2727 var _response = _requester.request(_url, | 2724 var _response = _requester.request(_url, "GET", |
2728 "GET", | 2725 body: _body, |
2729 body: _body, | 2726 queryParams: _queryParams, |
2730 queryParams: _queryParams, | 2727 uploadOptions: _uploadOptions, |
2731 uploadOptions: _uploadOptions, | 2728 uploadMedia: _uploadMedia, |
2732 uploadMedia: _uploadMedia, | 2729 downloadOptions: _downloadOptions); |
2733 downloadOptions: _downloadOptions); | |
2734 return _response.then((data) => new Privileges.fromJson(data)); | 2730 return _response.then((data) => new Privileges.fromJson(data)); |
2735 } | 2731 } |
2736 | |
2737 } | 2732 } |
2738 | 2733 |
2739 | |
2740 class ResourcesResourceApi { | 2734 class ResourcesResourceApi { |
2741 final commons.ApiRequester _requester; | 2735 final commons.ApiRequester _requester; |
2742 | 2736 |
2743 ResourcesCalendarsResourceApi get calendars => new ResourcesCalendarsResourceA
pi(_requester); | 2737 ResourcesCalendarsResourceApi get calendars => |
| 2738 new ResourcesCalendarsResourceApi(_requester); |
2744 | 2739 |
2745 ResourcesResourceApi(commons.ApiRequester client) : | 2740 ResourcesResourceApi(commons.ApiRequester client) : _requester = client; |
2746 _requester = client; | |
2747 } | 2741 } |
2748 | 2742 |
2749 | |
2750 class ResourcesCalendarsResourceApi { | 2743 class ResourcesCalendarsResourceApi { |
2751 final commons.ApiRequester _requester; | 2744 final commons.ApiRequester _requester; |
2752 | 2745 |
2753 ResourcesCalendarsResourceApi(commons.ApiRequester client) : | 2746 ResourcesCalendarsResourceApi(commons.ApiRequester client) |
2754 _requester = client; | 2747 : _requester = client; |
2755 | 2748 |
2756 /** | 2749 /// Deletes a calendar resource. |
2757 * Deletes a calendar resource. | 2750 /// |
2758 * | 2751 /// Request parameters: |
2759 * Request parameters: | 2752 /// |
2760 * | 2753 /// [customer] - The unique ID for the customer's G Suite account. As an |
2761 * [customer] - The unique ID for the customer's G Suite account. As an | 2754 /// account administrator, you can also use the my_customer alias to |
2762 * account administrator, you can also use the my_customer alias to represent | 2755 /// represent your account's customer ID. |
2763 * your account's customer ID. | 2756 /// |
2764 * | 2757 /// [calendarResourceId] - The unique ID of the calendar resource to delete. |
2765 * [calendarResourceId] - The unique ID of the calendar resource to delete. | 2758 /// |
2766 * | 2759 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
2767 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 2760 /// an error. |
2768 * error. | 2761 /// |
2769 * | 2762 /// If the used [http.Client] completes with an error when making a REST |
2770 * If the used [http.Client] completes with an error when making a REST call, | 2763 /// call, this method will complete with the same error. |
2771 * this method will complete with the same error. | |
2772 */ | |
2773 async.Future delete(core.String customer, core.String calendarResourceId) { | 2764 async.Future delete(core.String customer, core.String calendarResourceId) { |
2774 var _url = null; | 2765 var _url = null; |
2775 var _queryParams = new core.Map(); | 2766 var _queryParams = new core.Map(); |
2776 var _uploadMedia = null; | 2767 var _uploadMedia = null; |
2777 var _uploadOptions = null; | 2768 var _uploadOptions = null; |
2778 var _downloadOptions = commons.DownloadOptions.Metadata; | 2769 var _downloadOptions = commons.DownloadOptions.Metadata; |
2779 var _body = null; | 2770 var _body = null; |
2780 | 2771 |
2781 if (customer == null) { | 2772 if (customer == null) { |
2782 throw new core.ArgumentError("Parameter customer is required."); | 2773 throw new core.ArgumentError("Parameter customer is required."); |
2783 } | 2774 } |
2784 if (calendarResourceId == null) { | 2775 if (calendarResourceId == null) { |
2785 throw new core.ArgumentError("Parameter calendarResourceId is required."); | 2776 throw new core.ArgumentError("Parameter calendarResourceId is required."); |
2786 } | 2777 } |
2787 | 2778 |
2788 _downloadOptions = null; | 2779 _downloadOptions = null; |
2789 | 2780 |
2790 _url = 'customer/' + commons.Escaper.ecapeVariable('$customer') + '/resource
s/calendars/' + commons.Escaper.ecapeVariable('$calendarResourceId'); | 2781 _url = 'customer/' + |
| 2782 commons.Escaper.ecapeVariable('$customer') + |
| 2783 '/resources/calendars/' + |
| 2784 commons.Escaper.ecapeVariable('$calendarResourceId'); |
2791 | 2785 |
2792 var _response = _requester.request(_url, | 2786 var _response = _requester.request(_url, "DELETE", |
2793 "DELETE", | 2787 body: _body, |
2794 body: _body, | 2788 queryParams: _queryParams, |
2795 queryParams: _queryParams, | 2789 uploadOptions: _uploadOptions, |
2796 uploadOptions: _uploadOptions, | 2790 uploadMedia: _uploadMedia, |
2797 uploadMedia: _uploadMedia, | 2791 downloadOptions: _downloadOptions); |
2798 downloadOptions: _downloadOptions); | |
2799 return _response.then((data) => null); | 2792 return _response.then((data) => null); |
2800 } | 2793 } |
2801 | 2794 |
2802 /** | 2795 /// Retrieves a calendar resource. |
2803 * Retrieves a calendar resource. | 2796 /// |
2804 * | 2797 /// Request parameters: |
2805 * Request parameters: | 2798 /// |
2806 * | 2799 /// [customer] - The unique ID for the customer's G Suite account. As an |
2807 * [customer] - The unique ID for the customer's G Suite account. As an | 2800 /// account administrator, you can also use the my_customer alias to |
2808 * account administrator, you can also use the my_customer alias to represent | 2801 /// represent your account's customer ID. |
2809 * your account's customer ID. | 2802 /// |
2810 * | 2803 /// [calendarResourceId] - The unique ID of the calendar resource to |
2811 * [calendarResourceId] - The unique ID of the calendar resource to retrieve. | 2804 /// retrieve. |
2812 * | 2805 /// |
2813 * Completes with a [CalendarResource]. | 2806 /// Completes with a [CalendarResource]. |
2814 * | 2807 /// |
2815 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 2808 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
2816 * error. | 2809 /// an error. |
2817 * | 2810 /// |
2818 * If the used [http.Client] completes with an error when making a REST call, | 2811 /// If the used [http.Client] completes with an error when making a REST |
2819 * this method will complete with the same error. | 2812 /// call, this method will complete with the same error. |
2820 */ | 2813 async.Future<CalendarResource> get( |
2821 async.Future<CalendarResource> get(core.String customer, core.String calendarR
esourceId) { | 2814 core.String customer, core.String calendarResourceId) { |
2822 var _url = null; | 2815 var _url = null; |
2823 var _queryParams = new core.Map(); | 2816 var _queryParams = new core.Map(); |
2824 var _uploadMedia = null; | 2817 var _uploadMedia = null; |
2825 var _uploadOptions = null; | 2818 var _uploadOptions = null; |
2826 var _downloadOptions = commons.DownloadOptions.Metadata; | 2819 var _downloadOptions = commons.DownloadOptions.Metadata; |
2827 var _body = null; | 2820 var _body = null; |
2828 | 2821 |
2829 if (customer == null) { | 2822 if (customer == null) { |
2830 throw new core.ArgumentError("Parameter customer is required."); | 2823 throw new core.ArgumentError("Parameter customer is required."); |
2831 } | 2824 } |
2832 if (calendarResourceId == null) { | 2825 if (calendarResourceId == null) { |
2833 throw new core.ArgumentError("Parameter calendarResourceId is required."); | 2826 throw new core.ArgumentError("Parameter calendarResourceId is required."); |
2834 } | 2827 } |
2835 | 2828 |
2836 _url = 'customer/' + commons.Escaper.ecapeVariable('$customer') + '/resource
s/calendars/' + commons.Escaper.ecapeVariable('$calendarResourceId'); | 2829 _url = 'customer/' + |
| 2830 commons.Escaper.ecapeVariable('$customer') + |
| 2831 '/resources/calendars/' + |
| 2832 commons.Escaper.ecapeVariable('$calendarResourceId'); |
2837 | 2833 |
2838 var _response = _requester.request(_url, | 2834 var _response = _requester.request(_url, "GET", |
2839 "GET", | 2835 body: _body, |
2840 body: _body, | 2836 queryParams: _queryParams, |
2841 queryParams: _queryParams, | 2837 uploadOptions: _uploadOptions, |
2842 uploadOptions: _uploadOptions, | 2838 uploadMedia: _uploadMedia, |
2843 uploadMedia: _uploadMedia, | 2839 downloadOptions: _downloadOptions); |
2844 downloadOptions: _downloadOptions); | |
2845 return _response.then((data) => new CalendarResource.fromJson(data)); | 2840 return _response.then((data) => new CalendarResource.fromJson(data)); |
2846 } | 2841 } |
2847 | 2842 |
2848 /** | 2843 /// Inserts a calendar resource. |
2849 * Inserts a calendar resource. | 2844 /// |
2850 * | 2845 /// [request] - The metadata request object. |
2851 * [request] - The metadata request object. | 2846 /// |
2852 * | 2847 /// Request parameters: |
2853 * Request parameters: | 2848 /// |
2854 * | 2849 /// [customer] - The unique ID for the customer's G Suite account. As an |
2855 * [customer] - The unique ID for the customer's G Suite account. As an | 2850 /// account administrator, you can also use the my_customer alias to |
2856 * account administrator, you can also use the my_customer alias to represent | 2851 /// represent your account's customer ID. |
2857 * your account's customer ID. | 2852 /// |
2858 * | 2853 /// Completes with a [CalendarResource]. |
2859 * Completes with a [CalendarResource]. | 2854 /// |
2860 * | 2855 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
2861 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 2856 /// an error. |
2862 * error. | 2857 /// |
2863 * | 2858 /// If the used [http.Client] completes with an error when making a REST |
2864 * If the used [http.Client] completes with an error when making a REST call, | 2859 /// call, this method will complete with the same error. |
2865 * this method will complete with the same error. | 2860 async.Future<CalendarResource> insert( |
2866 */ | 2861 CalendarResource request, core.String customer) { |
2867 async.Future<CalendarResource> insert(CalendarResource request, core.String cu
stomer) { | |
2868 var _url = null; | 2862 var _url = null; |
2869 var _queryParams = new core.Map(); | 2863 var _queryParams = new core.Map(); |
2870 var _uploadMedia = null; | 2864 var _uploadMedia = null; |
2871 var _uploadOptions = null; | 2865 var _uploadOptions = null; |
2872 var _downloadOptions = commons.DownloadOptions.Metadata; | 2866 var _downloadOptions = commons.DownloadOptions.Metadata; |
2873 var _body = null; | 2867 var _body = null; |
2874 | 2868 |
2875 if (request != null) { | 2869 if (request != null) { |
2876 _body = convert.JSON.encode((request).toJson()); | 2870 _body = convert.JSON.encode((request).toJson()); |
2877 } | 2871 } |
2878 if (customer == null) { | 2872 if (customer == null) { |
2879 throw new core.ArgumentError("Parameter customer is required."); | 2873 throw new core.ArgumentError("Parameter customer is required."); |
2880 } | 2874 } |
2881 | 2875 |
2882 _url = 'customer/' + commons.Escaper.ecapeVariable('$customer') + '/resource
s/calendars'; | 2876 _url = 'customer/' + |
| 2877 commons.Escaper.ecapeVariable('$customer') + |
| 2878 '/resources/calendars'; |
2883 | 2879 |
2884 var _response = _requester.request(_url, | 2880 var _response = _requester.request(_url, "POST", |
2885 "POST", | 2881 body: _body, |
2886 body: _body, | 2882 queryParams: _queryParams, |
2887 queryParams: _queryParams, | 2883 uploadOptions: _uploadOptions, |
2888 uploadOptions: _uploadOptions, | 2884 uploadMedia: _uploadMedia, |
2889 uploadMedia: _uploadMedia, | 2885 downloadOptions: _downloadOptions); |
2890 downloadOptions: _downloadOptions); | |
2891 return _response.then((data) => new CalendarResource.fromJson(data)); | 2886 return _response.then((data) => new CalendarResource.fromJson(data)); |
2892 } | 2887 } |
2893 | 2888 |
2894 /** | 2889 /// Retrieves a list of calendar resources for an account. |
2895 * Retrieves a list of calendar resources for an account. | 2890 /// |
2896 * | 2891 /// Request parameters: |
2897 * Request parameters: | 2892 /// |
2898 * | 2893 /// [customer] - The unique ID for the customer's G Suite account. As an |
2899 * [customer] - The unique ID for the customer's G Suite account. As an | 2894 /// account administrator, you can also use the my_customer alias to |
2900 * account administrator, you can also use the my_customer alias to represent | 2895 /// represent your account's customer ID. |
2901 * your account's customer ID. | 2896 /// |
2902 * | 2897 /// [maxResults] - Maximum number of results to return. |
2903 * [maxResults] - Maximum number of results to return. | 2898 /// Value must be between "1" and "500". |
2904 * Value must be between "1" and "500". | 2899 /// |
2905 * | 2900 /// [pageToken] - Token to specify the next page in the list. |
2906 * [pageToken] - Token to specify the next page in the list. | 2901 /// |
2907 * | 2902 /// Completes with a [CalendarResources]. |
2908 * Completes with a [CalendarResources]. | 2903 /// |
2909 * | 2904 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
2910 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 2905 /// an error. |
2911 * error. | 2906 /// |
2912 * | 2907 /// If the used [http.Client] completes with an error when making a REST |
2913 * If the used [http.Client] completes with an error when making a REST call, | 2908 /// call, this method will complete with the same error. |
2914 * this method will complete with the same error. | 2909 async.Future<CalendarResources> list(core.String customer, |
2915 */ | 2910 {core.int maxResults, core.String pageToken}) { |
2916 async.Future<CalendarResources> list(core.String customer, {core.int maxResult
s, core.String pageToken}) { | |
2917 var _url = null; | 2911 var _url = null; |
2918 var _queryParams = new core.Map(); | 2912 var _queryParams = new core.Map(); |
2919 var _uploadMedia = null; | 2913 var _uploadMedia = null; |
2920 var _uploadOptions = null; | 2914 var _uploadOptions = null; |
2921 var _downloadOptions = commons.DownloadOptions.Metadata; | 2915 var _downloadOptions = commons.DownloadOptions.Metadata; |
2922 var _body = null; | 2916 var _body = null; |
2923 | 2917 |
2924 if (customer == null) { | 2918 if (customer == null) { |
2925 throw new core.ArgumentError("Parameter customer is required."); | 2919 throw new core.ArgumentError("Parameter customer is required."); |
2926 } | 2920 } |
2927 if (maxResults != null) { | 2921 if (maxResults != null) { |
2928 _queryParams["maxResults"] = ["${maxResults}"]; | 2922 _queryParams["maxResults"] = ["${maxResults}"]; |
2929 } | 2923 } |
2930 if (pageToken != null) { | 2924 if (pageToken != null) { |
2931 _queryParams["pageToken"] = [pageToken]; | 2925 _queryParams["pageToken"] = [pageToken]; |
2932 } | 2926 } |
2933 | 2927 |
2934 _url = 'customer/' + commons.Escaper.ecapeVariable('$customer') + '/resource
s/calendars'; | 2928 _url = 'customer/' + |
| 2929 commons.Escaper.ecapeVariable('$customer') + |
| 2930 '/resources/calendars'; |
2935 | 2931 |
2936 var _response = _requester.request(_url, | 2932 var _response = _requester.request(_url, "GET", |
2937 "GET", | 2933 body: _body, |
2938 body: _body, | 2934 queryParams: _queryParams, |
2939 queryParams: _queryParams, | 2935 uploadOptions: _uploadOptions, |
2940 uploadOptions: _uploadOptions, | 2936 uploadMedia: _uploadMedia, |
2941 uploadMedia: _uploadMedia, | 2937 downloadOptions: _downloadOptions); |
2942 downloadOptions: _downloadOptions); | |
2943 return _response.then((data) => new CalendarResources.fromJson(data)); | 2938 return _response.then((data) => new CalendarResources.fromJson(data)); |
2944 } | 2939 } |
2945 | 2940 |
2946 /** | 2941 /// Updates a calendar resource. This method supports patch semantics. |
2947 * Updates a calendar resource. This method supports patch semantics. | 2942 /// |
2948 * | 2943 /// [request] - The metadata request object. |
2949 * [request] - The metadata request object. | 2944 /// |
2950 * | 2945 /// Request parameters: |
2951 * Request parameters: | 2946 /// |
2952 * | 2947 /// [customer] - The unique ID for the customer's G Suite account. As an |
2953 * [customer] - The unique ID for the customer's G Suite account. As an | 2948 /// account administrator, you can also use the my_customer alias to |
2954 * account administrator, you can also use the my_customer alias to represent | 2949 /// represent your account's customer ID. |
2955 * your account's customer ID. | 2950 /// |
2956 * | 2951 /// [calendarResourceId] - The unique ID of the calendar resource to update. |
2957 * [calendarResourceId] - The unique ID of the calendar resource to update. | 2952 /// |
2958 * | 2953 /// Completes with a [CalendarResource]. |
2959 * Completes with a [CalendarResource]. | 2954 /// |
2960 * | 2955 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
2961 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 2956 /// an error. |
2962 * error. | 2957 /// |
2963 * | 2958 /// If the used [http.Client] completes with an error when making a REST |
2964 * If the used [http.Client] completes with an error when making a REST call, | 2959 /// call, this method will complete with the same error. |
2965 * this method will complete with the same error. | 2960 async.Future<CalendarResource> patch(CalendarResource request, |
2966 */ | 2961 core.String customer, core.String calendarResourceId) { |
2967 async.Future<CalendarResource> patch(CalendarResource request, core.String cus
tomer, core.String calendarResourceId) { | |
2968 var _url = null; | 2962 var _url = null; |
2969 var _queryParams = new core.Map(); | 2963 var _queryParams = new core.Map(); |
2970 var _uploadMedia = null; | 2964 var _uploadMedia = null; |
2971 var _uploadOptions = null; | 2965 var _uploadOptions = null; |
2972 var _downloadOptions = commons.DownloadOptions.Metadata; | 2966 var _downloadOptions = commons.DownloadOptions.Metadata; |
2973 var _body = null; | 2967 var _body = null; |
2974 | 2968 |
2975 if (request != null) { | 2969 if (request != null) { |
2976 _body = convert.JSON.encode((request).toJson()); | 2970 _body = convert.JSON.encode((request).toJson()); |
2977 } | 2971 } |
2978 if (customer == null) { | 2972 if (customer == null) { |
2979 throw new core.ArgumentError("Parameter customer is required."); | 2973 throw new core.ArgumentError("Parameter customer is required."); |
2980 } | 2974 } |
2981 if (calendarResourceId == null) { | 2975 if (calendarResourceId == null) { |
2982 throw new core.ArgumentError("Parameter calendarResourceId is required."); | 2976 throw new core.ArgumentError("Parameter calendarResourceId is required."); |
2983 } | 2977 } |
2984 | 2978 |
2985 _url = 'customer/' + commons.Escaper.ecapeVariable('$customer') + '/resource
s/calendars/' + commons.Escaper.ecapeVariable('$calendarResourceId'); | 2979 _url = 'customer/' + |
| 2980 commons.Escaper.ecapeVariable('$customer') + |
| 2981 '/resources/calendars/' + |
| 2982 commons.Escaper.ecapeVariable('$calendarResourceId'); |
2986 | 2983 |
2987 var _response = _requester.request(_url, | 2984 var _response = _requester.request(_url, "PATCH", |
2988 "PATCH", | 2985 body: _body, |
2989 body: _body, | 2986 queryParams: _queryParams, |
2990 queryParams: _queryParams, | 2987 uploadOptions: _uploadOptions, |
2991 uploadOptions: _uploadOptions, | 2988 uploadMedia: _uploadMedia, |
2992 uploadMedia: _uploadMedia, | 2989 downloadOptions: _downloadOptions); |
2993 downloadOptions: _downloadOptions); | |
2994 return _response.then((data) => new CalendarResource.fromJson(data)); | 2990 return _response.then((data) => new CalendarResource.fromJson(data)); |
2995 } | 2991 } |
2996 | 2992 |
2997 /** | 2993 /// Updates a calendar resource. |
2998 * Updates a calendar resource. | 2994 /// |
2999 * | 2995 /// [request] - The metadata request object. |
3000 * [request] - The metadata request object. | 2996 /// |
3001 * | 2997 /// Request parameters: |
3002 * Request parameters: | 2998 /// |
3003 * | 2999 /// [customer] - The unique ID for the customer's G Suite account. As an |
3004 * [customer] - The unique ID for the customer's G Suite account. As an | 3000 /// account administrator, you can also use the my_customer alias to |
3005 * account administrator, you can also use the my_customer alias to represent | 3001 /// represent your account's customer ID. |
3006 * your account's customer ID. | 3002 /// |
3007 * | 3003 /// [calendarResourceId] - The unique ID of the calendar resource to update. |
3008 * [calendarResourceId] - The unique ID of the calendar resource to update. | 3004 /// |
3009 * | 3005 /// Completes with a [CalendarResource]. |
3010 * Completes with a [CalendarResource]. | 3006 /// |
3011 * | 3007 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
3012 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 3008 /// an error. |
3013 * error. | 3009 /// |
3014 * | 3010 /// If the used [http.Client] completes with an error when making a REST |
3015 * If the used [http.Client] completes with an error when making a REST call, | 3011 /// call, this method will complete with the same error. |
3016 * this method will complete with the same error. | 3012 async.Future<CalendarResource> update(CalendarResource request, |
3017 */ | 3013 core.String customer, core.String calendarResourceId) { |
3018 async.Future<CalendarResource> update(CalendarResource request, core.String cu
stomer, core.String calendarResourceId) { | |
3019 var _url = null; | 3014 var _url = null; |
3020 var _queryParams = new core.Map(); | 3015 var _queryParams = new core.Map(); |
3021 var _uploadMedia = null; | 3016 var _uploadMedia = null; |
3022 var _uploadOptions = null; | 3017 var _uploadOptions = null; |
3023 var _downloadOptions = commons.DownloadOptions.Metadata; | 3018 var _downloadOptions = commons.DownloadOptions.Metadata; |
3024 var _body = null; | 3019 var _body = null; |
3025 | 3020 |
3026 if (request != null) { | 3021 if (request != null) { |
3027 _body = convert.JSON.encode((request).toJson()); | 3022 _body = convert.JSON.encode((request).toJson()); |
3028 } | 3023 } |
3029 if (customer == null) { | 3024 if (customer == null) { |
3030 throw new core.ArgumentError("Parameter customer is required."); | 3025 throw new core.ArgumentError("Parameter customer is required."); |
3031 } | 3026 } |
3032 if (calendarResourceId == null) { | 3027 if (calendarResourceId == null) { |
3033 throw new core.ArgumentError("Parameter calendarResourceId is required."); | 3028 throw new core.ArgumentError("Parameter calendarResourceId is required."); |
3034 } | 3029 } |
3035 | 3030 |
3036 _url = 'customer/' + commons.Escaper.ecapeVariable('$customer') + '/resource
s/calendars/' + commons.Escaper.ecapeVariable('$calendarResourceId'); | 3031 _url = 'customer/' + |
| 3032 commons.Escaper.ecapeVariable('$customer') + |
| 3033 '/resources/calendars/' + |
| 3034 commons.Escaper.ecapeVariable('$calendarResourceId'); |
3037 | 3035 |
3038 var _response = _requester.request(_url, | 3036 var _response = _requester.request(_url, "PUT", |
3039 "PUT", | 3037 body: _body, |
3040 body: _body, | 3038 queryParams: _queryParams, |
3041 queryParams: _queryParams, | 3039 uploadOptions: _uploadOptions, |
3042 uploadOptions: _uploadOptions, | 3040 uploadMedia: _uploadMedia, |
3043 uploadMedia: _uploadMedia, | 3041 downloadOptions: _downloadOptions); |
3044 downloadOptions: _downloadOptions); | |
3045 return _response.then((data) => new CalendarResource.fromJson(data)); | 3042 return _response.then((data) => new CalendarResource.fromJson(data)); |
3046 } | 3043 } |
3047 | |
3048 } | 3044 } |
3049 | 3045 |
3050 | |
3051 class RoleAssignmentsResourceApi { | 3046 class RoleAssignmentsResourceApi { |
3052 final commons.ApiRequester _requester; | 3047 final commons.ApiRequester _requester; |
3053 | 3048 |
3054 RoleAssignmentsResourceApi(commons.ApiRequester client) : | 3049 RoleAssignmentsResourceApi(commons.ApiRequester client) : _requester = client; |
3055 _requester = client; | |
3056 | 3050 |
3057 /** | 3051 /// Deletes a role assignment. |
3058 * Deletes a role assignment. | 3052 /// |
3059 * | 3053 /// Request parameters: |
3060 * Request parameters: | 3054 /// |
3061 * | 3055 /// [customer] - Immutable ID of the G Suite account. |
3062 * [customer] - Immutable ID of the G Suite account. | 3056 /// |
3063 * | 3057 /// [roleAssignmentId] - Immutable ID of the role assignment. |
3064 * [roleAssignmentId] - Immutable ID of the role assignment. | 3058 /// |
3065 * | 3059 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
3066 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 3060 /// an error. |
3067 * error. | 3061 /// |
3068 * | 3062 /// If the used [http.Client] completes with an error when making a REST |
3069 * If the used [http.Client] completes with an error when making a REST call, | 3063 /// call, this method will complete with the same error. |
3070 * this method will complete with the same error. | |
3071 */ | |
3072 async.Future delete(core.String customer, core.String roleAssignmentId) { | 3064 async.Future delete(core.String customer, core.String roleAssignmentId) { |
3073 var _url = null; | 3065 var _url = null; |
3074 var _queryParams = new core.Map(); | 3066 var _queryParams = new core.Map(); |
3075 var _uploadMedia = null; | 3067 var _uploadMedia = null; |
3076 var _uploadOptions = null; | 3068 var _uploadOptions = null; |
3077 var _downloadOptions = commons.DownloadOptions.Metadata; | 3069 var _downloadOptions = commons.DownloadOptions.Metadata; |
3078 var _body = null; | 3070 var _body = null; |
3079 | 3071 |
3080 if (customer == null) { | 3072 if (customer == null) { |
3081 throw new core.ArgumentError("Parameter customer is required."); | 3073 throw new core.ArgumentError("Parameter customer is required."); |
3082 } | 3074 } |
3083 if (roleAssignmentId == null) { | 3075 if (roleAssignmentId == null) { |
3084 throw new core.ArgumentError("Parameter roleAssignmentId is required."); | 3076 throw new core.ArgumentError("Parameter roleAssignmentId is required."); |
3085 } | 3077 } |
3086 | 3078 |
3087 _downloadOptions = null; | 3079 _downloadOptions = null; |
3088 | 3080 |
3089 _url = 'customer/' + commons.Escaper.ecapeVariable('$customer') + '/roleassi
gnments/' + commons.Escaper.ecapeVariable('$roleAssignmentId'); | 3081 _url = 'customer/' + |
| 3082 commons.Escaper.ecapeVariable('$customer') + |
| 3083 '/roleassignments/' + |
| 3084 commons.Escaper.ecapeVariable('$roleAssignmentId'); |
3090 | 3085 |
3091 var _response = _requester.request(_url, | 3086 var _response = _requester.request(_url, "DELETE", |
3092 "DELETE", | 3087 body: _body, |
3093 body: _body, | 3088 queryParams: _queryParams, |
3094 queryParams: _queryParams, | 3089 uploadOptions: _uploadOptions, |
3095 uploadOptions: _uploadOptions, | 3090 uploadMedia: _uploadMedia, |
3096 uploadMedia: _uploadMedia, | 3091 downloadOptions: _downloadOptions); |
3097 downloadOptions: _downloadOptions); | |
3098 return _response.then((data) => null); | 3092 return _response.then((data) => null); |
3099 } | 3093 } |
3100 | 3094 |
3101 /** | 3095 /// Retrieve a role assignment. |
3102 * Retrieve a role assignment. | 3096 /// |
3103 * | 3097 /// Request parameters: |
3104 * Request parameters: | 3098 /// |
3105 * | 3099 /// [customer] - Immutable ID of the G Suite account. |
3106 * [customer] - Immutable ID of the G Suite account. | 3100 /// |
3107 * | 3101 /// [roleAssignmentId] - Immutable ID of the role assignment. |
3108 * [roleAssignmentId] - Immutable ID of the role assignment. | 3102 /// |
3109 * | 3103 /// Completes with a [RoleAssignment]. |
3110 * Completes with a [RoleAssignment]. | 3104 /// |
3111 * | 3105 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
3112 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 3106 /// an error. |
3113 * error. | 3107 /// |
3114 * | 3108 /// If the used [http.Client] completes with an error when making a REST |
3115 * If the used [http.Client] completes with an error when making a REST call, | 3109 /// call, this method will complete with the same error. |
3116 * this method will complete with the same error. | 3110 async.Future<RoleAssignment> get( |
3117 */ | 3111 core.String customer, core.String roleAssignmentId) { |
3118 async.Future<RoleAssignment> get(core.String customer, core.String roleAssignm
entId) { | |
3119 var _url = null; | 3112 var _url = null; |
3120 var _queryParams = new core.Map(); | 3113 var _queryParams = new core.Map(); |
3121 var _uploadMedia = null; | 3114 var _uploadMedia = null; |
3122 var _uploadOptions = null; | 3115 var _uploadOptions = null; |
3123 var _downloadOptions = commons.DownloadOptions.Metadata; | 3116 var _downloadOptions = commons.DownloadOptions.Metadata; |
3124 var _body = null; | 3117 var _body = null; |
3125 | 3118 |
3126 if (customer == null) { | 3119 if (customer == null) { |
3127 throw new core.ArgumentError("Parameter customer is required."); | 3120 throw new core.ArgumentError("Parameter customer is required."); |
3128 } | 3121 } |
3129 if (roleAssignmentId == null) { | 3122 if (roleAssignmentId == null) { |
3130 throw new core.ArgumentError("Parameter roleAssignmentId is required."); | 3123 throw new core.ArgumentError("Parameter roleAssignmentId is required."); |
3131 } | 3124 } |
3132 | 3125 |
3133 _url = 'customer/' + commons.Escaper.ecapeVariable('$customer') + '/roleassi
gnments/' + commons.Escaper.ecapeVariable('$roleAssignmentId'); | 3126 _url = 'customer/' + |
| 3127 commons.Escaper.ecapeVariable('$customer') + |
| 3128 '/roleassignments/' + |
| 3129 commons.Escaper.ecapeVariable('$roleAssignmentId'); |
3134 | 3130 |
3135 var _response = _requester.request(_url, | 3131 var _response = _requester.request(_url, "GET", |
3136 "GET", | 3132 body: _body, |
3137 body: _body, | 3133 queryParams: _queryParams, |
3138 queryParams: _queryParams, | 3134 uploadOptions: _uploadOptions, |
3139 uploadOptions: _uploadOptions, | 3135 uploadMedia: _uploadMedia, |
3140 uploadMedia: _uploadMedia, | 3136 downloadOptions: _downloadOptions); |
3141 downloadOptions: _downloadOptions); | |
3142 return _response.then((data) => new RoleAssignment.fromJson(data)); | 3137 return _response.then((data) => new RoleAssignment.fromJson(data)); |
3143 } | 3138 } |
3144 | 3139 |
3145 /** | 3140 /// Creates a role assignment. |
3146 * Creates a role assignment. | 3141 /// |
3147 * | 3142 /// [request] - The metadata request object. |
3148 * [request] - The metadata request object. | 3143 /// |
3149 * | 3144 /// Request parameters: |
3150 * Request parameters: | 3145 /// |
3151 * | 3146 /// [customer] - Immutable ID of the G Suite account. |
3152 * [customer] - Immutable ID of the G Suite account. | 3147 /// |
3153 * | 3148 /// Completes with a [RoleAssignment]. |
3154 * Completes with a [RoleAssignment]. | 3149 /// |
3155 * | 3150 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
3156 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 3151 /// an error. |
3157 * error. | 3152 /// |
3158 * | 3153 /// If the used [http.Client] completes with an error when making a REST |
3159 * If the used [http.Client] completes with an error when making a REST call, | 3154 /// call, this method will complete with the same error. |
3160 * this method will complete with the same error. | 3155 async.Future<RoleAssignment> insert( |
3161 */ | 3156 RoleAssignment request, core.String customer) { |
3162 async.Future<RoleAssignment> insert(RoleAssignment request, core.String custom
er) { | |
3163 var _url = null; | 3157 var _url = null; |
3164 var _queryParams = new core.Map(); | 3158 var _queryParams = new core.Map(); |
3165 var _uploadMedia = null; | 3159 var _uploadMedia = null; |
3166 var _uploadOptions = null; | 3160 var _uploadOptions = null; |
3167 var _downloadOptions = commons.DownloadOptions.Metadata; | 3161 var _downloadOptions = commons.DownloadOptions.Metadata; |
3168 var _body = null; | 3162 var _body = null; |
3169 | 3163 |
3170 if (request != null) { | 3164 if (request != null) { |
3171 _body = convert.JSON.encode((request).toJson()); | 3165 _body = convert.JSON.encode((request).toJson()); |
3172 } | 3166 } |
3173 if (customer == null) { | 3167 if (customer == null) { |
3174 throw new core.ArgumentError("Parameter customer is required."); | 3168 throw new core.ArgumentError("Parameter customer is required."); |
3175 } | 3169 } |
3176 | 3170 |
3177 _url = 'customer/' + commons.Escaper.ecapeVariable('$customer') + '/roleassi
gnments'; | 3171 _url = 'customer/' + |
| 3172 commons.Escaper.ecapeVariable('$customer') + |
| 3173 '/roleassignments'; |
3178 | 3174 |
3179 var _response = _requester.request(_url, | 3175 var _response = _requester.request(_url, "POST", |
3180 "POST", | 3176 body: _body, |
3181 body: _body, | 3177 queryParams: _queryParams, |
3182 queryParams: _queryParams, | 3178 uploadOptions: _uploadOptions, |
3183 uploadOptions: _uploadOptions, | 3179 uploadMedia: _uploadMedia, |
3184 uploadMedia: _uploadMedia, | 3180 downloadOptions: _downloadOptions); |
3185 downloadOptions: _downloadOptions); | |
3186 return _response.then((data) => new RoleAssignment.fromJson(data)); | 3181 return _response.then((data) => new RoleAssignment.fromJson(data)); |
3187 } | 3182 } |
3188 | 3183 |
3189 /** | 3184 /// Retrieves a paginated list of all roleAssignments. |
3190 * Retrieves a paginated list of all roleAssignments. | 3185 /// |
3191 * | 3186 /// Request parameters: |
3192 * Request parameters: | 3187 /// |
3193 * | 3188 /// [customer] - Immutable ID of the G Suite account. |
3194 * [customer] - Immutable ID of the G Suite account. | 3189 /// |
3195 * | 3190 /// [maxResults] - Maximum number of results to return. |
3196 * [maxResults] - Maximum number of results to return. | 3191 /// Value must be between "1" and "200". |
3197 * Value must be between "1" and "200". | 3192 /// |
3198 * | 3193 /// [pageToken] - Token to specify the next page in the list. |
3199 * [pageToken] - Token to specify the next page in the list. | 3194 /// |
3200 * | 3195 /// [roleId] - Immutable ID of a role. If included in the request, returns |
3201 * [roleId] - Immutable ID of a role. If included in the request, returns only | 3196 /// only role assignments containing this role ID. |
3202 * role assignments containing this role ID. | 3197 /// |
3203 * | 3198 /// [userKey] - The user's primary email address, alias email address, or |
3204 * [userKey] - The user's primary email address, alias email address, or | 3199 /// unique user ID. If included in the request, returns role assignments only |
3205 * unique user ID. If included in the request, returns role assignments only | 3200 /// for this user. |
3206 * for this user. | 3201 /// |
3207 * | 3202 /// Completes with a [RoleAssignments]. |
3208 * Completes with a [RoleAssignments]. | 3203 /// |
3209 * | 3204 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
3210 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 3205 /// an error. |
3211 * error. | 3206 /// |
3212 * | 3207 /// If the used [http.Client] completes with an error when making a REST |
3213 * If the used [http.Client] completes with an error when making a REST call, | 3208 /// call, this method will complete with the same error. |
3214 * this method will complete with the same error. | 3209 async.Future<RoleAssignments> list(core.String customer, |
3215 */ | 3210 {core.int maxResults, |
3216 async.Future<RoleAssignments> list(core.String customer, {core.int maxResults,
core.String pageToken, core.String roleId, core.String userKey}) { | 3211 core.String pageToken, |
| 3212 core.String roleId, |
| 3213 core.String userKey}) { |
3217 var _url = null; | 3214 var _url = null; |
3218 var _queryParams = new core.Map(); | 3215 var _queryParams = new core.Map(); |
3219 var _uploadMedia = null; | 3216 var _uploadMedia = null; |
3220 var _uploadOptions = null; | 3217 var _uploadOptions = null; |
3221 var _downloadOptions = commons.DownloadOptions.Metadata; | 3218 var _downloadOptions = commons.DownloadOptions.Metadata; |
3222 var _body = null; | 3219 var _body = null; |
3223 | 3220 |
3224 if (customer == null) { | 3221 if (customer == null) { |
3225 throw new core.ArgumentError("Parameter customer is required."); | 3222 throw new core.ArgumentError("Parameter customer is required."); |
3226 } | 3223 } |
3227 if (maxResults != null) { | 3224 if (maxResults != null) { |
3228 _queryParams["maxResults"] = ["${maxResults}"]; | 3225 _queryParams["maxResults"] = ["${maxResults}"]; |
3229 } | 3226 } |
3230 if (pageToken != null) { | 3227 if (pageToken != null) { |
3231 _queryParams["pageToken"] = [pageToken]; | 3228 _queryParams["pageToken"] = [pageToken]; |
3232 } | 3229 } |
3233 if (roleId != null) { | 3230 if (roleId != null) { |
3234 _queryParams["roleId"] = [roleId]; | 3231 _queryParams["roleId"] = [roleId]; |
3235 } | 3232 } |
3236 if (userKey != null) { | 3233 if (userKey != null) { |
3237 _queryParams["userKey"] = [userKey]; | 3234 _queryParams["userKey"] = [userKey]; |
3238 } | 3235 } |
3239 | 3236 |
3240 _url = 'customer/' + commons.Escaper.ecapeVariable('$customer') + '/roleassi
gnments'; | 3237 _url = 'customer/' + |
| 3238 commons.Escaper.ecapeVariable('$customer') + |
| 3239 '/roleassignments'; |
3241 | 3240 |
3242 var _response = _requester.request(_url, | 3241 var _response = _requester.request(_url, "GET", |
3243 "GET", | 3242 body: _body, |
3244 body: _body, | 3243 queryParams: _queryParams, |
3245 queryParams: _queryParams, | 3244 uploadOptions: _uploadOptions, |
3246 uploadOptions: _uploadOptions, | 3245 uploadMedia: _uploadMedia, |
3247 uploadMedia: _uploadMedia, | 3246 downloadOptions: _downloadOptions); |
3248 downloadOptions: _downloadOptions); | |
3249 return _response.then((data) => new RoleAssignments.fromJson(data)); | 3247 return _response.then((data) => new RoleAssignments.fromJson(data)); |
3250 } | 3248 } |
3251 | |
3252 } | 3249 } |
3253 | 3250 |
3254 | |
3255 class RolesResourceApi { | 3251 class RolesResourceApi { |
3256 final commons.ApiRequester _requester; | 3252 final commons.ApiRequester _requester; |
3257 | 3253 |
3258 RolesResourceApi(commons.ApiRequester client) : | 3254 RolesResourceApi(commons.ApiRequester client) : _requester = client; |
3259 _requester = client; | |
3260 | 3255 |
3261 /** | 3256 /// Deletes a role. |
3262 * Deletes a role. | 3257 /// |
3263 * | 3258 /// Request parameters: |
3264 * Request parameters: | 3259 /// |
3265 * | 3260 /// [customer] - Immutable ID of the G Suite account. |
3266 * [customer] - Immutable ID of the G Suite account. | 3261 /// |
3267 * | 3262 /// [roleId] - Immutable ID of the role. |
3268 * [roleId] - Immutable ID of the role. | 3263 /// |
3269 * | 3264 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
3270 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 3265 /// an error. |
3271 * error. | 3266 /// |
3272 * | 3267 /// If the used [http.Client] completes with an error when making a REST |
3273 * If the used [http.Client] completes with an error when making a REST call, | 3268 /// call, this method will complete with the same error. |
3274 * this method will complete with the same error. | |
3275 */ | |
3276 async.Future delete(core.String customer, core.String roleId) { | 3269 async.Future delete(core.String customer, core.String roleId) { |
3277 var _url = null; | 3270 var _url = null; |
3278 var _queryParams = new core.Map(); | 3271 var _queryParams = new core.Map(); |
3279 var _uploadMedia = null; | 3272 var _uploadMedia = null; |
3280 var _uploadOptions = null; | 3273 var _uploadOptions = null; |
3281 var _downloadOptions = commons.DownloadOptions.Metadata; | 3274 var _downloadOptions = commons.DownloadOptions.Metadata; |
3282 var _body = null; | 3275 var _body = null; |
3283 | 3276 |
3284 if (customer == null) { | 3277 if (customer == null) { |
3285 throw new core.ArgumentError("Parameter customer is required."); | 3278 throw new core.ArgumentError("Parameter customer is required."); |
3286 } | 3279 } |
3287 if (roleId == null) { | 3280 if (roleId == null) { |
3288 throw new core.ArgumentError("Parameter roleId is required."); | 3281 throw new core.ArgumentError("Parameter roleId is required."); |
3289 } | 3282 } |
3290 | 3283 |
3291 _downloadOptions = null; | 3284 _downloadOptions = null; |
3292 | 3285 |
3293 _url = 'customer/' + commons.Escaper.ecapeVariable('$customer') + '/roles/'
+ commons.Escaper.ecapeVariable('$roleId'); | 3286 _url = 'customer/' + |
| 3287 commons.Escaper.ecapeVariable('$customer') + |
| 3288 '/roles/' + |
| 3289 commons.Escaper.ecapeVariable('$roleId'); |
3294 | 3290 |
3295 var _response = _requester.request(_url, | 3291 var _response = _requester.request(_url, "DELETE", |
3296 "DELETE", | 3292 body: _body, |
3297 body: _body, | 3293 queryParams: _queryParams, |
3298 queryParams: _queryParams, | 3294 uploadOptions: _uploadOptions, |
3299 uploadOptions: _uploadOptions, | 3295 uploadMedia: _uploadMedia, |
3300 uploadMedia: _uploadMedia, | 3296 downloadOptions: _downloadOptions); |
3301 downloadOptions: _downloadOptions); | |
3302 return _response.then((data) => null); | 3297 return _response.then((data) => null); |
3303 } | 3298 } |
3304 | 3299 |
3305 /** | 3300 /// Retrieves a role. |
3306 * Retrieves a role. | 3301 /// |
3307 * | 3302 /// Request parameters: |
3308 * Request parameters: | 3303 /// |
3309 * | 3304 /// [customer] - Immutable ID of the G Suite account. |
3310 * [customer] - Immutable ID of the G Suite account. | 3305 /// |
3311 * | 3306 /// [roleId] - Immutable ID of the role. |
3312 * [roleId] - Immutable ID of the role. | 3307 /// |
3313 * | 3308 /// Completes with a [Role]. |
3314 * Completes with a [Role]. | 3309 /// |
3315 * | 3310 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
3316 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 3311 /// an error. |
3317 * error. | 3312 /// |
3318 * | 3313 /// If the used [http.Client] completes with an error when making a REST |
3319 * If the used [http.Client] completes with an error when making a REST call, | 3314 /// call, this method will complete with the same error. |
3320 * this method will complete with the same error. | |
3321 */ | |
3322 async.Future<Role> get(core.String customer, core.String roleId) { | 3315 async.Future<Role> get(core.String customer, core.String roleId) { |
3323 var _url = null; | 3316 var _url = null; |
3324 var _queryParams = new core.Map(); | 3317 var _queryParams = new core.Map(); |
3325 var _uploadMedia = null; | 3318 var _uploadMedia = null; |
3326 var _uploadOptions = null; | 3319 var _uploadOptions = null; |
3327 var _downloadOptions = commons.DownloadOptions.Metadata; | 3320 var _downloadOptions = commons.DownloadOptions.Metadata; |
3328 var _body = null; | 3321 var _body = null; |
3329 | 3322 |
3330 if (customer == null) { | 3323 if (customer == null) { |
3331 throw new core.ArgumentError("Parameter customer is required."); | 3324 throw new core.ArgumentError("Parameter customer is required."); |
3332 } | 3325 } |
3333 if (roleId == null) { | 3326 if (roleId == null) { |
3334 throw new core.ArgumentError("Parameter roleId is required."); | 3327 throw new core.ArgumentError("Parameter roleId is required."); |
3335 } | 3328 } |
3336 | 3329 |
3337 _url = 'customer/' + commons.Escaper.ecapeVariable('$customer') + '/roles/'
+ commons.Escaper.ecapeVariable('$roleId'); | 3330 _url = 'customer/' + |
| 3331 commons.Escaper.ecapeVariable('$customer') + |
| 3332 '/roles/' + |
| 3333 commons.Escaper.ecapeVariable('$roleId'); |
3338 | 3334 |
3339 var _response = _requester.request(_url, | 3335 var _response = _requester.request(_url, "GET", |
3340 "GET", | 3336 body: _body, |
3341 body: _body, | 3337 queryParams: _queryParams, |
3342 queryParams: _queryParams, | 3338 uploadOptions: _uploadOptions, |
3343 uploadOptions: _uploadOptions, | 3339 uploadMedia: _uploadMedia, |
3344 uploadMedia: _uploadMedia, | 3340 downloadOptions: _downloadOptions); |
3345 downloadOptions: _downloadOptions); | |
3346 return _response.then((data) => new Role.fromJson(data)); | 3341 return _response.then((data) => new Role.fromJson(data)); |
3347 } | 3342 } |
3348 | 3343 |
3349 /** | 3344 /// Creates a role. |
3350 * Creates a role. | 3345 /// |
3351 * | 3346 /// [request] - The metadata request object. |
3352 * [request] - The metadata request object. | 3347 /// |
3353 * | 3348 /// Request parameters: |
3354 * Request parameters: | 3349 /// |
3355 * | 3350 /// [customer] - Immutable ID of the G Suite account. |
3356 * [customer] - Immutable ID of the G Suite account. | 3351 /// |
3357 * | 3352 /// Completes with a [Role]. |
3358 * Completes with a [Role]. | 3353 /// |
3359 * | 3354 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
3360 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 3355 /// an error. |
3361 * error. | 3356 /// |
3362 * | 3357 /// If the used [http.Client] completes with an error when making a REST |
3363 * If the used [http.Client] completes with an error when making a REST call, | 3358 /// call, this method will complete with the same error. |
3364 * this method will complete with the same error. | |
3365 */ | |
3366 async.Future<Role> insert(Role request, core.String customer) { | 3359 async.Future<Role> insert(Role request, core.String customer) { |
3367 var _url = null; | 3360 var _url = null; |
3368 var _queryParams = new core.Map(); | 3361 var _queryParams = new core.Map(); |
3369 var _uploadMedia = null; | 3362 var _uploadMedia = null; |
3370 var _uploadOptions = null; | 3363 var _uploadOptions = null; |
3371 var _downloadOptions = commons.DownloadOptions.Metadata; | 3364 var _downloadOptions = commons.DownloadOptions.Metadata; |
3372 var _body = null; | 3365 var _body = null; |
3373 | 3366 |
3374 if (request != null) { | 3367 if (request != null) { |
3375 _body = convert.JSON.encode((request).toJson()); | 3368 _body = convert.JSON.encode((request).toJson()); |
3376 } | 3369 } |
3377 if (customer == null) { | 3370 if (customer == null) { |
3378 throw new core.ArgumentError("Parameter customer is required."); | 3371 throw new core.ArgumentError("Parameter customer is required."); |
3379 } | 3372 } |
3380 | 3373 |
3381 _url = 'customer/' + commons.Escaper.ecapeVariable('$customer') + '/roles'; | 3374 _url = 'customer/' + commons.Escaper.ecapeVariable('$customer') + '/roles'; |
3382 | 3375 |
3383 var _response = _requester.request(_url, | 3376 var _response = _requester.request(_url, "POST", |
3384 "POST", | 3377 body: _body, |
3385 body: _body, | 3378 queryParams: _queryParams, |
3386 queryParams: _queryParams, | 3379 uploadOptions: _uploadOptions, |
3387 uploadOptions: _uploadOptions, | 3380 uploadMedia: _uploadMedia, |
3388 uploadMedia: _uploadMedia, | 3381 downloadOptions: _downloadOptions); |
3389 downloadOptions: _downloadOptions); | |
3390 return _response.then((data) => new Role.fromJson(data)); | 3382 return _response.then((data) => new Role.fromJson(data)); |
3391 } | 3383 } |
3392 | 3384 |
3393 /** | 3385 /// Retrieves a paginated list of all the roles in a domain. |
3394 * Retrieves a paginated list of all the roles in a domain. | 3386 /// |
3395 * | 3387 /// Request parameters: |
3396 * Request parameters: | 3388 /// |
3397 * | 3389 /// [customer] - Immutable ID of the G Suite account. |
3398 * [customer] - Immutable ID of the G Suite account. | 3390 /// |
3399 * | 3391 /// [maxResults] - Maximum number of results to return. |
3400 * [maxResults] - Maximum number of results to return. | 3392 /// Value must be between "1" and "100". |
3401 * Value must be between "1" and "100". | 3393 /// |
3402 * | 3394 /// [pageToken] - Token to specify the next page in the list. |
3403 * [pageToken] - Token to specify the next page in the list. | 3395 /// |
3404 * | 3396 /// Completes with a [Roles]. |
3405 * Completes with a [Roles]. | 3397 /// |
3406 * | 3398 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
3407 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 3399 /// an error. |
3408 * error. | 3400 /// |
3409 * | 3401 /// If the used [http.Client] completes with an error when making a REST |
3410 * If the used [http.Client] completes with an error when making a REST call, | 3402 /// call, this method will complete with the same error. |
3411 * this method will complete with the same error. | 3403 async.Future<Roles> list(core.String customer, |
3412 */ | 3404 {core.int maxResults, core.String pageToken}) { |
3413 async.Future<Roles> list(core.String customer, {core.int maxResults, core.Stri
ng pageToken}) { | |
3414 var _url = null; | 3405 var _url = null; |
3415 var _queryParams = new core.Map(); | 3406 var _queryParams = new core.Map(); |
3416 var _uploadMedia = null; | 3407 var _uploadMedia = null; |
3417 var _uploadOptions = null; | 3408 var _uploadOptions = null; |
3418 var _downloadOptions = commons.DownloadOptions.Metadata; | 3409 var _downloadOptions = commons.DownloadOptions.Metadata; |
3419 var _body = null; | 3410 var _body = null; |
3420 | 3411 |
3421 if (customer == null) { | 3412 if (customer == null) { |
3422 throw new core.ArgumentError("Parameter customer is required."); | 3413 throw new core.ArgumentError("Parameter customer is required."); |
3423 } | 3414 } |
3424 if (maxResults != null) { | 3415 if (maxResults != null) { |
3425 _queryParams["maxResults"] = ["${maxResults}"]; | 3416 _queryParams["maxResults"] = ["${maxResults}"]; |
3426 } | 3417 } |
3427 if (pageToken != null) { | 3418 if (pageToken != null) { |
3428 _queryParams["pageToken"] = [pageToken]; | 3419 _queryParams["pageToken"] = [pageToken]; |
3429 } | 3420 } |
3430 | 3421 |
3431 _url = 'customer/' + commons.Escaper.ecapeVariable('$customer') + '/roles'; | 3422 _url = 'customer/' + commons.Escaper.ecapeVariable('$customer') + '/roles'; |
3432 | 3423 |
3433 var _response = _requester.request(_url, | 3424 var _response = _requester.request(_url, "GET", |
3434 "GET", | 3425 body: _body, |
3435 body: _body, | 3426 queryParams: _queryParams, |
3436 queryParams: _queryParams, | 3427 uploadOptions: _uploadOptions, |
3437 uploadOptions: _uploadOptions, | 3428 uploadMedia: _uploadMedia, |
3438 uploadMedia: _uploadMedia, | 3429 downloadOptions: _downloadOptions); |
3439 downloadOptions: _downloadOptions); | |
3440 return _response.then((data) => new Roles.fromJson(data)); | 3430 return _response.then((data) => new Roles.fromJson(data)); |
3441 } | 3431 } |
3442 | 3432 |
3443 /** | 3433 /// Updates a role. This method supports patch semantics. |
3444 * Updates a role. This method supports patch semantics. | 3434 /// |
3445 * | 3435 /// [request] - The metadata request object. |
3446 * [request] - The metadata request object. | 3436 /// |
3447 * | 3437 /// Request parameters: |
3448 * Request parameters: | 3438 /// |
3449 * | 3439 /// [customer] - Immutable ID of the G Suite account. |
3450 * [customer] - Immutable ID of the G Suite account. | 3440 /// |
3451 * | 3441 /// [roleId] - Immutable ID of the role. |
3452 * [roleId] - Immutable ID of the role. | 3442 /// |
3453 * | 3443 /// Completes with a [Role]. |
3454 * Completes with a [Role]. | 3444 /// |
3455 * | 3445 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
3456 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 3446 /// an error. |
3457 * error. | 3447 /// |
3458 * | 3448 /// If the used [http.Client] completes with an error when making a REST |
3459 * If the used [http.Client] completes with an error when making a REST call, | 3449 /// call, this method will complete with the same error. |
3460 * this method will complete with the same error. | 3450 async.Future<Role> patch( |
3461 */ | 3451 Role request, core.String customer, core.String roleId) { |
3462 async.Future<Role> patch(Role request, core.String customer, core.String roleI
d) { | |
3463 var _url = null; | 3452 var _url = null; |
3464 var _queryParams = new core.Map(); | 3453 var _queryParams = new core.Map(); |
3465 var _uploadMedia = null; | 3454 var _uploadMedia = null; |
3466 var _uploadOptions = null; | 3455 var _uploadOptions = null; |
3467 var _downloadOptions = commons.DownloadOptions.Metadata; | 3456 var _downloadOptions = commons.DownloadOptions.Metadata; |
3468 var _body = null; | 3457 var _body = null; |
3469 | 3458 |
3470 if (request != null) { | 3459 if (request != null) { |
3471 _body = convert.JSON.encode((request).toJson()); | 3460 _body = convert.JSON.encode((request).toJson()); |
3472 } | 3461 } |
3473 if (customer == null) { | 3462 if (customer == null) { |
3474 throw new core.ArgumentError("Parameter customer is required."); | 3463 throw new core.ArgumentError("Parameter customer is required."); |
3475 } | 3464 } |
3476 if (roleId == null) { | 3465 if (roleId == null) { |
3477 throw new core.ArgumentError("Parameter roleId is required."); | 3466 throw new core.ArgumentError("Parameter roleId is required."); |
3478 } | 3467 } |
3479 | 3468 |
3480 _url = 'customer/' + commons.Escaper.ecapeVariable('$customer') + '/roles/'
+ commons.Escaper.ecapeVariable('$roleId'); | 3469 _url = 'customer/' + |
| 3470 commons.Escaper.ecapeVariable('$customer') + |
| 3471 '/roles/' + |
| 3472 commons.Escaper.ecapeVariable('$roleId'); |
3481 | 3473 |
3482 var _response = _requester.request(_url, | 3474 var _response = _requester.request(_url, "PATCH", |
3483 "PATCH", | 3475 body: _body, |
3484 body: _body, | 3476 queryParams: _queryParams, |
3485 queryParams: _queryParams, | 3477 uploadOptions: _uploadOptions, |
3486 uploadOptions: _uploadOptions, | 3478 uploadMedia: _uploadMedia, |
3487 uploadMedia: _uploadMedia, | 3479 downloadOptions: _downloadOptions); |
3488 downloadOptions: _downloadOptions); | |
3489 return _response.then((data) => new Role.fromJson(data)); | 3480 return _response.then((data) => new Role.fromJson(data)); |
3490 } | 3481 } |
3491 | 3482 |
3492 /** | 3483 /// Updates a role. |
3493 * Updates a role. | 3484 /// |
3494 * | 3485 /// [request] - The metadata request object. |
3495 * [request] - The metadata request object. | 3486 /// |
3496 * | 3487 /// Request parameters: |
3497 * Request parameters: | 3488 /// |
3498 * | 3489 /// [customer] - Immutable ID of the G Suite account. |
3499 * [customer] - Immutable ID of the G Suite account. | 3490 /// |
3500 * | 3491 /// [roleId] - Immutable ID of the role. |
3501 * [roleId] - Immutable ID of the role. | 3492 /// |
3502 * | 3493 /// Completes with a [Role]. |
3503 * Completes with a [Role]. | 3494 /// |
3504 * | 3495 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
3505 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 3496 /// an error. |
3506 * error. | 3497 /// |
3507 * | 3498 /// If the used [http.Client] completes with an error when making a REST |
3508 * If the used [http.Client] completes with an error when making a REST call, | 3499 /// call, this method will complete with the same error. |
3509 * this method will complete with the same error. | 3500 async.Future<Role> update( |
3510 */ | 3501 Role request, core.String customer, core.String roleId) { |
3511 async.Future<Role> update(Role request, core.String customer, core.String role
Id) { | |
3512 var _url = null; | 3502 var _url = null; |
3513 var _queryParams = new core.Map(); | 3503 var _queryParams = new core.Map(); |
3514 var _uploadMedia = null; | 3504 var _uploadMedia = null; |
3515 var _uploadOptions = null; | 3505 var _uploadOptions = null; |
3516 var _downloadOptions = commons.DownloadOptions.Metadata; | 3506 var _downloadOptions = commons.DownloadOptions.Metadata; |
3517 var _body = null; | 3507 var _body = null; |
3518 | 3508 |
3519 if (request != null) { | 3509 if (request != null) { |
3520 _body = convert.JSON.encode((request).toJson()); | 3510 _body = convert.JSON.encode((request).toJson()); |
3521 } | 3511 } |
3522 if (customer == null) { | 3512 if (customer == null) { |
3523 throw new core.ArgumentError("Parameter customer is required."); | 3513 throw new core.ArgumentError("Parameter customer is required."); |
3524 } | 3514 } |
3525 if (roleId == null) { | 3515 if (roleId == null) { |
3526 throw new core.ArgumentError("Parameter roleId is required."); | 3516 throw new core.ArgumentError("Parameter roleId is required."); |
3527 } | 3517 } |
3528 | 3518 |
3529 _url = 'customer/' + commons.Escaper.ecapeVariable('$customer') + '/roles/'
+ commons.Escaper.ecapeVariable('$roleId'); | 3519 _url = 'customer/' + |
| 3520 commons.Escaper.ecapeVariable('$customer') + |
| 3521 '/roles/' + |
| 3522 commons.Escaper.ecapeVariable('$roleId'); |
3530 | 3523 |
3531 var _response = _requester.request(_url, | 3524 var _response = _requester.request(_url, "PUT", |
3532 "PUT", | 3525 body: _body, |
3533 body: _body, | 3526 queryParams: _queryParams, |
3534 queryParams: _queryParams, | 3527 uploadOptions: _uploadOptions, |
3535 uploadOptions: _uploadOptions, | 3528 uploadMedia: _uploadMedia, |
3536 uploadMedia: _uploadMedia, | 3529 downloadOptions: _downloadOptions); |
3537 downloadOptions: _downloadOptions); | |
3538 return _response.then((data) => new Role.fromJson(data)); | 3530 return _response.then((data) => new Role.fromJson(data)); |
3539 } | 3531 } |
3540 | |
3541 } | 3532 } |
3542 | 3533 |
3543 | |
3544 class SchemasResourceApi { | 3534 class SchemasResourceApi { |
3545 final commons.ApiRequester _requester; | 3535 final commons.ApiRequester _requester; |
3546 | 3536 |
3547 SchemasResourceApi(commons.ApiRequester client) : | 3537 SchemasResourceApi(commons.ApiRequester client) : _requester = client; |
3548 _requester = client; | |
3549 | 3538 |
3550 /** | 3539 /// Delete schema |
3551 * Delete schema | 3540 /// |
3552 * | 3541 /// Request parameters: |
3553 * Request parameters: | 3542 /// |
3554 * | 3543 /// [customerId] - Immutable ID of the G Suite account |
3555 * [customerId] - Immutable ID of the G Suite account | 3544 /// |
3556 * | 3545 /// [schemaKey] - Name or immutable Id of the schema |
3557 * [schemaKey] - Name or immutable Id of the schema | 3546 /// |
3558 * | 3547 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
3559 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 3548 /// an error. |
3560 * error. | 3549 /// |
3561 * | 3550 /// If the used [http.Client] completes with an error when making a REST |
3562 * If the used [http.Client] completes with an error when making a REST call, | 3551 /// call, this method will complete with the same error. |
3563 * this method will complete with the same error. | |
3564 */ | |
3565 async.Future delete(core.String customerId, core.String schemaKey) { | 3552 async.Future delete(core.String customerId, core.String schemaKey) { |
3566 var _url = null; | 3553 var _url = null; |
3567 var _queryParams = new core.Map(); | 3554 var _queryParams = new core.Map(); |
3568 var _uploadMedia = null; | 3555 var _uploadMedia = null; |
3569 var _uploadOptions = null; | 3556 var _uploadOptions = null; |
3570 var _downloadOptions = commons.DownloadOptions.Metadata; | 3557 var _downloadOptions = commons.DownloadOptions.Metadata; |
3571 var _body = null; | 3558 var _body = null; |
3572 | 3559 |
3573 if (customerId == null) { | 3560 if (customerId == null) { |
3574 throw new core.ArgumentError("Parameter customerId is required."); | 3561 throw new core.ArgumentError("Parameter customerId is required."); |
3575 } | 3562 } |
3576 if (schemaKey == null) { | 3563 if (schemaKey == null) { |
3577 throw new core.ArgumentError("Parameter schemaKey is required."); | 3564 throw new core.ArgumentError("Parameter schemaKey is required."); |
3578 } | 3565 } |
3579 | 3566 |
3580 _downloadOptions = null; | 3567 _downloadOptions = null; |
3581 | 3568 |
3582 _url = 'customer/' + commons.Escaper.ecapeVariable('$customerId') + '/schema
s/' + commons.Escaper.ecapeVariable('$schemaKey'); | 3569 _url = 'customer/' + |
| 3570 commons.Escaper.ecapeVariable('$customerId') + |
| 3571 '/schemas/' + |
| 3572 commons.Escaper.ecapeVariable('$schemaKey'); |
3583 | 3573 |
3584 var _response = _requester.request(_url, | 3574 var _response = _requester.request(_url, "DELETE", |
3585 "DELETE", | 3575 body: _body, |
3586 body: _body, | 3576 queryParams: _queryParams, |
3587 queryParams: _queryParams, | 3577 uploadOptions: _uploadOptions, |
3588 uploadOptions: _uploadOptions, | 3578 uploadMedia: _uploadMedia, |
3589 uploadMedia: _uploadMedia, | 3579 downloadOptions: _downloadOptions); |
3590 downloadOptions: _downloadOptions); | |
3591 return _response.then((data) => null); | 3580 return _response.then((data) => null); |
3592 } | 3581 } |
3593 | 3582 |
3594 /** | 3583 /// Retrieve schema |
3595 * Retrieve schema | 3584 /// |
3596 * | 3585 /// Request parameters: |
3597 * Request parameters: | 3586 /// |
3598 * | 3587 /// [customerId] - Immutable ID of the G Suite account |
3599 * [customerId] - Immutable ID of the G Suite account | 3588 /// |
3600 * | 3589 /// [schemaKey] - Name or immutable Id of the schema |
3601 * [schemaKey] - Name or immutable Id of the schema | 3590 /// |
3602 * | 3591 /// Completes with a [Schema]. |
3603 * Completes with a [Schema]. | 3592 /// |
3604 * | 3593 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
3605 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 3594 /// an error. |
3606 * error. | 3595 /// |
3607 * | 3596 /// If the used [http.Client] completes with an error when making a REST |
3608 * If the used [http.Client] completes with an error when making a REST call, | 3597 /// call, this method will complete with the same error. |
3609 * this method will complete with the same error. | |
3610 */ | |
3611 async.Future<Schema> get(core.String customerId, core.String schemaKey) { | 3598 async.Future<Schema> get(core.String customerId, core.String schemaKey) { |
3612 var _url = null; | 3599 var _url = null; |
3613 var _queryParams = new core.Map(); | 3600 var _queryParams = new core.Map(); |
3614 var _uploadMedia = null; | 3601 var _uploadMedia = null; |
3615 var _uploadOptions = null; | 3602 var _uploadOptions = null; |
3616 var _downloadOptions = commons.DownloadOptions.Metadata; | 3603 var _downloadOptions = commons.DownloadOptions.Metadata; |
3617 var _body = null; | 3604 var _body = null; |
3618 | 3605 |
3619 if (customerId == null) { | 3606 if (customerId == null) { |
3620 throw new core.ArgumentError("Parameter customerId is required."); | 3607 throw new core.ArgumentError("Parameter customerId is required."); |
3621 } | 3608 } |
3622 if (schemaKey == null) { | 3609 if (schemaKey == null) { |
3623 throw new core.ArgumentError("Parameter schemaKey is required."); | 3610 throw new core.ArgumentError("Parameter schemaKey is required."); |
3624 } | 3611 } |
3625 | 3612 |
3626 _url = 'customer/' + commons.Escaper.ecapeVariable('$customerId') + '/schema
s/' + commons.Escaper.ecapeVariable('$schemaKey'); | 3613 _url = 'customer/' + |
| 3614 commons.Escaper.ecapeVariable('$customerId') + |
| 3615 '/schemas/' + |
| 3616 commons.Escaper.ecapeVariable('$schemaKey'); |
3627 | 3617 |
3628 var _response = _requester.request(_url, | 3618 var _response = _requester.request(_url, "GET", |
3629 "GET", | 3619 body: _body, |
3630 body: _body, | 3620 queryParams: _queryParams, |
3631 queryParams: _queryParams, | 3621 uploadOptions: _uploadOptions, |
3632 uploadOptions: _uploadOptions, | 3622 uploadMedia: _uploadMedia, |
3633 uploadMedia: _uploadMedia, | 3623 downloadOptions: _downloadOptions); |
3634 downloadOptions: _downloadOptions); | |
3635 return _response.then((data) => new Schema.fromJson(data)); | 3624 return _response.then((data) => new Schema.fromJson(data)); |
3636 } | 3625 } |
3637 | 3626 |
3638 /** | 3627 /// Create schema. |
3639 * Create schema. | 3628 /// |
3640 * | 3629 /// [request] - The metadata request object. |
3641 * [request] - The metadata request object. | 3630 /// |
3642 * | 3631 /// Request parameters: |
3643 * Request parameters: | 3632 /// |
3644 * | 3633 /// [customerId] - Immutable ID of the G Suite account |
3645 * [customerId] - Immutable ID of the G Suite account | 3634 /// |
3646 * | 3635 /// Completes with a [Schema]. |
3647 * Completes with a [Schema]. | 3636 /// |
3648 * | 3637 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
3649 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 3638 /// an error. |
3650 * error. | 3639 /// |
3651 * | 3640 /// If the used [http.Client] completes with an error when making a REST |
3652 * If the used [http.Client] completes with an error when making a REST call, | 3641 /// call, this method will complete with the same error. |
3653 * this method will complete with the same error. | |
3654 */ | |
3655 async.Future<Schema> insert(Schema request, core.String customerId) { | 3642 async.Future<Schema> insert(Schema request, core.String customerId) { |
3656 var _url = null; | 3643 var _url = null; |
3657 var _queryParams = new core.Map(); | 3644 var _queryParams = new core.Map(); |
3658 var _uploadMedia = null; | 3645 var _uploadMedia = null; |
3659 var _uploadOptions = null; | 3646 var _uploadOptions = null; |
3660 var _downloadOptions = commons.DownloadOptions.Metadata; | 3647 var _downloadOptions = commons.DownloadOptions.Metadata; |
3661 var _body = null; | 3648 var _body = null; |
3662 | 3649 |
3663 if (request != null) { | 3650 if (request != null) { |
3664 _body = convert.JSON.encode((request).toJson()); | 3651 _body = convert.JSON.encode((request).toJson()); |
3665 } | 3652 } |
3666 if (customerId == null) { | 3653 if (customerId == null) { |
3667 throw new core.ArgumentError("Parameter customerId is required."); | 3654 throw new core.ArgumentError("Parameter customerId is required."); |
3668 } | 3655 } |
3669 | 3656 |
3670 _url = 'customer/' + commons.Escaper.ecapeVariable('$customerId') + '/schema
s'; | 3657 _url = |
| 3658 'customer/' + commons.Escaper.ecapeVariable('$customerId') + '/schemas'; |
3671 | 3659 |
3672 var _response = _requester.request(_url, | 3660 var _response = _requester.request(_url, "POST", |
3673 "POST", | 3661 body: _body, |
3674 body: _body, | 3662 queryParams: _queryParams, |
3675 queryParams: _queryParams, | 3663 uploadOptions: _uploadOptions, |
3676 uploadOptions: _uploadOptions, | 3664 uploadMedia: _uploadMedia, |
3677 uploadMedia: _uploadMedia, | 3665 downloadOptions: _downloadOptions); |
3678 downloadOptions: _downloadOptions); | |
3679 return _response.then((data) => new Schema.fromJson(data)); | 3666 return _response.then((data) => new Schema.fromJson(data)); |
3680 } | 3667 } |
3681 | 3668 |
3682 /** | 3669 /// Retrieve all schemas for a customer |
3683 * Retrieve all schemas for a customer | 3670 /// |
3684 * | 3671 /// Request parameters: |
3685 * Request parameters: | 3672 /// |
3686 * | 3673 /// [customerId] - Immutable ID of the G Suite account |
3687 * [customerId] - Immutable ID of the G Suite account | 3674 /// |
3688 * | 3675 /// Completes with a [Schemas]. |
3689 * Completes with a [Schemas]. | 3676 /// |
3690 * | 3677 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
3691 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 3678 /// an error. |
3692 * error. | 3679 /// |
3693 * | 3680 /// If the used [http.Client] completes with an error when making a REST |
3694 * If the used [http.Client] completes with an error when making a REST call, | 3681 /// call, this method will complete with the same error. |
3695 * this method will complete with the same error. | |
3696 */ | |
3697 async.Future<Schemas> list(core.String customerId) { | 3682 async.Future<Schemas> list(core.String customerId) { |
3698 var _url = null; | 3683 var _url = null; |
3699 var _queryParams = new core.Map(); | 3684 var _queryParams = new core.Map(); |
3700 var _uploadMedia = null; | 3685 var _uploadMedia = null; |
3701 var _uploadOptions = null; | 3686 var _uploadOptions = null; |
3702 var _downloadOptions = commons.DownloadOptions.Metadata; | 3687 var _downloadOptions = commons.DownloadOptions.Metadata; |
3703 var _body = null; | 3688 var _body = null; |
3704 | 3689 |
3705 if (customerId == null) { | 3690 if (customerId == null) { |
3706 throw new core.ArgumentError("Parameter customerId is required."); | 3691 throw new core.ArgumentError("Parameter customerId is required."); |
3707 } | 3692 } |
3708 | 3693 |
3709 _url = 'customer/' + commons.Escaper.ecapeVariable('$customerId') + '/schema
s'; | 3694 _url = |
| 3695 'customer/' + commons.Escaper.ecapeVariable('$customerId') + '/schemas'; |
3710 | 3696 |
3711 var _response = _requester.request(_url, | 3697 var _response = _requester.request(_url, "GET", |
3712 "GET", | 3698 body: _body, |
3713 body: _body, | 3699 queryParams: _queryParams, |
3714 queryParams: _queryParams, | 3700 uploadOptions: _uploadOptions, |
3715 uploadOptions: _uploadOptions, | 3701 uploadMedia: _uploadMedia, |
3716 uploadMedia: _uploadMedia, | 3702 downloadOptions: _downloadOptions); |
3717 downloadOptions: _downloadOptions); | |
3718 return _response.then((data) => new Schemas.fromJson(data)); | 3703 return _response.then((data) => new Schemas.fromJson(data)); |
3719 } | 3704 } |
3720 | 3705 |
3721 /** | 3706 /// Update schema. This method supports patch semantics. |
3722 * Update schema. This method supports patch semantics. | 3707 /// |
3723 * | 3708 /// [request] - The metadata request object. |
3724 * [request] - The metadata request object. | 3709 /// |
3725 * | 3710 /// Request parameters: |
3726 * Request parameters: | 3711 /// |
3727 * | 3712 /// [customerId] - Immutable ID of the G Suite account |
3728 * [customerId] - Immutable ID of the G Suite account | 3713 /// |
3729 * | 3714 /// [schemaKey] - Name or immutable Id of the schema. |
3730 * [schemaKey] - Name or immutable Id of the schema. | 3715 /// |
3731 * | 3716 /// Completes with a [Schema]. |
3732 * Completes with a [Schema]. | 3717 /// |
3733 * | 3718 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
3734 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 3719 /// an error. |
3735 * error. | 3720 /// |
3736 * | 3721 /// If the used [http.Client] completes with an error when making a REST |
3737 * If the used [http.Client] completes with an error when making a REST call, | 3722 /// call, this method will complete with the same error. |
3738 * this method will complete with the same error. | 3723 async.Future<Schema> patch( |
3739 */ | 3724 Schema request, core.String customerId, core.String schemaKey) { |
3740 async.Future<Schema> patch(Schema request, core.String customerId, core.String
schemaKey) { | |
3741 var _url = null; | 3725 var _url = null; |
3742 var _queryParams = new core.Map(); | 3726 var _queryParams = new core.Map(); |
3743 var _uploadMedia = null; | 3727 var _uploadMedia = null; |
3744 var _uploadOptions = null; | 3728 var _uploadOptions = null; |
3745 var _downloadOptions = commons.DownloadOptions.Metadata; | 3729 var _downloadOptions = commons.DownloadOptions.Metadata; |
3746 var _body = null; | 3730 var _body = null; |
3747 | 3731 |
3748 if (request != null) { | 3732 if (request != null) { |
3749 _body = convert.JSON.encode((request).toJson()); | 3733 _body = convert.JSON.encode((request).toJson()); |
3750 } | 3734 } |
3751 if (customerId == null) { | 3735 if (customerId == null) { |
3752 throw new core.ArgumentError("Parameter customerId is required."); | 3736 throw new core.ArgumentError("Parameter customerId is required."); |
3753 } | 3737 } |
3754 if (schemaKey == null) { | 3738 if (schemaKey == null) { |
3755 throw new core.ArgumentError("Parameter schemaKey is required."); | 3739 throw new core.ArgumentError("Parameter schemaKey is required."); |
3756 } | 3740 } |
3757 | 3741 |
3758 _url = 'customer/' + commons.Escaper.ecapeVariable('$customerId') + '/schema
s/' + commons.Escaper.ecapeVariable('$schemaKey'); | 3742 _url = 'customer/' + |
| 3743 commons.Escaper.ecapeVariable('$customerId') + |
| 3744 '/schemas/' + |
| 3745 commons.Escaper.ecapeVariable('$schemaKey'); |
3759 | 3746 |
3760 var _response = _requester.request(_url, | 3747 var _response = _requester.request(_url, "PATCH", |
3761 "PATCH", | 3748 body: _body, |
3762 body: _body, | 3749 queryParams: _queryParams, |
3763 queryParams: _queryParams, | 3750 uploadOptions: _uploadOptions, |
3764 uploadOptions: _uploadOptions, | 3751 uploadMedia: _uploadMedia, |
3765 uploadMedia: _uploadMedia, | 3752 downloadOptions: _downloadOptions); |
3766 downloadOptions: _downloadOptions); | |
3767 return _response.then((data) => new Schema.fromJson(data)); | 3753 return _response.then((data) => new Schema.fromJson(data)); |
3768 } | 3754 } |
3769 | 3755 |
3770 /** | 3756 /// Update schema |
3771 * Update schema | 3757 /// |
3772 * | 3758 /// [request] - The metadata request object. |
3773 * [request] - The metadata request object. | 3759 /// |
3774 * | 3760 /// Request parameters: |
3775 * Request parameters: | 3761 /// |
3776 * | 3762 /// [customerId] - Immutable ID of the G Suite account |
3777 * [customerId] - Immutable ID of the G Suite account | 3763 /// |
3778 * | 3764 /// [schemaKey] - Name or immutable Id of the schema. |
3779 * [schemaKey] - Name or immutable Id of the schema. | 3765 /// |
3780 * | 3766 /// Completes with a [Schema]. |
3781 * Completes with a [Schema]. | 3767 /// |
3782 * | 3768 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
3783 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 3769 /// an error. |
3784 * error. | 3770 /// |
3785 * | 3771 /// If the used [http.Client] completes with an error when making a REST |
3786 * If the used [http.Client] completes with an error when making a REST call, | 3772 /// call, this method will complete with the same error. |
3787 * this method will complete with the same error. | 3773 async.Future<Schema> update( |
3788 */ | 3774 Schema request, core.String customerId, core.String schemaKey) { |
3789 async.Future<Schema> update(Schema request, core.String customerId, core.Strin
g schemaKey) { | |
3790 var _url = null; | 3775 var _url = null; |
3791 var _queryParams = new core.Map(); | 3776 var _queryParams = new core.Map(); |
3792 var _uploadMedia = null; | 3777 var _uploadMedia = null; |
3793 var _uploadOptions = null; | 3778 var _uploadOptions = null; |
3794 var _downloadOptions = commons.DownloadOptions.Metadata; | 3779 var _downloadOptions = commons.DownloadOptions.Metadata; |
3795 var _body = null; | 3780 var _body = null; |
3796 | 3781 |
3797 if (request != null) { | 3782 if (request != null) { |
3798 _body = convert.JSON.encode((request).toJson()); | 3783 _body = convert.JSON.encode((request).toJson()); |
3799 } | 3784 } |
3800 if (customerId == null) { | 3785 if (customerId == null) { |
3801 throw new core.ArgumentError("Parameter customerId is required."); | 3786 throw new core.ArgumentError("Parameter customerId is required."); |
3802 } | 3787 } |
3803 if (schemaKey == null) { | 3788 if (schemaKey == null) { |
3804 throw new core.ArgumentError("Parameter schemaKey is required."); | 3789 throw new core.ArgumentError("Parameter schemaKey is required."); |
3805 } | 3790 } |
3806 | 3791 |
3807 _url = 'customer/' + commons.Escaper.ecapeVariable('$customerId') + '/schema
s/' + commons.Escaper.ecapeVariable('$schemaKey'); | 3792 _url = 'customer/' + |
| 3793 commons.Escaper.ecapeVariable('$customerId') + |
| 3794 '/schemas/' + |
| 3795 commons.Escaper.ecapeVariable('$schemaKey'); |
3808 | 3796 |
3809 var _response = _requester.request(_url, | 3797 var _response = _requester.request(_url, "PUT", |
3810 "PUT", | 3798 body: _body, |
3811 body: _body, | 3799 queryParams: _queryParams, |
3812 queryParams: _queryParams, | 3800 uploadOptions: _uploadOptions, |
3813 uploadOptions: _uploadOptions, | 3801 uploadMedia: _uploadMedia, |
3814 uploadMedia: _uploadMedia, | 3802 downloadOptions: _downloadOptions); |
3815 downloadOptions: _downloadOptions); | |
3816 return _response.then((data) => new Schema.fromJson(data)); | 3803 return _response.then((data) => new Schema.fromJson(data)); |
3817 } | 3804 } |
3818 | |
3819 } | 3805 } |
3820 | 3806 |
3821 | |
3822 class TokensResourceApi { | 3807 class TokensResourceApi { |
3823 final commons.ApiRequester _requester; | 3808 final commons.ApiRequester _requester; |
3824 | 3809 |
3825 TokensResourceApi(commons.ApiRequester client) : | 3810 TokensResourceApi(commons.ApiRequester client) : _requester = client; |
3826 _requester = client; | |
3827 | 3811 |
3828 /** | 3812 /// Delete all access tokens issued by a user for an application. |
3829 * Delete all access tokens issued by a user for an application. | 3813 /// |
3830 * | 3814 /// Request parameters: |
3831 * Request parameters: | 3815 /// |
3832 * | 3816 /// [userKey] - Identifies the user in the API request. The value can be the |
3833 * [userKey] - Identifies the user in the API request. The value can be the | 3817 /// user's primary email address, alias email address, or unique user ID. |
3834 * user's primary email address, alias email address, or unique user ID. | 3818 /// |
3835 * | 3819 /// [clientId] - The Client ID of the application the token is issued to. |
3836 * [clientId] - The Client ID of the application the token is issued to. | 3820 /// |
3837 * | 3821 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
3838 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 3822 /// an error. |
3839 * error. | 3823 /// |
3840 * | 3824 /// If the used [http.Client] completes with an error when making a REST |
3841 * If the used [http.Client] completes with an error when making a REST call, | 3825 /// call, this method will complete with the same error. |
3842 * this method will complete with the same error. | |
3843 */ | |
3844 async.Future delete(core.String userKey, core.String clientId) { | 3826 async.Future delete(core.String userKey, core.String clientId) { |
3845 var _url = null; | 3827 var _url = null; |
3846 var _queryParams = new core.Map(); | 3828 var _queryParams = new core.Map(); |
3847 var _uploadMedia = null; | 3829 var _uploadMedia = null; |
3848 var _uploadOptions = null; | 3830 var _uploadOptions = null; |
3849 var _downloadOptions = commons.DownloadOptions.Metadata; | 3831 var _downloadOptions = commons.DownloadOptions.Metadata; |
3850 var _body = null; | 3832 var _body = null; |
3851 | 3833 |
3852 if (userKey == null) { | 3834 if (userKey == null) { |
3853 throw new core.ArgumentError("Parameter userKey is required."); | 3835 throw new core.ArgumentError("Parameter userKey is required."); |
3854 } | 3836 } |
3855 if (clientId == null) { | 3837 if (clientId == null) { |
3856 throw new core.ArgumentError("Parameter clientId is required."); | 3838 throw new core.ArgumentError("Parameter clientId is required."); |
3857 } | 3839 } |
3858 | 3840 |
3859 _downloadOptions = null; | 3841 _downloadOptions = null; |
3860 | 3842 |
3861 _url = 'users/' + commons.Escaper.ecapeVariable('$userKey') + '/tokens/' + c
ommons.Escaper.ecapeVariable('$clientId'); | 3843 _url = 'users/' + |
| 3844 commons.Escaper.ecapeVariable('$userKey') + |
| 3845 '/tokens/' + |
| 3846 commons.Escaper.ecapeVariable('$clientId'); |
3862 | 3847 |
3863 var _response = _requester.request(_url, | 3848 var _response = _requester.request(_url, "DELETE", |
3864 "DELETE", | 3849 body: _body, |
3865 body: _body, | 3850 queryParams: _queryParams, |
3866 queryParams: _queryParams, | 3851 uploadOptions: _uploadOptions, |
3867 uploadOptions: _uploadOptions, | 3852 uploadMedia: _uploadMedia, |
3868 uploadMedia: _uploadMedia, | 3853 downloadOptions: _downloadOptions); |
3869 downloadOptions: _downloadOptions); | |
3870 return _response.then((data) => null); | 3854 return _response.then((data) => null); |
3871 } | 3855 } |
3872 | 3856 |
3873 /** | 3857 /// Get information about an access token issued by a user. |
3874 * Get information about an access token issued by a user. | 3858 /// |
3875 * | 3859 /// Request parameters: |
3876 * Request parameters: | 3860 /// |
3877 * | 3861 /// [userKey] - Identifies the user in the API request. The value can be the |
3878 * [userKey] - Identifies the user in the API request. The value can be the | 3862 /// user's primary email address, alias email address, or unique user ID. |
3879 * user's primary email address, alias email address, or unique user ID. | 3863 /// |
3880 * | 3864 /// [clientId] - The Client ID of the application the token is issued to. |
3881 * [clientId] - The Client ID of the application the token is issued to. | 3865 /// |
3882 * | 3866 /// Completes with a [Token]. |
3883 * Completes with a [Token]. | 3867 /// |
3884 * | 3868 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
3885 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 3869 /// an error. |
3886 * error. | 3870 /// |
3887 * | 3871 /// If the used [http.Client] completes with an error when making a REST |
3888 * If the used [http.Client] completes with an error when making a REST call, | 3872 /// call, this method will complete with the same error. |
3889 * this method will complete with the same error. | |
3890 */ | |
3891 async.Future<Token> get(core.String userKey, core.String clientId) { | 3873 async.Future<Token> get(core.String userKey, core.String clientId) { |
3892 var _url = null; | 3874 var _url = null; |
3893 var _queryParams = new core.Map(); | 3875 var _queryParams = new core.Map(); |
3894 var _uploadMedia = null; | 3876 var _uploadMedia = null; |
3895 var _uploadOptions = null; | 3877 var _uploadOptions = null; |
3896 var _downloadOptions = commons.DownloadOptions.Metadata; | 3878 var _downloadOptions = commons.DownloadOptions.Metadata; |
3897 var _body = null; | 3879 var _body = null; |
3898 | 3880 |
3899 if (userKey == null) { | 3881 if (userKey == null) { |
3900 throw new core.ArgumentError("Parameter userKey is required."); | 3882 throw new core.ArgumentError("Parameter userKey is required."); |
3901 } | 3883 } |
3902 if (clientId == null) { | 3884 if (clientId == null) { |
3903 throw new core.ArgumentError("Parameter clientId is required."); | 3885 throw new core.ArgumentError("Parameter clientId is required."); |
3904 } | 3886 } |
3905 | 3887 |
3906 _url = 'users/' + commons.Escaper.ecapeVariable('$userKey') + '/tokens/' + c
ommons.Escaper.ecapeVariable('$clientId'); | 3888 _url = 'users/' + |
| 3889 commons.Escaper.ecapeVariable('$userKey') + |
| 3890 '/tokens/' + |
| 3891 commons.Escaper.ecapeVariable('$clientId'); |
3907 | 3892 |
3908 var _response = _requester.request(_url, | 3893 var _response = _requester.request(_url, "GET", |
3909 "GET", | 3894 body: _body, |
3910 body: _body, | 3895 queryParams: _queryParams, |
3911 queryParams: _queryParams, | 3896 uploadOptions: _uploadOptions, |
3912 uploadOptions: _uploadOptions, | 3897 uploadMedia: _uploadMedia, |
3913 uploadMedia: _uploadMedia, | 3898 downloadOptions: _downloadOptions); |
3914 downloadOptions: _downloadOptions); | |
3915 return _response.then((data) => new Token.fromJson(data)); | 3899 return _response.then((data) => new Token.fromJson(data)); |
3916 } | 3900 } |
3917 | 3901 |
3918 /** | 3902 /// Returns the set of tokens specified user has issued to 3rd party |
3919 * Returns the set of tokens specified user has issued to 3rd party | 3903 /// applications. |
3920 * applications. | 3904 /// |
3921 * | 3905 /// Request parameters: |
3922 * Request parameters: | 3906 /// |
3923 * | 3907 /// [userKey] - Identifies the user in the API request. The value can be the |
3924 * [userKey] - Identifies the user in the API request. The value can be the | 3908 /// user's primary email address, alias email address, or unique user ID. |
3925 * user's primary email address, alias email address, or unique user ID. | 3909 /// |
3926 * | 3910 /// Completes with a [Tokens]. |
3927 * Completes with a [Tokens]. | 3911 /// |
3928 * | 3912 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
3929 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 3913 /// an error. |
3930 * error. | 3914 /// |
3931 * | 3915 /// If the used [http.Client] completes with an error when making a REST |
3932 * If the used [http.Client] completes with an error when making a REST call, | 3916 /// call, this method will complete with the same error. |
3933 * this method will complete with the same error. | |
3934 */ | |
3935 async.Future<Tokens> list(core.String userKey) { | 3917 async.Future<Tokens> list(core.String userKey) { |
3936 var _url = null; | 3918 var _url = null; |
3937 var _queryParams = new core.Map(); | 3919 var _queryParams = new core.Map(); |
3938 var _uploadMedia = null; | 3920 var _uploadMedia = null; |
3939 var _uploadOptions = null; | 3921 var _uploadOptions = null; |
3940 var _downloadOptions = commons.DownloadOptions.Metadata; | 3922 var _downloadOptions = commons.DownloadOptions.Metadata; |
3941 var _body = null; | 3923 var _body = null; |
3942 | 3924 |
3943 if (userKey == null) { | 3925 if (userKey == null) { |
3944 throw new core.ArgumentError("Parameter userKey is required."); | 3926 throw new core.ArgumentError("Parameter userKey is required."); |
3945 } | 3927 } |
3946 | 3928 |
3947 _url = 'users/' + commons.Escaper.ecapeVariable('$userKey') + '/tokens'; | 3929 _url = 'users/' + commons.Escaper.ecapeVariable('$userKey') + '/tokens'; |
3948 | 3930 |
3949 var _response = _requester.request(_url, | 3931 var _response = _requester.request(_url, "GET", |
3950 "GET", | 3932 body: _body, |
3951 body: _body, | 3933 queryParams: _queryParams, |
3952 queryParams: _queryParams, | 3934 uploadOptions: _uploadOptions, |
3953 uploadOptions: _uploadOptions, | 3935 uploadMedia: _uploadMedia, |
3954 uploadMedia: _uploadMedia, | 3936 downloadOptions: _downloadOptions); |
3955 downloadOptions: _downloadOptions); | |
3956 return _response.then((data) => new Tokens.fromJson(data)); | 3937 return _response.then((data) => new Tokens.fromJson(data)); |
3957 } | 3938 } |
3958 | |
3959 } | 3939 } |
3960 | 3940 |
3961 | |
3962 class UsersResourceApi { | 3941 class UsersResourceApi { |
3963 final commons.ApiRequester _requester; | 3942 final commons.ApiRequester _requester; |
3964 | 3943 |
3965 UsersAliasesResourceApi get aliases => new UsersAliasesResourceApi(_requester)
; | 3944 UsersAliasesResourceApi get aliases => |
| 3945 new UsersAliasesResourceApi(_requester); |
3966 UsersPhotosResourceApi get photos => new UsersPhotosResourceApi(_requester); | 3946 UsersPhotosResourceApi get photos => new UsersPhotosResourceApi(_requester); |
3967 | 3947 |
3968 UsersResourceApi(commons.ApiRequester client) : | 3948 UsersResourceApi(commons.ApiRequester client) : _requester = client; |
3969 _requester = client; | |
3970 | 3949 |
3971 /** | 3950 /// Delete user |
3972 * Delete user | 3951 /// |
3973 * | 3952 /// Request parameters: |
3974 * Request parameters: | 3953 /// |
3975 * | 3954 /// [userKey] - Email or immutable Id of the user |
3976 * [userKey] - Email or immutable Id of the user | 3955 /// |
3977 * | 3956 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
3978 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 3957 /// an error. |
3979 * error. | 3958 /// |
3980 * | 3959 /// If the used [http.Client] completes with an error when making a REST |
3981 * If the used [http.Client] completes with an error when making a REST call, | 3960 /// call, this method will complete with the same error. |
3982 * this method will complete with the same error. | |
3983 */ | |
3984 async.Future delete(core.String userKey) { | 3961 async.Future delete(core.String userKey) { |
3985 var _url = null; | 3962 var _url = null; |
3986 var _queryParams = new core.Map(); | 3963 var _queryParams = new core.Map(); |
3987 var _uploadMedia = null; | 3964 var _uploadMedia = null; |
3988 var _uploadOptions = null; | 3965 var _uploadOptions = null; |
3989 var _downloadOptions = commons.DownloadOptions.Metadata; | 3966 var _downloadOptions = commons.DownloadOptions.Metadata; |
3990 var _body = null; | 3967 var _body = null; |
3991 | 3968 |
3992 if (userKey == null) { | 3969 if (userKey == null) { |
3993 throw new core.ArgumentError("Parameter userKey is required."); | 3970 throw new core.ArgumentError("Parameter userKey is required."); |
3994 } | 3971 } |
3995 | 3972 |
3996 _downloadOptions = null; | 3973 _downloadOptions = null; |
3997 | 3974 |
3998 _url = 'users/' + commons.Escaper.ecapeVariable('$userKey'); | 3975 _url = 'users/' + commons.Escaper.ecapeVariable('$userKey'); |
3999 | 3976 |
4000 var _response = _requester.request(_url, | 3977 var _response = _requester.request(_url, "DELETE", |
4001 "DELETE", | 3978 body: _body, |
4002 body: _body, | 3979 queryParams: _queryParams, |
4003 queryParams: _queryParams, | 3980 uploadOptions: _uploadOptions, |
4004 uploadOptions: _uploadOptions, | 3981 uploadMedia: _uploadMedia, |
4005 uploadMedia: _uploadMedia, | 3982 downloadOptions: _downloadOptions); |
4006 downloadOptions: _downloadOptions); | |
4007 return _response.then((data) => null); | 3983 return _response.then((data) => null); |
4008 } | 3984 } |
4009 | 3985 |
4010 /** | 3986 /// retrieve user |
4011 * retrieve user | 3987 /// |
4012 * | 3988 /// Request parameters: |
4013 * Request parameters: | 3989 /// |
4014 * | 3990 /// [userKey] - Email or immutable Id of the user |
4015 * [userKey] - Email or immutable Id of the user | 3991 /// |
4016 * | 3992 /// [customFieldMask] - Comma-separated list of schema names. All fields from |
4017 * [customFieldMask] - Comma-separated list of schema names. All fields from | 3993 /// these schemas are fetched. This should only be set when |
4018 * these schemas are fetched. This should only be set when projection=custom. | 3994 /// projection=custom. |
4019 * | 3995 /// |
4020 * [projection] - What subset of fields to fetch for this user. | 3996 /// [projection] - What subset of fields to fetch for this user. |
4021 * Possible string values are: | 3997 /// Possible string values are: |
4022 * - "basic" : Do not include any custom fields for the user. | 3998 /// - "basic" : Do not include any custom fields for the user. |
4023 * - "custom" : Include custom fields from schemas mentioned in | 3999 /// - "custom" : Include custom fields from schemas mentioned in |
4024 * customFieldMask. | 4000 /// customFieldMask. |
4025 * - "full" : Include all fields associated with this user. | 4001 /// - "full" : Include all fields associated with this user. |
4026 * | 4002 /// |
4027 * [viewType] - Whether to fetch the ADMIN_VIEW or DOMAIN_PUBLIC view of the | 4003 /// [viewType] - Whether to fetch the ADMIN_VIEW or DOMAIN_PUBLIC view of the |
4028 * user. | 4004 /// user. |
4029 * Possible string values are: | 4005 /// Possible string values are: |
4030 * - "admin_view" : Fetches the ADMIN_VIEW of the user. | 4006 /// - "admin_view" : Fetches the ADMIN_VIEW of the user. |
4031 * - "domain_public" : Fetches the DOMAIN_PUBLIC view of the user. | 4007 /// - "domain_public" : Fetches the DOMAIN_PUBLIC view of the user. |
4032 * | 4008 /// |
4033 * Completes with a [User]. | 4009 /// Completes with a [User]. |
4034 * | 4010 /// |
4035 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 4011 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
4036 * error. | 4012 /// an error. |
4037 * | 4013 /// |
4038 * If the used [http.Client] completes with an error when making a REST call, | 4014 /// If the used [http.Client] completes with an error when making a REST |
4039 * this method will complete with the same error. | 4015 /// call, this method will complete with the same error. |
4040 */ | 4016 async.Future<User> get(core.String userKey, |
4041 async.Future<User> get(core.String userKey, {core.String customFieldMask, core
.String projection, core.String viewType}) { | 4017 {core.String customFieldMask, |
| 4018 core.String projection, |
| 4019 core.String viewType}) { |
4042 var _url = null; | 4020 var _url = null; |
4043 var _queryParams = new core.Map(); | 4021 var _queryParams = new core.Map(); |
4044 var _uploadMedia = null; | 4022 var _uploadMedia = null; |
4045 var _uploadOptions = null; | 4023 var _uploadOptions = null; |
4046 var _downloadOptions = commons.DownloadOptions.Metadata; | 4024 var _downloadOptions = commons.DownloadOptions.Metadata; |
4047 var _body = null; | 4025 var _body = null; |
4048 | 4026 |
4049 if (userKey == null) { | 4027 if (userKey == null) { |
4050 throw new core.ArgumentError("Parameter userKey is required."); | 4028 throw new core.ArgumentError("Parameter userKey is required."); |
4051 } | 4029 } |
4052 if (customFieldMask != null) { | 4030 if (customFieldMask != null) { |
4053 _queryParams["customFieldMask"] = [customFieldMask]; | 4031 _queryParams["customFieldMask"] = [customFieldMask]; |
4054 } | 4032 } |
4055 if (projection != null) { | 4033 if (projection != null) { |
4056 _queryParams["projection"] = [projection]; | 4034 _queryParams["projection"] = [projection]; |
4057 } | 4035 } |
4058 if (viewType != null) { | 4036 if (viewType != null) { |
4059 _queryParams["viewType"] = [viewType]; | 4037 _queryParams["viewType"] = [viewType]; |
4060 } | 4038 } |
4061 | 4039 |
4062 _url = 'users/' + commons.Escaper.ecapeVariable('$userKey'); | 4040 _url = 'users/' + commons.Escaper.ecapeVariable('$userKey'); |
4063 | 4041 |
4064 var _response = _requester.request(_url, | 4042 var _response = _requester.request(_url, "GET", |
4065 "GET", | 4043 body: _body, |
4066 body: _body, | 4044 queryParams: _queryParams, |
4067 queryParams: _queryParams, | 4045 uploadOptions: _uploadOptions, |
4068 uploadOptions: _uploadOptions, | 4046 uploadMedia: _uploadMedia, |
4069 uploadMedia: _uploadMedia, | 4047 downloadOptions: _downloadOptions); |
4070 downloadOptions: _downloadOptions); | |
4071 return _response.then((data) => new User.fromJson(data)); | 4048 return _response.then((data) => new User.fromJson(data)); |
4072 } | 4049 } |
4073 | 4050 |
4074 /** | 4051 /// create user. |
4075 * create user. | 4052 /// |
4076 * | 4053 /// [request] - The metadata request object. |
4077 * [request] - The metadata request object. | 4054 /// |
4078 * | 4055 /// Request parameters: |
4079 * Request parameters: | 4056 /// |
4080 * | 4057 /// Completes with a [User]. |
4081 * Completes with a [User]. | 4058 /// |
4082 * | 4059 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
4083 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 4060 /// an error. |
4084 * error. | 4061 /// |
4085 * | 4062 /// If the used [http.Client] completes with an error when making a REST |
4086 * If the used [http.Client] completes with an error when making a REST call, | 4063 /// call, this method will complete with the same error. |
4087 * this method will complete with the same error. | |
4088 */ | |
4089 async.Future<User> insert(User request) { | 4064 async.Future<User> insert(User request) { |
4090 var _url = null; | 4065 var _url = null; |
4091 var _queryParams = new core.Map(); | 4066 var _queryParams = new core.Map(); |
4092 var _uploadMedia = null; | 4067 var _uploadMedia = null; |
4093 var _uploadOptions = null; | 4068 var _uploadOptions = null; |
4094 var _downloadOptions = commons.DownloadOptions.Metadata; | 4069 var _downloadOptions = commons.DownloadOptions.Metadata; |
4095 var _body = null; | 4070 var _body = null; |
4096 | 4071 |
4097 if (request != null) { | 4072 if (request != null) { |
4098 _body = convert.JSON.encode((request).toJson()); | 4073 _body = convert.JSON.encode((request).toJson()); |
4099 } | 4074 } |
4100 | 4075 |
4101 _url = 'users'; | 4076 _url = 'users'; |
4102 | 4077 |
4103 var _response = _requester.request(_url, | 4078 var _response = _requester.request(_url, "POST", |
4104 "POST", | 4079 body: _body, |
4105 body: _body, | 4080 queryParams: _queryParams, |
4106 queryParams: _queryParams, | 4081 uploadOptions: _uploadOptions, |
4107 uploadOptions: _uploadOptions, | 4082 uploadMedia: _uploadMedia, |
4108 uploadMedia: _uploadMedia, | 4083 downloadOptions: _downloadOptions); |
4109 downloadOptions: _downloadOptions); | |
4110 return _response.then((data) => new User.fromJson(data)); | 4084 return _response.then((data) => new User.fromJson(data)); |
4111 } | 4085 } |
4112 | 4086 |
4113 /** | 4087 /// Retrieve either deleted users or all users in a domain (paginated) |
4114 * Retrieve either deleted users or all users in a domain (paginated) | 4088 /// |
4115 * | 4089 /// Request parameters: |
4116 * Request parameters: | 4090 /// |
4117 * | 4091 /// [customFieldMask] - Comma-separated list of schema names. All fields from |
4118 * [customFieldMask] - Comma-separated list of schema names. All fields from | 4092 /// these schemas are fetched. This should only be set when |
4119 * these schemas are fetched. This should only be set when projection=custom. | 4093 /// projection=custom. |
4120 * | 4094 /// |
4121 * [customer] - Immutable ID of the G Suite account. In case of multi-domain, | 4095 /// [customer] - Immutable ID of the G Suite account. In case of |
4122 * to fetch all users for a customer, fill this field instead of domain. | 4096 /// multi-domain, to fetch all users for a customer, fill this field instead |
4123 * | 4097 /// of domain. |
4124 * [domain] - Name of the domain. Fill this field to get users from only this | 4098 /// |
4125 * domain. To return all users in a multi-domain fill customer field instead. | 4099 /// [domain] - Name of the domain. Fill this field to get users from only |
4126 * | 4100 /// this domain. To return all users in a multi-domain fill customer field |
4127 * [event] - Event on which subscription is intended (if subscribing) | 4101 /// instead. |
4128 * Possible string values are: | 4102 /// |
4129 * - "add" : User Created Event | 4103 /// [event] - Event on which subscription is intended (if subscribing) |
4130 * - "delete" : User Deleted Event | 4104 /// Possible string values are: |
4131 * - "makeAdmin" : User Admin Status Change Event | 4105 /// - "add" : User Created Event |
4132 * - "undelete" : User Undeleted Event | 4106 /// - "delete" : User Deleted Event |
4133 * - "update" : User Updated Event | 4107 /// - "makeAdmin" : User Admin Status Change Event |
4134 * | 4108 /// - "undelete" : User Undeleted Event |
4135 * [maxResults] - Maximum number of results to return. Default is 100. Max | 4109 /// - "update" : User Updated Event |
4136 * allowed is 500 | 4110 /// |
4137 * Value must be between "1" and "500". | 4111 /// [maxResults] - Maximum number of results to return. Default is 100. Max |
4138 * | 4112 /// allowed is 500 |
4139 * [orderBy] - Column to use for sorting results | 4113 /// Value must be between "1" and "500". |
4140 * Possible string values are: | 4114 /// |
4141 * - "email" : Primary email of the user. | 4115 /// [orderBy] - Column to use for sorting results |
4142 * - "familyName" : User's family name. | 4116 /// Possible string values are: |
4143 * - "givenName" : User's given name. | 4117 /// - "email" : Primary email of the user. |
4144 * | 4118 /// - "familyName" : User's family name. |
4145 * [pageToken] - Token to specify next page in the list | 4119 /// - "givenName" : User's given name. |
4146 * | 4120 /// |
4147 * [projection] - What subset of fields to fetch for this user. | 4121 /// [pageToken] - Token to specify next page in the list |
4148 * Possible string values are: | 4122 /// |
4149 * - "basic" : Do not include any custom fields for the user. | 4123 /// [projection] - What subset of fields to fetch for this user. |
4150 * - "custom" : Include custom fields from schemas mentioned in | 4124 /// Possible string values are: |
4151 * customFieldMask. | 4125 /// - "basic" : Do not include any custom fields for the user. |
4152 * - "full" : Include all fields associated with this user. | 4126 /// - "custom" : Include custom fields from schemas mentioned in |
4153 * | 4127 /// customFieldMask. |
4154 * [query] - Query string search. Should be of the form "". Complete | 4128 /// - "full" : Include all fields associated with this user. |
4155 * documentation is at | 4129 /// |
4156 * https://developers.google.com/admin-sdk/directory/v1/guides/search-users | 4130 /// [query] - Query string search. Should be of the form "". Complete |
4157 * | 4131 /// documentation is at |
4158 * [showDeleted] - If set to true retrieves the list of deleted users. Default | 4132 /// https://developers.google.com/admin-sdk/directory/v1/guides/search-users |
4159 * is false | 4133 /// |
4160 * | 4134 /// [showDeleted] - If set to true retrieves the list of deleted users. |
4161 * [sortOrder] - Whether to return results in ascending or descending order. | 4135 /// Default is false |
4162 * Possible string values are: | 4136 /// |
4163 * - "ASCENDING" : Ascending order. | 4137 /// [sortOrder] - Whether to return results in ascending or descending order. |
4164 * - "DESCENDING" : Descending order. | 4138 /// Possible string values are: |
4165 * | 4139 /// - "ASCENDING" : Ascending order. |
4166 * [viewType] - Whether to fetch the ADMIN_VIEW or DOMAIN_PUBLIC view of the | 4140 /// - "DESCENDING" : Descending order. |
4167 * user. | 4141 /// |
4168 * Possible string values are: | 4142 /// [viewType] - Whether to fetch the ADMIN_VIEW or DOMAIN_PUBLIC view of the |
4169 * - "admin_view" : Fetches the ADMIN_VIEW of the user. | 4143 /// user. |
4170 * - "domain_public" : Fetches the DOMAIN_PUBLIC view of the user. | 4144 /// Possible string values are: |
4171 * | 4145 /// - "admin_view" : Fetches the ADMIN_VIEW of the user. |
4172 * Completes with a [Users]. | 4146 /// - "domain_public" : Fetches the DOMAIN_PUBLIC view of the user. |
4173 * | 4147 /// |
4174 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 4148 /// Completes with a [Users]. |
4175 * error. | 4149 /// |
4176 * | 4150 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
4177 * If the used [http.Client] completes with an error when making a REST call, | 4151 /// an error. |
4178 * this method will complete with the same error. | 4152 /// |
4179 */ | 4153 /// If the used [http.Client] completes with an error when making a REST |
4180 async.Future<Users> list({core.String customFieldMask, core.String customer, c
ore.String domain, core.String event, core.int maxResults, core.String orderBy,
core.String pageToken, core.String projection, core.String query, core.String sh
owDeleted, core.String sortOrder, core.String viewType}) { | 4154 /// call, this method will complete with the same error. |
| 4155 async.Future<Users> list( |
| 4156 {core.String customFieldMask, |
| 4157 core.String customer, |
| 4158 core.String domain, |
| 4159 core.String event, |
| 4160 core.int maxResults, |
| 4161 core.String orderBy, |
| 4162 core.String pageToken, |
| 4163 core.String projection, |
| 4164 core.String query, |
| 4165 core.String showDeleted, |
| 4166 core.String sortOrder, |
| 4167 core.String viewType}) { |
4181 var _url = null; | 4168 var _url = null; |
4182 var _queryParams = new core.Map(); | 4169 var _queryParams = new core.Map(); |
4183 var _uploadMedia = null; | 4170 var _uploadMedia = null; |
4184 var _uploadOptions = null; | 4171 var _uploadOptions = null; |
4185 var _downloadOptions = commons.DownloadOptions.Metadata; | 4172 var _downloadOptions = commons.DownloadOptions.Metadata; |
4186 var _body = null; | 4173 var _body = null; |
4187 | 4174 |
4188 if (customFieldMask != null) { | 4175 if (customFieldMask != null) { |
4189 _queryParams["customFieldMask"] = [customFieldMask]; | 4176 _queryParams["customFieldMask"] = [customFieldMask]; |
4190 } | 4177 } |
(...skipping 26 matching lines...) Expand all Loading... |
4217 } | 4204 } |
4218 if (sortOrder != null) { | 4205 if (sortOrder != null) { |
4219 _queryParams["sortOrder"] = [sortOrder]; | 4206 _queryParams["sortOrder"] = [sortOrder]; |
4220 } | 4207 } |
4221 if (viewType != null) { | 4208 if (viewType != null) { |
4222 _queryParams["viewType"] = [viewType]; | 4209 _queryParams["viewType"] = [viewType]; |
4223 } | 4210 } |
4224 | 4211 |
4225 _url = 'users'; | 4212 _url = 'users'; |
4226 | 4213 |
4227 var _response = _requester.request(_url, | 4214 var _response = _requester.request(_url, "GET", |
4228 "GET", | 4215 body: _body, |
4229 body: _body, | 4216 queryParams: _queryParams, |
4230 queryParams: _queryParams, | 4217 uploadOptions: _uploadOptions, |
4231 uploadOptions: _uploadOptions, | 4218 uploadMedia: _uploadMedia, |
4232 uploadMedia: _uploadMedia, | 4219 downloadOptions: _downloadOptions); |
4233 downloadOptions: _downloadOptions); | |
4234 return _response.then((data) => new Users.fromJson(data)); | 4220 return _response.then((data) => new Users.fromJson(data)); |
4235 } | 4221 } |
4236 | 4222 |
4237 /** | 4223 /// change admin status of a user |
4238 * change admin status of a user | 4224 /// |
4239 * | 4225 /// [request] - The metadata request object. |
4240 * [request] - The metadata request object. | 4226 /// |
4241 * | 4227 /// Request parameters: |
4242 * Request parameters: | 4228 /// |
4243 * | 4229 /// [userKey] - Email or immutable Id of the user as admin |
4244 * [userKey] - Email or immutable Id of the user as admin | 4230 /// |
4245 * | 4231 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
4246 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 4232 /// an error. |
4247 * error. | 4233 /// |
4248 * | 4234 /// If the used [http.Client] completes with an error when making a REST |
4249 * If the used [http.Client] completes with an error when making a REST call, | 4235 /// call, this method will complete with the same error. |
4250 * this method will complete with the same error. | |
4251 */ | |
4252 async.Future makeAdmin(UserMakeAdmin request, core.String userKey) { | 4236 async.Future makeAdmin(UserMakeAdmin request, core.String userKey) { |
4253 var _url = null; | 4237 var _url = null; |
4254 var _queryParams = new core.Map(); | 4238 var _queryParams = new core.Map(); |
4255 var _uploadMedia = null; | 4239 var _uploadMedia = null; |
4256 var _uploadOptions = null; | 4240 var _uploadOptions = null; |
4257 var _downloadOptions = commons.DownloadOptions.Metadata; | 4241 var _downloadOptions = commons.DownloadOptions.Metadata; |
4258 var _body = null; | 4242 var _body = null; |
4259 | 4243 |
4260 if (request != null) { | 4244 if (request != null) { |
4261 _body = convert.JSON.encode((request).toJson()); | 4245 _body = convert.JSON.encode((request).toJson()); |
4262 } | 4246 } |
4263 if (userKey == null) { | 4247 if (userKey == null) { |
4264 throw new core.ArgumentError("Parameter userKey is required."); | 4248 throw new core.ArgumentError("Parameter userKey is required."); |
4265 } | 4249 } |
4266 | 4250 |
4267 _downloadOptions = null; | 4251 _downloadOptions = null; |
4268 | 4252 |
4269 _url = 'users/' + commons.Escaper.ecapeVariable('$userKey') + '/makeAdmin'; | 4253 _url = 'users/' + commons.Escaper.ecapeVariable('$userKey') + '/makeAdmin'; |
4270 | 4254 |
4271 var _response = _requester.request(_url, | 4255 var _response = _requester.request(_url, "POST", |
4272 "POST", | 4256 body: _body, |
4273 body: _body, | 4257 queryParams: _queryParams, |
4274 queryParams: _queryParams, | 4258 uploadOptions: _uploadOptions, |
4275 uploadOptions: _uploadOptions, | 4259 uploadMedia: _uploadMedia, |
4276 uploadMedia: _uploadMedia, | 4260 downloadOptions: _downloadOptions); |
4277 downloadOptions: _downloadOptions); | |
4278 return _response.then((data) => null); | 4261 return _response.then((data) => null); |
4279 } | 4262 } |
4280 | 4263 |
4281 /** | 4264 /// update user. This method supports patch semantics. |
4282 * update user. This method supports patch semantics. | 4265 /// |
4283 * | 4266 /// [request] - The metadata request object. |
4284 * [request] - The metadata request object. | 4267 /// |
4285 * | 4268 /// Request parameters: |
4286 * Request parameters: | 4269 /// |
4287 * | 4270 /// [userKey] - Email or immutable Id of the user. If Id, it should match |
4288 * [userKey] - Email or immutable Id of the user. If Id, it should match with | 4271 /// with id of user object |
4289 * id of user object | 4272 /// |
4290 * | 4273 /// Completes with a [User]. |
4291 * Completes with a [User]. | 4274 /// |
4292 * | 4275 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
4293 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 4276 /// an error. |
4294 * error. | 4277 /// |
4295 * | 4278 /// If the used [http.Client] completes with an error when making a REST |
4296 * If the used [http.Client] completes with an error when making a REST call, | 4279 /// call, this method will complete with the same error. |
4297 * this method will complete with the same error. | |
4298 */ | |
4299 async.Future<User> patch(User request, core.String userKey) { | 4280 async.Future<User> patch(User request, core.String userKey) { |
4300 var _url = null; | 4281 var _url = null; |
4301 var _queryParams = new core.Map(); | 4282 var _queryParams = new core.Map(); |
4302 var _uploadMedia = null; | 4283 var _uploadMedia = null; |
4303 var _uploadOptions = null; | 4284 var _uploadOptions = null; |
4304 var _downloadOptions = commons.DownloadOptions.Metadata; | 4285 var _downloadOptions = commons.DownloadOptions.Metadata; |
4305 var _body = null; | 4286 var _body = null; |
4306 | 4287 |
4307 if (request != null) { | 4288 if (request != null) { |
4308 _body = convert.JSON.encode((request).toJson()); | 4289 _body = convert.JSON.encode((request).toJson()); |
4309 } | 4290 } |
4310 if (userKey == null) { | 4291 if (userKey == null) { |
4311 throw new core.ArgumentError("Parameter userKey is required."); | 4292 throw new core.ArgumentError("Parameter userKey is required."); |
4312 } | 4293 } |
4313 | 4294 |
4314 _url = 'users/' + commons.Escaper.ecapeVariable('$userKey'); | 4295 _url = 'users/' + commons.Escaper.ecapeVariable('$userKey'); |
4315 | 4296 |
4316 var _response = _requester.request(_url, | 4297 var _response = _requester.request(_url, "PATCH", |
4317 "PATCH", | 4298 body: _body, |
4318 body: _body, | 4299 queryParams: _queryParams, |
4319 queryParams: _queryParams, | 4300 uploadOptions: _uploadOptions, |
4320 uploadOptions: _uploadOptions, | 4301 uploadMedia: _uploadMedia, |
4321 uploadMedia: _uploadMedia, | 4302 downloadOptions: _downloadOptions); |
4322 downloadOptions: _downloadOptions); | |
4323 return _response.then((data) => new User.fromJson(data)); | 4303 return _response.then((data) => new User.fromJson(data)); |
4324 } | 4304 } |
4325 | 4305 |
4326 /** | 4306 /// Undelete a deleted user |
4327 * Undelete a deleted user | 4307 /// |
4328 * | 4308 /// [request] - The metadata request object. |
4329 * [request] - The metadata request object. | 4309 /// |
4330 * | 4310 /// Request parameters: |
4331 * Request parameters: | 4311 /// |
4332 * | 4312 /// [userKey] - The immutable id of the user |
4333 * [userKey] - The immutable id of the user | 4313 /// |
4334 * | 4314 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
4335 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 4315 /// an error. |
4336 * error. | 4316 /// |
4337 * | 4317 /// If the used [http.Client] completes with an error when making a REST |
4338 * If the used [http.Client] completes with an error when making a REST call, | 4318 /// call, this method will complete with the same error. |
4339 * this method will complete with the same error. | |
4340 */ | |
4341 async.Future undelete(UserUndelete request, core.String userKey) { | 4319 async.Future undelete(UserUndelete request, core.String userKey) { |
4342 var _url = null; | 4320 var _url = null; |
4343 var _queryParams = new core.Map(); | 4321 var _queryParams = new core.Map(); |
4344 var _uploadMedia = null; | 4322 var _uploadMedia = null; |
4345 var _uploadOptions = null; | 4323 var _uploadOptions = null; |
4346 var _downloadOptions = commons.DownloadOptions.Metadata; | 4324 var _downloadOptions = commons.DownloadOptions.Metadata; |
4347 var _body = null; | 4325 var _body = null; |
4348 | 4326 |
4349 if (request != null) { | 4327 if (request != null) { |
4350 _body = convert.JSON.encode((request).toJson()); | 4328 _body = convert.JSON.encode((request).toJson()); |
4351 } | 4329 } |
4352 if (userKey == null) { | 4330 if (userKey == null) { |
4353 throw new core.ArgumentError("Parameter userKey is required."); | 4331 throw new core.ArgumentError("Parameter userKey is required."); |
4354 } | 4332 } |
4355 | 4333 |
4356 _downloadOptions = null; | 4334 _downloadOptions = null; |
4357 | 4335 |
4358 _url = 'users/' + commons.Escaper.ecapeVariable('$userKey') + '/undelete'; | 4336 _url = 'users/' + commons.Escaper.ecapeVariable('$userKey') + '/undelete'; |
4359 | 4337 |
4360 var _response = _requester.request(_url, | 4338 var _response = _requester.request(_url, "POST", |
4361 "POST", | 4339 body: _body, |
4362 body: _body, | 4340 queryParams: _queryParams, |
4363 queryParams: _queryParams, | 4341 uploadOptions: _uploadOptions, |
4364 uploadOptions: _uploadOptions, | 4342 uploadMedia: _uploadMedia, |
4365 uploadMedia: _uploadMedia, | 4343 downloadOptions: _downloadOptions); |
4366 downloadOptions: _downloadOptions); | |
4367 return _response.then((data) => null); | 4344 return _response.then((data) => null); |
4368 } | 4345 } |
4369 | 4346 |
4370 /** | 4347 /// update user |
4371 * update user | 4348 /// |
4372 * | 4349 /// [request] - The metadata request object. |
4373 * [request] - The metadata request object. | 4350 /// |
4374 * | 4351 /// Request parameters: |
4375 * Request parameters: | 4352 /// |
4376 * | 4353 /// [userKey] - Email or immutable Id of the user. If Id, it should match |
4377 * [userKey] - Email or immutable Id of the user. If Id, it should match with | 4354 /// with id of user object |
4378 * id of user object | 4355 /// |
4379 * | 4356 /// Completes with a [User]. |
4380 * Completes with a [User]. | 4357 /// |
4381 * | 4358 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
4382 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 4359 /// an error. |
4383 * error. | 4360 /// |
4384 * | 4361 /// If the used [http.Client] completes with an error when making a REST |
4385 * If the used [http.Client] completes with an error when making a REST call, | 4362 /// call, this method will complete with the same error. |
4386 * this method will complete with the same error. | |
4387 */ | |
4388 async.Future<User> update(User request, core.String userKey) { | 4363 async.Future<User> update(User request, core.String userKey) { |
4389 var _url = null; | 4364 var _url = null; |
4390 var _queryParams = new core.Map(); | 4365 var _queryParams = new core.Map(); |
4391 var _uploadMedia = null; | 4366 var _uploadMedia = null; |
4392 var _uploadOptions = null; | 4367 var _uploadOptions = null; |
4393 var _downloadOptions = commons.DownloadOptions.Metadata; | 4368 var _downloadOptions = commons.DownloadOptions.Metadata; |
4394 var _body = null; | 4369 var _body = null; |
4395 | 4370 |
4396 if (request != null) { | 4371 if (request != null) { |
4397 _body = convert.JSON.encode((request).toJson()); | 4372 _body = convert.JSON.encode((request).toJson()); |
4398 } | 4373 } |
4399 if (userKey == null) { | 4374 if (userKey == null) { |
4400 throw new core.ArgumentError("Parameter userKey is required."); | 4375 throw new core.ArgumentError("Parameter userKey is required."); |
4401 } | 4376 } |
4402 | 4377 |
4403 _url = 'users/' + commons.Escaper.ecapeVariable('$userKey'); | 4378 _url = 'users/' + commons.Escaper.ecapeVariable('$userKey'); |
4404 | 4379 |
4405 var _response = _requester.request(_url, | 4380 var _response = _requester.request(_url, "PUT", |
4406 "PUT", | 4381 body: _body, |
4407 body: _body, | 4382 queryParams: _queryParams, |
4408 queryParams: _queryParams, | 4383 uploadOptions: _uploadOptions, |
4409 uploadOptions: _uploadOptions, | 4384 uploadMedia: _uploadMedia, |
4410 uploadMedia: _uploadMedia, | 4385 downloadOptions: _downloadOptions); |
4411 downloadOptions: _downloadOptions); | |
4412 return _response.then((data) => new User.fromJson(data)); | 4386 return _response.then((data) => new User.fromJson(data)); |
4413 } | 4387 } |
4414 | 4388 |
4415 /** | 4389 /// Watch for changes in users list |
4416 * Watch for changes in users list | 4390 /// |
4417 * | 4391 /// [request] - The metadata request object. |
4418 * [request] - The metadata request object. | 4392 /// |
4419 * | 4393 /// Request parameters: |
4420 * Request parameters: | 4394 /// |
4421 * | 4395 /// [customFieldMask] - Comma-separated list of schema names. All fields from |
4422 * [customFieldMask] - Comma-separated list of schema names. All fields from | 4396 /// these schemas are fetched. This should only be set when |
4423 * these schemas are fetched. This should only be set when projection=custom. | 4397 /// projection=custom. |
4424 * | 4398 /// |
4425 * [customer] - Immutable ID of the G Suite account. In case of multi-domain, | 4399 /// [customer] - Immutable ID of the G Suite account. In case of |
4426 * to fetch all users for a customer, fill this field instead of domain. | 4400 /// multi-domain, to fetch all users for a customer, fill this field instead |
4427 * | 4401 /// of domain. |
4428 * [domain] - Name of the domain. Fill this field to get users from only this | 4402 /// |
4429 * domain. To return all users in a multi-domain fill customer field instead. | 4403 /// [domain] - Name of the domain. Fill this field to get users from only |
4430 * | 4404 /// this domain. To return all users in a multi-domain fill customer field |
4431 * [event] - Event on which subscription is intended (if subscribing) | 4405 /// instead. |
4432 * Possible string values are: | 4406 /// |
4433 * - "add" : User Created Event | 4407 /// [event] - Event on which subscription is intended (if subscribing) |
4434 * - "delete" : User Deleted Event | 4408 /// Possible string values are: |
4435 * - "makeAdmin" : User Admin Status Change Event | 4409 /// - "add" : User Created Event |
4436 * - "undelete" : User Undeleted Event | 4410 /// - "delete" : User Deleted Event |
4437 * - "update" : User Updated Event | 4411 /// - "makeAdmin" : User Admin Status Change Event |
4438 * | 4412 /// - "undelete" : User Undeleted Event |
4439 * [maxResults] - Maximum number of results to return. Default is 100. Max | 4413 /// - "update" : User Updated Event |
4440 * allowed is 500 | 4414 /// |
4441 * Value must be between "1" and "500". | 4415 /// [maxResults] - Maximum number of results to return. Default is 100. Max |
4442 * | 4416 /// allowed is 500 |
4443 * [orderBy] - Column to use for sorting results | 4417 /// Value must be between "1" and "500". |
4444 * Possible string values are: | 4418 /// |
4445 * - "email" : Primary email of the user. | 4419 /// [orderBy] - Column to use for sorting results |
4446 * - "familyName" : User's family name. | 4420 /// Possible string values are: |
4447 * - "givenName" : User's given name. | 4421 /// - "email" : Primary email of the user. |
4448 * | 4422 /// - "familyName" : User's family name. |
4449 * [pageToken] - Token to specify next page in the list | 4423 /// - "givenName" : User's given name. |
4450 * | 4424 /// |
4451 * [projection] - What subset of fields to fetch for this user. | 4425 /// [pageToken] - Token to specify next page in the list |
4452 * Possible string values are: | 4426 /// |
4453 * - "basic" : Do not include any custom fields for the user. | 4427 /// [projection] - What subset of fields to fetch for this user. |
4454 * - "custom" : Include custom fields from schemas mentioned in | 4428 /// Possible string values are: |
4455 * customFieldMask. | 4429 /// - "basic" : Do not include any custom fields for the user. |
4456 * - "full" : Include all fields associated with this user. | 4430 /// - "custom" : Include custom fields from schemas mentioned in |
4457 * | 4431 /// customFieldMask. |
4458 * [query] - Query string search. Should be of the form "". Complete | 4432 /// - "full" : Include all fields associated with this user. |
4459 * documentation is at | 4433 /// |
4460 * https://developers.google.com/admin-sdk/directory/v1/guides/search-users | 4434 /// [query] - Query string search. Should be of the form "". Complete |
4461 * | 4435 /// documentation is at |
4462 * [showDeleted] - If set to true retrieves the list of deleted users. Default | 4436 /// https://developers.google.com/admin-sdk/directory/v1/guides/search-users |
4463 * is false | 4437 /// |
4464 * | 4438 /// [showDeleted] - If set to true retrieves the list of deleted users. |
4465 * [sortOrder] - Whether to return results in ascending or descending order. | 4439 /// Default is false |
4466 * Possible string values are: | 4440 /// |
4467 * - "ASCENDING" : Ascending order. | 4441 /// [sortOrder] - Whether to return results in ascending or descending order. |
4468 * - "DESCENDING" : Descending order. | 4442 /// Possible string values are: |
4469 * | 4443 /// - "ASCENDING" : Ascending order. |
4470 * [viewType] - Whether to fetch the ADMIN_VIEW or DOMAIN_PUBLIC view of the | 4444 /// - "DESCENDING" : Descending order. |
4471 * user. | 4445 /// |
4472 * Possible string values are: | 4446 /// [viewType] - Whether to fetch the ADMIN_VIEW or DOMAIN_PUBLIC view of the |
4473 * - "admin_view" : Fetches the ADMIN_VIEW of the user. | 4447 /// user. |
4474 * - "domain_public" : Fetches the DOMAIN_PUBLIC view of the user. | 4448 /// Possible string values are: |
4475 * | 4449 /// - "admin_view" : Fetches the ADMIN_VIEW of the user. |
4476 * Completes with a [Channel]. | 4450 /// - "domain_public" : Fetches the DOMAIN_PUBLIC view of the user. |
4477 * | 4451 /// |
4478 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 4452 /// Completes with a [Channel]. |
4479 * error. | 4453 /// |
4480 * | 4454 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
4481 * If the used [http.Client] completes with an error when making a REST call, | 4455 /// an error. |
4482 * this method will complete with the same error. | 4456 /// |
4483 */ | 4457 /// If the used [http.Client] completes with an error when making a REST |
4484 async.Future<Channel> watch(Channel request, {core.String customFieldMask, cor
e.String customer, core.String domain, core.String event, core.int maxResults, c
ore.String orderBy, core.String pageToken, core.String projection, core.String q
uery, core.String showDeleted, core.String sortOrder, core.String viewType}) { | 4458 /// call, this method will complete with the same error. |
| 4459 async.Future<Channel> watch(Channel request, |
| 4460 {core.String customFieldMask, |
| 4461 core.String customer, |
| 4462 core.String domain, |
| 4463 core.String event, |
| 4464 core.int maxResults, |
| 4465 core.String orderBy, |
| 4466 core.String pageToken, |
| 4467 core.String projection, |
| 4468 core.String query, |
| 4469 core.String showDeleted, |
| 4470 core.String sortOrder, |
| 4471 core.String viewType}) { |
4485 var _url = null; | 4472 var _url = null; |
4486 var _queryParams = new core.Map(); | 4473 var _queryParams = new core.Map(); |
4487 var _uploadMedia = null; | 4474 var _uploadMedia = null; |
4488 var _uploadOptions = null; | 4475 var _uploadOptions = null; |
4489 var _downloadOptions = commons.DownloadOptions.Metadata; | 4476 var _downloadOptions = commons.DownloadOptions.Metadata; |
4490 var _body = null; | 4477 var _body = null; |
4491 | 4478 |
4492 if (request != null) { | 4479 if (request != null) { |
4493 _body = convert.JSON.encode((request).toJson()); | 4480 _body = convert.JSON.encode((request).toJson()); |
4494 } | 4481 } |
(...skipping 29 matching lines...) Expand all Loading... |
4524 } | 4511 } |
4525 if (sortOrder != null) { | 4512 if (sortOrder != null) { |
4526 _queryParams["sortOrder"] = [sortOrder]; | 4513 _queryParams["sortOrder"] = [sortOrder]; |
4527 } | 4514 } |
4528 if (viewType != null) { | 4515 if (viewType != null) { |
4529 _queryParams["viewType"] = [viewType]; | 4516 _queryParams["viewType"] = [viewType]; |
4530 } | 4517 } |
4531 | 4518 |
4532 _url = 'users/watch'; | 4519 _url = 'users/watch'; |
4533 | 4520 |
4534 var _response = _requester.request(_url, | 4521 var _response = _requester.request(_url, "POST", |
4535 "POST", | 4522 body: _body, |
4536 body: _body, | 4523 queryParams: _queryParams, |
4537 queryParams: _queryParams, | 4524 uploadOptions: _uploadOptions, |
4538 uploadOptions: _uploadOptions, | 4525 uploadMedia: _uploadMedia, |
4539 uploadMedia: _uploadMedia, | 4526 downloadOptions: _downloadOptions); |
4540 downloadOptions: _downloadOptions); | |
4541 return _response.then((data) => new Channel.fromJson(data)); | 4527 return _response.then((data) => new Channel.fromJson(data)); |
4542 } | 4528 } |
4543 | |
4544 } | 4529 } |
4545 | 4530 |
4546 | |
4547 class UsersAliasesResourceApi { | 4531 class UsersAliasesResourceApi { |
4548 final commons.ApiRequester _requester; | 4532 final commons.ApiRequester _requester; |
4549 | 4533 |
4550 UsersAliasesResourceApi(commons.ApiRequester client) : | 4534 UsersAliasesResourceApi(commons.ApiRequester client) : _requester = client; |
4551 _requester = client; | |
4552 | 4535 |
4553 /** | 4536 /// Remove a alias for the user |
4554 * Remove a alias for the user | 4537 /// |
4555 * | 4538 /// Request parameters: |
4556 * Request parameters: | 4539 /// |
4557 * | 4540 /// [userKey] - Email or immutable Id of the user |
4558 * [userKey] - Email or immutable Id of the user | 4541 /// |
4559 * | 4542 /// [alias] - The alias to be removed |
4560 * [alias] - The alias to be removed | 4543 /// |
4561 * | 4544 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
4562 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 4545 /// an error. |
4563 * error. | 4546 /// |
4564 * | 4547 /// If the used [http.Client] completes with an error when making a REST |
4565 * If the used [http.Client] completes with an error when making a REST call, | 4548 /// call, this method will complete with the same error. |
4566 * this method will complete with the same error. | |
4567 */ | |
4568 async.Future delete(core.String userKey, core.String alias) { | 4549 async.Future delete(core.String userKey, core.String alias) { |
4569 var _url = null; | 4550 var _url = null; |
4570 var _queryParams = new core.Map(); | 4551 var _queryParams = new core.Map(); |
4571 var _uploadMedia = null; | 4552 var _uploadMedia = null; |
4572 var _uploadOptions = null; | 4553 var _uploadOptions = null; |
4573 var _downloadOptions = commons.DownloadOptions.Metadata; | 4554 var _downloadOptions = commons.DownloadOptions.Metadata; |
4574 var _body = null; | 4555 var _body = null; |
4575 | 4556 |
4576 if (userKey == null) { | 4557 if (userKey == null) { |
4577 throw new core.ArgumentError("Parameter userKey is required."); | 4558 throw new core.ArgumentError("Parameter userKey is required."); |
4578 } | 4559 } |
4579 if (alias == null) { | 4560 if (alias == null) { |
4580 throw new core.ArgumentError("Parameter alias is required."); | 4561 throw new core.ArgumentError("Parameter alias is required."); |
4581 } | 4562 } |
4582 | 4563 |
4583 _downloadOptions = null; | 4564 _downloadOptions = null; |
4584 | 4565 |
4585 _url = 'users/' + commons.Escaper.ecapeVariable('$userKey') + '/aliases/' +
commons.Escaper.ecapeVariable('$alias'); | 4566 _url = 'users/' + |
| 4567 commons.Escaper.ecapeVariable('$userKey') + |
| 4568 '/aliases/' + |
| 4569 commons.Escaper.ecapeVariable('$alias'); |
4586 | 4570 |
4587 var _response = _requester.request(_url, | 4571 var _response = _requester.request(_url, "DELETE", |
4588 "DELETE", | 4572 body: _body, |
4589 body: _body, | 4573 queryParams: _queryParams, |
4590 queryParams: _queryParams, | 4574 uploadOptions: _uploadOptions, |
4591 uploadOptions: _uploadOptions, | 4575 uploadMedia: _uploadMedia, |
4592 uploadMedia: _uploadMedia, | 4576 downloadOptions: _downloadOptions); |
4593 downloadOptions: _downloadOptions); | |
4594 return _response.then((data) => null); | 4577 return _response.then((data) => null); |
4595 } | 4578 } |
4596 | 4579 |
4597 /** | 4580 /// Add a alias for the user |
4598 * Add a alias for the user | 4581 /// |
4599 * | 4582 /// [request] - The metadata request object. |
4600 * [request] - The metadata request object. | 4583 /// |
4601 * | 4584 /// Request parameters: |
4602 * Request parameters: | 4585 /// |
4603 * | 4586 /// [userKey] - Email or immutable Id of the user |
4604 * [userKey] - Email or immutable Id of the user | 4587 /// |
4605 * | 4588 /// Completes with a [Alias]. |
4606 * Completes with a [Alias]. | 4589 /// |
4607 * | 4590 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
4608 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 4591 /// an error. |
4609 * error. | 4592 /// |
4610 * | 4593 /// If the used [http.Client] completes with an error when making a REST |
4611 * If the used [http.Client] completes with an error when making a REST call, | 4594 /// call, this method will complete with the same error. |
4612 * this method will complete with the same error. | |
4613 */ | |
4614 async.Future<Alias> insert(Alias request, core.String userKey) { | 4595 async.Future<Alias> insert(Alias request, core.String userKey) { |
4615 var _url = null; | 4596 var _url = null; |
4616 var _queryParams = new core.Map(); | 4597 var _queryParams = new core.Map(); |
4617 var _uploadMedia = null; | 4598 var _uploadMedia = null; |
4618 var _uploadOptions = null; | 4599 var _uploadOptions = null; |
4619 var _downloadOptions = commons.DownloadOptions.Metadata; | 4600 var _downloadOptions = commons.DownloadOptions.Metadata; |
4620 var _body = null; | 4601 var _body = null; |
4621 | 4602 |
4622 if (request != null) { | 4603 if (request != null) { |
4623 _body = convert.JSON.encode((request).toJson()); | 4604 _body = convert.JSON.encode((request).toJson()); |
4624 } | 4605 } |
4625 if (userKey == null) { | 4606 if (userKey == null) { |
4626 throw new core.ArgumentError("Parameter userKey is required."); | 4607 throw new core.ArgumentError("Parameter userKey is required."); |
4627 } | 4608 } |
4628 | 4609 |
4629 _url = 'users/' + commons.Escaper.ecapeVariable('$userKey') + '/aliases'; | 4610 _url = 'users/' + commons.Escaper.ecapeVariable('$userKey') + '/aliases'; |
4630 | 4611 |
4631 var _response = _requester.request(_url, | 4612 var _response = _requester.request(_url, "POST", |
4632 "POST", | 4613 body: _body, |
4633 body: _body, | 4614 queryParams: _queryParams, |
4634 queryParams: _queryParams, | 4615 uploadOptions: _uploadOptions, |
4635 uploadOptions: _uploadOptions, | 4616 uploadMedia: _uploadMedia, |
4636 uploadMedia: _uploadMedia, | 4617 downloadOptions: _downloadOptions); |
4637 downloadOptions: _downloadOptions); | |
4638 return _response.then((data) => new Alias.fromJson(data)); | 4618 return _response.then((data) => new Alias.fromJson(data)); |
4639 } | 4619 } |
4640 | 4620 |
4641 /** | 4621 /// List all aliases for a user |
4642 * List all aliases for a user | 4622 /// |
4643 * | 4623 /// Request parameters: |
4644 * Request parameters: | 4624 /// |
4645 * | 4625 /// [userKey] - Email or immutable Id of the user |
4646 * [userKey] - Email or immutable Id of the user | 4626 /// |
4647 * | 4627 /// [event] - Event on which subscription is intended (if subscribing) |
4648 * [event] - Event on which subscription is intended (if subscribing) | 4628 /// Possible string values are: |
4649 * Possible string values are: | 4629 /// - "add" : Alias Created Event |
4650 * - "add" : Alias Created Event | 4630 /// - "delete" : Alias Deleted Event |
4651 * - "delete" : Alias Deleted Event | 4631 /// |
4652 * | 4632 /// Completes with a [Aliases]. |
4653 * Completes with a [Aliases]. | 4633 /// |
4654 * | 4634 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
4655 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 4635 /// an error. |
4656 * error. | 4636 /// |
4657 * | 4637 /// If the used [http.Client] completes with an error when making a REST |
4658 * If the used [http.Client] completes with an error when making a REST call, | 4638 /// call, this method will complete with the same error. |
4659 * this method will complete with the same error. | |
4660 */ | |
4661 async.Future<Aliases> list(core.String userKey, {core.String event}) { | 4639 async.Future<Aliases> list(core.String userKey, {core.String event}) { |
4662 var _url = null; | 4640 var _url = null; |
4663 var _queryParams = new core.Map(); | 4641 var _queryParams = new core.Map(); |
4664 var _uploadMedia = null; | 4642 var _uploadMedia = null; |
4665 var _uploadOptions = null; | 4643 var _uploadOptions = null; |
4666 var _downloadOptions = commons.DownloadOptions.Metadata; | 4644 var _downloadOptions = commons.DownloadOptions.Metadata; |
4667 var _body = null; | 4645 var _body = null; |
4668 | 4646 |
4669 if (userKey == null) { | 4647 if (userKey == null) { |
4670 throw new core.ArgumentError("Parameter userKey is required."); | 4648 throw new core.ArgumentError("Parameter userKey is required."); |
4671 } | 4649 } |
4672 if (event != null) { | 4650 if (event != null) { |
4673 _queryParams["event"] = [event]; | 4651 _queryParams["event"] = [event]; |
4674 } | 4652 } |
4675 | 4653 |
4676 _url = 'users/' + commons.Escaper.ecapeVariable('$userKey') + '/aliases'; | 4654 _url = 'users/' + commons.Escaper.ecapeVariable('$userKey') + '/aliases'; |
4677 | 4655 |
4678 var _response = _requester.request(_url, | 4656 var _response = _requester.request(_url, "GET", |
4679 "GET", | 4657 body: _body, |
4680 body: _body, | 4658 queryParams: _queryParams, |
4681 queryParams: _queryParams, | 4659 uploadOptions: _uploadOptions, |
4682 uploadOptions: _uploadOptions, | 4660 uploadMedia: _uploadMedia, |
4683 uploadMedia: _uploadMedia, | 4661 downloadOptions: _downloadOptions); |
4684 downloadOptions: _downloadOptions); | |
4685 return _response.then((data) => new Aliases.fromJson(data)); | 4662 return _response.then((data) => new Aliases.fromJson(data)); |
4686 } | 4663 } |
4687 | 4664 |
4688 /** | 4665 /// Watch for changes in user aliases list |
4689 * Watch for changes in user aliases list | 4666 /// |
4690 * | 4667 /// [request] - The metadata request object. |
4691 * [request] - The metadata request object. | 4668 /// |
4692 * | 4669 /// Request parameters: |
4693 * Request parameters: | 4670 /// |
4694 * | 4671 /// [userKey] - Email or immutable Id of the user |
4695 * [userKey] - Email or immutable Id of the user | 4672 /// |
4696 * | 4673 /// [event] - Event on which subscription is intended (if subscribing) |
4697 * [event] - Event on which subscription is intended (if subscribing) | 4674 /// Possible string values are: |
4698 * Possible string values are: | 4675 /// - "add" : Alias Created Event |
4699 * - "add" : Alias Created Event | 4676 /// - "delete" : Alias Deleted Event |
4700 * - "delete" : Alias Deleted Event | 4677 /// |
4701 * | 4678 /// Completes with a [Channel]. |
4702 * Completes with a [Channel]. | 4679 /// |
4703 * | 4680 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
4704 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 4681 /// an error. |
4705 * error. | 4682 /// |
4706 * | 4683 /// If the used [http.Client] completes with an error when making a REST |
4707 * If the used [http.Client] completes with an error when making a REST call, | 4684 /// call, this method will complete with the same error. |
4708 * this method will complete with the same error. | 4685 async.Future<Channel> watch(Channel request, core.String userKey, |
4709 */ | 4686 {core.String event}) { |
4710 async.Future<Channel> watch(Channel request, core.String userKey, {core.String
event}) { | |
4711 var _url = null; | 4687 var _url = null; |
4712 var _queryParams = new core.Map(); | 4688 var _queryParams = new core.Map(); |
4713 var _uploadMedia = null; | 4689 var _uploadMedia = null; |
4714 var _uploadOptions = null; | 4690 var _uploadOptions = null; |
4715 var _downloadOptions = commons.DownloadOptions.Metadata; | 4691 var _downloadOptions = commons.DownloadOptions.Metadata; |
4716 var _body = null; | 4692 var _body = null; |
4717 | 4693 |
4718 if (request != null) { | 4694 if (request != null) { |
4719 _body = convert.JSON.encode((request).toJson()); | 4695 _body = convert.JSON.encode((request).toJson()); |
4720 } | 4696 } |
4721 if (userKey == null) { | 4697 if (userKey == null) { |
4722 throw new core.ArgumentError("Parameter userKey is required."); | 4698 throw new core.ArgumentError("Parameter userKey is required."); |
4723 } | 4699 } |
4724 if (event != null) { | 4700 if (event != null) { |
4725 _queryParams["event"] = [event]; | 4701 _queryParams["event"] = [event]; |
4726 } | 4702 } |
4727 | 4703 |
4728 _url = 'users/' + commons.Escaper.ecapeVariable('$userKey') + '/aliases/watc
h'; | 4704 _url = |
| 4705 'users/' + commons.Escaper.ecapeVariable('$userKey') + '/aliases/watch'; |
4729 | 4706 |
4730 var _response = _requester.request(_url, | 4707 var _response = _requester.request(_url, "POST", |
4731 "POST", | 4708 body: _body, |
4732 body: _body, | 4709 queryParams: _queryParams, |
4733 queryParams: _queryParams, | 4710 uploadOptions: _uploadOptions, |
4734 uploadOptions: _uploadOptions, | 4711 uploadMedia: _uploadMedia, |
4735 uploadMedia: _uploadMedia, | 4712 downloadOptions: _downloadOptions); |
4736 downloadOptions: _downloadOptions); | |
4737 return _response.then((data) => new Channel.fromJson(data)); | 4713 return _response.then((data) => new Channel.fromJson(data)); |
4738 } | 4714 } |
4739 | |
4740 } | 4715 } |
4741 | 4716 |
4742 | |
4743 class UsersPhotosResourceApi { | 4717 class UsersPhotosResourceApi { |
4744 final commons.ApiRequester _requester; | 4718 final commons.ApiRequester _requester; |
4745 | 4719 |
4746 UsersPhotosResourceApi(commons.ApiRequester client) : | 4720 UsersPhotosResourceApi(commons.ApiRequester client) : _requester = client; |
4747 _requester = client; | |
4748 | 4721 |
4749 /** | 4722 /// Remove photos for the user |
4750 * Remove photos for the user | 4723 /// |
4751 * | 4724 /// Request parameters: |
4752 * Request parameters: | 4725 /// |
4753 * | 4726 /// [userKey] - Email or immutable Id of the user |
4754 * [userKey] - Email or immutable Id of the user | 4727 /// |
4755 * | 4728 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
4756 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 4729 /// an error. |
4757 * error. | 4730 /// |
4758 * | 4731 /// If the used [http.Client] completes with an error when making a REST |
4759 * If the used [http.Client] completes with an error when making a REST call, | 4732 /// call, this method will complete with the same error. |
4760 * this method will complete with the same error. | |
4761 */ | |
4762 async.Future delete(core.String userKey) { | 4733 async.Future delete(core.String userKey) { |
4763 var _url = null; | 4734 var _url = null; |
4764 var _queryParams = new core.Map(); | 4735 var _queryParams = new core.Map(); |
4765 var _uploadMedia = null; | 4736 var _uploadMedia = null; |
4766 var _uploadOptions = null; | 4737 var _uploadOptions = null; |
4767 var _downloadOptions = commons.DownloadOptions.Metadata; | 4738 var _downloadOptions = commons.DownloadOptions.Metadata; |
4768 var _body = null; | 4739 var _body = null; |
4769 | 4740 |
4770 if (userKey == null) { | 4741 if (userKey == null) { |
4771 throw new core.ArgumentError("Parameter userKey is required."); | 4742 throw new core.ArgumentError("Parameter userKey is required."); |
4772 } | 4743 } |
4773 | 4744 |
4774 _downloadOptions = null; | 4745 _downloadOptions = null; |
4775 | 4746 |
4776 _url = 'users/' + commons.Escaper.ecapeVariable('$userKey') + '/photos/thumb
nail'; | 4747 _url = 'users/' + |
| 4748 commons.Escaper.ecapeVariable('$userKey') + |
| 4749 '/photos/thumbnail'; |
4777 | 4750 |
4778 var _response = _requester.request(_url, | 4751 var _response = _requester.request(_url, "DELETE", |
4779 "DELETE", | 4752 body: _body, |
4780 body: _body, | 4753 queryParams: _queryParams, |
4781 queryParams: _queryParams, | 4754 uploadOptions: _uploadOptions, |
4782 uploadOptions: _uploadOptions, | 4755 uploadMedia: _uploadMedia, |
4783 uploadMedia: _uploadMedia, | 4756 downloadOptions: _downloadOptions); |
4784 downloadOptions: _downloadOptions); | |
4785 return _response.then((data) => null); | 4757 return _response.then((data) => null); |
4786 } | 4758 } |
4787 | 4759 |
4788 /** | 4760 /// Retrieve photo of a user |
4789 * Retrieve photo of a user | 4761 /// |
4790 * | 4762 /// Request parameters: |
4791 * Request parameters: | 4763 /// |
4792 * | 4764 /// [userKey] - Email or immutable Id of the user |
4793 * [userKey] - Email or immutable Id of the user | 4765 /// |
4794 * | 4766 /// Completes with a [UserPhoto]. |
4795 * Completes with a [UserPhoto]. | 4767 /// |
4796 * | 4768 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
4797 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 4769 /// an error. |
4798 * error. | 4770 /// |
4799 * | 4771 /// If the used [http.Client] completes with an error when making a REST |
4800 * If the used [http.Client] completes with an error when making a REST call, | 4772 /// call, this method will complete with the same error. |
4801 * this method will complete with the same error. | |
4802 */ | |
4803 async.Future<UserPhoto> get(core.String userKey) { | 4773 async.Future<UserPhoto> get(core.String userKey) { |
4804 var _url = null; | 4774 var _url = null; |
4805 var _queryParams = new core.Map(); | 4775 var _queryParams = new core.Map(); |
4806 var _uploadMedia = null; | 4776 var _uploadMedia = null; |
4807 var _uploadOptions = null; | 4777 var _uploadOptions = null; |
4808 var _downloadOptions = commons.DownloadOptions.Metadata; | 4778 var _downloadOptions = commons.DownloadOptions.Metadata; |
4809 var _body = null; | 4779 var _body = null; |
4810 | 4780 |
4811 if (userKey == null) { | 4781 if (userKey == null) { |
4812 throw new core.ArgumentError("Parameter userKey is required."); | 4782 throw new core.ArgumentError("Parameter userKey is required."); |
4813 } | 4783 } |
4814 | 4784 |
4815 _url = 'users/' + commons.Escaper.ecapeVariable('$userKey') + '/photos/thumb
nail'; | 4785 _url = 'users/' + |
| 4786 commons.Escaper.ecapeVariable('$userKey') + |
| 4787 '/photos/thumbnail'; |
4816 | 4788 |
4817 var _response = _requester.request(_url, | 4789 var _response = _requester.request(_url, "GET", |
4818 "GET", | 4790 body: _body, |
4819 body: _body, | 4791 queryParams: _queryParams, |
4820 queryParams: _queryParams, | 4792 uploadOptions: _uploadOptions, |
4821 uploadOptions: _uploadOptions, | 4793 uploadMedia: _uploadMedia, |
4822 uploadMedia: _uploadMedia, | 4794 downloadOptions: _downloadOptions); |
4823 downloadOptions: _downloadOptions); | |
4824 return _response.then((data) => new UserPhoto.fromJson(data)); | 4795 return _response.then((data) => new UserPhoto.fromJson(data)); |
4825 } | 4796 } |
4826 | 4797 |
4827 /** | 4798 /// Add a photo for the user. This method supports patch semantics. |
4828 * Add a photo for the user. This method supports patch semantics. | 4799 /// |
4829 * | 4800 /// [request] - The metadata request object. |
4830 * [request] - The metadata request object. | 4801 /// |
4831 * | 4802 /// Request parameters: |
4832 * Request parameters: | 4803 /// |
4833 * | 4804 /// [userKey] - Email or immutable Id of the user |
4834 * [userKey] - Email or immutable Id of the user | 4805 /// |
4835 * | 4806 /// Completes with a [UserPhoto]. |
4836 * Completes with a [UserPhoto]. | 4807 /// |
4837 * | 4808 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
4838 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 4809 /// an error. |
4839 * error. | 4810 /// |
4840 * | 4811 /// If the used [http.Client] completes with an error when making a REST |
4841 * If the used [http.Client] completes with an error when making a REST call, | 4812 /// call, this method will complete with the same error. |
4842 * this method will complete with the same error. | |
4843 */ | |
4844 async.Future<UserPhoto> patch(UserPhoto request, core.String userKey) { | 4813 async.Future<UserPhoto> patch(UserPhoto request, core.String userKey) { |
4845 var _url = null; | 4814 var _url = null; |
4846 var _queryParams = new core.Map(); | 4815 var _queryParams = new core.Map(); |
4847 var _uploadMedia = null; | 4816 var _uploadMedia = null; |
4848 var _uploadOptions = null; | 4817 var _uploadOptions = null; |
4849 var _downloadOptions = commons.DownloadOptions.Metadata; | 4818 var _downloadOptions = commons.DownloadOptions.Metadata; |
4850 var _body = null; | 4819 var _body = null; |
4851 | 4820 |
4852 if (request != null) { | 4821 if (request != null) { |
4853 _body = convert.JSON.encode((request).toJson()); | 4822 _body = convert.JSON.encode((request).toJson()); |
4854 } | 4823 } |
4855 if (userKey == null) { | 4824 if (userKey == null) { |
4856 throw new core.ArgumentError("Parameter userKey is required."); | 4825 throw new core.ArgumentError("Parameter userKey is required."); |
4857 } | 4826 } |
4858 | 4827 |
4859 _url = 'users/' + commons.Escaper.ecapeVariable('$userKey') + '/photos/thumb
nail'; | 4828 _url = 'users/' + |
| 4829 commons.Escaper.ecapeVariable('$userKey') + |
| 4830 '/photos/thumbnail'; |
4860 | 4831 |
4861 var _response = _requester.request(_url, | 4832 var _response = _requester.request(_url, "PATCH", |
4862 "PATCH", | 4833 body: _body, |
4863 body: _body, | 4834 queryParams: _queryParams, |
4864 queryParams: _queryParams, | 4835 uploadOptions: _uploadOptions, |
4865 uploadOptions: _uploadOptions, | 4836 uploadMedia: _uploadMedia, |
4866 uploadMedia: _uploadMedia, | 4837 downloadOptions: _downloadOptions); |
4867 downloadOptions: _downloadOptions); | |
4868 return _response.then((data) => new UserPhoto.fromJson(data)); | 4838 return _response.then((data) => new UserPhoto.fromJson(data)); |
4869 } | 4839 } |
4870 | 4840 |
4871 /** | 4841 /// Add a photo for the user |
4872 * Add a photo for the user | 4842 /// |
4873 * | 4843 /// [request] - The metadata request object. |
4874 * [request] - The metadata request object. | 4844 /// |
4875 * | 4845 /// Request parameters: |
4876 * Request parameters: | 4846 /// |
4877 * | 4847 /// [userKey] - Email or immutable Id of the user |
4878 * [userKey] - Email or immutable Id of the user | 4848 /// |
4879 * | 4849 /// Completes with a [UserPhoto]. |
4880 * Completes with a [UserPhoto]. | 4850 /// |
4881 * | 4851 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
4882 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 4852 /// an error. |
4883 * error. | 4853 /// |
4884 * | 4854 /// If the used [http.Client] completes with an error when making a REST |
4885 * If the used [http.Client] completes with an error when making a REST call, | 4855 /// call, this method will complete with the same error. |
4886 * this method will complete with the same error. | |
4887 */ | |
4888 async.Future<UserPhoto> update(UserPhoto request, core.String userKey) { | 4856 async.Future<UserPhoto> update(UserPhoto request, core.String userKey) { |
4889 var _url = null; | 4857 var _url = null; |
4890 var _queryParams = new core.Map(); | 4858 var _queryParams = new core.Map(); |
4891 var _uploadMedia = null; | 4859 var _uploadMedia = null; |
4892 var _uploadOptions = null; | 4860 var _uploadOptions = null; |
4893 var _downloadOptions = commons.DownloadOptions.Metadata; | 4861 var _downloadOptions = commons.DownloadOptions.Metadata; |
4894 var _body = null; | 4862 var _body = null; |
4895 | 4863 |
4896 if (request != null) { | 4864 if (request != null) { |
4897 _body = convert.JSON.encode((request).toJson()); | 4865 _body = convert.JSON.encode((request).toJson()); |
4898 } | 4866 } |
4899 if (userKey == null) { | 4867 if (userKey == null) { |
4900 throw new core.ArgumentError("Parameter userKey is required."); | 4868 throw new core.ArgumentError("Parameter userKey is required."); |
4901 } | 4869 } |
4902 | 4870 |
4903 _url = 'users/' + commons.Escaper.ecapeVariable('$userKey') + '/photos/thumb
nail'; | 4871 _url = 'users/' + |
| 4872 commons.Escaper.ecapeVariable('$userKey') + |
| 4873 '/photos/thumbnail'; |
4904 | 4874 |
4905 var _response = _requester.request(_url, | 4875 var _response = _requester.request(_url, "PUT", |
4906 "PUT", | 4876 body: _body, |
4907 body: _body, | 4877 queryParams: _queryParams, |
4908 queryParams: _queryParams, | 4878 uploadOptions: _uploadOptions, |
4909 uploadOptions: _uploadOptions, | 4879 uploadMedia: _uploadMedia, |
4910 uploadMedia: _uploadMedia, | 4880 downloadOptions: _downloadOptions); |
4911 downloadOptions: _downloadOptions); | |
4912 return _response.then((data) => new UserPhoto.fromJson(data)); | 4881 return _response.then((data) => new UserPhoto.fromJson(data)); |
4913 } | 4882 } |
4914 | |
4915 } | 4883 } |
4916 | 4884 |
4917 | |
4918 class VerificationCodesResourceApi { | 4885 class VerificationCodesResourceApi { |
4919 final commons.ApiRequester _requester; | 4886 final commons.ApiRequester _requester; |
4920 | 4887 |
4921 VerificationCodesResourceApi(commons.ApiRequester client) : | 4888 VerificationCodesResourceApi(commons.ApiRequester client) |
4922 _requester = client; | 4889 : _requester = client; |
4923 | 4890 |
4924 /** | 4891 /// Generate new backup verification codes for the user. |
4925 * Generate new backup verification codes for the user. | 4892 /// |
4926 * | 4893 /// Request parameters: |
4927 * Request parameters: | 4894 /// |
4928 * | 4895 /// [userKey] - Email or immutable Id of the user |
4929 * [userKey] - Email or immutable Id of the user | 4896 /// |
4930 * | 4897 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
4931 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 4898 /// an error. |
4932 * error. | 4899 /// |
4933 * | 4900 /// If the used [http.Client] completes with an error when making a REST |
4934 * If the used [http.Client] completes with an error when making a REST call, | 4901 /// call, this method will complete with the same error. |
4935 * this method will complete with the same error. | |
4936 */ | |
4937 async.Future generate(core.String userKey) { | 4902 async.Future generate(core.String userKey) { |
4938 var _url = null; | 4903 var _url = null; |
4939 var _queryParams = new core.Map(); | 4904 var _queryParams = new core.Map(); |
4940 var _uploadMedia = null; | 4905 var _uploadMedia = null; |
4941 var _uploadOptions = null; | 4906 var _uploadOptions = null; |
4942 var _downloadOptions = commons.DownloadOptions.Metadata; | 4907 var _downloadOptions = commons.DownloadOptions.Metadata; |
4943 var _body = null; | 4908 var _body = null; |
4944 | 4909 |
4945 if (userKey == null) { | 4910 if (userKey == null) { |
4946 throw new core.ArgumentError("Parameter userKey is required."); | 4911 throw new core.ArgumentError("Parameter userKey is required."); |
4947 } | 4912 } |
4948 | 4913 |
4949 _downloadOptions = null; | 4914 _downloadOptions = null; |
4950 | 4915 |
4951 _url = 'users/' + commons.Escaper.ecapeVariable('$userKey') + '/verification
Codes/generate'; | 4916 _url = 'users/' + |
| 4917 commons.Escaper.ecapeVariable('$userKey') + |
| 4918 '/verificationCodes/generate'; |
4952 | 4919 |
4953 var _response = _requester.request(_url, | 4920 var _response = _requester.request(_url, "POST", |
4954 "POST", | 4921 body: _body, |
4955 body: _body, | 4922 queryParams: _queryParams, |
4956 queryParams: _queryParams, | 4923 uploadOptions: _uploadOptions, |
4957 uploadOptions: _uploadOptions, | 4924 uploadMedia: _uploadMedia, |
4958 uploadMedia: _uploadMedia, | 4925 downloadOptions: _downloadOptions); |
4959 downloadOptions: _downloadOptions); | |
4960 return _response.then((data) => null); | 4926 return _response.then((data) => null); |
4961 } | 4927 } |
4962 | 4928 |
4963 /** | 4929 /// Invalidate the current backup verification codes for the user. |
4964 * Invalidate the current backup verification codes for the user. | 4930 /// |
4965 * | 4931 /// Request parameters: |
4966 * Request parameters: | 4932 /// |
4967 * | 4933 /// [userKey] - Email or immutable Id of the user |
4968 * [userKey] - Email or immutable Id of the user | 4934 /// |
4969 * | 4935 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
4970 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 4936 /// an error. |
4971 * error. | 4937 /// |
4972 * | 4938 /// If the used [http.Client] completes with an error when making a REST |
4973 * If the used [http.Client] completes with an error when making a REST call, | 4939 /// call, this method will complete with the same error. |
4974 * this method will complete with the same error. | |
4975 */ | |
4976 async.Future invalidate(core.String userKey) { | 4940 async.Future invalidate(core.String userKey) { |
4977 var _url = null; | 4941 var _url = null; |
4978 var _queryParams = new core.Map(); | 4942 var _queryParams = new core.Map(); |
4979 var _uploadMedia = null; | 4943 var _uploadMedia = null; |
4980 var _uploadOptions = null; | 4944 var _uploadOptions = null; |
4981 var _downloadOptions = commons.DownloadOptions.Metadata; | 4945 var _downloadOptions = commons.DownloadOptions.Metadata; |
4982 var _body = null; | 4946 var _body = null; |
4983 | 4947 |
4984 if (userKey == null) { | 4948 if (userKey == null) { |
4985 throw new core.ArgumentError("Parameter userKey is required."); | 4949 throw new core.ArgumentError("Parameter userKey is required."); |
4986 } | 4950 } |
4987 | 4951 |
4988 _downloadOptions = null; | 4952 _downloadOptions = null; |
4989 | 4953 |
4990 _url = 'users/' + commons.Escaper.ecapeVariable('$userKey') + '/verification
Codes/invalidate'; | 4954 _url = 'users/' + |
| 4955 commons.Escaper.ecapeVariable('$userKey') + |
| 4956 '/verificationCodes/invalidate'; |
4991 | 4957 |
4992 var _response = _requester.request(_url, | 4958 var _response = _requester.request(_url, "POST", |
4993 "POST", | 4959 body: _body, |
4994 body: _body, | 4960 queryParams: _queryParams, |
4995 queryParams: _queryParams, | 4961 uploadOptions: _uploadOptions, |
4996 uploadOptions: _uploadOptions, | 4962 uploadMedia: _uploadMedia, |
4997 uploadMedia: _uploadMedia, | 4963 downloadOptions: _downloadOptions); |
4998 downloadOptions: _downloadOptions); | |
4999 return _response.then((data) => null); | 4964 return _response.then((data) => null); |
5000 } | 4965 } |
5001 | 4966 |
5002 /** | 4967 /// Returns the current set of valid backup verification codes for the |
5003 * Returns the current set of valid backup verification codes for the | 4968 /// specified user. |
5004 * specified user. | 4969 /// |
5005 * | 4970 /// Request parameters: |
5006 * Request parameters: | 4971 /// |
5007 * | 4972 /// [userKey] - Identifies the user in the API request. The value can be the |
5008 * [userKey] - Identifies the user in the API request. The value can be the | 4973 /// user's primary email address, alias email address, or unique user ID. |
5009 * user's primary email address, alias email address, or unique user ID. | 4974 /// |
5010 * | 4975 /// Completes with a [VerificationCodes]. |
5011 * Completes with a [VerificationCodes]. | 4976 /// |
5012 * | 4977 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
5013 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 4978 /// an error. |
5014 * error. | 4979 /// |
5015 * | 4980 /// If the used [http.Client] completes with an error when making a REST |
5016 * If the used [http.Client] completes with an error when making a REST call, | 4981 /// call, this method will complete with the same error. |
5017 * this method will complete with the same error. | |
5018 */ | |
5019 async.Future<VerificationCodes> list(core.String userKey) { | 4982 async.Future<VerificationCodes> list(core.String userKey) { |
5020 var _url = null; | 4983 var _url = null; |
5021 var _queryParams = new core.Map(); | 4984 var _queryParams = new core.Map(); |
5022 var _uploadMedia = null; | 4985 var _uploadMedia = null; |
5023 var _uploadOptions = null; | 4986 var _uploadOptions = null; |
5024 var _downloadOptions = commons.DownloadOptions.Metadata; | 4987 var _downloadOptions = commons.DownloadOptions.Metadata; |
5025 var _body = null; | 4988 var _body = null; |
5026 | 4989 |
5027 if (userKey == null) { | 4990 if (userKey == null) { |
5028 throw new core.ArgumentError("Parameter userKey is required."); | 4991 throw new core.ArgumentError("Parameter userKey is required."); |
5029 } | 4992 } |
5030 | 4993 |
5031 _url = 'users/' + commons.Escaper.ecapeVariable('$userKey') + '/verification
Codes'; | 4994 _url = 'users/' + |
| 4995 commons.Escaper.ecapeVariable('$userKey') + |
| 4996 '/verificationCodes'; |
5032 | 4997 |
5033 var _response = _requester.request(_url, | 4998 var _response = _requester.request(_url, "GET", |
5034 "GET", | 4999 body: _body, |
5035 body: _body, | 5000 queryParams: _queryParams, |
5036 queryParams: _queryParams, | 5001 uploadOptions: _uploadOptions, |
5037 uploadOptions: _uploadOptions, | 5002 uploadMedia: _uploadMedia, |
5038 uploadMedia: _uploadMedia, | 5003 downloadOptions: _downloadOptions); |
5039 downloadOptions: _downloadOptions); | |
5040 return _response.then((data) => new VerificationCodes.fromJson(data)); | 5004 return _response.then((data) => new VerificationCodes.fromJson(data)); |
5041 } | 5005 } |
5042 | |
5043 } | 5006 } |
5044 | 5007 |
| 5008 /// JSON template for Alias object in Directory API. |
| 5009 class Alias { |
| 5010 /// A alias email |
| 5011 core.String alias; |
5045 | 5012 |
| 5013 /// ETag of the resource. |
| 5014 core.String etag; |
5046 | 5015 |
5047 /** JSON template for Alias object in Directory API. */ | 5016 /// Unique id of the group (Read-only) Unique id of the user (Read-only) |
5048 class Alias { | |
5049 /** A alias email */ | |
5050 core.String alias; | |
5051 /** ETag of the resource. */ | |
5052 core.String etag; | |
5053 /** Unique id of the group (Read-only) Unique id of the user (Read-only) */ | |
5054 core.String id; | 5017 core.String id; |
5055 /** Kind of resource this is. */ | 5018 |
| 5019 /// Kind of resource this is. |
5056 core.String kind; | 5020 core.String kind; |
5057 /** Group's primary email (Read-only) User's primary email (Read-only) */ | 5021 |
| 5022 /// Group's primary email (Read-only) User's primary email (Read-only) |
5058 core.String primaryEmail; | 5023 core.String primaryEmail; |
5059 | 5024 |
5060 Alias(); | 5025 Alias(); |
5061 | 5026 |
5062 Alias.fromJson(core.Map _json) { | 5027 Alias.fromJson(core.Map _json) { |
5063 if (_json.containsKey("alias")) { | 5028 if (_json.containsKey("alias")) { |
5064 alias = _json["alias"]; | 5029 alias = _json["alias"]; |
5065 } | 5030 } |
5066 if (_json.containsKey("etag")) { | 5031 if (_json.containsKey("etag")) { |
5067 etag = _json["etag"]; | 5032 etag = _json["etag"]; |
5068 } | 5033 } |
5069 if (_json.containsKey("id")) { | 5034 if (_json.containsKey("id")) { |
5070 id = _json["id"]; | 5035 id = _json["id"]; |
5071 } | 5036 } |
5072 if (_json.containsKey("kind")) { | 5037 if (_json.containsKey("kind")) { |
5073 kind = _json["kind"]; | 5038 kind = _json["kind"]; |
5074 } | 5039 } |
5075 if (_json.containsKey("primaryEmail")) { | 5040 if (_json.containsKey("primaryEmail")) { |
5076 primaryEmail = _json["primaryEmail"]; | 5041 primaryEmail = _json["primaryEmail"]; |
5077 } | 5042 } |
5078 } | 5043 } |
5079 | 5044 |
5080 core.Map<core.String, core.Object> toJson() { | 5045 core.Map<core.String, core.Object> toJson() { |
5081 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 5046 final core.Map<core.String, core.Object> _json = |
| 5047 new core.Map<core.String, core.Object>(); |
5082 if (alias != null) { | 5048 if (alias != null) { |
5083 _json["alias"] = alias; | 5049 _json["alias"] = alias; |
5084 } | 5050 } |
5085 if (etag != null) { | 5051 if (etag != null) { |
5086 _json["etag"] = etag; | 5052 _json["etag"] = etag; |
5087 } | 5053 } |
5088 if (id != null) { | 5054 if (id != null) { |
5089 _json["id"] = id; | 5055 _json["id"] = id; |
5090 } | 5056 } |
5091 if (kind != null) { | 5057 if (kind != null) { |
5092 _json["kind"] = kind; | 5058 _json["kind"] = kind; |
5093 } | 5059 } |
5094 if (primaryEmail != null) { | 5060 if (primaryEmail != null) { |
5095 _json["primaryEmail"] = primaryEmail; | 5061 _json["primaryEmail"] = primaryEmail; |
5096 } | 5062 } |
5097 return _json; | 5063 return _json; |
5098 } | 5064 } |
5099 } | 5065 } |
5100 | 5066 |
5101 /** JSON response template to list aliases in Directory API. */ | 5067 /// JSON response template to list aliases in Directory API. |
5102 class Aliases { | 5068 class Aliases { |
5103 /** | 5069 /// List of alias objects. |
5104 * List of alias objects. | 5070 /// |
5105 * | 5071 /// The values for Object must be JSON objects. It can consist of `num`, |
5106 * The values for Object must be JSON objects. It can consist of `num`, | 5072 /// `String`, `bool` and `null` as well as `Map` and `List` values. |
5107 * `String`, `bool` and `null` as well as `Map` and `List` values. | |
5108 */ | |
5109 core.List<core.Object> aliases; | 5073 core.List<core.Object> aliases; |
5110 /** ETag of the resource. */ | 5074 |
| 5075 /// ETag of the resource. |
5111 core.String etag; | 5076 core.String etag; |
5112 /** Kind of resource this is. */ | 5077 |
| 5078 /// Kind of resource this is. |
5113 core.String kind; | 5079 core.String kind; |
5114 | 5080 |
5115 Aliases(); | 5081 Aliases(); |
5116 | 5082 |
5117 Aliases.fromJson(core.Map _json) { | 5083 Aliases.fromJson(core.Map _json) { |
5118 if (_json.containsKey("aliases")) { | 5084 if (_json.containsKey("aliases")) { |
5119 aliases = _json["aliases"]; | 5085 aliases = _json["aliases"]; |
5120 } | 5086 } |
5121 if (_json.containsKey("etag")) { | 5087 if (_json.containsKey("etag")) { |
5122 etag = _json["etag"]; | 5088 etag = _json["etag"]; |
5123 } | 5089 } |
5124 if (_json.containsKey("kind")) { | 5090 if (_json.containsKey("kind")) { |
5125 kind = _json["kind"]; | 5091 kind = _json["kind"]; |
5126 } | 5092 } |
5127 } | 5093 } |
5128 | 5094 |
5129 core.Map<core.String, core.Object> toJson() { | 5095 core.Map<core.String, core.Object> toJson() { |
5130 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 5096 final core.Map<core.String, core.Object> _json = |
| 5097 new core.Map<core.String, core.Object>(); |
5131 if (aliases != null) { | 5098 if (aliases != null) { |
5132 _json["aliases"] = aliases; | 5099 _json["aliases"] = aliases; |
5133 } | 5100 } |
5134 if (etag != null) { | 5101 if (etag != null) { |
5135 _json["etag"] = etag; | 5102 _json["etag"] = etag; |
5136 } | 5103 } |
5137 if (kind != null) { | 5104 if (kind != null) { |
5138 _json["kind"] = kind; | 5105 _json["kind"] = kind; |
5139 } | 5106 } |
5140 return _json; | 5107 return _json; |
5141 } | 5108 } |
5142 } | 5109 } |
5143 | 5110 |
5144 /** The template that returns individual ASP (Access Code) data. */ | 5111 /// The template that returns individual ASP (Access Code) data. |
5145 class Asp { | 5112 class Asp { |
5146 /** The unique ID of the ASP. */ | 5113 /// The unique ID of the ASP. |
5147 core.int codeId; | 5114 core.int codeId; |
5148 /** The time when the ASP was created. Expressed in Unix time format. */ | 5115 |
| 5116 /// The time when the ASP was created. Expressed in Unix time format. |
5149 core.String creationTime; | 5117 core.String creationTime; |
5150 /** ETag of the ASP. */ | 5118 |
| 5119 /// ETag of the ASP. |
5151 core.String etag; | 5120 core.String etag; |
5152 /** The type of the API resource. This is always admin#directory#asp. */ | 5121 |
| 5122 /// The type of the API resource. This is always admin#directory#asp. |
5153 core.String kind; | 5123 core.String kind; |
5154 /** The time when the ASP was last used. Expressed in Unix time format. */ | 5124 |
| 5125 /// The time when the ASP was last used. Expressed in Unix time format. |
5155 core.String lastTimeUsed; | 5126 core.String lastTimeUsed; |
5156 /** | 5127 |
5157 * The name of the application that the user, represented by their userId, | 5128 /// The name of the application that the user, represented by their userId, |
5158 * entered when the ASP was created. | 5129 /// entered when the ASP was created. |
5159 */ | |
5160 core.String name; | 5130 core.String name; |
5161 /** The unique ID of the user who issued the ASP. */ | 5131 |
| 5132 /// The unique ID of the user who issued the ASP. |
5162 core.String userKey; | 5133 core.String userKey; |
5163 | 5134 |
5164 Asp(); | 5135 Asp(); |
5165 | 5136 |
5166 Asp.fromJson(core.Map _json) { | 5137 Asp.fromJson(core.Map _json) { |
5167 if (_json.containsKey("codeId")) { | 5138 if (_json.containsKey("codeId")) { |
5168 codeId = _json["codeId"]; | 5139 codeId = _json["codeId"]; |
5169 } | 5140 } |
5170 if (_json.containsKey("creationTime")) { | 5141 if (_json.containsKey("creationTime")) { |
5171 creationTime = _json["creationTime"]; | 5142 creationTime = _json["creationTime"]; |
5172 } | 5143 } |
5173 if (_json.containsKey("etag")) { | 5144 if (_json.containsKey("etag")) { |
5174 etag = _json["etag"]; | 5145 etag = _json["etag"]; |
5175 } | 5146 } |
5176 if (_json.containsKey("kind")) { | 5147 if (_json.containsKey("kind")) { |
5177 kind = _json["kind"]; | 5148 kind = _json["kind"]; |
5178 } | 5149 } |
5179 if (_json.containsKey("lastTimeUsed")) { | 5150 if (_json.containsKey("lastTimeUsed")) { |
5180 lastTimeUsed = _json["lastTimeUsed"]; | 5151 lastTimeUsed = _json["lastTimeUsed"]; |
5181 } | 5152 } |
5182 if (_json.containsKey("name")) { | 5153 if (_json.containsKey("name")) { |
5183 name = _json["name"]; | 5154 name = _json["name"]; |
5184 } | 5155 } |
5185 if (_json.containsKey("userKey")) { | 5156 if (_json.containsKey("userKey")) { |
5186 userKey = _json["userKey"]; | 5157 userKey = _json["userKey"]; |
5187 } | 5158 } |
5188 } | 5159 } |
5189 | 5160 |
5190 core.Map<core.String, core.Object> toJson() { | 5161 core.Map<core.String, core.Object> toJson() { |
5191 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 5162 final core.Map<core.String, core.Object> _json = |
| 5163 new core.Map<core.String, core.Object>(); |
5192 if (codeId != null) { | 5164 if (codeId != null) { |
5193 _json["codeId"] = codeId; | 5165 _json["codeId"] = codeId; |
5194 } | 5166 } |
5195 if (creationTime != null) { | 5167 if (creationTime != null) { |
5196 _json["creationTime"] = creationTime; | 5168 _json["creationTime"] = creationTime; |
5197 } | 5169 } |
5198 if (etag != null) { | 5170 if (etag != null) { |
5199 _json["etag"] = etag; | 5171 _json["etag"] = etag; |
5200 } | 5172 } |
5201 if (kind != null) { | 5173 if (kind != null) { |
5202 _json["kind"] = kind; | 5174 _json["kind"] = kind; |
5203 } | 5175 } |
5204 if (lastTimeUsed != null) { | 5176 if (lastTimeUsed != null) { |
5205 _json["lastTimeUsed"] = lastTimeUsed; | 5177 _json["lastTimeUsed"] = lastTimeUsed; |
5206 } | 5178 } |
5207 if (name != null) { | 5179 if (name != null) { |
5208 _json["name"] = name; | 5180 _json["name"] = name; |
5209 } | 5181 } |
5210 if (userKey != null) { | 5182 if (userKey != null) { |
5211 _json["userKey"] = userKey; | 5183 _json["userKey"] = userKey; |
5212 } | 5184 } |
5213 return _json; | 5185 return _json; |
5214 } | 5186 } |
5215 } | 5187 } |
5216 | 5188 |
5217 class Asps { | 5189 class Asps { |
5218 /** ETag of the resource. */ | 5190 /// ETag of the resource. |
5219 core.String etag; | 5191 core.String etag; |
5220 /** A list of ASP resources. */ | 5192 |
| 5193 /// A list of ASP resources. |
5221 core.List<Asp> items; | 5194 core.List<Asp> items; |
5222 /** The type of the API resource. This is always admin#directory#aspList. */ | 5195 |
| 5196 /// The type of the API resource. This is always admin#directory#aspList. |
5223 core.String kind; | 5197 core.String kind; |
5224 | 5198 |
5225 Asps(); | 5199 Asps(); |
5226 | 5200 |
5227 Asps.fromJson(core.Map _json) { | 5201 Asps.fromJson(core.Map _json) { |
5228 if (_json.containsKey("etag")) { | 5202 if (_json.containsKey("etag")) { |
5229 etag = _json["etag"]; | 5203 etag = _json["etag"]; |
5230 } | 5204 } |
5231 if (_json.containsKey("items")) { | 5205 if (_json.containsKey("items")) { |
5232 items = _json["items"].map((value) => new Asp.fromJson(value)).toList(); | 5206 items = _json["items"].map((value) => new Asp.fromJson(value)).toList(); |
5233 } | 5207 } |
5234 if (_json.containsKey("kind")) { | 5208 if (_json.containsKey("kind")) { |
5235 kind = _json["kind"]; | 5209 kind = _json["kind"]; |
5236 } | 5210 } |
5237 } | 5211 } |
5238 | 5212 |
5239 core.Map<core.String, core.Object> toJson() { | 5213 core.Map<core.String, core.Object> toJson() { |
5240 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 5214 final core.Map<core.String, core.Object> _json = |
| 5215 new core.Map<core.String, core.Object>(); |
5241 if (etag != null) { | 5216 if (etag != null) { |
5242 _json["etag"] = etag; | 5217 _json["etag"] = etag; |
5243 } | 5218 } |
5244 if (items != null) { | 5219 if (items != null) { |
5245 _json["items"] = items.map((value) => (value).toJson()).toList(); | 5220 _json["items"] = items.map((value) => (value).toJson()).toList(); |
5246 } | 5221 } |
5247 if (kind != null) { | 5222 if (kind != null) { |
5248 _json["kind"] = kind; | 5223 _json["kind"] = kind; |
5249 } | 5224 } |
5250 return _json; | 5225 return _json; |
5251 } | 5226 } |
5252 } | 5227 } |
5253 | 5228 |
5254 /** JSON template for Calendar Resource object in Directory API. */ | 5229 /// JSON template for Calendar Resource object in Directory API. |
5255 class CalendarResource { | 5230 class CalendarResource { |
5256 /** ETag of the resource. */ | 5231 /// ETag of the resource. |
5257 core.String etags; | 5232 core.String etags; |
5258 /** | 5233 |
5259 * The type of the resource. For calendar resources, the value is | 5234 /// The type of the resource. For calendar resources, the value is |
5260 * admin#directory#resources#calendars#CalendarResource. | 5235 /// admin#directory#resources#calendars#CalendarResource. |
5261 */ | |
5262 core.String kind; | 5236 core.String kind; |
5263 /** The brief description of the calendar resource. */ | 5237 |
| 5238 /// The brief description of the calendar resource. |
5264 core.String resourceDescription; | 5239 core.String resourceDescription; |
5265 /** | 5240 |
5266 * The read-only email ID for the calendar resource. Generated as part of | 5241 /// The read-only email ID for the calendar resource. Generated as part of |
5267 * creating a new calendar resource. | 5242 /// creating a new calendar resource. |
5268 */ | |
5269 core.String resourceEmail; | 5243 core.String resourceEmail; |
5270 /** The unique ID for the calendar resource. */ | 5244 |
| 5245 /// The unique ID for the calendar resource. |
5271 core.String resourceId; | 5246 core.String resourceId; |
5272 /** The name of the calendar resource. For example, Training Room 1A */ | 5247 |
| 5248 /// The name of the calendar resource. For example, Training Room 1A |
5273 core.String resourceName; | 5249 core.String resourceName; |
5274 /** | 5250 |
5275 * The type of the calendar resource. Used for grouping resources in the | 5251 /// The type of the calendar resource. Used for grouping resources in the |
5276 * calendar user interface. | 5252 /// calendar user interface. |
5277 */ | |
5278 core.String resourceType; | 5253 core.String resourceType; |
5279 | 5254 |
5280 CalendarResource(); | 5255 CalendarResource(); |
5281 | 5256 |
5282 CalendarResource.fromJson(core.Map _json) { | 5257 CalendarResource.fromJson(core.Map _json) { |
5283 if (_json.containsKey("etags")) { | 5258 if (_json.containsKey("etags")) { |
5284 etags = _json["etags"]; | 5259 etags = _json["etags"]; |
5285 } | 5260 } |
5286 if (_json.containsKey("kind")) { | 5261 if (_json.containsKey("kind")) { |
5287 kind = _json["kind"]; | 5262 kind = _json["kind"]; |
5288 } | 5263 } |
5289 if (_json.containsKey("resourceDescription")) { | 5264 if (_json.containsKey("resourceDescription")) { |
5290 resourceDescription = _json["resourceDescription"]; | 5265 resourceDescription = _json["resourceDescription"]; |
5291 } | 5266 } |
5292 if (_json.containsKey("resourceEmail")) { | 5267 if (_json.containsKey("resourceEmail")) { |
5293 resourceEmail = _json["resourceEmail"]; | 5268 resourceEmail = _json["resourceEmail"]; |
5294 } | 5269 } |
5295 if (_json.containsKey("resourceId")) { | 5270 if (_json.containsKey("resourceId")) { |
5296 resourceId = _json["resourceId"]; | 5271 resourceId = _json["resourceId"]; |
5297 } | 5272 } |
5298 if (_json.containsKey("resourceName")) { | 5273 if (_json.containsKey("resourceName")) { |
5299 resourceName = _json["resourceName"]; | 5274 resourceName = _json["resourceName"]; |
5300 } | 5275 } |
5301 if (_json.containsKey("resourceType")) { | 5276 if (_json.containsKey("resourceType")) { |
5302 resourceType = _json["resourceType"]; | 5277 resourceType = _json["resourceType"]; |
5303 } | 5278 } |
5304 } | 5279 } |
5305 | 5280 |
5306 core.Map<core.String, core.Object> toJson() { | 5281 core.Map<core.String, core.Object> toJson() { |
5307 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 5282 final core.Map<core.String, core.Object> _json = |
| 5283 new core.Map<core.String, core.Object>(); |
5308 if (etags != null) { | 5284 if (etags != null) { |
5309 _json["etags"] = etags; | 5285 _json["etags"] = etags; |
5310 } | 5286 } |
5311 if (kind != null) { | 5287 if (kind != null) { |
5312 _json["kind"] = kind; | 5288 _json["kind"] = kind; |
5313 } | 5289 } |
5314 if (resourceDescription != null) { | 5290 if (resourceDescription != null) { |
5315 _json["resourceDescription"] = resourceDescription; | 5291 _json["resourceDescription"] = resourceDescription; |
5316 } | 5292 } |
5317 if (resourceEmail != null) { | 5293 if (resourceEmail != null) { |
5318 _json["resourceEmail"] = resourceEmail; | 5294 _json["resourceEmail"] = resourceEmail; |
5319 } | 5295 } |
5320 if (resourceId != null) { | 5296 if (resourceId != null) { |
5321 _json["resourceId"] = resourceId; | 5297 _json["resourceId"] = resourceId; |
5322 } | 5298 } |
5323 if (resourceName != null) { | 5299 if (resourceName != null) { |
5324 _json["resourceName"] = resourceName; | 5300 _json["resourceName"] = resourceName; |
5325 } | 5301 } |
5326 if (resourceType != null) { | 5302 if (resourceType != null) { |
5327 _json["resourceType"] = resourceType; | 5303 _json["resourceType"] = resourceType; |
5328 } | 5304 } |
5329 return _json; | 5305 return _json; |
5330 } | 5306 } |
5331 } | 5307 } |
5332 | 5308 |
5333 /** | 5309 /// JSON template for Calendar Resource List Response object in Directory API. |
5334 * JSON template for Calendar Resource List Response object in Directory API. | |
5335 */ | |
5336 class CalendarResources { | 5310 class CalendarResources { |
5337 /** ETag of the resource. */ | 5311 /// ETag of the resource. |
5338 core.String etag; | 5312 core.String etag; |
5339 /** The CalendarResources in this page of results. */ | 5313 |
| 5314 /// The CalendarResources in this page of results. |
5340 core.List<CalendarResource> items; | 5315 core.List<CalendarResource> items; |
5341 /** | 5316 |
5342 * Identifies this as a collection of CalendarResources. This is always | 5317 /// Identifies this as a collection of CalendarResources. This is always |
5343 * admin#directory#resources#calendars#calendarResourcesList. | 5318 /// admin#directory#resources#calendars#calendarResourcesList. |
5344 */ | |
5345 core.String kind; | 5319 core.String kind; |
5346 /** | 5320 |
5347 * The continuation token, used to page through large result sets. Provide | 5321 /// The continuation token, used to page through large result sets. Provide |
5348 * this value in a subsequent request to return the next page of results. | 5322 /// this value in a subsequent request to return the next page of results. |
5349 */ | |
5350 core.String nextPageToken; | 5323 core.String nextPageToken; |
5351 | 5324 |
5352 CalendarResources(); | 5325 CalendarResources(); |
5353 | 5326 |
5354 CalendarResources.fromJson(core.Map _json) { | 5327 CalendarResources.fromJson(core.Map _json) { |
5355 if (_json.containsKey("etag")) { | 5328 if (_json.containsKey("etag")) { |
5356 etag = _json["etag"]; | 5329 etag = _json["etag"]; |
5357 } | 5330 } |
5358 if (_json.containsKey("items")) { | 5331 if (_json.containsKey("items")) { |
5359 items = _json["items"].map((value) => new CalendarResource.fromJson(value)
).toList(); | 5332 items = _json["items"] |
| 5333 .map((value) => new CalendarResource.fromJson(value)) |
| 5334 .toList(); |
5360 } | 5335 } |
5361 if (_json.containsKey("kind")) { | 5336 if (_json.containsKey("kind")) { |
5362 kind = _json["kind"]; | 5337 kind = _json["kind"]; |
5363 } | 5338 } |
5364 if (_json.containsKey("nextPageToken")) { | 5339 if (_json.containsKey("nextPageToken")) { |
5365 nextPageToken = _json["nextPageToken"]; | 5340 nextPageToken = _json["nextPageToken"]; |
5366 } | 5341 } |
5367 } | 5342 } |
5368 | 5343 |
5369 core.Map<core.String, core.Object> toJson() { | 5344 core.Map<core.String, core.Object> toJson() { |
5370 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 5345 final core.Map<core.String, core.Object> _json = |
| 5346 new core.Map<core.String, core.Object>(); |
5371 if (etag != null) { | 5347 if (etag != null) { |
5372 _json["etag"] = etag; | 5348 _json["etag"] = etag; |
5373 } | 5349 } |
5374 if (items != null) { | 5350 if (items != null) { |
5375 _json["items"] = items.map((value) => (value).toJson()).toList(); | 5351 _json["items"] = items.map((value) => (value).toJson()).toList(); |
5376 } | 5352 } |
5377 if (kind != null) { | 5353 if (kind != null) { |
5378 _json["kind"] = kind; | 5354 _json["kind"] = kind; |
5379 } | 5355 } |
5380 if (nextPageToken != null) { | 5356 if (nextPageToken != null) { |
5381 _json["nextPageToken"] = nextPageToken; | 5357 _json["nextPageToken"] = nextPageToken; |
5382 } | 5358 } |
5383 return _json; | 5359 return _json; |
5384 } | 5360 } |
5385 } | 5361 } |
5386 | 5362 |
5387 /** An notification channel used to watch for resource changes. */ | 5363 /// An notification channel used to watch for resource changes. |
5388 class Channel { | 5364 class Channel { |
5389 /** The address where notifications are delivered for this channel. */ | 5365 /// The address where notifications are delivered for this channel. |
5390 core.String address; | 5366 core.String address; |
5391 /** | 5367 |
5392 * Date and time of notification channel expiration, expressed as a Unix | 5368 /// Date and time of notification channel expiration, expressed as a Unix |
5393 * timestamp, in milliseconds. Optional. | 5369 /// timestamp, in milliseconds. Optional. |
5394 */ | |
5395 core.String expiration; | 5370 core.String expiration; |
5396 /** A UUID or similar unique string that identifies this channel. */ | 5371 |
| 5372 /// A UUID or similar unique string that identifies this channel. |
5397 core.String id; | 5373 core.String id; |
5398 /** | 5374 |
5399 * Identifies this as a notification channel used to watch for changes to a | 5375 /// Identifies this as a notification channel used to watch for changes to a |
5400 * resource. Value: the fixed string "api#channel". | 5376 /// resource. Value: the fixed string "api#channel". |
5401 */ | |
5402 core.String kind; | 5377 core.String kind; |
5403 /** Additional parameters controlling delivery channel behavior. Optional. */ | 5378 |
| 5379 /// Additional parameters controlling delivery channel behavior. Optional. |
5404 core.Map<core.String, core.String> params; | 5380 core.Map<core.String, core.String> params; |
5405 /** A Boolean value to indicate whether payload is wanted. Optional. */ | 5381 |
| 5382 /// A Boolean value to indicate whether payload is wanted. Optional. |
5406 core.bool payload; | 5383 core.bool payload; |
5407 /** | 5384 |
5408 * An opaque ID that identifies the resource being watched on this channel. | 5385 /// An opaque ID that identifies the resource being watched on this channel. |
5409 * Stable across different API versions. | 5386 /// Stable across different API versions. |
5410 */ | |
5411 core.String resourceId; | 5387 core.String resourceId; |
5412 /** A version-specific identifier for the watched resource. */ | 5388 |
| 5389 /// A version-specific identifier for the watched resource. |
5413 core.String resourceUri; | 5390 core.String resourceUri; |
5414 /** | 5391 |
5415 * An arbitrary string delivered to the target address with each notification | 5392 /// An arbitrary string delivered to the target address with each |
5416 * delivered over this channel. Optional. | 5393 /// notification delivered over this channel. Optional. |
5417 */ | |
5418 core.String token; | 5394 core.String token; |
5419 /** The type of delivery mechanism used for this channel. */ | 5395 |
| 5396 /// The type of delivery mechanism used for this channel. |
5420 core.String type; | 5397 core.String type; |
5421 | 5398 |
5422 Channel(); | 5399 Channel(); |
5423 | 5400 |
5424 Channel.fromJson(core.Map _json) { | 5401 Channel.fromJson(core.Map _json) { |
5425 if (_json.containsKey("address")) { | 5402 if (_json.containsKey("address")) { |
5426 address = _json["address"]; | 5403 address = _json["address"]; |
5427 } | 5404 } |
5428 if (_json.containsKey("expiration")) { | 5405 if (_json.containsKey("expiration")) { |
5429 expiration = _json["expiration"]; | 5406 expiration = _json["expiration"]; |
(...skipping 18 matching lines...) Expand all Loading... |
5448 } | 5425 } |
5449 if (_json.containsKey("token")) { | 5426 if (_json.containsKey("token")) { |
5450 token = _json["token"]; | 5427 token = _json["token"]; |
5451 } | 5428 } |
5452 if (_json.containsKey("type")) { | 5429 if (_json.containsKey("type")) { |
5453 type = _json["type"]; | 5430 type = _json["type"]; |
5454 } | 5431 } |
5455 } | 5432 } |
5456 | 5433 |
5457 core.Map<core.String, core.Object> toJson() { | 5434 core.Map<core.String, core.Object> toJson() { |
5458 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 5435 final core.Map<core.String, core.Object> _json = |
| 5436 new core.Map<core.String, core.Object>(); |
5459 if (address != null) { | 5437 if (address != null) { |
5460 _json["address"] = address; | 5438 _json["address"] = address; |
5461 } | 5439 } |
5462 if (expiration != null) { | 5440 if (expiration != null) { |
5463 _json["expiration"] = expiration; | 5441 _json["expiration"] = expiration; |
5464 } | 5442 } |
5465 if (id != null) { | 5443 if (id != null) { |
5466 _json["id"] = id; | 5444 _json["id"] = id; |
5467 } | 5445 } |
5468 if (kind != null) { | 5446 if (kind != null) { |
(...skipping 15 matching lines...) Expand all Loading... |
5484 _json["token"] = token; | 5462 _json["token"] = token; |
5485 } | 5463 } |
5486 if (type != null) { | 5464 if (type != null) { |
5487 _json["type"] = type; | 5465 _json["type"] = type; |
5488 } | 5466 } |
5489 return _json; | 5467 return _json; |
5490 } | 5468 } |
5491 } | 5469 } |
5492 | 5470 |
5493 class ChromeOsDeviceActiveTimeRanges { | 5471 class ChromeOsDeviceActiveTimeRanges { |
5494 /** Duration in milliseconds */ | 5472 /// Duration in milliseconds |
5495 core.int activeTime; | 5473 core.int activeTime; |
5496 /** Date of usage */ | 5474 |
| 5475 /// Date of usage |
5497 core.DateTime date; | 5476 core.DateTime date; |
5498 | 5477 |
5499 ChromeOsDeviceActiveTimeRanges(); | 5478 ChromeOsDeviceActiveTimeRanges(); |
5500 | 5479 |
5501 ChromeOsDeviceActiveTimeRanges.fromJson(core.Map _json) { | 5480 ChromeOsDeviceActiveTimeRanges.fromJson(core.Map _json) { |
5502 if (_json.containsKey("activeTime")) { | 5481 if (_json.containsKey("activeTime")) { |
5503 activeTime = _json["activeTime"]; | 5482 activeTime = _json["activeTime"]; |
5504 } | 5483 } |
5505 if (_json.containsKey("date")) { | 5484 if (_json.containsKey("date")) { |
5506 date = core.DateTime.parse(_json["date"]); | 5485 date = core.DateTime.parse(_json["date"]); |
5507 } | 5486 } |
5508 } | 5487 } |
5509 | 5488 |
5510 core.Map<core.String, core.Object> toJson() { | 5489 core.Map<core.String, core.Object> toJson() { |
5511 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 5490 final core.Map<core.String, core.Object> _json = |
| 5491 new core.Map<core.String, core.Object>(); |
5512 if (activeTime != null) { | 5492 if (activeTime != null) { |
5513 _json["activeTime"] = activeTime; | 5493 _json["activeTime"] = activeTime; |
5514 } | 5494 } |
5515 if (date != null) { | 5495 if (date != null) { |
5516 _json["date"] = "${(date).year.toString().padLeft(4, '0')}-${(date).month.
toString().padLeft(2, '0')}-${(date).day.toString().padLeft(2, '0')}"; | 5496 _json["date"] = |
| 5497 "${(date).year.toString().padLeft(4, '0')}-${(date).month.toString().p
adLeft(2, '0')}-${(date).day.toString().padLeft(2, '0')}"; |
5517 } | 5498 } |
5518 return _json; | 5499 return _json; |
5519 } | 5500 } |
5520 } | 5501 } |
5521 | 5502 |
5522 class ChromeOsDeviceRecentUsers { | 5503 class ChromeOsDeviceRecentUsers { |
5523 /** Email address of the user. Present only if the user type is managed */ | 5504 /// Email address of the user. Present only if the user type is managed |
5524 core.String email; | 5505 core.String email; |
5525 /** The type of the user */ | 5506 |
| 5507 /// The type of the user |
5526 core.String type; | 5508 core.String type; |
5527 | 5509 |
5528 ChromeOsDeviceRecentUsers(); | 5510 ChromeOsDeviceRecentUsers(); |
5529 | 5511 |
5530 ChromeOsDeviceRecentUsers.fromJson(core.Map _json) { | 5512 ChromeOsDeviceRecentUsers.fromJson(core.Map _json) { |
5531 if (_json.containsKey("email")) { | 5513 if (_json.containsKey("email")) { |
5532 email = _json["email"]; | 5514 email = _json["email"]; |
5533 } | 5515 } |
5534 if (_json.containsKey("type")) { | 5516 if (_json.containsKey("type")) { |
5535 type = _json["type"]; | 5517 type = _json["type"]; |
5536 } | 5518 } |
5537 } | 5519 } |
5538 | 5520 |
5539 core.Map<core.String, core.Object> toJson() { | 5521 core.Map<core.String, core.Object> toJson() { |
5540 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 5522 final core.Map<core.String, core.Object> _json = |
| 5523 new core.Map<core.String, core.Object>(); |
5541 if (email != null) { | 5524 if (email != null) { |
5542 _json["email"] = email; | 5525 _json["email"] = email; |
5543 } | 5526 } |
5544 if (type != null) { | 5527 if (type != null) { |
5545 _json["type"] = type; | 5528 _json["type"] = type; |
5546 } | 5529 } |
5547 return _json; | 5530 return _json; |
5548 } | 5531 } |
5549 } | 5532 } |
5550 | 5533 |
5551 /** JSON template for Chrome Os Device resource in Directory API. */ | 5534 /// JSON template for Chrome Os Device resource in Directory API. |
5552 class ChromeOsDevice { | 5535 class ChromeOsDevice { |
5553 /** List of active time ranges (Read-only) */ | 5536 /// List of active time ranges (Read-only) |
5554 core.List<ChromeOsDeviceActiveTimeRanges> activeTimeRanges; | 5537 core.List<ChromeOsDeviceActiveTimeRanges> activeTimeRanges; |
5555 /** AssetId specified during enrollment or through later annotation */ | 5538 |
| 5539 /// AssetId specified during enrollment or through later annotation |
5556 core.String annotatedAssetId; | 5540 core.String annotatedAssetId; |
5557 /** Address or location of the device as noted by the administrator */ | 5541 |
| 5542 /// Address or location of the device as noted by the administrator |
5558 core.String annotatedLocation; | 5543 core.String annotatedLocation; |
5559 /** User of the device */ | 5544 |
| 5545 /// User of the device |
5560 core.String annotatedUser; | 5546 core.String annotatedUser; |
5561 /** Chromebook boot mode (Read-only) */ | 5547 |
| 5548 /// Chromebook boot mode (Read-only) |
5562 core.String bootMode; | 5549 core.String bootMode; |
5563 /** Unique identifier of Chrome OS Device (Read-only) */ | 5550 |
| 5551 /// Unique identifier of Chrome OS Device (Read-only) |
5564 core.String deviceId; | 5552 core.String deviceId; |
5565 /** ETag of the resource. */ | 5553 |
| 5554 /// ETag of the resource. |
5566 core.String etag; | 5555 core.String etag; |
5567 /** Chromebook Mac Address on ethernet network interface (Read-only) */ | 5556 |
| 5557 /// Chromebook Mac Address on ethernet network interface (Read-only) |
5568 core.String ethernetMacAddress; | 5558 core.String ethernetMacAddress; |
5569 /** Chromebook firmware version (Read-only) */ | 5559 |
| 5560 /// Chromebook firmware version (Read-only) |
5570 core.String firmwareVersion; | 5561 core.String firmwareVersion; |
5571 /** Kind of resource this is. */ | 5562 |
| 5563 /// Kind of resource this is. |
5572 core.String kind; | 5564 core.String kind; |
5573 /** Date and time the device was last enrolled (Read-only) */ | 5565 |
| 5566 /// Date and time the device was last enrolled (Read-only) |
5574 core.DateTime lastEnrollmentTime; | 5567 core.DateTime lastEnrollmentTime; |
5575 /** | 5568 |
5576 * Date and time the device was last synchronized with the policy settings in | 5569 /// Date and time the device was last synchronized with the policy settings |
5577 * the G Suite administrator control panel (Read-only) | 5570 /// in the G Suite administrator control panel (Read-only) |
5578 */ | |
5579 core.DateTime lastSync; | 5571 core.DateTime lastSync; |
5580 /** Chromebook Mac Address on wifi network interface (Read-only) */ | 5572 |
| 5573 /// Chromebook Mac Address on wifi network interface (Read-only) |
5581 core.String macAddress; | 5574 core.String macAddress; |
5582 /** | 5575 |
5583 * Mobile Equipment identifier for the 3G mobile card in the Chromebook | 5576 /// Mobile Equipment identifier for the 3G mobile card in the Chromebook |
5584 * (Read-only) | 5577 /// (Read-only) |
5585 */ | |
5586 core.String meid; | 5578 core.String meid; |
5587 /** Chromebook Model (Read-only) */ | 5579 |
| 5580 /// Chromebook Model (Read-only) |
5588 core.String model; | 5581 core.String model; |
5589 /** Notes added by the administrator */ | 5582 |
| 5583 /// Notes added by the administrator |
5590 core.String notes; | 5584 core.String notes; |
5591 /** Chromebook order number (Read-only) */ | 5585 |
| 5586 /// Chromebook order number (Read-only) |
5592 core.String orderNumber; | 5587 core.String orderNumber; |
5593 /** OrgUnit of the device */ | 5588 |
| 5589 /// OrgUnit of the device |
5594 core.String orgUnitPath; | 5590 core.String orgUnitPath; |
5595 /** Chromebook Os Version (Read-only) */ | 5591 |
| 5592 /// Chromebook Os Version (Read-only) |
5596 core.String osVersion; | 5593 core.String osVersion; |
5597 /** Chromebook platform version (Read-only) */ | 5594 |
| 5595 /// Chromebook platform version (Read-only) |
5598 core.String platformVersion; | 5596 core.String platformVersion; |
5599 /** | 5597 |
5600 * List of recent device users, in descending order by last login time | 5598 /// List of recent device users, in descending order by last login time |
5601 * (Read-only) | 5599 /// (Read-only) |
5602 */ | |
5603 core.List<ChromeOsDeviceRecentUsers> recentUsers; | 5600 core.List<ChromeOsDeviceRecentUsers> recentUsers; |
5604 /** Chromebook serial number (Read-only) */ | 5601 |
| 5602 /// Chromebook serial number (Read-only) |
5605 core.String serialNumber; | 5603 core.String serialNumber; |
5606 /** status of the device (Read-only) */ | 5604 |
| 5605 /// status of the device (Read-only) |
5607 core.String status; | 5606 core.String status; |
5608 /** Final date the device will be supported (Read-only) */ | 5607 |
| 5608 /// Final date the device will be supported (Read-only) |
5609 core.DateTime supportEndDate; | 5609 core.DateTime supportEndDate; |
5610 /** Will Chromebook auto renew after support end date (Read-only) */ | 5610 |
| 5611 /// Will Chromebook auto renew after support end date (Read-only) |
5611 core.bool willAutoRenew; | 5612 core.bool willAutoRenew; |
5612 | 5613 |
5613 ChromeOsDevice(); | 5614 ChromeOsDevice(); |
5614 | 5615 |
5615 ChromeOsDevice.fromJson(core.Map _json) { | 5616 ChromeOsDevice.fromJson(core.Map _json) { |
5616 if (_json.containsKey("activeTimeRanges")) { | 5617 if (_json.containsKey("activeTimeRanges")) { |
5617 activeTimeRanges = _json["activeTimeRanges"].map((value) => new ChromeOsDe
viceActiveTimeRanges.fromJson(value)).toList(); | 5618 activeTimeRanges = _json["activeTimeRanges"] |
| 5619 .map((value) => new ChromeOsDeviceActiveTimeRanges.fromJson(value)) |
| 5620 .toList(); |
5618 } | 5621 } |
5619 if (_json.containsKey("annotatedAssetId")) { | 5622 if (_json.containsKey("annotatedAssetId")) { |
5620 annotatedAssetId = _json["annotatedAssetId"]; | 5623 annotatedAssetId = _json["annotatedAssetId"]; |
5621 } | 5624 } |
5622 if (_json.containsKey("annotatedLocation")) { | 5625 if (_json.containsKey("annotatedLocation")) { |
5623 annotatedLocation = _json["annotatedLocation"]; | 5626 annotatedLocation = _json["annotatedLocation"]; |
5624 } | 5627 } |
5625 if (_json.containsKey("annotatedUser")) { | 5628 if (_json.containsKey("annotatedUser")) { |
5626 annotatedUser = _json["annotatedUser"]; | 5629 annotatedUser = _json["annotatedUser"]; |
5627 } | 5630 } |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5667 if (_json.containsKey("orgUnitPath")) { | 5670 if (_json.containsKey("orgUnitPath")) { |
5668 orgUnitPath = _json["orgUnitPath"]; | 5671 orgUnitPath = _json["orgUnitPath"]; |
5669 } | 5672 } |
5670 if (_json.containsKey("osVersion")) { | 5673 if (_json.containsKey("osVersion")) { |
5671 osVersion = _json["osVersion"]; | 5674 osVersion = _json["osVersion"]; |
5672 } | 5675 } |
5673 if (_json.containsKey("platformVersion")) { | 5676 if (_json.containsKey("platformVersion")) { |
5674 platformVersion = _json["platformVersion"]; | 5677 platformVersion = _json["platformVersion"]; |
5675 } | 5678 } |
5676 if (_json.containsKey("recentUsers")) { | 5679 if (_json.containsKey("recentUsers")) { |
5677 recentUsers = _json["recentUsers"].map((value) => new ChromeOsDeviceRecent
Users.fromJson(value)).toList(); | 5680 recentUsers = _json["recentUsers"] |
| 5681 .map((value) => new ChromeOsDeviceRecentUsers.fromJson(value)) |
| 5682 .toList(); |
5678 } | 5683 } |
5679 if (_json.containsKey("serialNumber")) { | 5684 if (_json.containsKey("serialNumber")) { |
5680 serialNumber = _json["serialNumber"]; | 5685 serialNumber = _json["serialNumber"]; |
5681 } | 5686 } |
5682 if (_json.containsKey("status")) { | 5687 if (_json.containsKey("status")) { |
5683 status = _json["status"]; | 5688 status = _json["status"]; |
5684 } | 5689 } |
5685 if (_json.containsKey("supportEndDate")) { | 5690 if (_json.containsKey("supportEndDate")) { |
5686 supportEndDate = core.DateTime.parse(_json["supportEndDate"]); | 5691 supportEndDate = core.DateTime.parse(_json["supportEndDate"]); |
5687 } | 5692 } |
5688 if (_json.containsKey("willAutoRenew")) { | 5693 if (_json.containsKey("willAutoRenew")) { |
5689 willAutoRenew = _json["willAutoRenew"]; | 5694 willAutoRenew = _json["willAutoRenew"]; |
5690 } | 5695 } |
5691 } | 5696 } |
5692 | 5697 |
5693 core.Map<core.String, core.Object> toJson() { | 5698 core.Map<core.String, core.Object> toJson() { |
5694 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 5699 final core.Map<core.String, core.Object> _json = |
| 5700 new core.Map<core.String, core.Object>(); |
5695 if (activeTimeRanges != null) { | 5701 if (activeTimeRanges != null) { |
5696 _json["activeTimeRanges"] = activeTimeRanges.map((value) => (value).toJson
()).toList(); | 5702 _json["activeTimeRanges"] = |
| 5703 activeTimeRanges.map((value) => (value).toJson()).toList(); |
5697 } | 5704 } |
5698 if (annotatedAssetId != null) { | 5705 if (annotatedAssetId != null) { |
5699 _json["annotatedAssetId"] = annotatedAssetId; | 5706 _json["annotatedAssetId"] = annotatedAssetId; |
5700 } | 5707 } |
5701 if (annotatedLocation != null) { | 5708 if (annotatedLocation != null) { |
5702 _json["annotatedLocation"] = annotatedLocation; | 5709 _json["annotatedLocation"] = annotatedLocation; |
5703 } | 5710 } |
5704 if (annotatedUser != null) { | 5711 if (annotatedUser != null) { |
5705 _json["annotatedUser"] = annotatedUser; | 5712 _json["annotatedUser"] = annotatedUser; |
5706 } | 5713 } |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5746 if (orgUnitPath != null) { | 5753 if (orgUnitPath != null) { |
5747 _json["orgUnitPath"] = orgUnitPath; | 5754 _json["orgUnitPath"] = orgUnitPath; |
5748 } | 5755 } |
5749 if (osVersion != null) { | 5756 if (osVersion != null) { |
5750 _json["osVersion"] = osVersion; | 5757 _json["osVersion"] = osVersion; |
5751 } | 5758 } |
5752 if (platformVersion != null) { | 5759 if (platformVersion != null) { |
5753 _json["platformVersion"] = platformVersion; | 5760 _json["platformVersion"] = platformVersion; |
5754 } | 5761 } |
5755 if (recentUsers != null) { | 5762 if (recentUsers != null) { |
5756 _json["recentUsers"] = recentUsers.map((value) => (value).toJson()).toList
(); | 5763 _json["recentUsers"] = |
| 5764 recentUsers.map((value) => (value).toJson()).toList(); |
5757 } | 5765 } |
5758 if (serialNumber != null) { | 5766 if (serialNumber != null) { |
5759 _json["serialNumber"] = serialNumber; | 5767 _json["serialNumber"] = serialNumber; |
5760 } | 5768 } |
5761 if (status != null) { | 5769 if (status != null) { |
5762 _json["status"] = status; | 5770 _json["status"] = status; |
5763 } | 5771 } |
5764 if (supportEndDate != null) { | 5772 if (supportEndDate != null) { |
5765 _json["supportEndDate"] = (supportEndDate).toIso8601String(); | 5773 _json["supportEndDate"] = (supportEndDate).toIso8601String(); |
5766 } | 5774 } |
5767 if (willAutoRenew != null) { | 5775 if (willAutoRenew != null) { |
5768 _json["willAutoRenew"] = willAutoRenew; | 5776 _json["willAutoRenew"] = willAutoRenew; |
5769 } | 5777 } |
5770 return _json; | 5778 return _json; |
5771 } | 5779 } |
5772 } | 5780 } |
5773 | 5781 |
5774 /** | 5782 /// JSON request template for firing actions on ChromeOs Device in Directory |
5775 * JSON request template for firing actions on ChromeOs Device in Directory | 5783 /// Devices API. |
5776 * Devices API. | |
5777 */ | |
5778 class ChromeOsDeviceAction { | 5784 class ChromeOsDeviceAction { |
5779 /** Action to be taken on the ChromeOs Device */ | 5785 /// Action to be taken on the ChromeOs Device |
5780 core.String action; | 5786 core.String action; |
5781 core.String deprovisionReason; | 5787 core.String deprovisionReason; |
5782 | 5788 |
5783 ChromeOsDeviceAction(); | 5789 ChromeOsDeviceAction(); |
5784 | 5790 |
5785 ChromeOsDeviceAction.fromJson(core.Map _json) { | 5791 ChromeOsDeviceAction.fromJson(core.Map _json) { |
5786 if (_json.containsKey("action")) { | 5792 if (_json.containsKey("action")) { |
5787 action = _json["action"]; | 5793 action = _json["action"]; |
5788 } | 5794 } |
5789 if (_json.containsKey("deprovisionReason")) { | 5795 if (_json.containsKey("deprovisionReason")) { |
5790 deprovisionReason = _json["deprovisionReason"]; | 5796 deprovisionReason = _json["deprovisionReason"]; |
5791 } | 5797 } |
5792 } | 5798 } |
5793 | 5799 |
5794 core.Map<core.String, core.Object> toJson() { | 5800 core.Map<core.String, core.Object> toJson() { |
5795 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 5801 final core.Map<core.String, core.Object> _json = |
| 5802 new core.Map<core.String, core.Object>(); |
5796 if (action != null) { | 5803 if (action != null) { |
5797 _json["action"] = action; | 5804 _json["action"] = action; |
5798 } | 5805 } |
5799 if (deprovisionReason != null) { | 5806 if (deprovisionReason != null) { |
5800 _json["deprovisionReason"] = deprovisionReason; | 5807 _json["deprovisionReason"] = deprovisionReason; |
5801 } | 5808 } |
5802 return _json; | 5809 return _json; |
5803 } | 5810 } |
5804 } | 5811 } |
5805 | 5812 |
5806 /** | 5813 /// JSON response template for List Chrome OS Devices operation in Directory |
5807 * JSON response template for List Chrome OS Devices operation in Directory API. | 5814 /// API. |
5808 */ | |
5809 class ChromeOsDevices { | 5815 class ChromeOsDevices { |
5810 /** List of Chrome OS Device objects. */ | 5816 /// List of Chrome OS Device objects. |
5811 core.List<ChromeOsDevice> chromeosdevices; | 5817 core.List<ChromeOsDevice> chromeosdevices; |
5812 /** ETag of the resource. */ | 5818 |
| 5819 /// ETag of the resource. |
5813 core.String etag; | 5820 core.String etag; |
5814 /** Kind of resource this is. */ | 5821 |
| 5822 /// Kind of resource this is. |
5815 core.String kind; | 5823 core.String kind; |
5816 /** Token used to access next page of this result. */ | 5824 |
| 5825 /// Token used to access next page of this result. |
5817 core.String nextPageToken; | 5826 core.String nextPageToken; |
5818 | 5827 |
5819 ChromeOsDevices(); | 5828 ChromeOsDevices(); |
5820 | 5829 |
5821 ChromeOsDevices.fromJson(core.Map _json) { | 5830 ChromeOsDevices.fromJson(core.Map _json) { |
5822 if (_json.containsKey("chromeosdevices")) { | 5831 if (_json.containsKey("chromeosdevices")) { |
5823 chromeosdevices = _json["chromeosdevices"].map((value) => new ChromeOsDevi
ce.fromJson(value)).toList(); | 5832 chromeosdevices = _json["chromeosdevices"] |
| 5833 .map((value) => new ChromeOsDevice.fromJson(value)) |
| 5834 .toList(); |
5824 } | 5835 } |
5825 if (_json.containsKey("etag")) { | 5836 if (_json.containsKey("etag")) { |
5826 etag = _json["etag"]; | 5837 etag = _json["etag"]; |
5827 } | 5838 } |
5828 if (_json.containsKey("kind")) { | 5839 if (_json.containsKey("kind")) { |
5829 kind = _json["kind"]; | 5840 kind = _json["kind"]; |
5830 } | 5841 } |
5831 if (_json.containsKey("nextPageToken")) { | 5842 if (_json.containsKey("nextPageToken")) { |
5832 nextPageToken = _json["nextPageToken"]; | 5843 nextPageToken = _json["nextPageToken"]; |
5833 } | 5844 } |
5834 } | 5845 } |
5835 | 5846 |
5836 core.Map<core.String, core.Object> toJson() { | 5847 core.Map<core.String, core.Object> toJson() { |
5837 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 5848 final core.Map<core.String, core.Object> _json = |
| 5849 new core.Map<core.String, core.Object>(); |
5838 if (chromeosdevices != null) { | 5850 if (chromeosdevices != null) { |
5839 _json["chromeosdevices"] = chromeosdevices.map((value) => (value).toJson()
).toList(); | 5851 _json["chromeosdevices"] = |
| 5852 chromeosdevices.map((value) => (value).toJson()).toList(); |
5840 } | 5853 } |
5841 if (etag != null) { | 5854 if (etag != null) { |
5842 _json["etag"] = etag; | 5855 _json["etag"] = etag; |
5843 } | 5856 } |
5844 if (kind != null) { | 5857 if (kind != null) { |
5845 _json["kind"] = kind; | 5858 _json["kind"] = kind; |
5846 } | 5859 } |
5847 if (nextPageToken != null) { | 5860 if (nextPageToken != null) { |
5848 _json["nextPageToken"] = nextPageToken; | 5861 _json["nextPageToken"] = nextPageToken; |
5849 } | 5862 } |
5850 return _json; | 5863 return _json; |
5851 } | 5864 } |
5852 } | 5865 } |
5853 | 5866 |
5854 /** | 5867 /// JSON request template for moving ChromeOs Device to given OU in Directory |
5855 * JSON request template for moving ChromeOs Device to given OU in Directory | 5868 /// Devices API. |
5856 * Devices API. | |
5857 */ | |
5858 class ChromeOsMoveDevicesToOu { | 5869 class ChromeOsMoveDevicesToOu { |
5859 /** ChromeOs Devices to be moved to OU */ | 5870 /// ChromeOs Devices to be moved to OU |
5860 core.List<core.String> deviceIds; | 5871 core.List<core.String> deviceIds; |
5861 | 5872 |
5862 ChromeOsMoveDevicesToOu(); | 5873 ChromeOsMoveDevicesToOu(); |
5863 | 5874 |
5864 ChromeOsMoveDevicesToOu.fromJson(core.Map _json) { | 5875 ChromeOsMoveDevicesToOu.fromJson(core.Map _json) { |
5865 if (_json.containsKey("deviceIds")) { | 5876 if (_json.containsKey("deviceIds")) { |
5866 deviceIds = _json["deviceIds"]; | 5877 deviceIds = _json["deviceIds"]; |
5867 } | 5878 } |
5868 } | 5879 } |
5869 | 5880 |
5870 core.Map<core.String, core.Object> toJson() { | 5881 core.Map<core.String, core.Object> toJson() { |
5871 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 5882 final core.Map<core.String, core.Object> _json = |
| 5883 new core.Map<core.String, core.Object>(); |
5872 if (deviceIds != null) { | 5884 if (deviceIds != null) { |
5873 _json["deviceIds"] = deviceIds; | 5885 _json["deviceIds"] = deviceIds; |
5874 } | 5886 } |
5875 return _json; | 5887 return _json; |
5876 } | 5888 } |
5877 } | 5889 } |
5878 | 5890 |
5879 /** JSON template for Customer Resource object in Directory API. */ | 5891 /// JSON template for Customer Resource object in Directory API. |
5880 class Customer { | 5892 class Customer { |
5881 /** | 5893 /// The customer's secondary contact email address. This email address cannot |
5882 * The customer's secondary contact email address. This email address cannot | 5894 /// be on the same domain as the customerDomain |
5883 * be on the same domain as the customerDomain | |
5884 */ | |
5885 core.String alternateEmail; | 5895 core.String alternateEmail; |
5886 /** The customer's creation time (Readonly) */ | 5896 |
| 5897 /// The customer's creation time (Readonly) |
5887 core.DateTime customerCreationTime; | 5898 core.DateTime customerCreationTime; |
5888 /** | 5899 |
5889 * The customer's primary domain name string. Do not include the www prefix | 5900 /// The customer's primary domain name string. Do not include the www prefix |
5890 * when creating a new customer. | 5901 /// when creating a new customer. |
5891 */ | |
5892 core.String customerDomain; | 5902 core.String customerDomain; |
5893 /** ETag of the resource. */ | 5903 |
| 5904 /// ETag of the resource. |
5894 core.String etag; | 5905 core.String etag; |
5895 /** The unique ID for the customer's G Suite account. (Readonly) */ | 5906 |
| 5907 /// The unique ID for the customer's G Suite account. (Readonly) |
5896 core.String id; | 5908 core.String id; |
5897 /** Identifies the resource as a customer. Value: admin#directory#customer */ | 5909 |
| 5910 /// Identifies the resource as a customer. Value: admin#directory#customer |
5898 core.String kind; | 5911 core.String kind; |
5899 /** The customer's ISO 639-2 language code. The default value is en-US */ | 5912 |
| 5913 /// The customer's ISO 639-2 language code. The default value is en-US |
5900 core.String language; | 5914 core.String language; |
5901 /** The customer's contact phone number in E.164 format. */ | 5915 |
| 5916 /// The customer's contact phone number in E.164 format. |
5902 core.String phoneNumber; | 5917 core.String phoneNumber; |
5903 /** The customer's postal address information. */ | 5918 |
| 5919 /// The customer's postal address information. |
5904 CustomerPostalAddress postalAddress; | 5920 CustomerPostalAddress postalAddress; |
5905 | 5921 |
5906 Customer(); | 5922 Customer(); |
5907 | 5923 |
5908 Customer.fromJson(core.Map _json) { | 5924 Customer.fromJson(core.Map _json) { |
5909 if (_json.containsKey("alternateEmail")) { | 5925 if (_json.containsKey("alternateEmail")) { |
5910 alternateEmail = _json["alternateEmail"]; | 5926 alternateEmail = _json["alternateEmail"]; |
5911 } | 5927 } |
5912 if (_json.containsKey("customerCreationTime")) { | 5928 if (_json.containsKey("customerCreationTime")) { |
5913 customerCreationTime = core.DateTime.parse(_json["customerCreationTime"]); | 5929 customerCreationTime = core.DateTime.parse(_json["customerCreationTime"]); |
(...skipping 10 matching lines...) Expand all Loading... |
5924 if (_json.containsKey("kind")) { | 5940 if (_json.containsKey("kind")) { |
5925 kind = _json["kind"]; | 5941 kind = _json["kind"]; |
5926 } | 5942 } |
5927 if (_json.containsKey("language")) { | 5943 if (_json.containsKey("language")) { |
5928 language = _json["language"]; | 5944 language = _json["language"]; |
5929 } | 5945 } |
5930 if (_json.containsKey("phoneNumber")) { | 5946 if (_json.containsKey("phoneNumber")) { |
5931 phoneNumber = _json["phoneNumber"]; | 5947 phoneNumber = _json["phoneNumber"]; |
5932 } | 5948 } |
5933 if (_json.containsKey("postalAddress")) { | 5949 if (_json.containsKey("postalAddress")) { |
5934 postalAddress = new CustomerPostalAddress.fromJson(_json["postalAddress"])
; | 5950 postalAddress = |
| 5951 new CustomerPostalAddress.fromJson(_json["postalAddress"]); |
5935 } | 5952 } |
5936 } | 5953 } |
5937 | 5954 |
5938 core.Map<core.String, core.Object> toJson() { | 5955 core.Map<core.String, core.Object> toJson() { |
5939 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 5956 final core.Map<core.String, core.Object> _json = |
| 5957 new core.Map<core.String, core.Object>(); |
5940 if (alternateEmail != null) { | 5958 if (alternateEmail != null) { |
5941 _json["alternateEmail"] = alternateEmail; | 5959 _json["alternateEmail"] = alternateEmail; |
5942 } | 5960 } |
5943 if (customerCreationTime != null) { | 5961 if (customerCreationTime != null) { |
5944 _json["customerCreationTime"] = (customerCreationTime).toIso8601String(); | 5962 _json["customerCreationTime"] = (customerCreationTime).toIso8601String(); |
5945 } | 5963 } |
5946 if (customerDomain != null) { | 5964 if (customerDomain != null) { |
5947 _json["customerDomain"] = customerDomain; | 5965 _json["customerDomain"] = customerDomain; |
5948 } | 5966 } |
5949 if (etag != null) { | 5967 if (etag != null) { |
(...skipping 11 matching lines...) Expand all Loading... |
5961 if (phoneNumber != null) { | 5979 if (phoneNumber != null) { |
5962 _json["phoneNumber"] = phoneNumber; | 5980 _json["phoneNumber"] = phoneNumber; |
5963 } | 5981 } |
5964 if (postalAddress != null) { | 5982 if (postalAddress != null) { |
5965 _json["postalAddress"] = (postalAddress).toJson(); | 5983 _json["postalAddress"] = (postalAddress).toJson(); |
5966 } | 5984 } |
5967 return _json; | 5985 return _json; |
5968 } | 5986 } |
5969 } | 5987 } |
5970 | 5988 |
5971 /** JSON template for postal address of a customer. */ | 5989 /// JSON template for postal address of a customer. |
5972 class CustomerPostalAddress { | 5990 class CustomerPostalAddress { |
5973 /** | 5991 /// A customer's physical address. The address can be composed of one to |
5974 * A customer's physical address. The address can be composed of one to three | 5992 /// three lines. |
5975 * lines. | |
5976 */ | |
5977 core.String addressLine1; | 5993 core.String addressLine1; |
5978 /** Address line 2 of the address. */ | 5994 |
| 5995 /// Address line 2 of the address. |
5979 core.String addressLine2; | 5996 core.String addressLine2; |
5980 /** Address line 3 of the address. */ | 5997 |
| 5998 /// Address line 3 of the address. |
5981 core.String addressLine3; | 5999 core.String addressLine3; |
5982 /** The customer contact's name. */ | 6000 |
| 6001 /// The customer contact's name. |
5983 core.String contactName; | 6002 core.String contactName; |
5984 /** | 6003 |
5985 * This is a required property. For countryCode information see the ISO 3166 | 6004 /// This is a required property. For countryCode information see the ISO 3166 |
5986 * country code elements. | 6005 /// country code elements. |
5987 */ | |
5988 core.String countryCode; | 6006 core.String countryCode; |
5989 /** | 6007 |
5990 * Name of the locality. An example of a locality value is the city of San | 6008 /// Name of the locality. An example of a locality value is the city of San |
5991 * Francisco. | 6009 /// Francisco. |
5992 */ | |
5993 core.String locality; | 6010 core.String locality; |
5994 /** The company or company division name. */ | 6011 |
| 6012 /// The company or company division name. |
5995 core.String organizationName; | 6013 core.String organizationName; |
5996 /** | 6014 |
5997 * The postal code. A postalCode example is a postal zip code such as 10009. | 6015 /// The postal code. A postalCode example is a postal zip code such as 10009. |
5998 * This is in accordance with - | 6016 /// This is in accordance with - |
5999 * http://portablecontacts.net/draft-spec.html#address_element. | 6017 /// http://portablecontacts.net/draft-spec.html#address_element. |
6000 */ | |
6001 core.String postalCode; | 6018 core.String postalCode; |
6002 /** | 6019 |
6003 * Name of the region. An example of a region value is NY for the state of New | 6020 /// Name of the region. An example of a region value is NY for the state of |
6004 * York. | 6021 /// New York. |
6005 */ | |
6006 core.String region; | 6022 core.String region; |
6007 | 6023 |
6008 CustomerPostalAddress(); | 6024 CustomerPostalAddress(); |
6009 | 6025 |
6010 CustomerPostalAddress.fromJson(core.Map _json) { | 6026 CustomerPostalAddress.fromJson(core.Map _json) { |
6011 if (_json.containsKey("addressLine1")) { | 6027 if (_json.containsKey("addressLine1")) { |
6012 addressLine1 = _json["addressLine1"]; | 6028 addressLine1 = _json["addressLine1"]; |
6013 } | 6029 } |
6014 if (_json.containsKey("addressLine2")) { | 6030 if (_json.containsKey("addressLine2")) { |
6015 addressLine2 = _json["addressLine2"]; | 6031 addressLine2 = _json["addressLine2"]; |
(...skipping 15 matching lines...) Expand all Loading... |
6031 } | 6047 } |
6032 if (_json.containsKey("postalCode")) { | 6048 if (_json.containsKey("postalCode")) { |
6033 postalCode = _json["postalCode"]; | 6049 postalCode = _json["postalCode"]; |
6034 } | 6050 } |
6035 if (_json.containsKey("region")) { | 6051 if (_json.containsKey("region")) { |
6036 region = _json["region"]; | 6052 region = _json["region"]; |
6037 } | 6053 } |
6038 } | 6054 } |
6039 | 6055 |
6040 core.Map<core.String, core.Object> toJson() { | 6056 core.Map<core.String, core.Object> toJson() { |
6041 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 6057 final core.Map<core.String, core.Object> _json = |
| 6058 new core.Map<core.String, core.Object>(); |
6042 if (addressLine1 != null) { | 6059 if (addressLine1 != null) { |
6043 _json["addressLine1"] = addressLine1; | 6060 _json["addressLine1"] = addressLine1; |
6044 } | 6061 } |
6045 if (addressLine2 != null) { | 6062 if (addressLine2 != null) { |
6046 _json["addressLine2"] = addressLine2; | 6063 _json["addressLine2"] = addressLine2; |
6047 } | 6064 } |
6048 if (addressLine3 != null) { | 6065 if (addressLine3 != null) { |
6049 _json["addressLine3"] = addressLine3; | 6066 _json["addressLine3"] = addressLine3; |
6050 } | 6067 } |
6051 if (contactName != null) { | 6068 if (contactName != null) { |
(...skipping 11 matching lines...) Expand all Loading... |
6063 if (postalCode != null) { | 6080 if (postalCode != null) { |
6064 _json["postalCode"] = postalCode; | 6081 _json["postalCode"] = postalCode; |
6065 } | 6082 } |
6066 if (region != null) { | 6083 if (region != null) { |
6067 _json["region"] = region; | 6084 _json["region"] = region; |
6068 } | 6085 } |
6069 return _json; | 6086 return _json; |
6070 } | 6087 } |
6071 } | 6088 } |
6072 | 6089 |
6073 /** JSON template for Domain Alias object in Directory API. */ | 6090 /// JSON template for Domain Alias object in Directory API. |
6074 class DomainAlias { | 6091 class DomainAlias { |
6075 /** The creation time of the domain alias. (Read-only). */ | 6092 /// The creation time of the domain alias. (Read-only). |
6076 core.String creationTime; | 6093 core.String creationTime; |
6077 /** The domain alias name. */ | 6094 |
| 6095 /// The domain alias name. |
6078 core.String domainAliasName; | 6096 core.String domainAliasName; |
6079 /** ETag of the resource. */ | 6097 |
| 6098 /// ETag of the resource. |
6080 core.String etag; | 6099 core.String etag; |
6081 /** Kind of resource this is. */ | 6100 |
| 6101 /// Kind of resource this is. |
6082 core.String kind; | 6102 core.String kind; |
6083 /** | 6103 |
6084 * The parent domain name that the domain alias is associated with. This can | 6104 /// The parent domain name that the domain alias is associated with. This can |
6085 * either be a primary or secondary domain name within a customer. | 6105 /// either be a primary or secondary domain name within a customer. |
6086 */ | |
6087 core.String parentDomainName; | 6106 core.String parentDomainName; |
6088 /** Indicates the verification state of a domain alias. (Read-only) */ | 6107 |
| 6108 /// Indicates the verification state of a domain alias. (Read-only) |
6089 core.bool verified; | 6109 core.bool verified; |
6090 | 6110 |
6091 DomainAlias(); | 6111 DomainAlias(); |
6092 | 6112 |
6093 DomainAlias.fromJson(core.Map _json) { | 6113 DomainAlias.fromJson(core.Map _json) { |
6094 if (_json.containsKey("creationTime")) { | 6114 if (_json.containsKey("creationTime")) { |
6095 creationTime = _json["creationTime"]; | 6115 creationTime = _json["creationTime"]; |
6096 } | 6116 } |
6097 if (_json.containsKey("domainAliasName")) { | 6117 if (_json.containsKey("domainAliasName")) { |
6098 domainAliasName = _json["domainAliasName"]; | 6118 domainAliasName = _json["domainAliasName"]; |
6099 } | 6119 } |
6100 if (_json.containsKey("etag")) { | 6120 if (_json.containsKey("etag")) { |
6101 etag = _json["etag"]; | 6121 etag = _json["etag"]; |
6102 } | 6122 } |
6103 if (_json.containsKey("kind")) { | 6123 if (_json.containsKey("kind")) { |
6104 kind = _json["kind"]; | 6124 kind = _json["kind"]; |
6105 } | 6125 } |
6106 if (_json.containsKey("parentDomainName")) { | 6126 if (_json.containsKey("parentDomainName")) { |
6107 parentDomainName = _json["parentDomainName"]; | 6127 parentDomainName = _json["parentDomainName"]; |
6108 } | 6128 } |
6109 if (_json.containsKey("verified")) { | 6129 if (_json.containsKey("verified")) { |
6110 verified = _json["verified"]; | 6130 verified = _json["verified"]; |
6111 } | 6131 } |
6112 } | 6132 } |
6113 | 6133 |
6114 core.Map<core.String, core.Object> toJson() { | 6134 core.Map<core.String, core.Object> toJson() { |
6115 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 6135 final core.Map<core.String, core.Object> _json = |
| 6136 new core.Map<core.String, core.Object>(); |
6116 if (creationTime != null) { | 6137 if (creationTime != null) { |
6117 _json["creationTime"] = creationTime; | 6138 _json["creationTime"] = creationTime; |
6118 } | 6139 } |
6119 if (domainAliasName != null) { | 6140 if (domainAliasName != null) { |
6120 _json["domainAliasName"] = domainAliasName; | 6141 _json["domainAliasName"] = domainAliasName; |
6121 } | 6142 } |
6122 if (etag != null) { | 6143 if (etag != null) { |
6123 _json["etag"] = etag; | 6144 _json["etag"] = etag; |
6124 } | 6145 } |
6125 if (kind != null) { | 6146 if (kind != null) { |
6126 _json["kind"] = kind; | 6147 _json["kind"] = kind; |
6127 } | 6148 } |
6128 if (parentDomainName != null) { | 6149 if (parentDomainName != null) { |
6129 _json["parentDomainName"] = parentDomainName; | 6150 _json["parentDomainName"] = parentDomainName; |
6130 } | 6151 } |
6131 if (verified != null) { | 6152 if (verified != null) { |
6132 _json["verified"] = verified; | 6153 _json["verified"] = verified; |
6133 } | 6154 } |
6134 return _json; | 6155 return _json; |
6135 } | 6156 } |
6136 } | 6157 } |
6137 | 6158 |
6138 /** JSON response template to list domain aliases in Directory API. */ | 6159 /// JSON response template to list domain aliases in Directory API. |
6139 class DomainAliases { | 6160 class DomainAliases { |
6140 /** List of domain alias objects. */ | 6161 /// List of domain alias objects. |
6141 core.List<DomainAlias> domainAliases; | 6162 core.List<DomainAlias> domainAliases; |
6142 /** ETag of the resource. */ | 6163 |
| 6164 /// ETag of the resource. |
6143 core.String etag; | 6165 core.String etag; |
6144 /** Kind of resource this is. */ | 6166 |
| 6167 /// Kind of resource this is. |
6145 core.String kind; | 6168 core.String kind; |
6146 | 6169 |
6147 DomainAliases(); | 6170 DomainAliases(); |
6148 | 6171 |
6149 DomainAliases.fromJson(core.Map _json) { | 6172 DomainAliases.fromJson(core.Map _json) { |
6150 if (_json.containsKey("domainAliases")) { | 6173 if (_json.containsKey("domainAliases")) { |
6151 domainAliases = _json["domainAliases"].map((value) => new DomainAlias.from
Json(value)).toList(); | 6174 domainAliases = _json["domainAliases"] |
| 6175 .map((value) => new DomainAlias.fromJson(value)) |
| 6176 .toList(); |
6152 } | 6177 } |
6153 if (_json.containsKey("etag")) { | 6178 if (_json.containsKey("etag")) { |
6154 etag = _json["etag"]; | 6179 etag = _json["etag"]; |
6155 } | 6180 } |
6156 if (_json.containsKey("kind")) { | 6181 if (_json.containsKey("kind")) { |
6157 kind = _json["kind"]; | 6182 kind = _json["kind"]; |
6158 } | 6183 } |
6159 } | 6184 } |
6160 | 6185 |
6161 core.Map<core.String, core.Object> toJson() { | 6186 core.Map<core.String, core.Object> toJson() { |
6162 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 6187 final core.Map<core.String, core.Object> _json = |
| 6188 new core.Map<core.String, core.Object>(); |
6163 if (domainAliases != null) { | 6189 if (domainAliases != null) { |
6164 _json["domainAliases"] = domainAliases.map((value) => (value).toJson()).to
List(); | 6190 _json["domainAliases"] = |
| 6191 domainAliases.map((value) => (value).toJson()).toList(); |
6165 } | 6192 } |
6166 if (etag != null) { | 6193 if (etag != null) { |
6167 _json["etag"] = etag; | 6194 _json["etag"] = etag; |
6168 } | 6195 } |
6169 if (kind != null) { | 6196 if (kind != null) { |
6170 _json["kind"] = kind; | 6197 _json["kind"] = kind; |
6171 } | 6198 } |
6172 return _json; | 6199 return _json; |
6173 } | 6200 } |
6174 } | 6201 } |
6175 | 6202 |
6176 /** JSON template for Domain object in Directory API. */ | 6203 /// JSON template for Domain object in Directory API. |
6177 class Domains { | 6204 class Domains { |
6178 /** Creation time of the domain. (Read-only). */ | 6205 /// Creation time of the domain. (Read-only). |
6179 core.String creationTime; | 6206 core.String creationTime; |
6180 /** List of domain alias objects. (Read-only) */ | 6207 |
| 6208 /// List of domain alias objects. (Read-only) |
6181 core.List<DomainAlias> domainAliases; | 6209 core.List<DomainAlias> domainAliases; |
6182 /** The domain name of the customer. */ | 6210 |
| 6211 /// The domain name of the customer. |
6183 core.String domainName; | 6212 core.String domainName; |
6184 /** ETag of the resource. */ | 6213 |
| 6214 /// ETag of the resource. |
6185 core.String etag; | 6215 core.String etag; |
6186 /** Indicates if the domain is a primary domain (Read-only). */ | 6216 |
| 6217 /// Indicates if the domain is a primary domain (Read-only). |
6187 core.bool isPrimary; | 6218 core.bool isPrimary; |
6188 /** Kind of resource this is. */ | 6219 |
| 6220 /// Kind of resource this is. |
6189 core.String kind; | 6221 core.String kind; |
6190 /** Indicates the verification state of a domain. (Read-only). */ | 6222 |
| 6223 /// Indicates the verification state of a domain. (Read-only). |
6191 core.bool verified; | 6224 core.bool verified; |
6192 | 6225 |
6193 Domains(); | 6226 Domains(); |
6194 | 6227 |
6195 Domains.fromJson(core.Map _json) { | 6228 Domains.fromJson(core.Map _json) { |
6196 if (_json.containsKey("creationTime")) { | 6229 if (_json.containsKey("creationTime")) { |
6197 creationTime = _json["creationTime"]; | 6230 creationTime = _json["creationTime"]; |
6198 } | 6231 } |
6199 if (_json.containsKey("domainAliases")) { | 6232 if (_json.containsKey("domainAliases")) { |
6200 domainAliases = _json["domainAliases"].map((value) => new DomainAlias.from
Json(value)).toList(); | 6233 domainAliases = _json["domainAliases"] |
| 6234 .map((value) => new DomainAlias.fromJson(value)) |
| 6235 .toList(); |
6201 } | 6236 } |
6202 if (_json.containsKey("domainName")) { | 6237 if (_json.containsKey("domainName")) { |
6203 domainName = _json["domainName"]; | 6238 domainName = _json["domainName"]; |
6204 } | 6239 } |
6205 if (_json.containsKey("etag")) { | 6240 if (_json.containsKey("etag")) { |
6206 etag = _json["etag"]; | 6241 etag = _json["etag"]; |
6207 } | 6242 } |
6208 if (_json.containsKey("isPrimary")) { | 6243 if (_json.containsKey("isPrimary")) { |
6209 isPrimary = _json["isPrimary"]; | 6244 isPrimary = _json["isPrimary"]; |
6210 } | 6245 } |
6211 if (_json.containsKey("kind")) { | 6246 if (_json.containsKey("kind")) { |
6212 kind = _json["kind"]; | 6247 kind = _json["kind"]; |
6213 } | 6248 } |
6214 if (_json.containsKey("verified")) { | 6249 if (_json.containsKey("verified")) { |
6215 verified = _json["verified"]; | 6250 verified = _json["verified"]; |
6216 } | 6251 } |
6217 } | 6252 } |
6218 | 6253 |
6219 core.Map<core.String, core.Object> toJson() { | 6254 core.Map<core.String, core.Object> toJson() { |
6220 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 6255 final core.Map<core.String, core.Object> _json = |
| 6256 new core.Map<core.String, core.Object>(); |
6221 if (creationTime != null) { | 6257 if (creationTime != null) { |
6222 _json["creationTime"] = creationTime; | 6258 _json["creationTime"] = creationTime; |
6223 } | 6259 } |
6224 if (domainAliases != null) { | 6260 if (domainAliases != null) { |
6225 _json["domainAliases"] = domainAliases.map((value) => (value).toJson()).to
List(); | 6261 _json["domainAliases"] = |
| 6262 domainAliases.map((value) => (value).toJson()).toList(); |
6226 } | 6263 } |
6227 if (domainName != null) { | 6264 if (domainName != null) { |
6228 _json["domainName"] = domainName; | 6265 _json["domainName"] = domainName; |
6229 } | 6266 } |
6230 if (etag != null) { | 6267 if (etag != null) { |
6231 _json["etag"] = etag; | 6268 _json["etag"] = etag; |
6232 } | 6269 } |
6233 if (isPrimary != null) { | 6270 if (isPrimary != null) { |
6234 _json["isPrimary"] = isPrimary; | 6271 _json["isPrimary"] = isPrimary; |
6235 } | 6272 } |
6236 if (kind != null) { | 6273 if (kind != null) { |
6237 _json["kind"] = kind; | 6274 _json["kind"] = kind; |
6238 } | 6275 } |
6239 if (verified != null) { | 6276 if (verified != null) { |
6240 _json["verified"] = verified; | 6277 _json["verified"] = verified; |
6241 } | 6278 } |
6242 return _json; | 6279 return _json; |
6243 } | 6280 } |
6244 } | 6281 } |
6245 | 6282 |
6246 /** JSON response template to list Domains in Directory API. */ | 6283 /// JSON response template to list Domains in Directory API. |
6247 class Domains2 { | 6284 class Domains2 { |
6248 /** List of domain objects. */ | 6285 /// List of domain objects. |
6249 core.List<Domains> domains; | 6286 core.List<Domains> domains; |
6250 /** ETag of the resource. */ | 6287 |
| 6288 /// ETag of the resource. |
6251 core.String etag; | 6289 core.String etag; |
6252 /** Kind of resource this is. */ | 6290 |
| 6291 /// Kind of resource this is. |
6253 core.String kind; | 6292 core.String kind; |
6254 | 6293 |
6255 Domains2(); | 6294 Domains2(); |
6256 | 6295 |
6257 Domains2.fromJson(core.Map _json) { | 6296 Domains2.fromJson(core.Map _json) { |
6258 if (_json.containsKey("domains")) { | 6297 if (_json.containsKey("domains")) { |
6259 domains = _json["domains"].map((value) => new Domains.fromJson(value)).toL
ist(); | 6298 domains = |
| 6299 _json["domains"].map((value) => new Domains.fromJson(value)).toList(); |
6260 } | 6300 } |
6261 if (_json.containsKey("etag")) { | 6301 if (_json.containsKey("etag")) { |
6262 etag = _json["etag"]; | 6302 etag = _json["etag"]; |
6263 } | 6303 } |
6264 if (_json.containsKey("kind")) { | 6304 if (_json.containsKey("kind")) { |
6265 kind = _json["kind"]; | 6305 kind = _json["kind"]; |
6266 } | 6306 } |
6267 } | 6307 } |
6268 | 6308 |
6269 core.Map<core.String, core.Object> toJson() { | 6309 core.Map<core.String, core.Object> toJson() { |
6270 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 6310 final core.Map<core.String, core.Object> _json = |
| 6311 new core.Map<core.String, core.Object>(); |
6271 if (domains != null) { | 6312 if (domains != null) { |
6272 _json["domains"] = domains.map((value) => (value).toJson()).toList(); | 6313 _json["domains"] = domains.map((value) => (value).toJson()).toList(); |
6273 } | 6314 } |
6274 if (etag != null) { | 6315 if (etag != null) { |
6275 _json["etag"] = etag; | 6316 _json["etag"] = etag; |
6276 } | 6317 } |
6277 if (kind != null) { | 6318 if (kind != null) { |
6278 _json["kind"] = kind; | 6319 _json["kind"] = kind; |
6279 } | 6320 } |
6280 return _json; | 6321 return _json; |
6281 } | 6322 } |
6282 } | 6323 } |
6283 | 6324 |
6284 /** JSON template for Group resource in Directory API. */ | 6325 /// JSON template for Group resource in Directory API. |
6285 class Group { | 6326 class Group { |
6286 /** Is the group created by admin (Read-only) * */ | 6327 /// Is the group created by admin (Read-only) * |
6287 core.bool adminCreated; | 6328 core.bool adminCreated; |
6288 /** List of aliases (Read-only) */ | 6329 |
| 6330 /// List of aliases (Read-only) |
6289 core.List<core.String> aliases; | 6331 core.List<core.String> aliases; |
6290 /** Description of the group */ | 6332 |
| 6333 /// Description of the group |
6291 core.String description; | 6334 core.String description; |
6292 /** Group direct members count */ | 6335 |
| 6336 /// Group direct members count |
6293 core.String directMembersCount; | 6337 core.String directMembersCount; |
6294 /** Email of Group */ | 6338 |
| 6339 /// Email of Group |
6295 core.String email; | 6340 core.String email; |
6296 /** ETag of the resource. */ | 6341 |
| 6342 /// ETag of the resource. |
6297 core.String etag; | 6343 core.String etag; |
6298 /** Unique identifier of Group (Read-only) */ | 6344 |
| 6345 /// Unique identifier of Group (Read-only) |
6299 core.String id; | 6346 core.String id; |
6300 /** Kind of resource this is. */ | 6347 |
| 6348 /// Kind of resource this is. |
6301 core.String kind; | 6349 core.String kind; |
6302 /** Group name */ | 6350 |
| 6351 /// Group name |
6303 core.String name; | 6352 core.String name; |
6304 /** List of non editable aliases (Read-only) */ | 6353 |
| 6354 /// List of non editable aliases (Read-only) |
6305 core.List<core.String> nonEditableAliases; | 6355 core.List<core.String> nonEditableAliases; |
6306 | 6356 |
6307 Group(); | 6357 Group(); |
6308 | 6358 |
6309 Group.fromJson(core.Map _json) { | 6359 Group.fromJson(core.Map _json) { |
6310 if (_json.containsKey("adminCreated")) { | 6360 if (_json.containsKey("adminCreated")) { |
6311 adminCreated = _json["adminCreated"]; | 6361 adminCreated = _json["adminCreated"]; |
6312 } | 6362 } |
6313 if (_json.containsKey("aliases")) { | 6363 if (_json.containsKey("aliases")) { |
6314 aliases = _json["aliases"]; | 6364 aliases = _json["aliases"]; |
(...skipping 18 matching lines...) Expand all Loading... |
6333 } | 6383 } |
6334 if (_json.containsKey("name")) { | 6384 if (_json.containsKey("name")) { |
6335 name = _json["name"]; | 6385 name = _json["name"]; |
6336 } | 6386 } |
6337 if (_json.containsKey("nonEditableAliases")) { | 6387 if (_json.containsKey("nonEditableAliases")) { |
6338 nonEditableAliases = _json["nonEditableAliases"]; | 6388 nonEditableAliases = _json["nonEditableAliases"]; |
6339 } | 6389 } |
6340 } | 6390 } |
6341 | 6391 |
6342 core.Map<core.String, core.Object> toJson() { | 6392 core.Map<core.String, core.Object> toJson() { |
6343 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 6393 final core.Map<core.String, core.Object> _json = |
| 6394 new core.Map<core.String, core.Object>(); |
6344 if (adminCreated != null) { | 6395 if (adminCreated != null) { |
6345 _json["adminCreated"] = adminCreated; | 6396 _json["adminCreated"] = adminCreated; |
6346 } | 6397 } |
6347 if (aliases != null) { | 6398 if (aliases != null) { |
6348 _json["aliases"] = aliases; | 6399 _json["aliases"] = aliases; |
6349 } | 6400 } |
6350 if (description != null) { | 6401 if (description != null) { |
6351 _json["description"] = description; | 6402 _json["description"] = description; |
6352 } | 6403 } |
6353 if (directMembersCount != null) { | 6404 if (directMembersCount != null) { |
(...skipping 14 matching lines...) Expand all Loading... |
6368 if (name != null) { | 6419 if (name != null) { |
6369 _json["name"] = name; | 6420 _json["name"] = name; |
6370 } | 6421 } |
6371 if (nonEditableAliases != null) { | 6422 if (nonEditableAliases != null) { |
6372 _json["nonEditableAliases"] = nonEditableAliases; | 6423 _json["nonEditableAliases"] = nonEditableAliases; |
6373 } | 6424 } |
6374 return _json; | 6425 return _json; |
6375 } | 6426 } |
6376 } | 6427 } |
6377 | 6428 |
6378 /** JSON response template for List Groups operation in Directory API. */ | 6429 /// JSON response template for List Groups operation in Directory API. |
6379 class Groups { | 6430 class Groups { |
6380 /** ETag of the resource. */ | 6431 /// ETag of the resource. |
6381 core.String etag; | 6432 core.String etag; |
6382 /** List of group objects. */ | 6433 |
| 6434 /// List of group objects. |
6383 core.List<Group> groups; | 6435 core.List<Group> groups; |
6384 /** Kind of resource this is. */ | 6436 |
| 6437 /// Kind of resource this is. |
6385 core.String kind; | 6438 core.String kind; |
6386 /** Token used to access next page of this result. */ | 6439 |
| 6440 /// Token used to access next page of this result. |
6387 core.String nextPageToken; | 6441 core.String nextPageToken; |
6388 | 6442 |
6389 Groups(); | 6443 Groups(); |
6390 | 6444 |
6391 Groups.fromJson(core.Map _json) { | 6445 Groups.fromJson(core.Map _json) { |
6392 if (_json.containsKey("etag")) { | 6446 if (_json.containsKey("etag")) { |
6393 etag = _json["etag"]; | 6447 etag = _json["etag"]; |
6394 } | 6448 } |
6395 if (_json.containsKey("groups")) { | 6449 if (_json.containsKey("groups")) { |
6396 groups = _json["groups"].map((value) => new Group.fromJson(value)).toList(
); | 6450 groups = |
| 6451 _json["groups"].map((value) => new Group.fromJson(value)).toList(); |
6397 } | 6452 } |
6398 if (_json.containsKey("kind")) { | 6453 if (_json.containsKey("kind")) { |
6399 kind = _json["kind"]; | 6454 kind = _json["kind"]; |
6400 } | 6455 } |
6401 if (_json.containsKey("nextPageToken")) { | 6456 if (_json.containsKey("nextPageToken")) { |
6402 nextPageToken = _json["nextPageToken"]; | 6457 nextPageToken = _json["nextPageToken"]; |
6403 } | 6458 } |
6404 } | 6459 } |
6405 | 6460 |
6406 core.Map<core.String, core.Object> toJson() { | 6461 core.Map<core.String, core.Object> toJson() { |
6407 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 6462 final core.Map<core.String, core.Object> _json = |
| 6463 new core.Map<core.String, core.Object>(); |
6408 if (etag != null) { | 6464 if (etag != null) { |
6409 _json["etag"] = etag; | 6465 _json["etag"] = etag; |
6410 } | 6466 } |
6411 if (groups != null) { | 6467 if (groups != null) { |
6412 _json["groups"] = groups.map((value) => (value).toJson()).toList(); | 6468 _json["groups"] = groups.map((value) => (value).toJson()).toList(); |
6413 } | 6469 } |
6414 if (kind != null) { | 6470 if (kind != null) { |
6415 _json["kind"] = kind; | 6471 _json["kind"] = kind; |
6416 } | 6472 } |
6417 if (nextPageToken != null) { | 6473 if (nextPageToken != null) { |
6418 _json["nextPageToken"] = nextPageToken; | 6474 _json["nextPageToken"] = nextPageToken; |
6419 } | 6475 } |
6420 return _json; | 6476 return _json; |
6421 } | 6477 } |
6422 } | 6478 } |
6423 | 6479 |
6424 /** JSON template for Member resource in Directory API. */ | 6480 /// JSON template for Member resource in Directory API. |
6425 class Member { | 6481 class Member { |
6426 /** Email of member (Read-only) */ | 6482 /// Email of member (Read-only) |
6427 core.String email; | 6483 core.String email; |
6428 /** ETag of the resource. */ | 6484 |
| 6485 /// ETag of the resource. |
6429 core.String etag; | 6486 core.String etag; |
6430 /** | 6487 |
6431 * Unique identifier of customer member (Read-only) Unique identifier of group | 6488 /// Unique identifier of customer member (Read-only) Unique identifier of |
6432 * (Read-only) Unique identifier of member (Read-only) | 6489 /// group (Read-only) Unique identifier of member (Read-only) |
6433 */ | |
6434 core.String id; | 6490 core.String id; |
6435 /** Kind of resource this is. */ | 6491 |
| 6492 /// Kind of resource this is. |
6436 core.String kind; | 6493 core.String kind; |
6437 /** Role of member */ | 6494 |
| 6495 /// Role of member |
6438 core.String role; | 6496 core.String role; |
6439 /** Status of member (Immutable) */ | 6497 |
| 6498 /// Status of member (Immutable) |
6440 core.String status; | 6499 core.String status; |
6441 /** Type of member (Immutable) */ | 6500 |
| 6501 /// Type of member (Immutable) |
6442 core.String type; | 6502 core.String type; |
6443 | 6503 |
6444 Member(); | 6504 Member(); |
6445 | 6505 |
6446 Member.fromJson(core.Map _json) { | 6506 Member.fromJson(core.Map _json) { |
6447 if (_json.containsKey("email")) { | 6507 if (_json.containsKey("email")) { |
6448 email = _json["email"]; | 6508 email = _json["email"]; |
6449 } | 6509 } |
6450 if (_json.containsKey("etag")) { | 6510 if (_json.containsKey("etag")) { |
6451 etag = _json["etag"]; | 6511 etag = _json["etag"]; |
6452 } | 6512 } |
6453 if (_json.containsKey("id")) { | 6513 if (_json.containsKey("id")) { |
6454 id = _json["id"]; | 6514 id = _json["id"]; |
6455 } | 6515 } |
6456 if (_json.containsKey("kind")) { | 6516 if (_json.containsKey("kind")) { |
6457 kind = _json["kind"]; | 6517 kind = _json["kind"]; |
6458 } | 6518 } |
6459 if (_json.containsKey("role")) { | 6519 if (_json.containsKey("role")) { |
6460 role = _json["role"]; | 6520 role = _json["role"]; |
6461 } | 6521 } |
6462 if (_json.containsKey("status")) { | 6522 if (_json.containsKey("status")) { |
6463 status = _json["status"]; | 6523 status = _json["status"]; |
6464 } | 6524 } |
6465 if (_json.containsKey("type")) { | 6525 if (_json.containsKey("type")) { |
6466 type = _json["type"]; | 6526 type = _json["type"]; |
6467 } | 6527 } |
6468 } | 6528 } |
6469 | 6529 |
6470 core.Map<core.String, core.Object> toJson() { | 6530 core.Map<core.String, core.Object> toJson() { |
6471 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 6531 final core.Map<core.String, core.Object> _json = |
| 6532 new core.Map<core.String, core.Object>(); |
6472 if (email != null) { | 6533 if (email != null) { |
6473 _json["email"] = email; | 6534 _json["email"] = email; |
6474 } | 6535 } |
6475 if (etag != null) { | 6536 if (etag != null) { |
6476 _json["etag"] = etag; | 6537 _json["etag"] = etag; |
6477 } | 6538 } |
6478 if (id != null) { | 6539 if (id != null) { |
6479 _json["id"] = id; | 6540 _json["id"] = id; |
6480 } | 6541 } |
6481 if (kind != null) { | 6542 if (kind != null) { |
6482 _json["kind"] = kind; | 6543 _json["kind"] = kind; |
6483 } | 6544 } |
6484 if (role != null) { | 6545 if (role != null) { |
6485 _json["role"] = role; | 6546 _json["role"] = role; |
6486 } | 6547 } |
6487 if (status != null) { | 6548 if (status != null) { |
6488 _json["status"] = status; | 6549 _json["status"] = status; |
6489 } | 6550 } |
6490 if (type != null) { | 6551 if (type != null) { |
6491 _json["type"] = type; | 6552 _json["type"] = type; |
6492 } | 6553 } |
6493 return _json; | 6554 return _json; |
6494 } | 6555 } |
6495 } | 6556 } |
6496 | 6557 |
6497 /** JSON response template for List Members operation in Directory API. */ | 6558 /// JSON response template for List Members operation in Directory API. |
6498 class Members { | 6559 class Members { |
6499 /** ETag of the resource. */ | 6560 /// ETag of the resource. |
6500 core.String etag; | 6561 core.String etag; |
6501 /** Kind of resource this is. */ | 6562 |
| 6563 /// Kind of resource this is. |
6502 core.String kind; | 6564 core.String kind; |
6503 /** List of member objects. */ | 6565 |
| 6566 /// List of member objects. |
6504 core.List<Member> members; | 6567 core.List<Member> members; |
6505 /** Token used to access next page of this result. */ | 6568 |
| 6569 /// Token used to access next page of this result. |
6506 core.String nextPageToken; | 6570 core.String nextPageToken; |
6507 | 6571 |
6508 Members(); | 6572 Members(); |
6509 | 6573 |
6510 Members.fromJson(core.Map _json) { | 6574 Members.fromJson(core.Map _json) { |
6511 if (_json.containsKey("etag")) { | 6575 if (_json.containsKey("etag")) { |
6512 etag = _json["etag"]; | 6576 etag = _json["etag"]; |
6513 } | 6577 } |
6514 if (_json.containsKey("kind")) { | 6578 if (_json.containsKey("kind")) { |
6515 kind = _json["kind"]; | 6579 kind = _json["kind"]; |
6516 } | 6580 } |
6517 if (_json.containsKey("members")) { | 6581 if (_json.containsKey("members")) { |
6518 members = _json["members"].map((value) => new Member.fromJson(value)).toLi
st(); | 6582 members = |
| 6583 _json["members"].map((value) => new Member.fromJson(value)).toList(); |
6519 } | 6584 } |
6520 if (_json.containsKey("nextPageToken")) { | 6585 if (_json.containsKey("nextPageToken")) { |
6521 nextPageToken = _json["nextPageToken"]; | 6586 nextPageToken = _json["nextPageToken"]; |
6522 } | 6587 } |
6523 } | 6588 } |
6524 | 6589 |
6525 core.Map<core.String, core.Object> toJson() { | 6590 core.Map<core.String, core.Object> toJson() { |
6526 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 6591 final core.Map<core.String, core.Object> _json = |
| 6592 new core.Map<core.String, core.Object>(); |
6527 if (etag != null) { | 6593 if (etag != null) { |
6528 _json["etag"] = etag; | 6594 _json["etag"] = etag; |
6529 } | 6595 } |
6530 if (kind != null) { | 6596 if (kind != null) { |
6531 _json["kind"] = kind; | 6597 _json["kind"] = kind; |
6532 } | 6598 } |
6533 if (members != null) { | 6599 if (members != null) { |
6534 _json["members"] = members.map((value) => (value).toJson()).toList(); | 6600 _json["members"] = members.map((value) => (value).toJson()).toList(); |
6535 } | 6601 } |
6536 if (nextPageToken != null) { | 6602 if (nextPageToken != null) { |
6537 _json["nextPageToken"] = nextPageToken; | 6603 _json["nextPageToken"] = nextPageToken; |
6538 } | 6604 } |
6539 return _json; | 6605 return _json; |
6540 } | 6606 } |
6541 } | 6607 } |
6542 | 6608 |
6543 class MobileDeviceApplications { | 6609 class MobileDeviceApplications { |
6544 /** Display name of application */ | 6610 /// Display name of application |
6545 core.String displayName; | 6611 core.String displayName; |
6546 /** Package name of application */ | 6612 |
| 6613 /// Package name of application |
6547 core.String packageName; | 6614 core.String packageName; |
6548 /** List of Permissions for application */ | 6615 |
| 6616 /// List of Permissions for application |
6549 core.List<core.String> permission; | 6617 core.List<core.String> permission; |
6550 /** Version code of application */ | 6618 |
| 6619 /// Version code of application |
6551 core.int versionCode; | 6620 core.int versionCode; |
6552 /** Version name of application */ | 6621 |
| 6622 /// Version name of application |
6553 core.String versionName; | 6623 core.String versionName; |
6554 | 6624 |
6555 MobileDeviceApplications(); | 6625 MobileDeviceApplications(); |
6556 | 6626 |
6557 MobileDeviceApplications.fromJson(core.Map _json) { | 6627 MobileDeviceApplications.fromJson(core.Map _json) { |
6558 if (_json.containsKey("displayName")) { | 6628 if (_json.containsKey("displayName")) { |
6559 displayName = _json["displayName"]; | 6629 displayName = _json["displayName"]; |
6560 } | 6630 } |
6561 if (_json.containsKey("packageName")) { | 6631 if (_json.containsKey("packageName")) { |
6562 packageName = _json["packageName"]; | 6632 packageName = _json["packageName"]; |
6563 } | 6633 } |
6564 if (_json.containsKey("permission")) { | 6634 if (_json.containsKey("permission")) { |
6565 permission = _json["permission"]; | 6635 permission = _json["permission"]; |
6566 } | 6636 } |
6567 if (_json.containsKey("versionCode")) { | 6637 if (_json.containsKey("versionCode")) { |
6568 versionCode = _json["versionCode"]; | 6638 versionCode = _json["versionCode"]; |
6569 } | 6639 } |
6570 if (_json.containsKey("versionName")) { | 6640 if (_json.containsKey("versionName")) { |
6571 versionName = _json["versionName"]; | 6641 versionName = _json["versionName"]; |
6572 } | 6642 } |
6573 } | 6643 } |
6574 | 6644 |
6575 core.Map<core.String, core.Object> toJson() { | 6645 core.Map<core.String, core.Object> toJson() { |
6576 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 6646 final core.Map<core.String, core.Object> _json = |
| 6647 new core.Map<core.String, core.Object>(); |
6577 if (displayName != null) { | 6648 if (displayName != null) { |
6578 _json["displayName"] = displayName; | 6649 _json["displayName"] = displayName; |
6579 } | 6650 } |
6580 if (packageName != null) { | 6651 if (packageName != null) { |
6581 _json["packageName"] = packageName; | 6652 _json["packageName"] = packageName; |
6582 } | 6653 } |
6583 if (permission != null) { | 6654 if (permission != null) { |
6584 _json["permission"] = permission; | 6655 _json["permission"] = permission; |
6585 } | 6656 } |
6586 if (versionCode != null) { | 6657 if (versionCode != null) { |
6587 _json["versionCode"] = versionCode; | 6658 _json["versionCode"] = versionCode; |
6588 } | 6659 } |
6589 if (versionName != null) { | 6660 if (versionName != null) { |
6590 _json["versionName"] = versionName; | 6661 _json["versionName"] = versionName; |
6591 } | 6662 } |
6592 return _json; | 6663 return _json; |
6593 } | 6664 } |
6594 } | 6665 } |
6595 | 6666 |
6596 /** JSON template for Mobile Device resource in Directory API. */ | 6667 /// JSON template for Mobile Device resource in Directory API. |
6597 class MobileDevice { | 6668 class MobileDevice { |
6598 /** Adb (USB debugging) enabled or disabled on device (Read-only) */ | 6669 /// Adb (USB debugging) enabled or disabled on device (Read-only) |
6599 core.bool adbStatus; | 6670 core.bool adbStatus; |
6600 /** List of applications installed on Mobile Device */ | 6671 |
| 6672 /// List of applications installed on Mobile Device |
6601 core.List<MobileDeviceApplications> applications; | 6673 core.List<MobileDeviceApplications> applications; |
6602 /** Mobile Device Baseband version (Read-only) */ | 6674 |
| 6675 /// Mobile Device Baseband version (Read-only) |
6603 core.String basebandVersion; | 6676 core.String basebandVersion; |
6604 /** Mobile Device Bootloader version (Read-only) */ | 6677 |
| 6678 /// Mobile Device Bootloader version (Read-only) |
6605 core.String bootloaderVersion; | 6679 core.String bootloaderVersion; |
6606 /** Mobile Device Brand (Read-only) */ | 6680 |
| 6681 /// Mobile Device Brand (Read-only) |
6607 core.String brand; | 6682 core.String brand; |
6608 /** Mobile Device Build number (Read-only) */ | 6683 |
| 6684 /// Mobile Device Build number (Read-only) |
6609 core.String buildNumber; | 6685 core.String buildNumber; |
6610 /** The default locale used on the Mobile Device (Read-only) */ | 6686 |
| 6687 /// The default locale used on the Mobile Device (Read-only) |
6611 core.String defaultLanguage; | 6688 core.String defaultLanguage; |
6612 /** Developer options enabled or disabled on device (Read-only) */ | 6689 |
| 6690 /// Developer options enabled or disabled on device (Read-only) |
6613 core.bool developerOptionsStatus; | 6691 core.bool developerOptionsStatus; |
6614 /** Mobile Device compromised status (Read-only) */ | 6692 |
| 6693 /// Mobile Device compromised status (Read-only) |
6615 core.String deviceCompromisedStatus; | 6694 core.String deviceCompromisedStatus; |
6616 /** Mobile Device serial number (Read-only) */ | 6695 |
| 6696 /// Mobile Device serial number (Read-only) |
6617 core.String deviceId; | 6697 core.String deviceId; |
6618 /** DevicePasswordStatus (Read-only) */ | 6698 |
| 6699 /// DevicePasswordStatus (Read-only) |
6619 core.String devicePasswordStatus; | 6700 core.String devicePasswordStatus; |
6620 /** List of owner user's email addresses (Read-only) */ | 6701 |
| 6702 /// List of owner user's email addresses (Read-only) |
6621 core.List<core.String> email; | 6703 core.List<core.String> email; |
6622 /** Mobile Device Encryption Status (Read-only) */ | 6704 |
| 6705 /// Mobile Device Encryption Status (Read-only) |
6623 core.String encryptionStatus; | 6706 core.String encryptionStatus; |
6624 /** ETag of the resource. */ | 6707 |
| 6708 /// ETag of the resource. |
6625 core.String etag; | 6709 core.String etag; |
6626 /** | 6710 |
6627 * Date and time the device was first synchronized with the policy settings in | 6711 /// Date and time the device was first synchronized with the policy settings |
6628 * the G Suite administrator control panel (Read-only) | 6712 /// in the G Suite administrator control panel (Read-only) |
6629 */ | |
6630 core.DateTime firstSync; | 6713 core.DateTime firstSync; |
6631 /** Mobile Device Hardware (Read-only) */ | 6714 |
| 6715 /// Mobile Device Hardware (Read-only) |
6632 core.String hardware; | 6716 core.String hardware; |
6633 /** Mobile Device Hardware Id (Read-only) */ | 6717 |
| 6718 /// Mobile Device Hardware Id (Read-only) |
6634 core.String hardwareId; | 6719 core.String hardwareId; |
6635 /** Mobile Device IMEI number (Read-only) */ | 6720 |
| 6721 /// Mobile Device IMEI number (Read-only) |
6636 core.String imei; | 6722 core.String imei; |
6637 /** Mobile Device Kernel version (Read-only) */ | 6723 |
| 6724 /// Mobile Device Kernel version (Read-only) |
6638 core.String kernelVersion; | 6725 core.String kernelVersion; |
6639 /** Kind of resource this is. */ | 6726 |
| 6727 /// Kind of resource this is. |
6640 core.String kind; | 6728 core.String kind; |
6641 /** | 6729 |
6642 * Date and time the device was last synchronized with the policy settings in | 6730 /// Date and time the device was last synchronized with the policy settings |
6643 * the G Suite administrator control panel (Read-only) | 6731 /// in the G Suite administrator control panel (Read-only) |
6644 */ | |
6645 core.DateTime lastSync; | 6732 core.DateTime lastSync; |
6646 /** | 6733 |
6647 * Boolean indicating if this account is on owner/primary profile or not | 6734 /// Boolean indicating if this account is on owner/primary profile or not |
6648 * (Read-only) | 6735 /// (Read-only) |
6649 */ | |
6650 core.bool managedAccountIsOnOwnerProfile; | 6736 core.bool managedAccountIsOnOwnerProfile; |
6651 /** Mobile Device manufacturer (Read-only) */ | 6737 |
| 6738 /// Mobile Device manufacturer (Read-only) |
6652 core.String manufacturer; | 6739 core.String manufacturer; |
6653 /** Mobile Device MEID number (Read-only) */ | 6740 |
| 6741 /// Mobile Device MEID number (Read-only) |
6654 core.String meid; | 6742 core.String meid; |
6655 /** Name of the model of the device */ | 6743 |
| 6744 /// Name of the model of the device |
6656 core.String model; | 6745 core.String model; |
6657 /** List of owner user's names (Read-only) */ | 6746 |
| 6747 /// List of owner user's names (Read-only) |
6658 core.List<core.String> name; | 6748 core.List<core.String> name; |
6659 /** Mobile Device mobile or network operator (if available) (Read-only) */ | 6749 |
| 6750 /// Mobile Device mobile or network operator (if available) (Read-only) |
6660 core.String networkOperator; | 6751 core.String networkOperator; |
6661 /** Name of the mobile operating system */ | 6752 |
| 6753 /// Name of the mobile operating system |
6662 core.String os; | 6754 core.String os; |
6663 /** List of accounts added on device (Read-only) */ | 6755 |
| 6756 /// List of accounts added on device (Read-only) |
6664 core.List<core.String> otherAccountsInfo; | 6757 core.List<core.String> otherAccountsInfo; |
6665 /** DMAgentPermission (Read-only) */ | 6758 |
| 6759 /// DMAgentPermission (Read-only) |
6666 core.String privilege; | 6760 core.String privilege; |
6667 /** Mobile Device release version version (Read-only) */ | 6761 |
| 6762 /// Mobile Device release version version (Read-only) |
6668 core.String releaseVersion; | 6763 core.String releaseVersion; |
6669 /** Unique identifier of Mobile Device (Read-only) */ | 6764 |
| 6765 /// Unique identifier of Mobile Device (Read-only) |
6670 core.String resourceId; | 6766 core.String resourceId; |
6671 /** Mobile Device Security patch level (Read-only) */ | 6767 |
| 6768 /// Mobile Device Security patch level (Read-only) |
6672 core.String securityPatchLevel; | 6769 core.String securityPatchLevel; |
6673 /** Mobile Device SSN or Serial Number (Read-only) */ | 6770 |
| 6771 /// Mobile Device SSN or Serial Number (Read-only) |
6674 core.String serialNumber; | 6772 core.String serialNumber; |
6675 /** Status of the device (Read-only) */ | 6773 |
| 6774 /// Status of the device (Read-only) |
6676 core.String status; | 6775 core.String status; |
6677 /** Work profile supported on device (Read-only) */ | 6776 |
| 6777 /// Work profile supported on device (Read-only) |
6678 core.bool supportsWorkProfile; | 6778 core.bool supportsWorkProfile; |
6679 /** The type of device (Read-only) */ | 6779 |
| 6780 /// The type of device (Read-only) |
6680 core.String type; | 6781 core.String type; |
6681 /** Unknown sources enabled or disabled on device (Read-only) */ | 6782 |
| 6783 /// Unknown sources enabled or disabled on device (Read-only) |
6682 core.bool unknownSourcesStatus; | 6784 core.bool unknownSourcesStatus; |
6683 /** Mobile Device user agent */ | 6785 |
| 6786 /// Mobile Device user agent |
6684 core.String userAgent; | 6787 core.String userAgent; |
6685 /** Mobile Device WiFi MAC address (Read-only) */ | 6788 |
| 6789 /// Mobile Device WiFi MAC address (Read-only) |
6686 core.String wifiMacAddress; | 6790 core.String wifiMacAddress; |
6687 | 6791 |
6688 MobileDevice(); | 6792 MobileDevice(); |
6689 | 6793 |
6690 MobileDevice.fromJson(core.Map _json) { | 6794 MobileDevice.fromJson(core.Map _json) { |
6691 if (_json.containsKey("adbStatus")) { | 6795 if (_json.containsKey("adbStatus")) { |
6692 adbStatus = _json["adbStatus"]; | 6796 adbStatus = _json["adbStatus"]; |
6693 } | 6797 } |
6694 if (_json.containsKey("applications")) { | 6798 if (_json.containsKey("applications")) { |
6695 applications = _json["applications"].map((value) => new MobileDeviceApplic
ations.fromJson(value)).toList(); | 6799 applications = _json["applications"] |
| 6800 .map((value) => new MobileDeviceApplications.fromJson(value)) |
| 6801 .toList(); |
6696 } | 6802 } |
6697 if (_json.containsKey("basebandVersion")) { | 6803 if (_json.containsKey("basebandVersion")) { |
6698 basebandVersion = _json["basebandVersion"]; | 6804 basebandVersion = _json["basebandVersion"]; |
6699 } | 6805 } |
6700 if (_json.containsKey("bootloaderVersion")) { | 6806 if (_json.containsKey("bootloaderVersion")) { |
6701 bootloaderVersion = _json["bootloaderVersion"]; | 6807 bootloaderVersion = _json["bootloaderVersion"]; |
6702 } | 6808 } |
6703 if (_json.containsKey("brand")) { | 6809 if (_json.containsKey("brand")) { |
6704 brand = _json["brand"]; | 6810 brand = _json["brand"]; |
6705 } | 6811 } |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6804 } | 6910 } |
6805 if (_json.containsKey("userAgent")) { | 6911 if (_json.containsKey("userAgent")) { |
6806 userAgent = _json["userAgent"]; | 6912 userAgent = _json["userAgent"]; |
6807 } | 6913 } |
6808 if (_json.containsKey("wifiMacAddress")) { | 6914 if (_json.containsKey("wifiMacAddress")) { |
6809 wifiMacAddress = _json["wifiMacAddress"]; | 6915 wifiMacAddress = _json["wifiMacAddress"]; |
6810 } | 6916 } |
6811 } | 6917 } |
6812 | 6918 |
6813 core.Map<core.String, core.Object> toJson() { | 6919 core.Map<core.String, core.Object> toJson() { |
6814 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 6920 final core.Map<core.String, core.Object> _json = |
| 6921 new core.Map<core.String, core.Object>(); |
6815 if (adbStatus != null) { | 6922 if (adbStatus != null) { |
6816 _json["adbStatus"] = adbStatus; | 6923 _json["adbStatus"] = adbStatus; |
6817 } | 6924 } |
6818 if (applications != null) { | 6925 if (applications != null) { |
6819 _json["applications"] = applications.map((value) => (value).toJson()).toLi
st(); | 6926 _json["applications"] = |
| 6927 applications.map((value) => (value).toJson()).toList(); |
6820 } | 6928 } |
6821 if (basebandVersion != null) { | 6929 if (basebandVersion != null) { |
6822 _json["basebandVersion"] = basebandVersion; | 6930 _json["basebandVersion"] = basebandVersion; |
6823 } | 6931 } |
6824 if (bootloaderVersion != null) { | 6932 if (bootloaderVersion != null) { |
6825 _json["bootloaderVersion"] = bootloaderVersion; | 6933 _json["bootloaderVersion"] = bootloaderVersion; |
6826 } | 6934 } |
6827 if (brand != null) { | 6935 if (brand != null) { |
6828 _json["brand"] = brand; | 6936 _json["brand"] = brand; |
6829 } | 6937 } |
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6929 if (userAgent != null) { | 7037 if (userAgent != null) { |
6930 _json["userAgent"] = userAgent; | 7038 _json["userAgent"] = userAgent; |
6931 } | 7039 } |
6932 if (wifiMacAddress != null) { | 7040 if (wifiMacAddress != null) { |
6933 _json["wifiMacAddress"] = wifiMacAddress; | 7041 _json["wifiMacAddress"] = wifiMacAddress; |
6934 } | 7042 } |
6935 return _json; | 7043 return _json; |
6936 } | 7044 } |
6937 } | 7045 } |
6938 | 7046 |
6939 /** | 7047 /// JSON request template for firing commands on Mobile Device in Directory |
6940 * JSON request template for firing commands on Mobile Device in Directory | 7048 /// Devices API. |
6941 * Devices API. | |
6942 */ | |
6943 class MobileDeviceAction { | 7049 class MobileDeviceAction { |
6944 /** Action to be taken on the Mobile Device */ | 7050 /// Action to be taken on the Mobile Device |
6945 core.String action; | 7051 core.String action; |
6946 | 7052 |
6947 MobileDeviceAction(); | 7053 MobileDeviceAction(); |
6948 | 7054 |
6949 MobileDeviceAction.fromJson(core.Map _json) { | 7055 MobileDeviceAction.fromJson(core.Map _json) { |
6950 if (_json.containsKey("action")) { | 7056 if (_json.containsKey("action")) { |
6951 action = _json["action"]; | 7057 action = _json["action"]; |
6952 } | 7058 } |
6953 } | 7059 } |
6954 | 7060 |
6955 core.Map<core.String, core.Object> toJson() { | 7061 core.Map<core.String, core.Object> toJson() { |
6956 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 7062 final core.Map<core.String, core.Object> _json = |
| 7063 new core.Map<core.String, core.Object>(); |
6957 if (action != null) { | 7064 if (action != null) { |
6958 _json["action"] = action; | 7065 _json["action"] = action; |
6959 } | 7066 } |
6960 return _json; | 7067 return _json; |
6961 } | 7068 } |
6962 } | 7069 } |
6963 | 7070 |
6964 /** | 7071 /// JSON response template for List Mobile Devices operation in Directory API. |
6965 * JSON response template for List Mobile Devices operation in Directory API. | |
6966 */ | |
6967 class MobileDevices { | 7072 class MobileDevices { |
6968 /** ETag of the resource. */ | 7073 /// ETag of the resource. |
6969 core.String etag; | 7074 core.String etag; |
6970 /** Kind of resource this is. */ | 7075 |
| 7076 /// Kind of resource this is. |
6971 core.String kind; | 7077 core.String kind; |
6972 /** List of Mobile Device objects. */ | 7078 |
| 7079 /// List of Mobile Device objects. |
6973 core.List<MobileDevice> mobiledevices; | 7080 core.List<MobileDevice> mobiledevices; |
6974 /** Token used to access next page of this result. */ | 7081 |
| 7082 /// Token used to access next page of this result. |
6975 core.String nextPageToken; | 7083 core.String nextPageToken; |
6976 | 7084 |
6977 MobileDevices(); | 7085 MobileDevices(); |
6978 | 7086 |
6979 MobileDevices.fromJson(core.Map _json) { | 7087 MobileDevices.fromJson(core.Map _json) { |
6980 if (_json.containsKey("etag")) { | 7088 if (_json.containsKey("etag")) { |
6981 etag = _json["etag"]; | 7089 etag = _json["etag"]; |
6982 } | 7090 } |
6983 if (_json.containsKey("kind")) { | 7091 if (_json.containsKey("kind")) { |
6984 kind = _json["kind"]; | 7092 kind = _json["kind"]; |
6985 } | 7093 } |
6986 if (_json.containsKey("mobiledevices")) { | 7094 if (_json.containsKey("mobiledevices")) { |
6987 mobiledevices = _json["mobiledevices"].map((value) => new MobileDevice.fro
mJson(value)).toList(); | 7095 mobiledevices = _json["mobiledevices"] |
| 7096 .map((value) => new MobileDevice.fromJson(value)) |
| 7097 .toList(); |
6988 } | 7098 } |
6989 if (_json.containsKey("nextPageToken")) { | 7099 if (_json.containsKey("nextPageToken")) { |
6990 nextPageToken = _json["nextPageToken"]; | 7100 nextPageToken = _json["nextPageToken"]; |
6991 } | 7101 } |
6992 } | 7102 } |
6993 | 7103 |
6994 core.Map<core.String, core.Object> toJson() { | 7104 core.Map<core.String, core.Object> toJson() { |
6995 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 7105 final core.Map<core.String, core.Object> _json = |
| 7106 new core.Map<core.String, core.Object>(); |
6996 if (etag != null) { | 7107 if (etag != null) { |
6997 _json["etag"] = etag; | 7108 _json["etag"] = etag; |
6998 } | 7109 } |
6999 if (kind != null) { | 7110 if (kind != null) { |
7000 _json["kind"] = kind; | 7111 _json["kind"] = kind; |
7001 } | 7112 } |
7002 if (mobiledevices != null) { | 7113 if (mobiledevices != null) { |
7003 _json["mobiledevices"] = mobiledevices.map((value) => (value).toJson()).to
List(); | 7114 _json["mobiledevices"] = |
| 7115 mobiledevices.map((value) => (value).toJson()).toList(); |
7004 } | 7116 } |
7005 if (nextPageToken != null) { | 7117 if (nextPageToken != null) { |
7006 _json["nextPageToken"] = nextPageToken; | 7118 _json["nextPageToken"] = nextPageToken; |
7007 } | 7119 } |
7008 return _json; | 7120 return _json; |
7009 } | 7121 } |
7010 } | 7122 } |
7011 | 7123 |
7012 /** Template for a notification resource. */ | 7124 /// Template for a notification resource. |
7013 class Notification { | 7125 class Notification { |
7014 /** Body of the notification (Read-only) */ | 7126 /// Body of the notification (Read-only) |
7015 core.String body; | 7127 core.String body; |
7016 /** ETag of the resource. */ | 7128 |
| 7129 /// ETag of the resource. |
7017 core.String etag; | 7130 core.String etag; |
7018 /** Address from which the notification is received (Read-only) */ | 7131 |
| 7132 /// Address from which the notification is received (Read-only) |
7019 core.String fromAddress; | 7133 core.String fromAddress; |
7020 /** Boolean indicating whether the notification is unread or not. */ | 7134 |
| 7135 /// Boolean indicating whether the notification is unread or not. |
7021 core.bool isUnread; | 7136 core.bool isUnread; |
7022 /** The type of the resource. */ | 7137 |
| 7138 /// The type of the resource. |
7023 core.String kind; | 7139 core.String kind; |
7024 core.String notificationId; | 7140 core.String notificationId; |
7025 /** Time at which notification was sent (Read-only) */ | 7141 |
| 7142 /// Time at which notification was sent (Read-only) |
7026 core.DateTime sendTime; | 7143 core.DateTime sendTime; |
7027 /** Subject of the notification (Read-only) */ | 7144 |
| 7145 /// Subject of the notification (Read-only) |
7028 core.String subject; | 7146 core.String subject; |
7029 | 7147 |
7030 Notification(); | 7148 Notification(); |
7031 | 7149 |
7032 Notification.fromJson(core.Map _json) { | 7150 Notification.fromJson(core.Map _json) { |
7033 if (_json.containsKey("body")) { | 7151 if (_json.containsKey("body")) { |
7034 body = _json["body"]; | 7152 body = _json["body"]; |
7035 } | 7153 } |
7036 if (_json.containsKey("etag")) { | 7154 if (_json.containsKey("etag")) { |
7037 etag = _json["etag"]; | 7155 etag = _json["etag"]; |
(...skipping 12 matching lines...) Expand all Loading... |
7050 } | 7168 } |
7051 if (_json.containsKey("sendTime")) { | 7169 if (_json.containsKey("sendTime")) { |
7052 sendTime = core.DateTime.parse(_json["sendTime"]); | 7170 sendTime = core.DateTime.parse(_json["sendTime"]); |
7053 } | 7171 } |
7054 if (_json.containsKey("subject")) { | 7172 if (_json.containsKey("subject")) { |
7055 subject = _json["subject"]; | 7173 subject = _json["subject"]; |
7056 } | 7174 } |
7057 } | 7175 } |
7058 | 7176 |
7059 core.Map<core.String, core.Object> toJson() { | 7177 core.Map<core.String, core.Object> toJson() { |
7060 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 7178 final core.Map<core.String, core.Object> _json = |
| 7179 new core.Map<core.String, core.Object>(); |
7061 if (body != null) { | 7180 if (body != null) { |
7062 _json["body"] = body; | 7181 _json["body"] = body; |
7063 } | 7182 } |
7064 if (etag != null) { | 7183 if (etag != null) { |
7065 _json["etag"] = etag; | 7184 _json["etag"] = etag; |
7066 } | 7185 } |
7067 if (fromAddress != null) { | 7186 if (fromAddress != null) { |
7068 _json["fromAddress"] = fromAddress; | 7187 _json["fromAddress"] = fromAddress; |
7069 } | 7188 } |
7070 if (isUnread != null) { | 7189 if (isUnread != null) { |
7071 _json["isUnread"] = isUnread; | 7190 _json["isUnread"] = isUnread; |
7072 } | 7191 } |
7073 if (kind != null) { | 7192 if (kind != null) { |
7074 _json["kind"] = kind; | 7193 _json["kind"] = kind; |
7075 } | 7194 } |
7076 if (notificationId != null) { | 7195 if (notificationId != null) { |
7077 _json["notificationId"] = notificationId; | 7196 _json["notificationId"] = notificationId; |
7078 } | 7197 } |
7079 if (sendTime != null) { | 7198 if (sendTime != null) { |
7080 _json["sendTime"] = (sendTime).toIso8601String(); | 7199 _json["sendTime"] = (sendTime).toIso8601String(); |
7081 } | 7200 } |
7082 if (subject != null) { | 7201 if (subject != null) { |
7083 _json["subject"] = subject; | 7202 _json["subject"] = subject; |
7084 } | 7203 } |
7085 return _json; | 7204 return _json; |
7086 } | 7205 } |
7087 } | 7206 } |
7088 | 7207 |
7089 /** Template for notifications list response. */ | 7208 /// Template for notifications list response. |
7090 class Notifications { | 7209 class Notifications { |
7091 /** ETag of the resource. */ | 7210 /// ETag of the resource. |
7092 core.String etag; | 7211 core.String etag; |
7093 /** List of notifications in this page. */ | 7212 |
| 7213 /// List of notifications in this page. |
7094 core.List<Notification> items; | 7214 core.List<Notification> items; |
7095 /** The type of the resource. */ | 7215 |
| 7216 /// The type of the resource. |
7096 core.String kind; | 7217 core.String kind; |
7097 /** Token for fetching the next page of notifications. */ | 7218 |
| 7219 /// Token for fetching the next page of notifications. |
7098 core.String nextPageToken; | 7220 core.String nextPageToken; |
7099 /** Number of unread notification for the domain. */ | 7221 |
| 7222 /// Number of unread notification for the domain. |
7100 core.int unreadNotificationsCount; | 7223 core.int unreadNotificationsCount; |
7101 | 7224 |
7102 Notifications(); | 7225 Notifications(); |
7103 | 7226 |
7104 Notifications.fromJson(core.Map _json) { | 7227 Notifications.fromJson(core.Map _json) { |
7105 if (_json.containsKey("etag")) { | 7228 if (_json.containsKey("etag")) { |
7106 etag = _json["etag"]; | 7229 etag = _json["etag"]; |
7107 } | 7230 } |
7108 if (_json.containsKey("items")) { | 7231 if (_json.containsKey("items")) { |
7109 items = _json["items"].map((value) => new Notification.fromJson(value)).to
List(); | 7232 items = _json["items"] |
| 7233 .map((value) => new Notification.fromJson(value)) |
| 7234 .toList(); |
7110 } | 7235 } |
7111 if (_json.containsKey("kind")) { | 7236 if (_json.containsKey("kind")) { |
7112 kind = _json["kind"]; | 7237 kind = _json["kind"]; |
7113 } | 7238 } |
7114 if (_json.containsKey("nextPageToken")) { | 7239 if (_json.containsKey("nextPageToken")) { |
7115 nextPageToken = _json["nextPageToken"]; | 7240 nextPageToken = _json["nextPageToken"]; |
7116 } | 7241 } |
7117 if (_json.containsKey("unreadNotificationsCount")) { | 7242 if (_json.containsKey("unreadNotificationsCount")) { |
7118 unreadNotificationsCount = _json["unreadNotificationsCount"]; | 7243 unreadNotificationsCount = _json["unreadNotificationsCount"]; |
7119 } | 7244 } |
7120 } | 7245 } |
7121 | 7246 |
7122 core.Map<core.String, core.Object> toJson() { | 7247 core.Map<core.String, core.Object> toJson() { |
7123 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 7248 final core.Map<core.String, core.Object> _json = |
| 7249 new core.Map<core.String, core.Object>(); |
7124 if (etag != null) { | 7250 if (etag != null) { |
7125 _json["etag"] = etag; | 7251 _json["etag"] = etag; |
7126 } | 7252 } |
7127 if (items != null) { | 7253 if (items != null) { |
7128 _json["items"] = items.map((value) => (value).toJson()).toList(); | 7254 _json["items"] = items.map((value) => (value).toJson()).toList(); |
7129 } | 7255 } |
7130 if (kind != null) { | 7256 if (kind != null) { |
7131 _json["kind"] = kind; | 7257 _json["kind"] = kind; |
7132 } | 7258 } |
7133 if (nextPageToken != null) { | 7259 if (nextPageToken != null) { |
7134 _json["nextPageToken"] = nextPageToken; | 7260 _json["nextPageToken"] = nextPageToken; |
7135 } | 7261 } |
7136 if (unreadNotificationsCount != null) { | 7262 if (unreadNotificationsCount != null) { |
7137 _json["unreadNotificationsCount"] = unreadNotificationsCount; | 7263 _json["unreadNotificationsCount"] = unreadNotificationsCount; |
7138 } | 7264 } |
7139 return _json; | 7265 return _json; |
7140 } | 7266 } |
7141 } | 7267 } |
7142 | 7268 |
7143 /** JSON template for Org Unit resource in Directory API. */ | 7269 /// JSON template for Org Unit resource in Directory API. |
7144 class OrgUnit { | 7270 class OrgUnit { |
7145 /** Should block inheritance */ | 7271 /// Should block inheritance |
7146 core.bool blockInheritance; | 7272 core.bool blockInheritance; |
7147 /** Description of OrgUnit */ | 7273 |
| 7274 /// Description of OrgUnit |
7148 core.String description; | 7275 core.String description; |
7149 /** ETag of the resource. */ | 7276 |
| 7277 /// ETag of the resource. |
7150 core.String etag; | 7278 core.String etag; |
7151 /** Kind of resource this is. */ | 7279 |
| 7280 /// Kind of resource this is. |
7152 core.String kind; | 7281 core.String kind; |
7153 /** Name of OrgUnit */ | 7282 |
| 7283 /// Name of OrgUnit |
7154 core.String name; | 7284 core.String name; |
7155 /** Id of OrgUnit */ | 7285 |
| 7286 /// Id of OrgUnit |
7156 core.String orgUnitId; | 7287 core.String orgUnitId; |
7157 /** Path of OrgUnit */ | 7288 |
| 7289 /// Path of OrgUnit |
7158 core.String orgUnitPath; | 7290 core.String orgUnitPath; |
7159 /** Id of parent OrgUnit */ | 7291 |
| 7292 /// Id of parent OrgUnit |
7160 core.String parentOrgUnitId; | 7293 core.String parentOrgUnitId; |
7161 /** Path of parent OrgUnit */ | 7294 |
| 7295 /// Path of parent OrgUnit |
7162 core.String parentOrgUnitPath; | 7296 core.String parentOrgUnitPath; |
7163 | 7297 |
7164 OrgUnit(); | 7298 OrgUnit(); |
7165 | 7299 |
7166 OrgUnit.fromJson(core.Map _json) { | 7300 OrgUnit.fromJson(core.Map _json) { |
7167 if (_json.containsKey("blockInheritance")) { | 7301 if (_json.containsKey("blockInheritance")) { |
7168 blockInheritance = _json["blockInheritance"]; | 7302 blockInheritance = _json["blockInheritance"]; |
7169 } | 7303 } |
7170 if (_json.containsKey("description")) { | 7304 if (_json.containsKey("description")) { |
7171 description = _json["description"]; | 7305 description = _json["description"]; |
(...skipping 15 matching lines...) Expand all Loading... |
7187 } | 7321 } |
7188 if (_json.containsKey("parentOrgUnitId")) { | 7322 if (_json.containsKey("parentOrgUnitId")) { |
7189 parentOrgUnitId = _json["parentOrgUnitId"]; | 7323 parentOrgUnitId = _json["parentOrgUnitId"]; |
7190 } | 7324 } |
7191 if (_json.containsKey("parentOrgUnitPath")) { | 7325 if (_json.containsKey("parentOrgUnitPath")) { |
7192 parentOrgUnitPath = _json["parentOrgUnitPath"]; | 7326 parentOrgUnitPath = _json["parentOrgUnitPath"]; |
7193 } | 7327 } |
7194 } | 7328 } |
7195 | 7329 |
7196 core.Map<core.String, core.Object> toJson() { | 7330 core.Map<core.String, core.Object> toJson() { |
7197 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 7331 final core.Map<core.String, core.Object> _json = |
| 7332 new core.Map<core.String, core.Object>(); |
7198 if (blockInheritance != null) { | 7333 if (blockInheritance != null) { |
7199 _json["blockInheritance"] = blockInheritance; | 7334 _json["blockInheritance"] = blockInheritance; |
7200 } | 7335 } |
7201 if (description != null) { | 7336 if (description != null) { |
7202 _json["description"] = description; | 7337 _json["description"] = description; |
7203 } | 7338 } |
7204 if (etag != null) { | 7339 if (etag != null) { |
7205 _json["etag"] = etag; | 7340 _json["etag"] = etag; |
7206 } | 7341 } |
7207 if (kind != null) { | 7342 if (kind != null) { |
(...skipping 11 matching lines...) Expand all Loading... |
7219 if (parentOrgUnitId != null) { | 7354 if (parentOrgUnitId != null) { |
7220 _json["parentOrgUnitId"] = parentOrgUnitId; | 7355 _json["parentOrgUnitId"] = parentOrgUnitId; |
7221 } | 7356 } |
7222 if (parentOrgUnitPath != null) { | 7357 if (parentOrgUnitPath != null) { |
7223 _json["parentOrgUnitPath"] = parentOrgUnitPath; | 7358 _json["parentOrgUnitPath"] = parentOrgUnitPath; |
7224 } | 7359 } |
7225 return _json; | 7360 return _json; |
7226 } | 7361 } |
7227 } | 7362 } |
7228 | 7363 |
7229 /** | 7364 /// JSON response template for List Organization Units operation in Directory |
7230 * JSON response template for List Organization Units operation in Directory | 7365 /// API. |
7231 * API. | |
7232 */ | |
7233 class OrgUnits { | 7366 class OrgUnits { |
7234 /** ETag of the resource. */ | 7367 /// ETag of the resource. |
7235 core.String etag; | 7368 core.String etag; |
7236 /** Kind of resource this is. */ | 7369 |
| 7370 /// Kind of resource this is. |
7237 core.String kind; | 7371 core.String kind; |
7238 /** List of user objects. */ | 7372 |
| 7373 /// List of user objects. |
7239 core.List<OrgUnit> organizationUnits; | 7374 core.List<OrgUnit> organizationUnits; |
7240 | 7375 |
7241 OrgUnits(); | 7376 OrgUnits(); |
7242 | 7377 |
7243 OrgUnits.fromJson(core.Map _json) { | 7378 OrgUnits.fromJson(core.Map _json) { |
7244 if (_json.containsKey("etag")) { | 7379 if (_json.containsKey("etag")) { |
7245 etag = _json["etag"]; | 7380 etag = _json["etag"]; |
7246 } | 7381 } |
7247 if (_json.containsKey("kind")) { | 7382 if (_json.containsKey("kind")) { |
7248 kind = _json["kind"]; | 7383 kind = _json["kind"]; |
7249 } | 7384 } |
7250 if (_json.containsKey("organizationUnits")) { | 7385 if (_json.containsKey("organizationUnits")) { |
7251 organizationUnits = _json["organizationUnits"].map((value) => new OrgUnit.
fromJson(value)).toList(); | 7386 organizationUnits = _json["organizationUnits"] |
| 7387 .map((value) => new OrgUnit.fromJson(value)) |
| 7388 .toList(); |
7252 } | 7389 } |
7253 } | 7390 } |
7254 | 7391 |
7255 core.Map<core.String, core.Object> toJson() { | 7392 core.Map<core.String, core.Object> toJson() { |
7256 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 7393 final core.Map<core.String, core.Object> _json = |
| 7394 new core.Map<core.String, core.Object>(); |
7257 if (etag != null) { | 7395 if (etag != null) { |
7258 _json["etag"] = etag; | 7396 _json["etag"] = etag; |
7259 } | 7397 } |
7260 if (kind != null) { | 7398 if (kind != null) { |
7261 _json["kind"] = kind; | 7399 _json["kind"] = kind; |
7262 } | 7400 } |
7263 if (organizationUnits != null) { | 7401 if (organizationUnits != null) { |
7264 _json["organizationUnits"] = organizationUnits.map((value) => (value).toJs
on()).toList(); | 7402 _json["organizationUnits"] = |
| 7403 organizationUnits.map((value) => (value).toJson()).toList(); |
7265 } | 7404 } |
7266 return _json; | 7405 return _json; |
7267 } | 7406 } |
7268 } | 7407 } |
7269 | 7408 |
7270 /** JSON template for privilege resource in Directory API. */ | 7409 /// JSON template for privilege resource in Directory API. |
7271 class Privilege { | 7410 class Privilege { |
7272 /** | 7411 /// A list of child privileges. Privileges for a service form a tree. Each |
7273 * A list of child privileges. Privileges for a service form a tree. Each | 7412 /// privilege can have a list of child privileges; this list is empty for a |
7274 * privilege can have a list of child privileges; this list is empty for a | 7413 /// leaf privilege. |
7275 * leaf privilege. | |
7276 */ | |
7277 core.List<Privilege> childPrivileges; | 7414 core.List<Privilege> childPrivileges; |
7278 /** ETag of the resource. */ | 7415 |
| 7416 /// ETag of the resource. |
7279 core.String etag; | 7417 core.String etag; |
7280 /** If the privilege can be restricted to an organization unit. */ | 7418 |
| 7419 /// If the privilege can be restricted to an organization unit. |
7281 core.bool isOuScopable; | 7420 core.bool isOuScopable; |
7282 /** | 7421 |
7283 * The type of the API resource. This is always admin#directory#privilege. | 7422 /// The type of the API resource. This is always admin#directory#privilege. |
7284 */ | |
7285 core.String kind; | 7423 core.String kind; |
7286 /** The name of the privilege. */ | 7424 |
| 7425 /// The name of the privilege. |
7287 core.String privilegeName; | 7426 core.String privilegeName; |
7288 /** The obfuscated ID of the service this privilege is for. */ | 7427 |
| 7428 /// The obfuscated ID of the service this privilege is for. |
7289 core.String serviceId; | 7429 core.String serviceId; |
7290 /** The name of the service this privilege is for. */ | 7430 |
| 7431 /// The name of the service this privilege is for. |
7291 core.String serviceName; | 7432 core.String serviceName; |
7292 | 7433 |
7293 Privilege(); | 7434 Privilege(); |
7294 | 7435 |
7295 Privilege.fromJson(core.Map _json) { | 7436 Privilege.fromJson(core.Map _json) { |
7296 if (_json.containsKey("childPrivileges")) { | 7437 if (_json.containsKey("childPrivileges")) { |
7297 childPrivileges = _json["childPrivileges"].map((value) => new Privilege.fr
omJson(value)).toList(); | 7438 childPrivileges = _json["childPrivileges"] |
| 7439 .map((value) => new Privilege.fromJson(value)) |
| 7440 .toList(); |
7298 } | 7441 } |
7299 if (_json.containsKey("etag")) { | 7442 if (_json.containsKey("etag")) { |
7300 etag = _json["etag"]; | 7443 etag = _json["etag"]; |
7301 } | 7444 } |
7302 if (_json.containsKey("isOuScopable")) { | 7445 if (_json.containsKey("isOuScopable")) { |
7303 isOuScopable = _json["isOuScopable"]; | 7446 isOuScopable = _json["isOuScopable"]; |
7304 } | 7447 } |
7305 if (_json.containsKey("kind")) { | 7448 if (_json.containsKey("kind")) { |
7306 kind = _json["kind"]; | 7449 kind = _json["kind"]; |
7307 } | 7450 } |
7308 if (_json.containsKey("privilegeName")) { | 7451 if (_json.containsKey("privilegeName")) { |
7309 privilegeName = _json["privilegeName"]; | 7452 privilegeName = _json["privilegeName"]; |
7310 } | 7453 } |
7311 if (_json.containsKey("serviceId")) { | 7454 if (_json.containsKey("serviceId")) { |
7312 serviceId = _json["serviceId"]; | 7455 serviceId = _json["serviceId"]; |
7313 } | 7456 } |
7314 if (_json.containsKey("serviceName")) { | 7457 if (_json.containsKey("serviceName")) { |
7315 serviceName = _json["serviceName"]; | 7458 serviceName = _json["serviceName"]; |
7316 } | 7459 } |
7317 } | 7460 } |
7318 | 7461 |
7319 core.Map<core.String, core.Object> toJson() { | 7462 core.Map<core.String, core.Object> toJson() { |
7320 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 7463 final core.Map<core.String, core.Object> _json = |
| 7464 new core.Map<core.String, core.Object>(); |
7321 if (childPrivileges != null) { | 7465 if (childPrivileges != null) { |
7322 _json["childPrivileges"] = childPrivileges.map((value) => (value).toJson()
).toList(); | 7466 _json["childPrivileges"] = |
| 7467 childPrivileges.map((value) => (value).toJson()).toList(); |
7323 } | 7468 } |
7324 if (etag != null) { | 7469 if (etag != null) { |
7325 _json["etag"] = etag; | 7470 _json["etag"] = etag; |
7326 } | 7471 } |
7327 if (isOuScopable != null) { | 7472 if (isOuScopable != null) { |
7328 _json["isOuScopable"] = isOuScopable; | 7473 _json["isOuScopable"] = isOuScopable; |
7329 } | 7474 } |
7330 if (kind != null) { | 7475 if (kind != null) { |
7331 _json["kind"] = kind; | 7476 _json["kind"] = kind; |
7332 } | 7477 } |
7333 if (privilegeName != null) { | 7478 if (privilegeName != null) { |
7334 _json["privilegeName"] = privilegeName; | 7479 _json["privilegeName"] = privilegeName; |
7335 } | 7480 } |
7336 if (serviceId != null) { | 7481 if (serviceId != null) { |
7337 _json["serviceId"] = serviceId; | 7482 _json["serviceId"] = serviceId; |
7338 } | 7483 } |
7339 if (serviceName != null) { | 7484 if (serviceName != null) { |
7340 _json["serviceName"] = serviceName; | 7485 _json["serviceName"] = serviceName; |
7341 } | 7486 } |
7342 return _json; | 7487 return _json; |
7343 } | 7488 } |
7344 } | 7489 } |
7345 | 7490 |
7346 /** JSON response template for List privileges operation in Directory API. */ | 7491 /// JSON response template for List privileges operation in Directory API. |
7347 class Privileges { | 7492 class Privileges { |
7348 /** ETag of the resource. */ | 7493 /// ETag of the resource. |
7349 core.String etag; | 7494 core.String etag; |
7350 /** A list of Privilege resources. */ | 7495 |
| 7496 /// A list of Privilege resources. |
7351 core.List<Privilege> items; | 7497 core.List<Privilege> items; |
7352 /** | 7498 |
7353 * The type of the API resource. This is always admin#directory#privileges. | 7499 /// The type of the API resource. This is always admin#directory#privileges. |
7354 */ | |
7355 core.String kind; | 7500 core.String kind; |
7356 | 7501 |
7357 Privileges(); | 7502 Privileges(); |
7358 | 7503 |
7359 Privileges.fromJson(core.Map _json) { | 7504 Privileges.fromJson(core.Map _json) { |
7360 if (_json.containsKey("etag")) { | 7505 if (_json.containsKey("etag")) { |
7361 etag = _json["etag"]; | 7506 etag = _json["etag"]; |
7362 } | 7507 } |
7363 if (_json.containsKey("items")) { | 7508 if (_json.containsKey("items")) { |
7364 items = _json["items"].map((value) => new Privilege.fromJson(value)).toLis
t(); | 7509 items = |
| 7510 _json["items"].map((value) => new Privilege.fromJson(value)).toList(); |
7365 } | 7511 } |
7366 if (_json.containsKey("kind")) { | 7512 if (_json.containsKey("kind")) { |
7367 kind = _json["kind"]; | 7513 kind = _json["kind"]; |
7368 } | 7514 } |
7369 } | 7515 } |
7370 | 7516 |
7371 core.Map<core.String, core.Object> toJson() { | 7517 core.Map<core.String, core.Object> toJson() { |
7372 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 7518 final core.Map<core.String, core.Object> _json = |
| 7519 new core.Map<core.String, core.Object>(); |
7373 if (etag != null) { | 7520 if (etag != null) { |
7374 _json["etag"] = etag; | 7521 _json["etag"] = etag; |
7375 } | 7522 } |
7376 if (items != null) { | 7523 if (items != null) { |
7377 _json["items"] = items.map((value) => (value).toJson()).toList(); | 7524 _json["items"] = items.map((value) => (value).toJson()).toList(); |
7378 } | 7525 } |
7379 if (kind != null) { | 7526 if (kind != null) { |
7380 _json["kind"] = kind; | 7527 _json["kind"] = kind; |
7381 } | 7528 } |
7382 return _json; | 7529 return _json; |
7383 } | 7530 } |
7384 } | 7531 } |
7385 | 7532 |
7386 class RoleRolePrivileges { | 7533 class RoleRolePrivileges { |
7387 /** The name of the privilege. */ | 7534 /// The name of the privilege. |
7388 core.String privilegeName; | 7535 core.String privilegeName; |
7389 /** The obfuscated ID of the service this privilege is for. */ | 7536 |
| 7537 /// The obfuscated ID of the service this privilege is for. |
7390 core.String serviceId; | 7538 core.String serviceId; |
7391 | 7539 |
7392 RoleRolePrivileges(); | 7540 RoleRolePrivileges(); |
7393 | 7541 |
7394 RoleRolePrivileges.fromJson(core.Map _json) { | 7542 RoleRolePrivileges.fromJson(core.Map _json) { |
7395 if (_json.containsKey("privilegeName")) { | 7543 if (_json.containsKey("privilegeName")) { |
7396 privilegeName = _json["privilegeName"]; | 7544 privilegeName = _json["privilegeName"]; |
7397 } | 7545 } |
7398 if (_json.containsKey("serviceId")) { | 7546 if (_json.containsKey("serviceId")) { |
7399 serviceId = _json["serviceId"]; | 7547 serviceId = _json["serviceId"]; |
7400 } | 7548 } |
7401 } | 7549 } |
7402 | 7550 |
7403 core.Map<core.String, core.Object> toJson() { | 7551 core.Map<core.String, core.Object> toJson() { |
7404 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 7552 final core.Map<core.String, core.Object> _json = |
| 7553 new core.Map<core.String, core.Object>(); |
7405 if (privilegeName != null) { | 7554 if (privilegeName != null) { |
7406 _json["privilegeName"] = privilegeName; | 7555 _json["privilegeName"] = privilegeName; |
7407 } | 7556 } |
7408 if (serviceId != null) { | 7557 if (serviceId != null) { |
7409 _json["serviceId"] = serviceId; | 7558 _json["serviceId"] = serviceId; |
7410 } | 7559 } |
7411 return _json; | 7560 return _json; |
7412 } | 7561 } |
7413 } | 7562 } |
7414 | 7563 |
7415 /** JSON template for role resource in Directory API. */ | 7564 /// JSON template for role resource in Directory API. |
7416 class Role { | 7565 class Role { |
7417 /** ETag of the resource. */ | 7566 /// ETag of the resource. |
7418 core.String etag; | 7567 core.String etag; |
7419 /** Returns true if the role is a super admin role. */ | 7568 |
| 7569 /// Returns true if the role is a super admin role. |
7420 core.bool isSuperAdminRole; | 7570 core.bool isSuperAdminRole; |
7421 /** Returns true if this is a pre-defined system role. */ | 7571 |
| 7572 /// Returns true if this is a pre-defined system role. |
7422 core.bool isSystemRole; | 7573 core.bool isSystemRole; |
7423 /** The type of the API resource. This is always admin#directory#role. */ | 7574 |
| 7575 /// The type of the API resource. This is always admin#directory#role. |
7424 core.String kind; | 7576 core.String kind; |
7425 /** A short description of the role. */ | 7577 |
| 7578 /// A short description of the role. |
7426 core.String roleDescription; | 7579 core.String roleDescription; |
7427 /** ID of the role. */ | 7580 |
| 7581 /// ID of the role. |
7428 core.String roleId; | 7582 core.String roleId; |
7429 /** Name of the role. */ | 7583 |
| 7584 /// Name of the role. |
7430 core.String roleName; | 7585 core.String roleName; |
7431 /** The set of privileges that are granted to this role. */ | 7586 |
| 7587 /// The set of privileges that are granted to this role. |
7432 core.List<RoleRolePrivileges> rolePrivileges; | 7588 core.List<RoleRolePrivileges> rolePrivileges; |
7433 | 7589 |
7434 Role(); | 7590 Role(); |
7435 | 7591 |
7436 Role.fromJson(core.Map _json) { | 7592 Role.fromJson(core.Map _json) { |
7437 if (_json.containsKey("etag")) { | 7593 if (_json.containsKey("etag")) { |
7438 etag = _json["etag"]; | 7594 etag = _json["etag"]; |
7439 } | 7595 } |
7440 if (_json.containsKey("isSuperAdminRole")) { | 7596 if (_json.containsKey("isSuperAdminRole")) { |
7441 isSuperAdminRole = _json["isSuperAdminRole"]; | 7597 isSuperAdminRole = _json["isSuperAdminRole"]; |
7442 } | 7598 } |
7443 if (_json.containsKey("isSystemRole")) { | 7599 if (_json.containsKey("isSystemRole")) { |
7444 isSystemRole = _json["isSystemRole"]; | 7600 isSystemRole = _json["isSystemRole"]; |
7445 } | 7601 } |
7446 if (_json.containsKey("kind")) { | 7602 if (_json.containsKey("kind")) { |
7447 kind = _json["kind"]; | 7603 kind = _json["kind"]; |
7448 } | 7604 } |
7449 if (_json.containsKey("roleDescription")) { | 7605 if (_json.containsKey("roleDescription")) { |
7450 roleDescription = _json["roleDescription"]; | 7606 roleDescription = _json["roleDescription"]; |
7451 } | 7607 } |
7452 if (_json.containsKey("roleId")) { | 7608 if (_json.containsKey("roleId")) { |
7453 roleId = _json["roleId"]; | 7609 roleId = _json["roleId"]; |
7454 } | 7610 } |
7455 if (_json.containsKey("roleName")) { | 7611 if (_json.containsKey("roleName")) { |
7456 roleName = _json["roleName"]; | 7612 roleName = _json["roleName"]; |
7457 } | 7613 } |
7458 if (_json.containsKey("rolePrivileges")) { | 7614 if (_json.containsKey("rolePrivileges")) { |
7459 rolePrivileges = _json["rolePrivileges"].map((value) => new RoleRolePrivil
eges.fromJson(value)).toList(); | 7615 rolePrivileges = _json["rolePrivileges"] |
| 7616 .map((value) => new RoleRolePrivileges.fromJson(value)) |
| 7617 .toList(); |
7460 } | 7618 } |
7461 } | 7619 } |
7462 | 7620 |
7463 core.Map<core.String, core.Object> toJson() { | 7621 core.Map<core.String, core.Object> toJson() { |
7464 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 7622 final core.Map<core.String, core.Object> _json = |
| 7623 new core.Map<core.String, core.Object>(); |
7465 if (etag != null) { | 7624 if (etag != null) { |
7466 _json["etag"] = etag; | 7625 _json["etag"] = etag; |
7467 } | 7626 } |
7468 if (isSuperAdminRole != null) { | 7627 if (isSuperAdminRole != null) { |
7469 _json["isSuperAdminRole"] = isSuperAdminRole; | 7628 _json["isSuperAdminRole"] = isSuperAdminRole; |
7470 } | 7629 } |
7471 if (isSystemRole != null) { | 7630 if (isSystemRole != null) { |
7472 _json["isSystemRole"] = isSystemRole; | 7631 _json["isSystemRole"] = isSystemRole; |
7473 } | 7632 } |
7474 if (kind != null) { | 7633 if (kind != null) { |
7475 _json["kind"] = kind; | 7634 _json["kind"] = kind; |
7476 } | 7635 } |
7477 if (roleDescription != null) { | 7636 if (roleDescription != null) { |
7478 _json["roleDescription"] = roleDescription; | 7637 _json["roleDescription"] = roleDescription; |
7479 } | 7638 } |
7480 if (roleId != null) { | 7639 if (roleId != null) { |
7481 _json["roleId"] = roleId; | 7640 _json["roleId"] = roleId; |
7482 } | 7641 } |
7483 if (roleName != null) { | 7642 if (roleName != null) { |
7484 _json["roleName"] = roleName; | 7643 _json["roleName"] = roleName; |
7485 } | 7644 } |
7486 if (rolePrivileges != null) { | 7645 if (rolePrivileges != null) { |
7487 _json["rolePrivileges"] = rolePrivileges.map((value) => (value).toJson()).
toList(); | 7646 _json["rolePrivileges"] = |
| 7647 rolePrivileges.map((value) => (value).toJson()).toList(); |
7488 } | 7648 } |
7489 return _json; | 7649 return _json; |
7490 } | 7650 } |
7491 } | 7651 } |
7492 | 7652 |
7493 /** JSON template for roleAssignment resource in Directory API. */ | 7653 /// JSON template for roleAssignment resource in Directory API. |
7494 class RoleAssignment { | 7654 class RoleAssignment { |
7495 /** The unique ID of the user this role is assigned to. */ | 7655 /// The unique ID of the user this role is assigned to. |
7496 core.String assignedTo; | 7656 core.String assignedTo; |
7497 /** ETag of the resource. */ | 7657 |
| 7658 /// ETag of the resource. |
7498 core.String etag; | 7659 core.String etag; |
7499 /** | 7660 |
7500 * The type of the API resource. This is always | 7661 /// The type of the API resource. This is always |
7501 * admin#directory#roleAssignment. | 7662 /// admin#directory#roleAssignment. |
7502 */ | |
7503 core.String kind; | 7663 core.String kind; |
7504 /** | 7664 |
7505 * If the role is restricted to an organization unit, this contains the ID for | 7665 /// If the role is restricted to an organization unit, this contains the ID |
7506 * the organization unit the exercise of this role is restricted to. | 7666 /// for the organization unit the exercise of this role is restricted to. |
7507 */ | |
7508 core.String orgUnitId; | 7667 core.String orgUnitId; |
7509 /** ID of this roleAssignment. */ | 7668 |
| 7669 /// ID of this roleAssignment. |
7510 core.String roleAssignmentId; | 7670 core.String roleAssignmentId; |
7511 /** The ID of the role that is assigned. */ | 7671 |
| 7672 /// The ID of the role that is assigned. |
7512 core.String roleId; | 7673 core.String roleId; |
7513 /** | 7674 |
7514 * The scope in which this role is assigned. Possible values are: | 7675 /// The scope in which this role is assigned. Possible values are: |
7515 * - CUSTOMER | 7676 /// - CUSTOMER |
7516 * - ORG_UNIT | 7677 /// - ORG_UNIT |
7517 */ | |
7518 core.String scopeType; | 7678 core.String scopeType; |
7519 | 7679 |
7520 RoleAssignment(); | 7680 RoleAssignment(); |
7521 | 7681 |
7522 RoleAssignment.fromJson(core.Map _json) { | 7682 RoleAssignment.fromJson(core.Map _json) { |
7523 if (_json.containsKey("assignedTo")) { | 7683 if (_json.containsKey("assignedTo")) { |
7524 assignedTo = _json["assignedTo"]; | 7684 assignedTo = _json["assignedTo"]; |
7525 } | 7685 } |
7526 if (_json.containsKey("etag")) { | 7686 if (_json.containsKey("etag")) { |
7527 etag = _json["etag"]; | 7687 etag = _json["etag"]; |
7528 } | 7688 } |
7529 if (_json.containsKey("kind")) { | 7689 if (_json.containsKey("kind")) { |
7530 kind = _json["kind"]; | 7690 kind = _json["kind"]; |
7531 } | 7691 } |
7532 if (_json.containsKey("orgUnitId")) { | 7692 if (_json.containsKey("orgUnitId")) { |
7533 orgUnitId = _json["orgUnitId"]; | 7693 orgUnitId = _json["orgUnitId"]; |
7534 } | 7694 } |
7535 if (_json.containsKey("roleAssignmentId")) { | 7695 if (_json.containsKey("roleAssignmentId")) { |
7536 roleAssignmentId = _json["roleAssignmentId"]; | 7696 roleAssignmentId = _json["roleAssignmentId"]; |
7537 } | 7697 } |
7538 if (_json.containsKey("roleId")) { | 7698 if (_json.containsKey("roleId")) { |
7539 roleId = _json["roleId"]; | 7699 roleId = _json["roleId"]; |
7540 } | 7700 } |
7541 if (_json.containsKey("scopeType")) { | 7701 if (_json.containsKey("scopeType")) { |
7542 scopeType = _json["scopeType"]; | 7702 scopeType = _json["scopeType"]; |
7543 } | 7703 } |
7544 } | 7704 } |
7545 | 7705 |
7546 core.Map<core.String, core.Object> toJson() { | 7706 core.Map<core.String, core.Object> toJson() { |
7547 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 7707 final core.Map<core.String, core.Object> _json = |
| 7708 new core.Map<core.String, core.Object>(); |
7548 if (assignedTo != null) { | 7709 if (assignedTo != null) { |
7549 _json["assignedTo"] = assignedTo; | 7710 _json["assignedTo"] = assignedTo; |
7550 } | 7711 } |
7551 if (etag != null) { | 7712 if (etag != null) { |
7552 _json["etag"] = etag; | 7713 _json["etag"] = etag; |
7553 } | 7714 } |
7554 if (kind != null) { | 7715 if (kind != null) { |
7555 _json["kind"] = kind; | 7716 _json["kind"] = kind; |
7556 } | 7717 } |
7557 if (orgUnitId != null) { | 7718 if (orgUnitId != null) { |
7558 _json["orgUnitId"] = orgUnitId; | 7719 _json["orgUnitId"] = orgUnitId; |
7559 } | 7720 } |
7560 if (roleAssignmentId != null) { | 7721 if (roleAssignmentId != null) { |
7561 _json["roleAssignmentId"] = roleAssignmentId; | 7722 _json["roleAssignmentId"] = roleAssignmentId; |
7562 } | 7723 } |
7563 if (roleId != null) { | 7724 if (roleId != null) { |
7564 _json["roleId"] = roleId; | 7725 _json["roleId"] = roleId; |
7565 } | 7726 } |
7566 if (scopeType != null) { | 7727 if (scopeType != null) { |
7567 _json["scopeType"] = scopeType; | 7728 _json["scopeType"] = scopeType; |
7568 } | 7729 } |
7569 return _json; | 7730 return _json; |
7570 } | 7731 } |
7571 } | 7732 } |
7572 | 7733 |
7573 /** | 7734 /// JSON response template for List roleAssignments operation in Directory API. |
7574 * JSON response template for List roleAssignments operation in Directory API. | |
7575 */ | |
7576 class RoleAssignments { | 7735 class RoleAssignments { |
7577 /** ETag of the resource. */ | 7736 /// ETag of the resource. |
7578 core.String etag; | 7737 core.String etag; |
7579 /** A list of RoleAssignment resources. */ | 7738 |
| 7739 /// A list of RoleAssignment resources. |
7580 core.List<RoleAssignment> items; | 7740 core.List<RoleAssignment> items; |
7581 /** | 7741 |
7582 * The type of the API resource. This is always | 7742 /// The type of the API resource. This is always |
7583 * admin#directory#roleAssignments. | 7743 /// admin#directory#roleAssignments. |
7584 */ | |
7585 core.String kind; | 7744 core.String kind; |
7586 core.String nextPageToken; | 7745 core.String nextPageToken; |
7587 | 7746 |
7588 RoleAssignments(); | 7747 RoleAssignments(); |
7589 | 7748 |
7590 RoleAssignments.fromJson(core.Map _json) { | 7749 RoleAssignments.fromJson(core.Map _json) { |
7591 if (_json.containsKey("etag")) { | 7750 if (_json.containsKey("etag")) { |
7592 etag = _json["etag"]; | 7751 etag = _json["etag"]; |
7593 } | 7752 } |
7594 if (_json.containsKey("items")) { | 7753 if (_json.containsKey("items")) { |
7595 items = _json["items"].map((value) => new RoleAssignment.fromJson(value)).
toList(); | 7754 items = _json["items"] |
| 7755 .map((value) => new RoleAssignment.fromJson(value)) |
| 7756 .toList(); |
7596 } | 7757 } |
7597 if (_json.containsKey("kind")) { | 7758 if (_json.containsKey("kind")) { |
7598 kind = _json["kind"]; | 7759 kind = _json["kind"]; |
7599 } | 7760 } |
7600 if (_json.containsKey("nextPageToken")) { | 7761 if (_json.containsKey("nextPageToken")) { |
7601 nextPageToken = _json["nextPageToken"]; | 7762 nextPageToken = _json["nextPageToken"]; |
7602 } | 7763 } |
7603 } | 7764 } |
7604 | 7765 |
7605 core.Map<core.String, core.Object> toJson() { | 7766 core.Map<core.String, core.Object> toJson() { |
7606 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 7767 final core.Map<core.String, core.Object> _json = |
| 7768 new core.Map<core.String, core.Object>(); |
7607 if (etag != null) { | 7769 if (etag != null) { |
7608 _json["etag"] = etag; | 7770 _json["etag"] = etag; |
7609 } | 7771 } |
7610 if (items != null) { | 7772 if (items != null) { |
7611 _json["items"] = items.map((value) => (value).toJson()).toList(); | 7773 _json["items"] = items.map((value) => (value).toJson()).toList(); |
7612 } | 7774 } |
7613 if (kind != null) { | 7775 if (kind != null) { |
7614 _json["kind"] = kind; | 7776 _json["kind"] = kind; |
7615 } | 7777 } |
7616 if (nextPageToken != null) { | 7778 if (nextPageToken != null) { |
7617 _json["nextPageToken"] = nextPageToken; | 7779 _json["nextPageToken"] = nextPageToken; |
7618 } | 7780 } |
7619 return _json; | 7781 return _json; |
7620 } | 7782 } |
7621 } | 7783 } |
7622 | 7784 |
7623 /** JSON response template for List roles operation in Directory API. */ | 7785 /// JSON response template for List roles operation in Directory API. |
7624 class Roles { | 7786 class Roles { |
7625 /** ETag of the resource. */ | 7787 /// ETag of the resource. |
7626 core.String etag; | 7788 core.String etag; |
7627 /** A list of Role resources. */ | 7789 |
| 7790 /// A list of Role resources. |
7628 core.List<Role> items; | 7791 core.List<Role> items; |
7629 /** The type of the API resource. This is always admin#directory#roles. */ | 7792 |
| 7793 /// The type of the API resource. This is always admin#directory#roles. |
7630 core.String kind; | 7794 core.String kind; |
7631 core.String nextPageToken; | 7795 core.String nextPageToken; |
7632 | 7796 |
7633 Roles(); | 7797 Roles(); |
7634 | 7798 |
7635 Roles.fromJson(core.Map _json) { | 7799 Roles.fromJson(core.Map _json) { |
7636 if (_json.containsKey("etag")) { | 7800 if (_json.containsKey("etag")) { |
7637 etag = _json["etag"]; | 7801 etag = _json["etag"]; |
7638 } | 7802 } |
7639 if (_json.containsKey("items")) { | 7803 if (_json.containsKey("items")) { |
7640 items = _json["items"].map((value) => new Role.fromJson(value)).toList(); | 7804 items = _json["items"].map((value) => new Role.fromJson(value)).toList(); |
7641 } | 7805 } |
7642 if (_json.containsKey("kind")) { | 7806 if (_json.containsKey("kind")) { |
7643 kind = _json["kind"]; | 7807 kind = _json["kind"]; |
7644 } | 7808 } |
7645 if (_json.containsKey("nextPageToken")) { | 7809 if (_json.containsKey("nextPageToken")) { |
7646 nextPageToken = _json["nextPageToken"]; | 7810 nextPageToken = _json["nextPageToken"]; |
7647 } | 7811 } |
7648 } | 7812 } |
7649 | 7813 |
7650 core.Map<core.String, core.Object> toJson() { | 7814 core.Map<core.String, core.Object> toJson() { |
7651 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 7815 final core.Map<core.String, core.Object> _json = |
| 7816 new core.Map<core.String, core.Object>(); |
7652 if (etag != null) { | 7817 if (etag != null) { |
7653 _json["etag"] = etag; | 7818 _json["etag"] = etag; |
7654 } | 7819 } |
7655 if (items != null) { | 7820 if (items != null) { |
7656 _json["items"] = items.map((value) => (value).toJson()).toList(); | 7821 _json["items"] = items.map((value) => (value).toJson()).toList(); |
7657 } | 7822 } |
7658 if (kind != null) { | 7823 if (kind != null) { |
7659 _json["kind"] = kind; | 7824 _json["kind"] = kind; |
7660 } | 7825 } |
7661 if (nextPageToken != null) { | 7826 if (nextPageToken != null) { |
7662 _json["nextPageToken"] = nextPageToken; | 7827 _json["nextPageToken"] = nextPageToken; |
7663 } | 7828 } |
7664 return _json; | 7829 return _json; |
7665 } | 7830 } |
7666 } | 7831 } |
7667 | 7832 |
7668 /** JSON template for Schema resource in Directory API. */ | 7833 /// JSON template for Schema resource in Directory API. |
7669 class Schema { | 7834 class Schema { |
7670 /** ETag of the resource. */ | 7835 /// ETag of the resource. |
7671 core.String etag; | 7836 core.String etag; |
7672 /** Fields of Schema */ | 7837 |
| 7838 /// Fields of Schema |
7673 core.List<SchemaFieldSpec> fields; | 7839 core.List<SchemaFieldSpec> fields; |
7674 /** Kind of resource this is. */ | 7840 |
| 7841 /// Kind of resource this is. |
7675 core.String kind; | 7842 core.String kind; |
7676 /** Unique identifier of Schema (Read-only) */ | 7843 |
| 7844 /// Unique identifier of Schema (Read-only) |
7677 core.String schemaId; | 7845 core.String schemaId; |
7678 /** Schema name */ | 7846 |
| 7847 /// Schema name |
7679 core.String schemaName; | 7848 core.String schemaName; |
7680 | 7849 |
7681 Schema(); | 7850 Schema(); |
7682 | 7851 |
7683 Schema.fromJson(core.Map _json) { | 7852 Schema.fromJson(core.Map _json) { |
7684 if (_json.containsKey("etag")) { | 7853 if (_json.containsKey("etag")) { |
7685 etag = _json["etag"]; | 7854 etag = _json["etag"]; |
7686 } | 7855 } |
7687 if (_json.containsKey("fields")) { | 7856 if (_json.containsKey("fields")) { |
7688 fields = _json["fields"].map((value) => new SchemaFieldSpec.fromJson(value
)).toList(); | 7857 fields = _json["fields"] |
| 7858 .map((value) => new SchemaFieldSpec.fromJson(value)) |
| 7859 .toList(); |
7689 } | 7860 } |
7690 if (_json.containsKey("kind")) { | 7861 if (_json.containsKey("kind")) { |
7691 kind = _json["kind"]; | 7862 kind = _json["kind"]; |
7692 } | 7863 } |
7693 if (_json.containsKey("schemaId")) { | 7864 if (_json.containsKey("schemaId")) { |
7694 schemaId = _json["schemaId"]; | 7865 schemaId = _json["schemaId"]; |
7695 } | 7866 } |
7696 if (_json.containsKey("schemaName")) { | 7867 if (_json.containsKey("schemaName")) { |
7697 schemaName = _json["schemaName"]; | 7868 schemaName = _json["schemaName"]; |
7698 } | 7869 } |
7699 } | 7870 } |
7700 | 7871 |
7701 core.Map<core.String, core.Object> toJson() { | 7872 core.Map<core.String, core.Object> toJson() { |
7702 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 7873 final core.Map<core.String, core.Object> _json = |
| 7874 new core.Map<core.String, core.Object>(); |
7703 if (etag != null) { | 7875 if (etag != null) { |
7704 _json["etag"] = etag; | 7876 _json["etag"] = etag; |
7705 } | 7877 } |
7706 if (fields != null) { | 7878 if (fields != null) { |
7707 _json["fields"] = fields.map((value) => (value).toJson()).toList(); | 7879 _json["fields"] = fields.map((value) => (value).toJson()).toList(); |
7708 } | 7880 } |
7709 if (kind != null) { | 7881 if (kind != null) { |
7710 _json["kind"] = kind; | 7882 _json["kind"] = kind; |
7711 } | 7883 } |
7712 if (schemaId != null) { | 7884 if (schemaId != null) { |
7713 _json["schemaId"] = schemaId; | 7885 _json["schemaId"] = schemaId; |
7714 } | 7886 } |
7715 if (schemaName != null) { | 7887 if (schemaName != null) { |
7716 _json["schemaName"] = schemaName; | 7888 _json["schemaName"] = schemaName; |
7717 } | 7889 } |
7718 return _json; | 7890 return _json; |
7719 } | 7891 } |
7720 } | 7892 } |
7721 | 7893 |
7722 /** | 7894 /// Indexing spec for a numeric field. By default, only exact match queries |
7723 * Indexing spec for a numeric field. By default, only exact match queries will | 7895 /// will be supported for numeric fields. Setting the numericIndexingSpec |
7724 * be supported for numeric fields. Setting the numericIndexingSpec allows range | 7896 /// allows range queries to be supported. |
7725 * queries to be supported. | |
7726 */ | |
7727 class SchemaFieldSpecNumericIndexingSpec { | 7897 class SchemaFieldSpecNumericIndexingSpec { |
7728 /** | 7898 /// Maximum value of this field. This is meant to be indicative rather than |
7729 * Maximum value of this field. This is meant to be indicative rather than | 7899 /// enforced. Values outside this range will still be indexed, but search may |
7730 * enforced. Values outside this range will still be indexed, but search may | 7900 /// not be as performant. |
7731 * not be as performant. | |
7732 */ | |
7733 core.double maxValue; | 7901 core.double maxValue; |
7734 /** | 7902 |
7735 * Minimum value of this field. This is meant to be indicative rather than | 7903 /// Minimum value of this field. This is meant to be indicative rather than |
7736 * enforced. Values outside this range will still be indexed, but search may | 7904 /// enforced. Values outside this range will still be indexed, but search may |
7737 * not be as performant. | 7905 /// not be as performant. |
7738 */ | |
7739 core.double minValue; | 7906 core.double minValue; |
7740 | 7907 |
7741 SchemaFieldSpecNumericIndexingSpec(); | 7908 SchemaFieldSpecNumericIndexingSpec(); |
7742 | 7909 |
7743 SchemaFieldSpecNumericIndexingSpec.fromJson(core.Map _json) { | 7910 SchemaFieldSpecNumericIndexingSpec.fromJson(core.Map _json) { |
7744 if (_json.containsKey("maxValue")) { | 7911 if (_json.containsKey("maxValue")) { |
7745 maxValue = _json["maxValue"]; | 7912 maxValue = _json["maxValue"]; |
7746 } | 7913 } |
7747 if (_json.containsKey("minValue")) { | 7914 if (_json.containsKey("minValue")) { |
7748 minValue = _json["minValue"]; | 7915 minValue = _json["minValue"]; |
7749 } | 7916 } |
7750 } | 7917 } |
7751 | 7918 |
7752 core.Map<core.String, core.Object> toJson() { | 7919 core.Map<core.String, core.Object> toJson() { |
7753 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 7920 final core.Map<core.String, core.Object> _json = |
| 7921 new core.Map<core.String, core.Object>(); |
7754 if (maxValue != null) { | 7922 if (maxValue != null) { |
7755 _json["maxValue"] = maxValue; | 7923 _json["maxValue"] = maxValue; |
7756 } | 7924 } |
7757 if (minValue != null) { | 7925 if (minValue != null) { |
7758 _json["minValue"] = minValue; | 7926 _json["minValue"] = minValue; |
7759 } | 7927 } |
7760 return _json; | 7928 return _json; |
7761 } | 7929 } |
7762 } | 7930 } |
7763 | 7931 |
7764 /** JSON template for FieldSpec resource for Schemas in Directory API. */ | 7932 /// JSON template for FieldSpec resource for Schemas in Directory API. |
7765 class SchemaFieldSpec { | 7933 class SchemaFieldSpec { |
7766 /** ETag of the resource. */ | 7934 /// ETag of the resource. |
7767 core.String etag; | 7935 core.String etag; |
7768 /** Unique identifier of Field (Read-only) */ | 7936 |
| 7937 /// Unique identifier of Field (Read-only) |
7769 core.String fieldId; | 7938 core.String fieldId; |
7770 /** Name of the field. */ | 7939 |
| 7940 /// Name of the field. |
7771 core.String fieldName; | 7941 core.String fieldName; |
7772 /** Type of the field. */ | 7942 |
| 7943 /// Type of the field. |
7773 core.String fieldType; | 7944 core.String fieldType; |
7774 /** Boolean specifying whether the field is indexed or not. */ | 7945 |
| 7946 /// Boolean specifying whether the field is indexed or not. |
7775 core.bool indexed; | 7947 core.bool indexed; |
7776 /** Kind of resource this is. */ | 7948 |
| 7949 /// Kind of resource this is. |
7777 core.String kind; | 7950 core.String kind; |
7778 /** Boolean specifying whether this is a multi-valued field or not. */ | 7951 |
| 7952 /// Boolean specifying whether this is a multi-valued field or not. |
7779 core.bool multiValued; | 7953 core.bool multiValued; |
7780 /** | 7954 |
7781 * Indexing spec for a numeric field. By default, only exact match queries | 7955 /// Indexing spec for a numeric field. By default, only exact match queries |
7782 * will be supported for numeric fields. Setting the numericIndexingSpec | 7956 /// will be supported for numeric fields. Setting the numericIndexingSpec |
7783 * allows range queries to be supported. | 7957 /// allows range queries to be supported. |
7784 */ | |
7785 SchemaFieldSpecNumericIndexingSpec numericIndexingSpec; | 7958 SchemaFieldSpecNumericIndexingSpec numericIndexingSpec; |
7786 /** | 7959 |
7787 * Read ACLs on the field specifying who can view values of this field. Valid | 7960 /// Read ACLs on the field specifying who can view values of this field. |
7788 * values are "ALL_DOMAIN_USERS" and "ADMINS_AND_SELF". | 7961 /// Valid values are "ALL_DOMAIN_USERS" and "ADMINS_AND_SELF". |
7789 */ | |
7790 core.String readAccessType; | 7962 core.String readAccessType; |
7791 | 7963 |
7792 SchemaFieldSpec(); | 7964 SchemaFieldSpec(); |
7793 | 7965 |
7794 SchemaFieldSpec.fromJson(core.Map _json) { | 7966 SchemaFieldSpec.fromJson(core.Map _json) { |
7795 if (_json.containsKey("etag")) { | 7967 if (_json.containsKey("etag")) { |
7796 etag = _json["etag"]; | 7968 etag = _json["etag"]; |
7797 } | 7969 } |
7798 if (_json.containsKey("fieldId")) { | 7970 if (_json.containsKey("fieldId")) { |
7799 fieldId = _json["fieldId"]; | 7971 fieldId = _json["fieldId"]; |
7800 } | 7972 } |
7801 if (_json.containsKey("fieldName")) { | 7973 if (_json.containsKey("fieldName")) { |
7802 fieldName = _json["fieldName"]; | 7974 fieldName = _json["fieldName"]; |
7803 } | 7975 } |
7804 if (_json.containsKey("fieldType")) { | 7976 if (_json.containsKey("fieldType")) { |
7805 fieldType = _json["fieldType"]; | 7977 fieldType = _json["fieldType"]; |
7806 } | 7978 } |
7807 if (_json.containsKey("indexed")) { | 7979 if (_json.containsKey("indexed")) { |
7808 indexed = _json["indexed"]; | 7980 indexed = _json["indexed"]; |
7809 } | 7981 } |
7810 if (_json.containsKey("kind")) { | 7982 if (_json.containsKey("kind")) { |
7811 kind = _json["kind"]; | 7983 kind = _json["kind"]; |
7812 } | 7984 } |
7813 if (_json.containsKey("multiValued")) { | 7985 if (_json.containsKey("multiValued")) { |
7814 multiValued = _json["multiValued"]; | 7986 multiValued = _json["multiValued"]; |
7815 } | 7987 } |
7816 if (_json.containsKey("numericIndexingSpec")) { | 7988 if (_json.containsKey("numericIndexingSpec")) { |
7817 numericIndexingSpec = new SchemaFieldSpecNumericIndexingSpec.fromJson(_jso
n["numericIndexingSpec"]); | 7989 numericIndexingSpec = new SchemaFieldSpecNumericIndexingSpec.fromJson( |
| 7990 _json["numericIndexingSpec"]); |
7818 } | 7991 } |
7819 if (_json.containsKey("readAccessType")) { | 7992 if (_json.containsKey("readAccessType")) { |
7820 readAccessType = _json["readAccessType"]; | 7993 readAccessType = _json["readAccessType"]; |
7821 } | 7994 } |
7822 } | 7995 } |
7823 | 7996 |
7824 core.Map<core.String, core.Object> toJson() { | 7997 core.Map<core.String, core.Object> toJson() { |
7825 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 7998 final core.Map<core.String, core.Object> _json = |
| 7999 new core.Map<core.String, core.Object>(); |
7826 if (etag != null) { | 8000 if (etag != null) { |
7827 _json["etag"] = etag; | 8001 _json["etag"] = etag; |
7828 } | 8002 } |
7829 if (fieldId != null) { | 8003 if (fieldId != null) { |
7830 _json["fieldId"] = fieldId; | 8004 _json["fieldId"] = fieldId; |
7831 } | 8005 } |
7832 if (fieldName != null) { | 8006 if (fieldName != null) { |
7833 _json["fieldName"] = fieldName; | 8007 _json["fieldName"] = fieldName; |
7834 } | 8008 } |
7835 if (fieldType != null) { | 8009 if (fieldType != null) { |
(...skipping 11 matching lines...) Expand all Loading... |
7847 if (numericIndexingSpec != null) { | 8021 if (numericIndexingSpec != null) { |
7848 _json["numericIndexingSpec"] = (numericIndexingSpec).toJson(); | 8022 _json["numericIndexingSpec"] = (numericIndexingSpec).toJson(); |
7849 } | 8023 } |
7850 if (readAccessType != null) { | 8024 if (readAccessType != null) { |
7851 _json["readAccessType"] = readAccessType; | 8025 _json["readAccessType"] = readAccessType; |
7852 } | 8026 } |
7853 return _json; | 8027 return _json; |
7854 } | 8028 } |
7855 } | 8029 } |
7856 | 8030 |
7857 /** JSON response template for List Schema operation in Directory API. */ | 8031 /// JSON response template for List Schema operation in Directory API. |
7858 class Schemas { | 8032 class Schemas { |
7859 /** ETag of the resource. */ | 8033 /// ETag of the resource. |
7860 core.String etag; | 8034 core.String etag; |
7861 /** Kind of resource this is. */ | 8035 |
| 8036 /// Kind of resource this is. |
7862 core.String kind; | 8037 core.String kind; |
7863 /** List of UserSchema objects. */ | 8038 |
| 8039 /// List of UserSchema objects. |
7864 core.List<Schema> schemas; | 8040 core.List<Schema> schemas; |
7865 | 8041 |
7866 Schemas(); | 8042 Schemas(); |
7867 | 8043 |
7868 Schemas.fromJson(core.Map _json) { | 8044 Schemas.fromJson(core.Map _json) { |
7869 if (_json.containsKey("etag")) { | 8045 if (_json.containsKey("etag")) { |
7870 etag = _json["etag"]; | 8046 etag = _json["etag"]; |
7871 } | 8047 } |
7872 if (_json.containsKey("kind")) { | 8048 if (_json.containsKey("kind")) { |
7873 kind = _json["kind"]; | 8049 kind = _json["kind"]; |
7874 } | 8050 } |
7875 if (_json.containsKey("schemas")) { | 8051 if (_json.containsKey("schemas")) { |
7876 schemas = _json["schemas"].map((value) => new Schema.fromJson(value)).toLi
st(); | 8052 schemas = |
| 8053 _json["schemas"].map((value) => new Schema.fromJson(value)).toList(); |
7877 } | 8054 } |
7878 } | 8055 } |
7879 | 8056 |
7880 core.Map<core.String, core.Object> toJson() { | 8057 core.Map<core.String, core.Object> toJson() { |
7881 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 8058 final core.Map<core.String, core.Object> _json = |
| 8059 new core.Map<core.String, core.Object>(); |
7882 if (etag != null) { | 8060 if (etag != null) { |
7883 _json["etag"] = etag; | 8061 _json["etag"] = etag; |
7884 } | 8062 } |
7885 if (kind != null) { | 8063 if (kind != null) { |
7886 _json["kind"] = kind; | 8064 _json["kind"] = kind; |
7887 } | 8065 } |
7888 if (schemas != null) { | 8066 if (schemas != null) { |
7889 _json["schemas"] = schemas.map((value) => (value).toJson()).toList(); | 8067 _json["schemas"] = schemas.map((value) => (value).toJson()).toList(); |
7890 } | 8068 } |
7891 return _json; | 8069 return _json; |
7892 } | 8070 } |
7893 } | 8071 } |
7894 | 8072 |
7895 /** JSON template for token resource in Directory API. */ | 8073 /// JSON template for token resource in Directory API. |
7896 class Token { | 8074 class Token { |
7897 /** | 8075 /// Whether the application is registered with Google. The value is true if |
7898 * Whether the application is registered with Google. The value is true if the | 8076 /// the application has an anonymous Client ID. |
7899 * application has an anonymous Client ID. | |
7900 */ | |
7901 core.bool anonymous; | 8077 core.bool anonymous; |
7902 /** The Client ID of the application the token is issued to. */ | 8078 |
| 8079 /// The Client ID of the application the token is issued to. |
7903 core.String clientId; | 8080 core.String clientId; |
7904 /** The displayable name of the application the token is issued to. */ | 8081 |
| 8082 /// The displayable name of the application the token is issued to. |
7905 core.String displayText; | 8083 core.String displayText; |
7906 /** ETag of the resource. */ | 8084 |
| 8085 /// ETag of the resource. |
7907 core.String etag; | 8086 core.String etag; |
7908 /** The type of the API resource. This is always admin#directory#token. */ | 8087 |
| 8088 /// The type of the API resource. This is always admin#directory#token. |
7909 core.String kind; | 8089 core.String kind; |
7910 /** | 8090 |
7911 * Whether the token is issued to an installed application. The value is true | 8091 /// Whether the token is issued to an installed application. The value is |
7912 * if the application is installed to a desktop or mobile device. | 8092 /// true if the application is installed to a desktop or mobile device. |
7913 */ | |
7914 core.bool nativeApp; | 8093 core.bool nativeApp; |
7915 /** A list of authorization scopes the application is granted. */ | 8094 |
| 8095 /// A list of authorization scopes the application is granted. |
7916 core.List<core.String> scopes; | 8096 core.List<core.String> scopes; |
7917 /** The unique ID of the user that issued the token. */ | 8097 |
| 8098 /// The unique ID of the user that issued the token. |
7918 core.String userKey; | 8099 core.String userKey; |
7919 | 8100 |
7920 Token(); | 8101 Token(); |
7921 | 8102 |
7922 Token.fromJson(core.Map _json) { | 8103 Token.fromJson(core.Map _json) { |
7923 if (_json.containsKey("anonymous")) { | 8104 if (_json.containsKey("anonymous")) { |
7924 anonymous = _json["anonymous"]; | 8105 anonymous = _json["anonymous"]; |
7925 } | 8106 } |
7926 if (_json.containsKey("clientId")) { | 8107 if (_json.containsKey("clientId")) { |
7927 clientId = _json["clientId"]; | 8108 clientId = _json["clientId"]; |
(...skipping 12 matching lines...) Expand all Loading... |
7940 } | 8121 } |
7941 if (_json.containsKey("scopes")) { | 8122 if (_json.containsKey("scopes")) { |
7942 scopes = _json["scopes"]; | 8123 scopes = _json["scopes"]; |
7943 } | 8124 } |
7944 if (_json.containsKey("userKey")) { | 8125 if (_json.containsKey("userKey")) { |
7945 userKey = _json["userKey"]; | 8126 userKey = _json["userKey"]; |
7946 } | 8127 } |
7947 } | 8128 } |
7948 | 8129 |
7949 core.Map<core.String, core.Object> toJson() { | 8130 core.Map<core.String, core.Object> toJson() { |
7950 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 8131 final core.Map<core.String, core.Object> _json = |
| 8132 new core.Map<core.String, core.Object>(); |
7951 if (anonymous != null) { | 8133 if (anonymous != null) { |
7952 _json["anonymous"] = anonymous; | 8134 _json["anonymous"] = anonymous; |
7953 } | 8135 } |
7954 if (clientId != null) { | 8136 if (clientId != null) { |
7955 _json["clientId"] = clientId; | 8137 _json["clientId"] = clientId; |
7956 } | 8138 } |
7957 if (displayText != null) { | 8139 if (displayText != null) { |
7958 _json["displayText"] = displayText; | 8140 _json["displayText"] = displayText; |
7959 } | 8141 } |
7960 if (etag != null) { | 8142 if (etag != null) { |
7961 _json["etag"] = etag; | 8143 _json["etag"] = etag; |
7962 } | 8144 } |
7963 if (kind != null) { | 8145 if (kind != null) { |
7964 _json["kind"] = kind; | 8146 _json["kind"] = kind; |
7965 } | 8147 } |
7966 if (nativeApp != null) { | 8148 if (nativeApp != null) { |
7967 _json["nativeApp"] = nativeApp; | 8149 _json["nativeApp"] = nativeApp; |
7968 } | 8150 } |
7969 if (scopes != null) { | 8151 if (scopes != null) { |
7970 _json["scopes"] = scopes; | 8152 _json["scopes"] = scopes; |
7971 } | 8153 } |
7972 if (userKey != null) { | 8154 if (userKey != null) { |
7973 _json["userKey"] = userKey; | 8155 _json["userKey"] = userKey; |
7974 } | 8156 } |
7975 return _json; | 8157 return _json; |
7976 } | 8158 } |
7977 } | 8159 } |
7978 | 8160 |
7979 /** JSON response template for List tokens operation in Directory API. */ | 8161 /// JSON response template for List tokens operation in Directory API. |
7980 class Tokens { | 8162 class Tokens { |
7981 /** ETag of the resource. */ | 8163 /// ETag of the resource. |
7982 core.String etag; | 8164 core.String etag; |
7983 /** A list of Token resources. */ | 8165 |
| 8166 /// A list of Token resources. |
7984 core.List<Token> items; | 8167 core.List<Token> items; |
7985 /** | 8168 |
7986 * The type of the API resource. This is always admin#directory#tokenList. | 8169 /// The type of the API resource. This is always admin#directory#tokenList. |
7987 */ | |
7988 core.String kind; | 8170 core.String kind; |
7989 | 8171 |
7990 Tokens(); | 8172 Tokens(); |
7991 | 8173 |
7992 Tokens.fromJson(core.Map _json) { | 8174 Tokens.fromJson(core.Map _json) { |
7993 if (_json.containsKey("etag")) { | 8175 if (_json.containsKey("etag")) { |
7994 etag = _json["etag"]; | 8176 etag = _json["etag"]; |
7995 } | 8177 } |
7996 if (_json.containsKey("items")) { | 8178 if (_json.containsKey("items")) { |
7997 items = _json["items"].map((value) => new Token.fromJson(value)).toList(); | 8179 items = _json["items"].map((value) => new Token.fromJson(value)).toList(); |
7998 } | 8180 } |
7999 if (_json.containsKey("kind")) { | 8181 if (_json.containsKey("kind")) { |
8000 kind = _json["kind"]; | 8182 kind = _json["kind"]; |
8001 } | 8183 } |
8002 } | 8184 } |
8003 | 8185 |
8004 core.Map<core.String, core.Object> toJson() { | 8186 core.Map<core.String, core.Object> toJson() { |
8005 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 8187 final core.Map<core.String, core.Object> _json = |
| 8188 new core.Map<core.String, core.Object>(); |
8006 if (etag != null) { | 8189 if (etag != null) { |
8007 _json["etag"] = etag; | 8190 _json["etag"] = etag; |
8008 } | 8191 } |
8009 if (items != null) { | 8192 if (items != null) { |
8010 _json["items"] = items.map((value) => (value).toJson()).toList(); | 8193 _json["items"] = items.map((value) => (value).toJson()).toList(); |
8011 } | 8194 } |
8012 if (kind != null) { | 8195 if (kind != null) { |
8013 _json["kind"] = kind; | 8196 _json["kind"] = kind; |
8014 } | 8197 } |
8015 return _json; | 8198 return _json; |
8016 } | 8199 } |
8017 } | 8200 } |
8018 | 8201 |
8019 /** JSON template for User object in Directory API. */ | 8202 /// JSON template for User object in Directory API. |
8020 class User { | 8203 class User { |
8021 /** | 8204 /// |
8022 * | 8205 /// |
8023 * | 8206 /// The values for Object must be JSON objects. It can consist of `num`, |
8024 * The values for Object must be JSON objects. It can consist of `num`, | 8207 /// `String`, `bool` and `null` as well as `Map` and `List` values. |
8025 * `String`, `bool` and `null` as well as `Map` and `List` values. | |
8026 */ | |
8027 core.Object addresses; | 8208 core.Object addresses; |
8028 /** Indicates if user has agreed to terms (Read-only) */ | 8209 |
| 8210 /// Indicates if user has agreed to terms (Read-only) |
8029 core.bool agreedToTerms; | 8211 core.bool agreedToTerms; |
8030 /** List of aliases (Read-only) */ | 8212 |
| 8213 /// List of aliases (Read-only) |
8031 core.List<core.String> aliases; | 8214 core.List<core.String> aliases; |
8032 /** Boolean indicating if the user should change password in next login */ | 8215 |
| 8216 /// Boolean indicating if the user should change password in next login |
8033 core.bool changePasswordAtNextLogin; | 8217 core.bool changePasswordAtNextLogin; |
8034 /** User's G Suite account creation time. (Read-only) */ | 8218 |
| 8219 /// User's G Suite account creation time. (Read-only) |
8035 core.DateTime creationTime; | 8220 core.DateTime creationTime; |
8036 /** Custom fields of the user. */ | 8221 |
| 8222 /// Custom fields of the user. |
8037 core.Map<core.String, UserCustomProperties> customSchemas; | 8223 core.Map<core.String, UserCustomProperties> customSchemas; |
8038 /** CustomerId of User (Read-only) */ | 8224 |
| 8225 /// CustomerId of User (Read-only) |
8039 core.String customerId; | 8226 core.String customerId; |
8040 core.DateTime deletionTime; | 8227 core.DateTime deletionTime; |
8041 /** | 8228 |
8042 * | 8229 /// |
8043 * | 8230 /// |
8044 * The values for Object must be JSON objects. It can consist of `num`, | 8231 /// The values for Object must be JSON objects. It can consist of `num`, |
8045 * `String`, `bool` and `null` as well as `Map` and `List` values. | 8232 /// `String`, `bool` and `null` as well as `Map` and `List` values. |
8046 */ | |
8047 core.Object emails; | 8233 core.Object emails; |
8048 /** ETag of the resource. */ | 8234 |
| 8235 /// ETag of the resource. |
8049 core.String etag; | 8236 core.String etag; |
8050 /** | 8237 |
8051 * | 8238 /// |
8052 * | 8239 /// |
8053 * The values for Object must be JSON objects. It can consist of `num`, | 8240 /// The values for Object must be JSON objects. It can consist of `num`, |
8054 * `String`, `bool` and `null` as well as `Map` and `List` values. | 8241 /// `String`, `bool` and `null` as well as `Map` and `List` values. |
8055 */ | |
8056 core.Object externalIds; | 8242 core.Object externalIds; |
8057 /** Hash function name for password. Supported are MD5, SHA-1 and crypt */ | 8243 |
| 8244 /// Hash function name for password. Supported are MD5, SHA-1 and crypt |
8058 core.String hashFunction; | 8245 core.String hashFunction; |
8059 /** Unique identifier of User (Read-only) */ | 8246 |
| 8247 /// Unique identifier of User (Read-only) |
8060 core.String id; | 8248 core.String id; |
8061 /** | 8249 |
8062 * | 8250 /// |
8063 * | 8251 /// |
8064 * The values for Object must be JSON objects. It can consist of `num`, | 8252 /// The values for Object must be JSON objects. It can consist of `num`, |
8065 * `String`, `bool` and `null` as well as `Map` and `List` values. | 8253 /// `String`, `bool` and `null` as well as `Map` and `List` values. |
8066 */ | |
8067 core.Object ims; | 8254 core.Object ims; |
8068 /** Boolean indicating if user is included in Global Address List */ | 8255 |
| 8256 /// Boolean indicating if user is included in Global Address List |
8069 core.bool includeInGlobalAddressList; | 8257 core.bool includeInGlobalAddressList; |
8070 /** Boolean indicating if ip is whitelisted */ | 8258 |
| 8259 /// Boolean indicating if ip is whitelisted |
8071 core.bool ipWhitelisted; | 8260 core.bool ipWhitelisted; |
8072 /** Boolean indicating if the user is admin (Read-only) */ | 8261 |
| 8262 /// Boolean indicating if the user is admin (Read-only) |
8073 core.bool isAdmin; | 8263 core.bool isAdmin; |
8074 /** Boolean indicating if the user is delegated admin (Read-only) */ | 8264 |
| 8265 /// Boolean indicating if the user is delegated admin (Read-only) |
8075 core.bool isDelegatedAdmin; | 8266 core.bool isDelegatedAdmin; |
8076 /** Is 2-step verification enforced (Read-only) */ | 8267 |
| 8268 /// Is 2-step verification enforced (Read-only) |
8077 core.bool isEnforcedIn2Sv; | 8269 core.bool isEnforcedIn2Sv; |
8078 /** Is enrolled in 2-step verification (Read-only) */ | 8270 |
| 8271 /// Is enrolled in 2-step verification (Read-only) |
8079 core.bool isEnrolledIn2Sv; | 8272 core.bool isEnrolledIn2Sv; |
8080 /** Is mailbox setup (Read-only) */ | 8273 |
| 8274 /// Is mailbox setup (Read-only) |
8081 core.bool isMailboxSetup; | 8275 core.bool isMailboxSetup; |
8082 /** | 8276 |
8083 * | 8277 /// |
8084 * | 8278 /// |
8085 * The values for Object must be JSON objects. It can consist of `num`, | 8279 /// The values for Object must be JSON objects. It can consist of `num`, |
8086 * `String`, `bool` and `null` as well as `Map` and `List` values. | 8280 /// `String`, `bool` and `null` as well as `Map` and `List` values. |
8087 */ | |
8088 core.Object keywords; | 8281 core.Object keywords; |
8089 /** Kind of resource this is. */ | 8282 |
| 8283 /// Kind of resource this is. |
8090 core.String kind; | 8284 core.String kind; |
8091 /** | 8285 |
8092 * | 8286 /// |
8093 * | 8287 /// |
8094 * The values for Object must be JSON objects. It can consist of `num`, | 8288 /// The values for Object must be JSON objects. It can consist of `num`, |
8095 * `String`, `bool` and `null` as well as `Map` and `List` values. | 8289 /// `String`, `bool` and `null` as well as `Map` and `List` values. |
8096 */ | |
8097 core.Object languages; | 8290 core.Object languages; |
8098 /** User's last login time. (Read-only) */ | 8291 |
| 8292 /// User's last login time. (Read-only) |
8099 core.DateTime lastLoginTime; | 8293 core.DateTime lastLoginTime; |
8100 /** | 8294 |
8101 * | 8295 /// |
8102 * | 8296 /// |
8103 * The values for Object must be JSON objects. It can consist of `num`, | 8297 /// The values for Object must be JSON objects. It can consist of `num`, |
8104 * `String`, `bool` and `null` as well as `Map` and `List` values. | 8298 /// `String`, `bool` and `null` as well as `Map` and `List` values. |
8105 */ | |
8106 core.Object locations; | 8299 core.Object locations; |
8107 /** User's name */ | 8300 |
| 8301 /// User's name |
8108 UserName name; | 8302 UserName name; |
8109 /** List of non editable aliases (Read-only) */ | 8303 |
| 8304 /// List of non editable aliases (Read-only) |
8110 core.List<core.String> nonEditableAliases; | 8305 core.List<core.String> nonEditableAliases; |
8111 /** | 8306 |
8112 * | 8307 /// |
8113 * | 8308 /// |
8114 * The values for Object must be JSON objects. It can consist of `num`, | 8309 /// The values for Object must be JSON objects. It can consist of `num`, |
8115 * `String`, `bool` and `null` as well as `Map` and `List` values. | 8310 /// `String`, `bool` and `null` as well as `Map` and `List` values. |
8116 */ | |
8117 core.Object notes; | 8311 core.Object notes; |
8118 /** OrgUnit of User */ | 8312 |
| 8313 /// OrgUnit of User |
8119 core.String orgUnitPath; | 8314 core.String orgUnitPath; |
8120 /** | 8315 |
8121 * | 8316 /// |
8122 * | 8317 /// |
8123 * The values for Object must be JSON objects. It can consist of `num`, | 8318 /// The values for Object must be JSON objects. It can consist of `num`, |
8124 * `String`, `bool` and `null` as well as `Map` and `List` values. | 8319 /// `String`, `bool` and `null` as well as `Map` and `List` values. |
8125 */ | |
8126 core.Object organizations; | 8320 core.Object organizations; |
8127 /** User's password */ | 8321 |
| 8322 /// User's password |
8128 core.String password; | 8323 core.String password; |
8129 /** | 8324 |
8130 * | 8325 /// |
8131 * | 8326 /// |
8132 * The values for Object must be JSON objects. It can consist of `num`, | 8327 /// The values for Object must be JSON objects. It can consist of `num`, |
8133 * `String`, `bool` and `null` as well as `Map` and `List` values. | 8328 /// `String`, `bool` and `null` as well as `Map` and `List` values. |
8134 */ | |
8135 core.Object phones; | 8329 core.Object phones; |
8136 /** | 8330 |
8137 * | 8331 /// |
8138 * | 8332 /// |
8139 * The values for Object must be JSON objects. It can consist of `num`, | 8333 /// The values for Object must be JSON objects. It can consist of `num`, |
8140 * `String`, `bool` and `null` as well as `Map` and `List` values. | 8334 /// `String`, `bool` and `null` as well as `Map` and `List` values. |
8141 */ | |
8142 core.Object posixAccounts; | 8335 core.Object posixAccounts; |
8143 /** username of User */ | 8336 |
| 8337 /// username of User |
8144 core.String primaryEmail; | 8338 core.String primaryEmail; |
8145 /** | 8339 |
8146 * | 8340 /// |
8147 * | 8341 /// |
8148 * The values for Object must be JSON objects. It can consist of `num`, | 8342 /// The values for Object must be JSON objects. It can consist of `num`, |
8149 * `String`, `bool` and `null` as well as `Map` and `List` values. | 8343 /// `String`, `bool` and `null` as well as `Map` and `List` values. |
8150 */ | |
8151 core.Object relations; | 8344 core.Object relations; |
8152 /** | 8345 |
8153 * | 8346 /// |
8154 * | 8347 /// |
8155 * The values for Object must be JSON objects. It can consist of `num`, | 8348 /// The values for Object must be JSON objects. It can consist of `num`, |
8156 * `String`, `bool` and `null` as well as `Map` and `List` values. | 8349 /// `String`, `bool` and `null` as well as `Map` and `List` values. |
8157 */ | |
8158 core.Object sshPublicKeys; | 8350 core.Object sshPublicKeys; |
8159 /** Indicates if user is suspended */ | 8351 |
| 8352 /// Indicates if user is suspended |
8160 core.bool suspended; | 8353 core.bool suspended; |
8161 /** Suspension reason if user is suspended (Read-only) */ | 8354 |
| 8355 /// Suspension reason if user is suspended (Read-only) |
8162 core.String suspensionReason; | 8356 core.String suspensionReason; |
8163 /** ETag of the user's photo (Read-only) */ | 8357 |
| 8358 /// ETag of the user's photo (Read-only) |
8164 core.String thumbnailPhotoEtag; | 8359 core.String thumbnailPhotoEtag; |
8165 /** Photo Url of the user (Read-only) */ | 8360 |
| 8361 /// Photo Url of the user (Read-only) |
8166 core.String thumbnailPhotoUrl; | 8362 core.String thumbnailPhotoUrl; |
8167 /** | 8363 |
8168 * | 8364 /// |
8169 * | 8365 /// |
8170 * The values for Object must be JSON objects. It can consist of `num`, | 8366 /// The values for Object must be JSON objects. It can consist of `num`, |
8171 * `String`, `bool` and `null` as well as `Map` and `List` values. | 8367 /// `String`, `bool` and `null` as well as `Map` and `List` values. |
8172 */ | |
8173 core.Object websites; | 8368 core.Object websites; |
8174 | 8369 |
8175 User(); | 8370 User(); |
8176 | 8371 |
8177 User.fromJson(core.Map _json) { | 8372 User.fromJson(core.Map _json) { |
8178 if (_json.containsKey("addresses")) { | 8373 if (_json.containsKey("addresses")) { |
8179 addresses = _json["addresses"]; | 8374 addresses = _json["addresses"]; |
8180 } | 8375 } |
8181 if (_json.containsKey("agreedToTerms")) { | 8376 if (_json.containsKey("agreedToTerms")) { |
8182 agreedToTerms = _json["agreedToTerms"]; | 8377 agreedToTerms = _json["agreedToTerms"]; |
8183 } | 8378 } |
8184 if (_json.containsKey("aliases")) { | 8379 if (_json.containsKey("aliases")) { |
8185 aliases = _json["aliases"]; | 8380 aliases = _json["aliases"]; |
8186 } | 8381 } |
8187 if (_json.containsKey("changePasswordAtNextLogin")) { | 8382 if (_json.containsKey("changePasswordAtNextLogin")) { |
8188 changePasswordAtNextLogin = _json["changePasswordAtNextLogin"]; | 8383 changePasswordAtNextLogin = _json["changePasswordAtNextLogin"]; |
8189 } | 8384 } |
8190 if (_json.containsKey("creationTime")) { | 8385 if (_json.containsKey("creationTime")) { |
8191 creationTime = core.DateTime.parse(_json["creationTime"]); | 8386 creationTime = core.DateTime.parse(_json["creationTime"]); |
8192 } | 8387 } |
8193 if (_json.containsKey("customSchemas")) { | 8388 if (_json.containsKey("customSchemas")) { |
8194 customSchemas = commons.mapMap<core.Map<core.String, core.Object>, UserCus
tomProperties>(_json["customSchemas"], (core.Map<core.String, core.Object> item)
=> new UserCustomProperties.fromJson(item)); | 8389 customSchemas = commons |
| 8390 .mapMap<core.Map<core.String, core.Object>, UserCustomProperties>( |
| 8391 _json["customSchemas"], |
| 8392 (core.Map<core.String, core.Object> item) => |
| 8393 new UserCustomProperties.fromJson(item)); |
8195 } | 8394 } |
8196 if (_json.containsKey("customerId")) { | 8395 if (_json.containsKey("customerId")) { |
8197 customerId = _json["customerId"]; | 8396 customerId = _json["customerId"]; |
8198 } | 8397 } |
8199 if (_json.containsKey("deletionTime")) { | 8398 if (_json.containsKey("deletionTime")) { |
8200 deletionTime = core.DateTime.parse(_json["deletionTime"]); | 8399 deletionTime = core.DateTime.parse(_json["deletionTime"]); |
8201 } | 8400 } |
8202 if (_json.containsKey("emails")) { | 8401 if (_json.containsKey("emails")) { |
8203 emails = _json["emails"]; | 8402 emails = _json["emails"]; |
8204 } | 8403 } |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8297 } | 8496 } |
8298 if (_json.containsKey("thumbnailPhotoUrl")) { | 8497 if (_json.containsKey("thumbnailPhotoUrl")) { |
8299 thumbnailPhotoUrl = _json["thumbnailPhotoUrl"]; | 8498 thumbnailPhotoUrl = _json["thumbnailPhotoUrl"]; |
8300 } | 8499 } |
8301 if (_json.containsKey("websites")) { | 8500 if (_json.containsKey("websites")) { |
8302 websites = _json["websites"]; | 8501 websites = _json["websites"]; |
8303 } | 8502 } |
8304 } | 8503 } |
8305 | 8504 |
8306 core.Map<core.String, core.Object> toJson() { | 8505 core.Map<core.String, core.Object> toJson() { |
8307 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 8506 final core.Map<core.String, core.Object> _json = |
| 8507 new core.Map<core.String, core.Object>(); |
8308 if (addresses != null) { | 8508 if (addresses != null) { |
8309 _json["addresses"] = addresses; | 8509 _json["addresses"] = addresses; |
8310 } | 8510 } |
8311 if (agreedToTerms != null) { | 8511 if (agreedToTerms != null) { |
8312 _json["agreedToTerms"] = agreedToTerms; | 8512 _json["agreedToTerms"] = agreedToTerms; |
8313 } | 8513 } |
8314 if (aliases != null) { | 8514 if (aliases != null) { |
8315 _json["aliases"] = aliases; | 8515 _json["aliases"] = aliases; |
8316 } | 8516 } |
8317 if (changePasswordAtNextLogin != null) { | 8517 if (changePasswordAtNextLogin != null) { |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8428 if (thumbnailPhotoUrl != null) { | 8628 if (thumbnailPhotoUrl != null) { |
8429 _json["thumbnailPhotoUrl"] = thumbnailPhotoUrl; | 8629 _json["thumbnailPhotoUrl"] = thumbnailPhotoUrl; |
8430 } | 8630 } |
8431 if (websites != null) { | 8631 if (websites != null) { |
8432 _json["websites"] = websites; | 8632 _json["websites"] = websites; |
8433 } | 8633 } |
8434 return _json; | 8634 return _json; |
8435 } | 8635 } |
8436 } | 8636 } |
8437 | 8637 |
8438 /** JSON template for About (notes) of a user in Directory API. */ | 8638 /// JSON template for About (notes) of a user in Directory API. |
8439 class UserAbout { | 8639 class UserAbout { |
8440 /** | 8640 /// About entry can have a type which indicates the content type. It can |
8441 * About entry can have a type which indicates the content type. It can either | 8641 /// either be plain or html. By default, notes contents are assumed to |
8442 * be plain or html. By default, notes contents are assumed to contain plain | 8642 /// contain plain text. |
8443 * text. | |
8444 */ | |
8445 core.String contentType; | 8643 core.String contentType; |
8446 /** Actual value of notes. */ | 8644 |
| 8645 /// Actual value of notes. |
8447 core.String value; | 8646 core.String value; |
8448 | 8647 |
8449 UserAbout(); | 8648 UserAbout(); |
8450 | 8649 |
8451 UserAbout.fromJson(core.Map _json) { | 8650 UserAbout.fromJson(core.Map _json) { |
8452 if (_json.containsKey("contentType")) { | 8651 if (_json.containsKey("contentType")) { |
8453 contentType = _json["contentType"]; | 8652 contentType = _json["contentType"]; |
8454 } | 8653 } |
8455 if (_json.containsKey("value")) { | 8654 if (_json.containsKey("value")) { |
8456 value = _json["value"]; | 8655 value = _json["value"]; |
8457 } | 8656 } |
8458 } | 8657 } |
8459 | 8658 |
8460 core.Map<core.String, core.Object> toJson() { | 8659 core.Map<core.String, core.Object> toJson() { |
8461 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 8660 final core.Map<core.String, core.Object> _json = |
| 8661 new core.Map<core.String, core.Object>(); |
8462 if (contentType != null) { | 8662 if (contentType != null) { |
8463 _json["contentType"] = contentType; | 8663 _json["contentType"] = contentType; |
8464 } | 8664 } |
8465 if (value != null) { | 8665 if (value != null) { |
8466 _json["value"] = value; | 8666 _json["value"] = value; |
8467 } | 8667 } |
8468 return _json; | 8668 return _json; |
8469 } | 8669 } |
8470 } | 8670 } |
8471 | 8671 |
8472 /** JSON template for address. */ | 8672 /// JSON template for address. |
8473 class UserAddress { | 8673 class UserAddress { |
8474 /** Country. */ | 8674 /// Country. |
8475 core.String country; | 8675 core.String country; |
8476 /** Country code. */ | 8676 |
| 8677 /// Country code. |
8477 core.String countryCode; | 8678 core.String countryCode; |
8478 /** Custom type. */ | 8679 |
| 8680 /// Custom type. |
8479 core.String customType; | 8681 core.String customType; |
8480 /** Extended Address. */ | 8682 |
| 8683 /// Extended Address. |
8481 core.String extendedAddress; | 8684 core.String extendedAddress; |
8482 /** Formatted address. */ | 8685 |
| 8686 /// Formatted address. |
8483 core.String formatted; | 8687 core.String formatted; |
8484 /** Locality. */ | 8688 |
| 8689 /// Locality. |
8485 core.String locality; | 8690 core.String locality; |
8486 /** Other parts of address. */ | 8691 |
| 8692 /// Other parts of address. |
8487 core.String poBox; | 8693 core.String poBox; |
8488 /** Postal code. */ | 8694 |
| 8695 /// Postal code. |
8489 core.String postalCode; | 8696 core.String postalCode; |
8490 /** | 8697 |
8491 * If this is user's primary address. Only one entry could be marked as | 8698 /// If this is user's primary address. Only one entry could be marked as |
8492 * primary. | 8699 /// primary. |
8493 */ | |
8494 core.bool primary; | 8700 core.bool primary; |
8495 /** Region. */ | 8701 |
| 8702 /// Region. |
8496 core.String region; | 8703 core.String region; |
8497 /** | 8704 |
8498 * User supplied address was structured. Structured addresses are NOT | 8705 /// User supplied address was structured. Structured addresses are NOT |
8499 * supported at this time. You might be able to write structured addresses, | 8706 /// supported at this time. You might be able to write structured addresses, |
8500 * but any values will eventually be clobbered. | 8707 /// but any values will eventually be clobbered. |
8501 */ | |
8502 core.bool sourceIsStructured; | 8708 core.bool sourceIsStructured; |
8503 /** Street. */ | 8709 |
| 8710 /// Street. |
8504 core.String streetAddress; | 8711 core.String streetAddress; |
8505 /** | 8712 |
8506 * Each entry can have a type which indicates standard values of that entry. | 8713 /// Each entry can have a type which indicates standard values of that entry. |
8507 * For example address could be of home, work etc. In addition to the standard | 8714 /// For example address could be of home, work etc. In addition to the |
8508 * type, an entry can have a custom type and can take any value. Such type | 8715 /// standard type, an entry can have a custom type and can take any value. |
8509 * should have the CUSTOM value as type and also have a customType value. | 8716 /// Such type should have the CUSTOM value as type and also have a customType |
8510 */ | 8717 /// value. |
8511 core.String type; | 8718 core.String type; |
8512 | 8719 |
8513 UserAddress(); | 8720 UserAddress(); |
8514 | 8721 |
8515 UserAddress.fromJson(core.Map _json) { | 8722 UserAddress.fromJson(core.Map _json) { |
8516 if (_json.containsKey("country")) { | 8723 if (_json.containsKey("country")) { |
8517 country = _json["country"]; | 8724 country = _json["country"]; |
8518 } | 8725 } |
8519 if (_json.containsKey("countryCode")) { | 8726 if (_json.containsKey("countryCode")) { |
8520 countryCode = _json["countryCode"]; | 8727 countryCode = _json["countryCode"]; |
(...skipping 27 matching lines...) Expand all Loading... |
8548 } | 8755 } |
8549 if (_json.containsKey("streetAddress")) { | 8756 if (_json.containsKey("streetAddress")) { |
8550 streetAddress = _json["streetAddress"]; | 8757 streetAddress = _json["streetAddress"]; |
8551 } | 8758 } |
8552 if (_json.containsKey("type")) { | 8759 if (_json.containsKey("type")) { |
8553 type = _json["type"]; | 8760 type = _json["type"]; |
8554 } | 8761 } |
8555 } | 8762 } |
8556 | 8763 |
8557 core.Map<core.String, core.Object> toJson() { | 8764 core.Map<core.String, core.Object> toJson() { |
8558 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 8765 final core.Map<core.String, core.Object> _json = |
| 8766 new core.Map<core.String, core.Object>(); |
8559 if (country != null) { | 8767 if (country != null) { |
8560 _json["country"] = country; | 8768 _json["country"] = country; |
8561 } | 8769 } |
8562 if (countryCode != null) { | 8770 if (countryCode != null) { |
8563 _json["countryCode"] = countryCode; | 8771 _json["countryCode"] = countryCode; |
8564 } | 8772 } |
8565 if (customType != null) { | 8773 if (customType != null) { |
8566 _json["customType"] = customType; | 8774 _json["customType"] = customType; |
8567 } | 8775 } |
8568 if (extendedAddress != null) { | 8776 if (extendedAddress != null) { |
(...skipping 23 matching lines...) Expand all Loading... |
8592 if (streetAddress != null) { | 8800 if (streetAddress != null) { |
8593 _json["streetAddress"] = streetAddress; | 8801 _json["streetAddress"] = streetAddress; |
8594 } | 8802 } |
8595 if (type != null) { | 8803 if (type != null) { |
8596 _json["type"] = type; | 8804 _json["type"] = type; |
8597 } | 8805 } |
8598 return _json; | 8806 return _json; |
8599 } | 8807 } |
8600 } | 8808 } |
8601 | 8809 |
8602 /** | 8810 /// JSON template for a set of custom properties (i.e. all fields in a |
8603 * JSON template for a set of custom properties (i.e. all fields in a particular | 8811 /// particular schema) |
8604 * schema) | |
8605 */ | |
8606 class UserCustomProperties | 8812 class UserCustomProperties |
8607 extends collection.MapBase<core.String, core.Object> { | 8813 extends collection.MapBase<core.String, core.Object> { |
8608 final core.Map _innerMap = {}; | 8814 final core.Map _innerMap = {}; |
8609 | 8815 |
8610 UserCustomProperties(); | 8816 UserCustomProperties(); |
8611 | 8817 |
8612 UserCustomProperties.fromJson(core.Map _json) { | 8818 UserCustomProperties.fromJson(core.Map _json) { |
8613 _json.forEach((core.String key, value) { | 8819 _json.forEach((core.String key, value) { |
8614 this[key] = value; | 8820 this[key] = value; |
8615 }); | 8821 }); |
8616 } | 8822 } |
8617 | 8823 |
8618 core.Map<core.String, core.Object> toJson() { | 8824 core.Map<core.String, core.Object> toJson() { |
8619 final core.Map<core.String, core.Object> _json = <core.String, core.Object>{
}; | 8825 final core.Map<core.String, core.Object> _json = |
| 8826 <core.String, core.Object>{}; |
8620 this.forEach((core.String key, value) { | 8827 this.forEach((core.String key, value) { |
8621 _json[key] = value; | 8828 _json[key] = value; |
8622 }); | 8829 }); |
8623 return _json; | 8830 return _json; |
8624 } | 8831 } |
8625 | 8832 |
8626 core.Object operator [](core.Object key) | 8833 core.Object operator [](core.Object key) => _innerMap[key]; |
8627 => _innerMap[key]; | |
8628 | 8834 |
8629 operator []=(core.String key, core.Object value) { | 8835 operator []=(core.String key, core.Object value) { |
8630 _innerMap[key] = value; | 8836 _innerMap[key] = value; |
8631 } | 8837 } |
8632 | 8838 |
8633 void clear() { | 8839 void clear() { |
8634 _innerMap.clear(); | 8840 _innerMap.clear(); |
8635 } | 8841 } |
8636 | 8842 |
8637 core.Iterable<core.String> get keys => _innerMap.keys; | 8843 core.Iterable<core.String> get keys => _innerMap.keys; |
8638 | 8844 |
8639 core.Object remove(core.Object key) => _innerMap.remove(key); | 8845 core.Object remove(core.Object key) => _innerMap.remove(key); |
8640 } | 8846 } |
8641 | 8847 |
8642 /** JSON template for an email. */ | 8848 /// JSON template for an email. |
8643 class UserEmail { | 8849 class UserEmail { |
8644 /** Email id of the user. */ | 8850 /// Email id of the user. |
8645 core.String address; | 8851 core.String address; |
8646 /** Custom Type. */ | 8852 |
| 8853 /// Custom Type. |
8647 core.String customType; | 8854 core.String customType; |
8648 /** | 8855 |
8649 * If this is user's primary email. Only one entry could be marked as primary. | 8856 /// If this is user's primary email. Only one entry could be marked as |
8650 */ | 8857 /// primary. |
8651 core.bool primary; | 8858 core.bool primary; |
8652 /** | 8859 |
8653 * Each entry can have a type which indicates standard types of that entry. | 8860 /// Each entry can have a type which indicates standard types of that entry. |
8654 * For example email could be of home, work etc. In addition to the standard | 8861 /// For example email could be of home, work etc. In addition to the standard |
8655 * type, an entry can have a custom type and can take any value Such types | 8862 /// type, an entry can have a custom type and can take any value Such types |
8656 * should have the CUSTOM value as type and also have a customType value. | 8863 /// should have the CUSTOM value as type and also have a customType value. |
8657 */ | |
8658 core.String type; | 8864 core.String type; |
8659 | 8865 |
8660 UserEmail(); | 8866 UserEmail(); |
8661 | 8867 |
8662 UserEmail.fromJson(core.Map _json) { | 8868 UserEmail.fromJson(core.Map _json) { |
8663 if (_json.containsKey("address")) { | 8869 if (_json.containsKey("address")) { |
8664 address = _json["address"]; | 8870 address = _json["address"]; |
8665 } | 8871 } |
8666 if (_json.containsKey("customType")) { | 8872 if (_json.containsKey("customType")) { |
8667 customType = _json["customType"]; | 8873 customType = _json["customType"]; |
8668 } | 8874 } |
8669 if (_json.containsKey("primary")) { | 8875 if (_json.containsKey("primary")) { |
8670 primary = _json["primary"]; | 8876 primary = _json["primary"]; |
8671 } | 8877 } |
8672 if (_json.containsKey("type")) { | 8878 if (_json.containsKey("type")) { |
8673 type = _json["type"]; | 8879 type = _json["type"]; |
8674 } | 8880 } |
8675 } | 8881 } |
8676 | 8882 |
8677 core.Map<core.String, core.Object> toJson() { | 8883 core.Map<core.String, core.Object> toJson() { |
8678 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 8884 final core.Map<core.String, core.Object> _json = |
| 8885 new core.Map<core.String, core.Object>(); |
8679 if (address != null) { | 8886 if (address != null) { |
8680 _json["address"] = address; | 8887 _json["address"] = address; |
8681 } | 8888 } |
8682 if (customType != null) { | 8889 if (customType != null) { |
8683 _json["customType"] = customType; | 8890 _json["customType"] = customType; |
8684 } | 8891 } |
8685 if (primary != null) { | 8892 if (primary != null) { |
8686 _json["primary"] = primary; | 8893 _json["primary"] = primary; |
8687 } | 8894 } |
8688 if (type != null) { | 8895 if (type != null) { |
8689 _json["type"] = type; | 8896 _json["type"] = type; |
8690 } | 8897 } |
8691 return _json; | 8898 return _json; |
8692 } | 8899 } |
8693 } | 8900 } |
8694 | 8901 |
8695 /** JSON template for an externalId entry. */ | 8902 /// JSON template for an externalId entry. |
8696 class UserExternalId { | 8903 class UserExternalId { |
8697 /** Custom type. */ | 8904 /// Custom type. |
8698 core.String customType; | 8905 core.String customType; |
8699 /** The type of the Id. */ | 8906 |
| 8907 /// The type of the Id. |
8700 core.String type; | 8908 core.String type; |
8701 /** The value of the id. */ | 8909 |
| 8910 /// The value of the id. |
8702 core.String value; | 8911 core.String value; |
8703 | 8912 |
8704 UserExternalId(); | 8913 UserExternalId(); |
8705 | 8914 |
8706 UserExternalId.fromJson(core.Map _json) { | 8915 UserExternalId.fromJson(core.Map _json) { |
8707 if (_json.containsKey("customType")) { | 8916 if (_json.containsKey("customType")) { |
8708 customType = _json["customType"]; | 8917 customType = _json["customType"]; |
8709 } | 8918 } |
8710 if (_json.containsKey("type")) { | 8919 if (_json.containsKey("type")) { |
8711 type = _json["type"]; | 8920 type = _json["type"]; |
8712 } | 8921 } |
8713 if (_json.containsKey("value")) { | 8922 if (_json.containsKey("value")) { |
8714 value = _json["value"]; | 8923 value = _json["value"]; |
8715 } | 8924 } |
8716 } | 8925 } |
8717 | 8926 |
8718 core.Map<core.String, core.Object> toJson() { | 8927 core.Map<core.String, core.Object> toJson() { |
8719 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 8928 final core.Map<core.String, core.Object> _json = |
| 8929 new core.Map<core.String, core.Object>(); |
8720 if (customType != null) { | 8930 if (customType != null) { |
8721 _json["customType"] = customType; | 8931 _json["customType"] = customType; |
8722 } | 8932 } |
8723 if (type != null) { | 8933 if (type != null) { |
8724 _json["type"] = type; | 8934 _json["type"] = type; |
8725 } | 8935 } |
8726 if (value != null) { | 8936 if (value != null) { |
8727 _json["value"] = value; | 8937 _json["value"] = value; |
8728 } | 8938 } |
8729 return _json; | 8939 return _json; |
8730 } | 8940 } |
8731 } | 8941 } |
8732 | 8942 |
8733 /** JSON template for instant messenger of an user. */ | 8943 /// JSON template for instant messenger of an user. |
8734 class UserIm { | 8944 class UserIm { |
8735 /** Custom protocol. */ | 8945 /// Custom protocol. |
8736 core.String customProtocol; | 8946 core.String customProtocol; |
8737 /** Custom type. */ | 8947 |
| 8948 /// Custom type. |
8738 core.String customType; | 8949 core.String customType; |
8739 /** Instant messenger id. */ | 8950 |
| 8951 /// Instant messenger id. |
8740 core.String im; | 8952 core.String im; |
8741 /** | 8953 |
8742 * If this is user's primary im. Only one entry could be marked as primary. | 8954 /// If this is user's primary im. Only one entry could be marked as primary. |
8743 */ | |
8744 core.bool primary; | 8955 core.bool primary; |
8745 /** | 8956 |
8746 * Protocol used in the instant messenger. It should be one of the values from | 8957 /// Protocol used in the instant messenger. It should be one of the values |
8747 * ImProtocolTypes map. Similar to type, it can take a CUSTOM value and | 8958 /// from ImProtocolTypes map. Similar to type, it can take a CUSTOM value and |
8748 * specify the custom name in customProtocol field. | 8959 /// specify the custom name in customProtocol field. |
8749 */ | |
8750 core.String protocol; | 8960 core.String protocol; |
8751 /** | 8961 |
8752 * Each entry can have a type which indicates standard types of that entry. | 8962 /// Each entry can have a type which indicates standard types of that entry. |
8753 * For example instant messengers could be of home, work etc. In addition to | 8963 /// For example instant messengers could be of home, work etc. In addition to |
8754 * the standard type, an entry can have a custom type and can take any value. | 8964 /// the standard type, an entry can have a custom type and can take any |
8755 * Such types should have the CUSTOM value as type and also have a customType | 8965 /// value. Such types should have the CUSTOM value as type and also have a |
8756 * value. | 8966 /// customType value. |
8757 */ | |
8758 core.String type; | 8967 core.String type; |
8759 | 8968 |
8760 UserIm(); | 8969 UserIm(); |
8761 | 8970 |
8762 UserIm.fromJson(core.Map _json) { | 8971 UserIm.fromJson(core.Map _json) { |
8763 if (_json.containsKey("customProtocol")) { | 8972 if (_json.containsKey("customProtocol")) { |
8764 customProtocol = _json["customProtocol"]; | 8973 customProtocol = _json["customProtocol"]; |
8765 } | 8974 } |
8766 if (_json.containsKey("customType")) { | 8975 if (_json.containsKey("customType")) { |
8767 customType = _json["customType"]; | 8976 customType = _json["customType"]; |
8768 } | 8977 } |
8769 if (_json.containsKey("im")) { | 8978 if (_json.containsKey("im")) { |
8770 im = _json["im"]; | 8979 im = _json["im"]; |
8771 } | 8980 } |
8772 if (_json.containsKey("primary")) { | 8981 if (_json.containsKey("primary")) { |
8773 primary = _json["primary"]; | 8982 primary = _json["primary"]; |
8774 } | 8983 } |
8775 if (_json.containsKey("protocol")) { | 8984 if (_json.containsKey("protocol")) { |
8776 protocol = _json["protocol"]; | 8985 protocol = _json["protocol"]; |
8777 } | 8986 } |
8778 if (_json.containsKey("type")) { | 8987 if (_json.containsKey("type")) { |
8779 type = _json["type"]; | 8988 type = _json["type"]; |
8780 } | 8989 } |
8781 } | 8990 } |
8782 | 8991 |
8783 core.Map<core.String, core.Object> toJson() { | 8992 core.Map<core.String, core.Object> toJson() { |
8784 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 8993 final core.Map<core.String, core.Object> _json = |
| 8994 new core.Map<core.String, core.Object>(); |
8785 if (customProtocol != null) { | 8995 if (customProtocol != null) { |
8786 _json["customProtocol"] = customProtocol; | 8996 _json["customProtocol"] = customProtocol; |
8787 } | 8997 } |
8788 if (customType != null) { | 8998 if (customType != null) { |
8789 _json["customType"] = customType; | 8999 _json["customType"] = customType; |
8790 } | 9000 } |
8791 if (im != null) { | 9001 if (im != null) { |
8792 _json["im"] = im; | 9002 _json["im"] = im; |
8793 } | 9003 } |
8794 if (primary != null) { | 9004 if (primary != null) { |
8795 _json["primary"] = primary; | 9005 _json["primary"] = primary; |
8796 } | 9006 } |
8797 if (protocol != null) { | 9007 if (protocol != null) { |
8798 _json["protocol"] = protocol; | 9008 _json["protocol"] = protocol; |
8799 } | 9009 } |
8800 if (type != null) { | 9010 if (type != null) { |
8801 _json["type"] = type; | 9011 _json["type"] = type; |
8802 } | 9012 } |
8803 return _json; | 9013 return _json; |
8804 } | 9014 } |
8805 } | 9015 } |
8806 | 9016 |
8807 /** JSON template for a keyword entry. */ | 9017 /// JSON template for a keyword entry. |
8808 class UserKeyword { | 9018 class UserKeyword { |
8809 /** Custom Type. */ | 9019 /// Custom Type. |
8810 core.String customType; | 9020 core.String customType; |
8811 /** | 9021 |
8812 * Each entry can have a type which indicates standard type of that entry. For | 9022 /// Each entry can have a type which indicates standard type of that entry. |
8813 * example, keyword could be of type occupation or outlook. In addition to the | 9023 /// For example, keyword could be of type occupation or outlook. In addition |
8814 * standard type, an entry can have a custom type and can give it any name. | 9024 /// to the standard type, an entry can have a custom type and can give it any |
8815 * Such types should have the CUSTOM value as type and also have a customType | 9025 /// name. Such types should have the CUSTOM value as type and also have a |
8816 * value. | 9026 /// customType value. |
8817 */ | |
8818 core.String type; | 9027 core.String type; |
8819 /** Keyword. */ | 9028 |
| 9029 /// Keyword. |
8820 core.String value; | 9030 core.String value; |
8821 | 9031 |
8822 UserKeyword(); | 9032 UserKeyword(); |
8823 | 9033 |
8824 UserKeyword.fromJson(core.Map _json) { | 9034 UserKeyword.fromJson(core.Map _json) { |
8825 if (_json.containsKey("customType")) { | 9035 if (_json.containsKey("customType")) { |
8826 customType = _json["customType"]; | 9036 customType = _json["customType"]; |
8827 } | 9037 } |
8828 if (_json.containsKey("type")) { | 9038 if (_json.containsKey("type")) { |
8829 type = _json["type"]; | 9039 type = _json["type"]; |
8830 } | 9040 } |
8831 if (_json.containsKey("value")) { | 9041 if (_json.containsKey("value")) { |
8832 value = _json["value"]; | 9042 value = _json["value"]; |
8833 } | 9043 } |
8834 } | 9044 } |
8835 | 9045 |
8836 core.Map<core.String, core.Object> toJson() { | 9046 core.Map<core.String, core.Object> toJson() { |
8837 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 9047 final core.Map<core.String, core.Object> _json = |
| 9048 new core.Map<core.String, core.Object>(); |
8838 if (customType != null) { | 9049 if (customType != null) { |
8839 _json["customType"] = customType; | 9050 _json["customType"] = customType; |
8840 } | 9051 } |
8841 if (type != null) { | 9052 if (type != null) { |
8842 _json["type"] = type; | 9053 _json["type"] = type; |
8843 } | 9054 } |
8844 if (value != null) { | 9055 if (value != null) { |
8845 _json["value"] = value; | 9056 _json["value"] = value; |
8846 } | 9057 } |
8847 return _json; | 9058 return _json; |
8848 } | 9059 } |
8849 } | 9060 } |
8850 | 9061 |
8851 /** JSON template for a language entry. */ | 9062 /// JSON template for a language entry. |
8852 class UserLanguage { | 9063 class UserLanguage { |
8853 /** | 9064 /// Other language. User can provide own language name if there is no |
8854 * Other language. User can provide own language name if there is no | 9065 /// corresponding Google III language code. If this is set LanguageCode can't |
8855 * corresponding Google III language code. If this is set LanguageCode can't | 9066 /// be set |
8856 * be set | |
8857 */ | |
8858 core.String customLanguage; | 9067 core.String customLanguage; |
8859 /** | 9068 |
8860 * Language Code. Should be used for storing Google III LanguageCode string | 9069 /// Language Code. Should be used for storing Google III LanguageCode string |
8861 * representation for language. Illegal values cause SchemaException. | 9070 /// representation for language. Illegal values cause SchemaException. |
8862 */ | |
8863 core.String languageCode; | 9071 core.String languageCode; |
8864 | 9072 |
8865 UserLanguage(); | 9073 UserLanguage(); |
8866 | 9074 |
8867 UserLanguage.fromJson(core.Map _json) { | 9075 UserLanguage.fromJson(core.Map _json) { |
8868 if (_json.containsKey("customLanguage")) { | 9076 if (_json.containsKey("customLanguage")) { |
8869 customLanguage = _json["customLanguage"]; | 9077 customLanguage = _json["customLanguage"]; |
8870 } | 9078 } |
8871 if (_json.containsKey("languageCode")) { | 9079 if (_json.containsKey("languageCode")) { |
8872 languageCode = _json["languageCode"]; | 9080 languageCode = _json["languageCode"]; |
8873 } | 9081 } |
8874 } | 9082 } |
8875 | 9083 |
8876 core.Map<core.String, core.Object> toJson() { | 9084 core.Map<core.String, core.Object> toJson() { |
8877 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 9085 final core.Map<core.String, core.Object> _json = |
| 9086 new core.Map<core.String, core.Object>(); |
8878 if (customLanguage != null) { | 9087 if (customLanguage != null) { |
8879 _json["customLanguage"] = customLanguage; | 9088 _json["customLanguage"] = customLanguage; |
8880 } | 9089 } |
8881 if (languageCode != null) { | 9090 if (languageCode != null) { |
8882 _json["languageCode"] = languageCode; | 9091 _json["languageCode"] = languageCode; |
8883 } | 9092 } |
8884 return _json; | 9093 return _json; |
8885 } | 9094 } |
8886 } | 9095 } |
8887 | 9096 |
8888 /** JSON template for a location entry. */ | 9097 /// JSON template for a location entry. |
8889 class UserLocation { | 9098 class UserLocation { |
8890 /** | 9099 /// Textual location. This is most useful for display purposes to concisely |
8891 * Textual location. This is most useful for display purposes to concisely | 9100 /// describe the location. For example, "Mountain View, CA", "Near Seattle", |
8892 * describe the location. For example, "Mountain View, CA", "Near Seattle", | 9101 /// "US-NYC-9TH 9A209A". |
8893 * "US-NYC-9TH 9A209A". | |
8894 */ | |
8895 core.String area; | 9102 core.String area; |
8896 /** Building Identifier. */ | 9103 |
| 9104 /// Building Identifier. |
8897 core.String buildingId; | 9105 core.String buildingId; |
8898 /** Custom Type. */ | 9106 |
| 9107 /// Custom Type. |
8899 core.String customType; | 9108 core.String customType; |
8900 /** Most specific textual code of individual desk location. */ | 9109 |
| 9110 /// Most specific textual code of individual desk location. |
8901 core.String deskCode; | 9111 core.String deskCode; |
8902 /** Floor name/number. */ | 9112 |
| 9113 /// Floor name/number. |
8903 core.String floorName; | 9114 core.String floorName; |
8904 /** | 9115 |
8905 * Floor section. More specific location within the floor. For example, if a | 9116 /// Floor section. More specific location within the floor. For example, if a |
8906 * floor is divided into sections "A", "B", and "C", this field would identify | 9117 /// floor is divided into sections "A", "B", and "C", this field would |
8907 * one of those values. | 9118 /// identify one of those values. |
8908 */ | |
8909 core.String floorSection; | 9119 core.String floorSection; |
8910 /** | 9120 |
8911 * Each entry can have a type which indicates standard types of that entry. | 9121 /// Each entry can have a type which indicates standard types of that entry. |
8912 * For example location could be of types default and desk. In addition to | 9122 /// For example location could be of types default and desk. In addition to |
8913 * standard type, an entry can have a custom type and can give it any name. | 9123 /// standard type, an entry can have a custom type and can give it any name. |
8914 * Such types should have "custom" as type and also have a customType value. | 9124 /// Such types should have "custom" as type and also have a customType value. |
8915 */ | |
8916 core.String type; | 9125 core.String type; |
8917 | 9126 |
8918 UserLocation(); | 9127 UserLocation(); |
8919 | 9128 |
8920 UserLocation.fromJson(core.Map _json) { | 9129 UserLocation.fromJson(core.Map _json) { |
8921 if (_json.containsKey("area")) { | 9130 if (_json.containsKey("area")) { |
8922 area = _json["area"]; | 9131 area = _json["area"]; |
8923 } | 9132 } |
8924 if (_json.containsKey("buildingId")) { | 9133 if (_json.containsKey("buildingId")) { |
8925 buildingId = _json["buildingId"]; | 9134 buildingId = _json["buildingId"]; |
8926 } | 9135 } |
8927 if (_json.containsKey("customType")) { | 9136 if (_json.containsKey("customType")) { |
8928 customType = _json["customType"]; | 9137 customType = _json["customType"]; |
8929 } | 9138 } |
8930 if (_json.containsKey("deskCode")) { | 9139 if (_json.containsKey("deskCode")) { |
8931 deskCode = _json["deskCode"]; | 9140 deskCode = _json["deskCode"]; |
8932 } | 9141 } |
8933 if (_json.containsKey("floorName")) { | 9142 if (_json.containsKey("floorName")) { |
8934 floorName = _json["floorName"]; | 9143 floorName = _json["floorName"]; |
8935 } | 9144 } |
8936 if (_json.containsKey("floorSection")) { | 9145 if (_json.containsKey("floorSection")) { |
8937 floorSection = _json["floorSection"]; | 9146 floorSection = _json["floorSection"]; |
8938 } | 9147 } |
8939 if (_json.containsKey("type")) { | 9148 if (_json.containsKey("type")) { |
8940 type = _json["type"]; | 9149 type = _json["type"]; |
8941 } | 9150 } |
8942 } | 9151 } |
8943 | 9152 |
8944 core.Map<core.String, core.Object> toJson() { | 9153 core.Map<core.String, core.Object> toJson() { |
8945 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 9154 final core.Map<core.String, core.Object> _json = |
| 9155 new core.Map<core.String, core.Object>(); |
8946 if (area != null) { | 9156 if (area != null) { |
8947 _json["area"] = area; | 9157 _json["area"] = area; |
8948 } | 9158 } |
8949 if (buildingId != null) { | 9159 if (buildingId != null) { |
8950 _json["buildingId"] = buildingId; | 9160 _json["buildingId"] = buildingId; |
8951 } | 9161 } |
8952 if (customType != null) { | 9162 if (customType != null) { |
8953 _json["customType"] = customType; | 9163 _json["customType"] = customType; |
8954 } | 9164 } |
8955 if (deskCode != null) { | 9165 if (deskCode != null) { |
8956 _json["deskCode"] = deskCode; | 9166 _json["deskCode"] = deskCode; |
8957 } | 9167 } |
8958 if (floorName != null) { | 9168 if (floorName != null) { |
8959 _json["floorName"] = floorName; | 9169 _json["floorName"] = floorName; |
8960 } | 9170 } |
8961 if (floorSection != null) { | 9171 if (floorSection != null) { |
8962 _json["floorSection"] = floorSection; | 9172 _json["floorSection"] = floorSection; |
8963 } | 9173 } |
8964 if (type != null) { | 9174 if (type != null) { |
8965 _json["type"] = type; | 9175 _json["type"] = type; |
8966 } | 9176 } |
8967 return _json; | 9177 return _json; |
8968 } | 9178 } |
8969 } | 9179 } |
8970 | 9180 |
8971 /** | 9181 /// JSON request template for setting/revoking admin status of a user in |
8972 * JSON request template for setting/revoking admin status of a user in | 9182 /// Directory API. |
8973 * Directory API. | |
8974 */ | |
8975 class UserMakeAdmin { | 9183 class UserMakeAdmin { |
8976 /** Boolean indicating new admin status of the user */ | 9184 /// Boolean indicating new admin status of the user |
8977 core.bool status; | 9185 core.bool status; |
8978 | 9186 |
8979 UserMakeAdmin(); | 9187 UserMakeAdmin(); |
8980 | 9188 |
8981 UserMakeAdmin.fromJson(core.Map _json) { | 9189 UserMakeAdmin.fromJson(core.Map _json) { |
8982 if (_json.containsKey("status")) { | 9190 if (_json.containsKey("status")) { |
8983 status = _json["status"]; | 9191 status = _json["status"]; |
8984 } | 9192 } |
8985 } | 9193 } |
8986 | 9194 |
8987 core.Map<core.String, core.Object> toJson() { | 9195 core.Map<core.String, core.Object> toJson() { |
8988 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 9196 final core.Map<core.String, core.Object> _json = |
| 9197 new core.Map<core.String, core.Object>(); |
8989 if (status != null) { | 9198 if (status != null) { |
8990 _json["status"] = status; | 9199 _json["status"] = status; |
8991 } | 9200 } |
8992 return _json; | 9201 return _json; |
8993 } | 9202 } |
8994 } | 9203 } |
8995 | 9204 |
8996 /** JSON template for name of a user in Directory API. */ | 9205 /// JSON template for name of a user in Directory API. |
8997 class UserName { | 9206 class UserName { |
8998 /** Last Name */ | 9207 /// Last Name |
8999 core.String familyName; | 9208 core.String familyName; |
9000 /** Full Name */ | 9209 |
| 9210 /// Full Name |
9001 core.String fullName; | 9211 core.String fullName; |
9002 /** First Name */ | 9212 |
| 9213 /// First Name |
9003 core.String givenName; | 9214 core.String givenName; |
9004 | 9215 |
9005 UserName(); | 9216 UserName(); |
9006 | 9217 |
9007 UserName.fromJson(core.Map _json) { | 9218 UserName.fromJson(core.Map _json) { |
9008 if (_json.containsKey("familyName")) { | 9219 if (_json.containsKey("familyName")) { |
9009 familyName = _json["familyName"]; | 9220 familyName = _json["familyName"]; |
9010 } | 9221 } |
9011 if (_json.containsKey("fullName")) { | 9222 if (_json.containsKey("fullName")) { |
9012 fullName = _json["fullName"]; | 9223 fullName = _json["fullName"]; |
9013 } | 9224 } |
9014 if (_json.containsKey("givenName")) { | 9225 if (_json.containsKey("givenName")) { |
9015 givenName = _json["givenName"]; | 9226 givenName = _json["givenName"]; |
9016 } | 9227 } |
9017 } | 9228 } |
9018 | 9229 |
9019 core.Map<core.String, core.Object> toJson() { | 9230 core.Map<core.String, core.Object> toJson() { |
9020 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 9231 final core.Map<core.String, core.Object> _json = |
| 9232 new core.Map<core.String, core.Object>(); |
9021 if (familyName != null) { | 9233 if (familyName != null) { |
9022 _json["familyName"] = familyName; | 9234 _json["familyName"] = familyName; |
9023 } | 9235 } |
9024 if (fullName != null) { | 9236 if (fullName != null) { |
9025 _json["fullName"] = fullName; | 9237 _json["fullName"] = fullName; |
9026 } | 9238 } |
9027 if (givenName != null) { | 9239 if (givenName != null) { |
9028 _json["givenName"] = givenName; | 9240 _json["givenName"] = givenName; |
9029 } | 9241 } |
9030 return _json; | 9242 return _json; |
9031 } | 9243 } |
9032 } | 9244 } |
9033 | 9245 |
9034 /** JSON template for an organization entry. */ | 9246 /// JSON template for an organization entry. |
9035 class UserOrganization { | 9247 class UserOrganization { |
9036 /** The cost center of the users department. */ | 9248 /// The cost center of the users department. |
9037 core.String costCenter; | 9249 core.String costCenter; |
9038 /** Custom type. */ | 9250 |
| 9251 /// Custom type. |
9039 core.String customType; | 9252 core.String customType; |
9040 /** Department within the organization. */ | 9253 |
| 9254 /// Department within the organization. |
9041 core.String department; | 9255 core.String department; |
9042 /** Description of the organization. */ | 9256 |
| 9257 /// Description of the organization. |
9043 core.String description; | 9258 core.String description; |
9044 /** The domain to which the organization belongs to. */ | 9259 |
| 9260 /// The domain to which the organization belongs to. |
9045 core.String domain; | 9261 core.String domain; |
9046 /** | 9262 |
9047 * The full-time equivalent percent within the organization (100000 = 100%). | 9263 /// The full-time equivalent percent within the organization (100000 = 100%). |
9048 */ | |
9049 core.int fullTimeEquivalent; | 9264 core.int fullTimeEquivalent; |
9050 /** | 9265 |
9051 * Location of the organization. This need not be fully qualified address. | 9266 /// Location of the organization. This need not be fully qualified address. |
9052 */ | |
9053 core.String location; | 9267 core.String location; |
9054 /** Name of the organization */ | 9268 |
| 9269 /// Name of the organization |
9055 core.String name; | 9270 core.String name; |
9056 /** If it user's primary organization. */ | 9271 |
| 9272 /// If it user's primary organization. |
9057 core.bool primary; | 9273 core.bool primary; |
9058 /** Symbol of the organization. */ | 9274 |
| 9275 /// Symbol of the organization. |
9059 core.String symbol; | 9276 core.String symbol; |
9060 /** Title (designation) of the user in the organization. */ | 9277 |
| 9278 /// Title (designation) of the user in the organization. |
9061 core.String title; | 9279 core.String title; |
9062 /** | 9280 |
9063 * Each entry can have a type which indicates standard types of that entry. | 9281 /// Each entry can have a type which indicates standard types of that entry. |
9064 * For example organization could be of school, work etc. In addition to the | 9282 /// For example organization could be of school, work etc. In addition to the |
9065 * standard type, an entry can have a custom type and can give it any name. | 9283 /// standard type, an entry can have a custom type and can give it any name. |
9066 * Such types should have the CUSTOM value as type and also have a CustomType | 9284 /// Such types should have the CUSTOM value as type and also have a |
9067 * value. | 9285 /// CustomType value. |
9068 */ | |
9069 core.String type; | 9286 core.String type; |
9070 | 9287 |
9071 UserOrganization(); | 9288 UserOrganization(); |
9072 | 9289 |
9073 UserOrganization.fromJson(core.Map _json) { | 9290 UserOrganization.fromJson(core.Map _json) { |
9074 if (_json.containsKey("costCenter")) { | 9291 if (_json.containsKey("costCenter")) { |
9075 costCenter = _json["costCenter"]; | 9292 costCenter = _json["costCenter"]; |
9076 } | 9293 } |
9077 if (_json.containsKey("customType")) { | 9294 if (_json.containsKey("customType")) { |
9078 customType = _json["customType"]; | 9295 customType = _json["customType"]; |
(...skipping 24 matching lines...) Expand all Loading... |
9103 } | 9320 } |
9104 if (_json.containsKey("title")) { | 9321 if (_json.containsKey("title")) { |
9105 title = _json["title"]; | 9322 title = _json["title"]; |
9106 } | 9323 } |
9107 if (_json.containsKey("type")) { | 9324 if (_json.containsKey("type")) { |
9108 type = _json["type"]; | 9325 type = _json["type"]; |
9109 } | 9326 } |
9110 } | 9327 } |
9111 | 9328 |
9112 core.Map<core.String, core.Object> toJson() { | 9329 core.Map<core.String, core.Object> toJson() { |
9113 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 9330 final core.Map<core.String, core.Object> _json = |
| 9331 new core.Map<core.String, core.Object>(); |
9114 if (costCenter != null) { | 9332 if (costCenter != null) { |
9115 _json["costCenter"] = costCenter; | 9333 _json["costCenter"] = costCenter; |
9116 } | 9334 } |
9117 if (customType != null) { | 9335 if (customType != null) { |
9118 _json["customType"] = customType; | 9336 _json["customType"] = customType; |
9119 } | 9337 } |
9120 if (department != null) { | 9338 if (department != null) { |
9121 _json["department"] = department; | 9339 _json["department"] = department; |
9122 } | 9340 } |
9123 if (description != null) { | 9341 if (description != null) { |
(...skipping 20 matching lines...) Expand all Loading... |
9144 if (title != null) { | 9362 if (title != null) { |
9145 _json["title"] = title; | 9363 _json["title"] = title; |
9146 } | 9364 } |
9147 if (type != null) { | 9365 if (type != null) { |
9148 _json["type"] = type; | 9366 _json["type"] = type; |
9149 } | 9367 } |
9150 return _json; | 9368 return _json; |
9151 } | 9369 } |
9152 } | 9370 } |
9153 | 9371 |
9154 /** JSON template for a phone entry. */ | 9372 /// JSON template for a phone entry. |
9155 class UserPhone { | 9373 class UserPhone { |
9156 /** Custom Type. */ | 9374 /// Custom Type. |
9157 core.String customType; | 9375 core.String customType; |
9158 /** If this is user's primary phone or not. */ | 9376 |
| 9377 /// If this is user's primary phone or not. |
9159 core.bool primary; | 9378 core.bool primary; |
9160 /** | 9379 |
9161 * Each entry can have a type which indicates standard types of that entry. | 9380 /// Each entry can have a type which indicates standard types of that entry. |
9162 * For example phone could be of home_fax, work, mobile etc. In addition to | 9381 /// For example phone could be of home_fax, work, mobile etc. In addition to |
9163 * the standard type, an entry can have a custom type and can give it any | 9382 /// the standard type, an entry can have a custom type and can give it any |
9164 * name. Such types should have the CUSTOM value as type and also have a | 9383 /// name. Such types should have the CUSTOM value as type and also have a |
9165 * customType value. | 9384 /// customType value. |
9166 */ | |
9167 core.String type; | 9385 core.String type; |
9168 /** Phone number. */ | 9386 |
| 9387 /// Phone number. |
9169 core.String value; | 9388 core.String value; |
9170 | 9389 |
9171 UserPhone(); | 9390 UserPhone(); |
9172 | 9391 |
9173 UserPhone.fromJson(core.Map _json) { | 9392 UserPhone.fromJson(core.Map _json) { |
9174 if (_json.containsKey("customType")) { | 9393 if (_json.containsKey("customType")) { |
9175 customType = _json["customType"]; | 9394 customType = _json["customType"]; |
9176 } | 9395 } |
9177 if (_json.containsKey("primary")) { | 9396 if (_json.containsKey("primary")) { |
9178 primary = _json["primary"]; | 9397 primary = _json["primary"]; |
9179 } | 9398 } |
9180 if (_json.containsKey("type")) { | 9399 if (_json.containsKey("type")) { |
9181 type = _json["type"]; | 9400 type = _json["type"]; |
9182 } | 9401 } |
9183 if (_json.containsKey("value")) { | 9402 if (_json.containsKey("value")) { |
9184 value = _json["value"]; | 9403 value = _json["value"]; |
9185 } | 9404 } |
9186 } | 9405 } |
9187 | 9406 |
9188 core.Map<core.String, core.Object> toJson() { | 9407 core.Map<core.String, core.Object> toJson() { |
9189 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 9408 final core.Map<core.String, core.Object> _json = |
| 9409 new core.Map<core.String, core.Object>(); |
9190 if (customType != null) { | 9410 if (customType != null) { |
9191 _json["customType"] = customType; | 9411 _json["customType"] = customType; |
9192 } | 9412 } |
9193 if (primary != null) { | 9413 if (primary != null) { |
9194 _json["primary"] = primary; | 9414 _json["primary"] = primary; |
9195 } | 9415 } |
9196 if (type != null) { | 9416 if (type != null) { |
9197 _json["type"] = type; | 9417 _json["type"] = type; |
9198 } | 9418 } |
9199 if (value != null) { | 9419 if (value != null) { |
9200 _json["value"] = value; | 9420 _json["value"] = value; |
9201 } | 9421 } |
9202 return _json; | 9422 return _json; |
9203 } | 9423 } |
9204 } | 9424 } |
9205 | 9425 |
9206 /** JSON template for Photo object in Directory API. */ | 9426 /// JSON template for Photo object in Directory API. |
9207 class UserPhoto { | 9427 class UserPhoto { |
9208 /** ETag of the resource. */ | 9428 /// ETag of the resource. |
9209 core.String etag; | 9429 core.String etag; |
9210 /** Height in pixels of the photo */ | 9430 |
| 9431 /// Height in pixels of the photo |
9211 core.int height; | 9432 core.int height; |
9212 /** Unique identifier of User (Read-only) */ | 9433 |
| 9434 /// Unique identifier of User (Read-only) |
9213 core.String id; | 9435 core.String id; |
9214 /** Kind of resource this is. */ | 9436 |
| 9437 /// Kind of resource this is. |
9215 core.String kind; | 9438 core.String kind; |
9216 /** Mime Type of the photo */ | 9439 |
| 9440 /// Mime Type of the photo |
9217 core.String mimeType; | 9441 core.String mimeType; |
9218 /** Base64 encoded photo data */ | 9442 |
| 9443 /// Base64 encoded photo data |
9219 core.String photoData; | 9444 core.String photoData; |
9220 core.List<core.int> get photoDataAsBytes { | 9445 core.List<core.int> get photoDataAsBytes { |
9221 return convert.BASE64.decode(photoData); | 9446 return convert.BASE64.decode(photoData); |
9222 } | 9447 } |
9223 | 9448 |
9224 void set photoDataAsBytes(core.List<core.int> _bytes) { | 9449 void set photoDataAsBytes(core.List<core.int> _bytes) { |
9225 photoData = convert.BASE64.encode(_bytes).replaceAll("/", "_").replaceAll("+
", "-"); | 9450 photoData = |
| 9451 convert.BASE64.encode(_bytes).replaceAll("/", "_").replaceAll("+", "-"); |
9226 } | 9452 } |
9227 /** Primary email of User (Read-only) */ | 9453 |
| 9454 /// Primary email of User (Read-only) |
9228 core.String primaryEmail; | 9455 core.String primaryEmail; |
9229 /** Width in pixels of the photo */ | 9456 |
| 9457 /// Width in pixels of the photo |
9230 core.int width; | 9458 core.int width; |
9231 | 9459 |
9232 UserPhoto(); | 9460 UserPhoto(); |
9233 | 9461 |
9234 UserPhoto.fromJson(core.Map _json) { | 9462 UserPhoto.fromJson(core.Map _json) { |
9235 if (_json.containsKey("etag")) { | 9463 if (_json.containsKey("etag")) { |
9236 etag = _json["etag"]; | 9464 etag = _json["etag"]; |
9237 } | 9465 } |
9238 if (_json.containsKey("height")) { | 9466 if (_json.containsKey("height")) { |
9239 height = _json["height"]; | 9467 height = _json["height"]; |
(...skipping 12 matching lines...) Expand all Loading... |
9252 } | 9480 } |
9253 if (_json.containsKey("primaryEmail")) { | 9481 if (_json.containsKey("primaryEmail")) { |
9254 primaryEmail = _json["primaryEmail"]; | 9482 primaryEmail = _json["primaryEmail"]; |
9255 } | 9483 } |
9256 if (_json.containsKey("width")) { | 9484 if (_json.containsKey("width")) { |
9257 width = _json["width"]; | 9485 width = _json["width"]; |
9258 } | 9486 } |
9259 } | 9487 } |
9260 | 9488 |
9261 core.Map<core.String, core.Object> toJson() { | 9489 core.Map<core.String, core.Object> toJson() { |
9262 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 9490 final core.Map<core.String, core.Object> _json = |
| 9491 new core.Map<core.String, core.Object>(); |
9263 if (etag != null) { | 9492 if (etag != null) { |
9264 _json["etag"] = etag; | 9493 _json["etag"] = etag; |
9265 } | 9494 } |
9266 if (height != null) { | 9495 if (height != null) { |
9267 _json["height"] = height; | 9496 _json["height"] = height; |
9268 } | 9497 } |
9269 if (id != null) { | 9498 if (id != null) { |
9270 _json["id"] = id; | 9499 _json["id"] = id; |
9271 } | 9500 } |
9272 if (kind != null) { | 9501 if (kind != null) { |
9273 _json["kind"] = kind; | 9502 _json["kind"] = kind; |
9274 } | 9503 } |
9275 if (mimeType != null) { | 9504 if (mimeType != null) { |
9276 _json["mimeType"] = mimeType; | 9505 _json["mimeType"] = mimeType; |
9277 } | 9506 } |
9278 if (photoData != null) { | 9507 if (photoData != null) { |
9279 _json["photoData"] = photoData; | 9508 _json["photoData"] = photoData; |
9280 } | 9509 } |
9281 if (primaryEmail != null) { | 9510 if (primaryEmail != null) { |
9282 _json["primaryEmail"] = primaryEmail; | 9511 _json["primaryEmail"] = primaryEmail; |
9283 } | 9512 } |
9284 if (width != null) { | 9513 if (width != null) { |
9285 _json["width"] = width; | 9514 _json["width"] = width; |
9286 } | 9515 } |
9287 return _json; | 9516 return _json; |
9288 } | 9517 } |
9289 } | 9518 } |
9290 | 9519 |
9291 /** | 9520 /// JSON template for a POSIX account entry. Description of the field family: |
9292 * JSON template for a POSIX account entry. Description of the field family: | 9521 /// go/fbs-posix. |
9293 * go/fbs-posix. | |
9294 */ | |
9295 class UserPosixAccount { | 9522 class UserPosixAccount { |
9296 /** The GECOS (user information) for this account. */ | 9523 /// The GECOS (user information) for this account. |
9297 core.String gecos; | 9524 core.String gecos; |
9298 /** The default group ID. */ | 9525 |
| 9526 /// The default group ID. |
9299 core.int gid; | 9527 core.int gid; |
9300 /** The path to the home directory for this account. */ | 9528 |
| 9529 /// The path to the home directory for this account. |
9301 core.String homeDirectory; | 9530 core.String homeDirectory; |
9302 /** If this is user's primary account within the SystemId. */ | 9531 |
| 9532 /// If this is user's primary account within the SystemId. |
9303 core.bool primary; | 9533 core.bool primary; |
9304 /** The path to the login shell for this account. */ | 9534 |
| 9535 /// The path to the login shell for this account. |
9305 core.String shell; | 9536 core.String shell; |
9306 /** System identifier for which account Username or Uid apply to. */ | 9537 |
| 9538 /// System identifier for which account Username or Uid apply to. |
9307 core.String systemId; | 9539 core.String systemId; |
9308 /** The POSIX compliant user ID. */ | 9540 |
| 9541 /// The POSIX compliant user ID. |
9309 core.int uid; | 9542 core.int uid; |
9310 /** The username of the account. */ | 9543 |
| 9544 /// The username of the account. |
9311 core.String username; | 9545 core.String username; |
9312 | 9546 |
9313 UserPosixAccount(); | 9547 UserPosixAccount(); |
9314 | 9548 |
9315 UserPosixAccount.fromJson(core.Map _json) { | 9549 UserPosixAccount.fromJson(core.Map _json) { |
9316 if (_json.containsKey("gecos")) { | 9550 if (_json.containsKey("gecos")) { |
9317 gecos = _json["gecos"]; | 9551 gecos = _json["gecos"]; |
9318 } | 9552 } |
9319 if (_json.containsKey("gid")) { | 9553 if (_json.containsKey("gid")) { |
9320 gid = _json["gid"]; | 9554 gid = _json["gid"]; |
(...skipping 12 matching lines...) Expand all Loading... |
9333 } | 9567 } |
9334 if (_json.containsKey("uid")) { | 9568 if (_json.containsKey("uid")) { |
9335 uid = _json["uid"]; | 9569 uid = _json["uid"]; |
9336 } | 9570 } |
9337 if (_json.containsKey("username")) { | 9571 if (_json.containsKey("username")) { |
9338 username = _json["username"]; | 9572 username = _json["username"]; |
9339 } | 9573 } |
9340 } | 9574 } |
9341 | 9575 |
9342 core.Map<core.String, core.Object> toJson() { | 9576 core.Map<core.String, core.Object> toJson() { |
9343 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 9577 final core.Map<core.String, core.Object> _json = |
| 9578 new core.Map<core.String, core.Object>(); |
9344 if (gecos != null) { | 9579 if (gecos != null) { |
9345 _json["gecos"] = gecos; | 9580 _json["gecos"] = gecos; |
9346 } | 9581 } |
9347 if (gid != null) { | 9582 if (gid != null) { |
9348 _json["gid"] = gid; | 9583 _json["gid"] = gid; |
9349 } | 9584 } |
9350 if (homeDirectory != null) { | 9585 if (homeDirectory != null) { |
9351 _json["homeDirectory"] = homeDirectory; | 9586 _json["homeDirectory"] = homeDirectory; |
9352 } | 9587 } |
9353 if (primary != null) { | 9588 if (primary != null) { |
9354 _json["primary"] = primary; | 9589 _json["primary"] = primary; |
9355 } | 9590 } |
9356 if (shell != null) { | 9591 if (shell != null) { |
9357 _json["shell"] = shell; | 9592 _json["shell"] = shell; |
9358 } | 9593 } |
9359 if (systemId != null) { | 9594 if (systemId != null) { |
9360 _json["systemId"] = systemId; | 9595 _json["systemId"] = systemId; |
9361 } | 9596 } |
9362 if (uid != null) { | 9597 if (uid != null) { |
9363 _json["uid"] = uid; | 9598 _json["uid"] = uid; |
9364 } | 9599 } |
9365 if (username != null) { | 9600 if (username != null) { |
9366 _json["username"] = username; | 9601 _json["username"] = username; |
9367 } | 9602 } |
9368 return _json; | 9603 return _json; |
9369 } | 9604 } |
9370 } | 9605 } |
9371 | 9606 |
9372 /** JSON template for a relation entry. */ | 9607 /// JSON template for a relation entry. |
9373 class UserRelation { | 9608 class UserRelation { |
9374 /** Custom Type. */ | 9609 /// Custom Type. |
9375 core.String customType; | 9610 core.String customType; |
9376 /** | 9611 |
9377 * The relation of the user. Some of the possible values are mother, father, | 9612 /// The relation of the user. Some of the possible values are mother, father, |
9378 * sister, brother, manager, assistant, partner. | 9613 /// sister, brother, manager, assistant, partner. |
9379 */ | |
9380 core.String type; | 9614 core.String type; |
9381 /** The name of the relation. */ | 9615 |
| 9616 /// The name of the relation. |
9382 core.String value; | 9617 core.String value; |
9383 | 9618 |
9384 UserRelation(); | 9619 UserRelation(); |
9385 | 9620 |
9386 UserRelation.fromJson(core.Map _json) { | 9621 UserRelation.fromJson(core.Map _json) { |
9387 if (_json.containsKey("customType")) { | 9622 if (_json.containsKey("customType")) { |
9388 customType = _json["customType"]; | 9623 customType = _json["customType"]; |
9389 } | 9624 } |
9390 if (_json.containsKey("type")) { | 9625 if (_json.containsKey("type")) { |
9391 type = _json["type"]; | 9626 type = _json["type"]; |
9392 } | 9627 } |
9393 if (_json.containsKey("value")) { | 9628 if (_json.containsKey("value")) { |
9394 value = _json["value"]; | 9629 value = _json["value"]; |
9395 } | 9630 } |
9396 } | 9631 } |
9397 | 9632 |
9398 core.Map<core.String, core.Object> toJson() { | 9633 core.Map<core.String, core.Object> toJson() { |
9399 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 9634 final core.Map<core.String, core.Object> _json = |
| 9635 new core.Map<core.String, core.Object>(); |
9400 if (customType != null) { | 9636 if (customType != null) { |
9401 _json["customType"] = customType; | 9637 _json["customType"] = customType; |
9402 } | 9638 } |
9403 if (type != null) { | 9639 if (type != null) { |
9404 _json["type"] = type; | 9640 _json["type"] = type; |
9405 } | 9641 } |
9406 if (value != null) { | 9642 if (value != null) { |
9407 _json["value"] = value; | 9643 _json["value"] = value; |
9408 } | 9644 } |
9409 return _json; | 9645 return _json; |
9410 } | 9646 } |
9411 } | 9647 } |
9412 | 9648 |
9413 /** JSON template for a POSIX account entry. */ | 9649 /// JSON template for a POSIX account entry. |
9414 class UserSshPublicKey { | 9650 class UserSshPublicKey { |
9415 /** An expiration time in microseconds since epoch. */ | 9651 /// An expiration time in microseconds since epoch. |
9416 core.String expirationTimeUsec; | 9652 core.String expirationTimeUsec; |
9417 /** A SHA-256 fingerprint of the SSH public key. (Read-only) */ | 9653 |
| 9654 /// A SHA-256 fingerprint of the SSH public key. (Read-only) |
9418 core.String fingerprint; | 9655 core.String fingerprint; |
9419 /** An SSH public key. */ | 9656 |
| 9657 /// An SSH public key. |
9420 core.String key; | 9658 core.String key; |
9421 | 9659 |
9422 UserSshPublicKey(); | 9660 UserSshPublicKey(); |
9423 | 9661 |
9424 UserSshPublicKey.fromJson(core.Map _json) { | 9662 UserSshPublicKey.fromJson(core.Map _json) { |
9425 if (_json.containsKey("expirationTimeUsec")) { | 9663 if (_json.containsKey("expirationTimeUsec")) { |
9426 expirationTimeUsec = _json["expirationTimeUsec"]; | 9664 expirationTimeUsec = _json["expirationTimeUsec"]; |
9427 } | 9665 } |
9428 if (_json.containsKey("fingerprint")) { | 9666 if (_json.containsKey("fingerprint")) { |
9429 fingerprint = _json["fingerprint"]; | 9667 fingerprint = _json["fingerprint"]; |
9430 } | 9668 } |
9431 if (_json.containsKey("key")) { | 9669 if (_json.containsKey("key")) { |
9432 key = _json["key"]; | 9670 key = _json["key"]; |
9433 } | 9671 } |
9434 } | 9672 } |
9435 | 9673 |
9436 core.Map<core.String, core.Object> toJson() { | 9674 core.Map<core.String, core.Object> toJson() { |
9437 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 9675 final core.Map<core.String, core.Object> _json = |
| 9676 new core.Map<core.String, core.Object>(); |
9438 if (expirationTimeUsec != null) { | 9677 if (expirationTimeUsec != null) { |
9439 _json["expirationTimeUsec"] = expirationTimeUsec; | 9678 _json["expirationTimeUsec"] = expirationTimeUsec; |
9440 } | 9679 } |
9441 if (fingerprint != null) { | 9680 if (fingerprint != null) { |
9442 _json["fingerprint"] = fingerprint; | 9681 _json["fingerprint"] = fingerprint; |
9443 } | 9682 } |
9444 if (key != null) { | 9683 if (key != null) { |
9445 _json["key"] = key; | 9684 _json["key"] = key; |
9446 } | 9685 } |
9447 return _json; | 9686 return _json; |
9448 } | 9687 } |
9449 } | 9688 } |
9450 | 9689 |
9451 /** JSON request template to undelete a user in Directory API. */ | 9690 /// JSON request template to undelete a user in Directory API. |
9452 class UserUndelete { | 9691 class UserUndelete { |
9453 /** OrgUnit of User */ | 9692 /// OrgUnit of User |
9454 core.String orgUnitPath; | 9693 core.String orgUnitPath; |
9455 | 9694 |
9456 UserUndelete(); | 9695 UserUndelete(); |
9457 | 9696 |
9458 UserUndelete.fromJson(core.Map _json) { | 9697 UserUndelete.fromJson(core.Map _json) { |
9459 if (_json.containsKey("orgUnitPath")) { | 9698 if (_json.containsKey("orgUnitPath")) { |
9460 orgUnitPath = _json["orgUnitPath"]; | 9699 orgUnitPath = _json["orgUnitPath"]; |
9461 } | 9700 } |
9462 } | 9701 } |
9463 | 9702 |
9464 core.Map<core.String, core.Object> toJson() { | 9703 core.Map<core.String, core.Object> toJson() { |
9465 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 9704 final core.Map<core.String, core.Object> _json = |
| 9705 new core.Map<core.String, core.Object>(); |
9466 if (orgUnitPath != null) { | 9706 if (orgUnitPath != null) { |
9467 _json["orgUnitPath"] = orgUnitPath; | 9707 _json["orgUnitPath"] = orgUnitPath; |
9468 } | 9708 } |
9469 return _json; | 9709 return _json; |
9470 } | 9710 } |
9471 } | 9711 } |
9472 | 9712 |
9473 /** JSON template for a website entry. */ | 9713 /// JSON template for a website entry. |
9474 class UserWebsite { | 9714 class UserWebsite { |
9475 /** Custom Type. */ | 9715 /// Custom Type. |
9476 core.String customType; | 9716 core.String customType; |
9477 /** If this is user's primary website or not. */ | 9717 |
| 9718 /// If this is user's primary website or not. |
9478 core.bool primary; | 9719 core.bool primary; |
9479 /** | 9720 |
9480 * Each entry can have a type which indicates standard types of that entry. | 9721 /// Each entry can have a type which indicates standard types of that entry. |
9481 * For example website could be of home, work, blog etc. In addition to the | 9722 /// For example website could be of home, work, blog etc. In addition to the |
9482 * standard type, an entry can have a custom type and can give it any name. | 9723 /// standard type, an entry can have a custom type and can give it any name. |
9483 * Such types should have the CUSTOM value as type and also have a customType | 9724 /// Such types should have the CUSTOM value as type and also have a |
9484 * value. | 9725 /// customType value. |
9485 */ | |
9486 core.String type; | 9726 core.String type; |
9487 /** Website. */ | 9727 |
| 9728 /// Website. |
9488 core.String value; | 9729 core.String value; |
9489 | 9730 |
9490 UserWebsite(); | 9731 UserWebsite(); |
9491 | 9732 |
9492 UserWebsite.fromJson(core.Map _json) { | 9733 UserWebsite.fromJson(core.Map _json) { |
9493 if (_json.containsKey("customType")) { | 9734 if (_json.containsKey("customType")) { |
9494 customType = _json["customType"]; | 9735 customType = _json["customType"]; |
9495 } | 9736 } |
9496 if (_json.containsKey("primary")) { | 9737 if (_json.containsKey("primary")) { |
9497 primary = _json["primary"]; | 9738 primary = _json["primary"]; |
9498 } | 9739 } |
9499 if (_json.containsKey("type")) { | 9740 if (_json.containsKey("type")) { |
9500 type = _json["type"]; | 9741 type = _json["type"]; |
9501 } | 9742 } |
9502 if (_json.containsKey("value")) { | 9743 if (_json.containsKey("value")) { |
9503 value = _json["value"]; | 9744 value = _json["value"]; |
9504 } | 9745 } |
9505 } | 9746 } |
9506 | 9747 |
9507 core.Map<core.String, core.Object> toJson() { | 9748 core.Map<core.String, core.Object> toJson() { |
9508 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 9749 final core.Map<core.String, core.Object> _json = |
| 9750 new core.Map<core.String, core.Object>(); |
9509 if (customType != null) { | 9751 if (customType != null) { |
9510 _json["customType"] = customType; | 9752 _json["customType"] = customType; |
9511 } | 9753 } |
9512 if (primary != null) { | 9754 if (primary != null) { |
9513 _json["primary"] = primary; | 9755 _json["primary"] = primary; |
9514 } | 9756 } |
9515 if (type != null) { | 9757 if (type != null) { |
9516 _json["type"] = type; | 9758 _json["type"] = type; |
9517 } | 9759 } |
9518 if (value != null) { | 9760 if (value != null) { |
9519 _json["value"] = value; | 9761 _json["value"] = value; |
9520 } | 9762 } |
9521 return _json; | 9763 return _json; |
9522 } | 9764 } |
9523 } | 9765 } |
9524 | 9766 |
9525 /** JSON response template for List Users operation in Apps Directory API. */ | 9767 /// JSON response template for List Users operation in Apps Directory API. |
9526 class Users { | 9768 class Users { |
9527 /** ETag of the resource. */ | 9769 /// ETag of the resource. |
9528 core.String etag; | 9770 core.String etag; |
9529 /** Kind of resource this is. */ | 9771 |
| 9772 /// Kind of resource this is. |
9530 core.String kind; | 9773 core.String kind; |
9531 /** Token used to access next page of this result. */ | 9774 |
| 9775 /// Token used to access next page of this result. |
9532 core.String nextPageToken; | 9776 core.String nextPageToken; |
9533 /** | 9777 |
9534 * Event that triggered this response (only used in case of Push Response) | 9778 /// Event that triggered this response (only used in case of Push Response) |
9535 */ | |
9536 core.String triggerEvent; | 9779 core.String triggerEvent; |
9537 /** List of user objects. */ | 9780 |
| 9781 /// List of user objects. |
9538 core.List<User> users; | 9782 core.List<User> users; |
9539 | 9783 |
9540 Users(); | 9784 Users(); |
9541 | 9785 |
9542 Users.fromJson(core.Map _json) { | 9786 Users.fromJson(core.Map _json) { |
9543 if (_json.containsKey("etag")) { | 9787 if (_json.containsKey("etag")) { |
9544 etag = _json["etag"]; | 9788 etag = _json["etag"]; |
9545 } | 9789 } |
9546 if (_json.containsKey("kind")) { | 9790 if (_json.containsKey("kind")) { |
9547 kind = _json["kind"]; | 9791 kind = _json["kind"]; |
9548 } | 9792 } |
9549 if (_json.containsKey("nextPageToken")) { | 9793 if (_json.containsKey("nextPageToken")) { |
9550 nextPageToken = _json["nextPageToken"]; | 9794 nextPageToken = _json["nextPageToken"]; |
9551 } | 9795 } |
9552 if (_json.containsKey("trigger_event")) { | 9796 if (_json.containsKey("trigger_event")) { |
9553 triggerEvent = _json["trigger_event"]; | 9797 triggerEvent = _json["trigger_event"]; |
9554 } | 9798 } |
9555 if (_json.containsKey("users")) { | 9799 if (_json.containsKey("users")) { |
9556 users = _json["users"].map((value) => new User.fromJson(value)).toList(); | 9800 users = _json["users"].map((value) => new User.fromJson(value)).toList(); |
9557 } | 9801 } |
9558 } | 9802 } |
9559 | 9803 |
9560 core.Map<core.String, core.Object> toJson() { | 9804 core.Map<core.String, core.Object> toJson() { |
9561 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 9805 final core.Map<core.String, core.Object> _json = |
| 9806 new core.Map<core.String, core.Object>(); |
9562 if (etag != null) { | 9807 if (etag != null) { |
9563 _json["etag"] = etag; | 9808 _json["etag"] = etag; |
9564 } | 9809 } |
9565 if (kind != null) { | 9810 if (kind != null) { |
9566 _json["kind"] = kind; | 9811 _json["kind"] = kind; |
9567 } | 9812 } |
9568 if (nextPageToken != null) { | 9813 if (nextPageToken != null) { |
9569 _json["nextPageToken"] = nextPageToken; | 9814 _json["nextPageToken"] = nextPageToken; |
9570 } | 9815 } |
9571 if (triggerEvent != null) { | 9816 if (triggerEvent != null) { |
9572 _json["trigger_event"] = triggerEvent; | 9817 _json["trigger_event"] = triggerEvent; |
9573 } | 9818 } |
9574 if (users != null) { | 9819 if (users != null) { |
9575 _json["users"] = users.map((value) => (value).toJson()).toList(); | 9820 _json["users"] = users.map((value) => (value).toJson()).toList(); |
9576 } | 9821 } |
9577 return _json; | 9822 return _json; |
9578 } | 9823 } |
9579 } | 9824 } |
9580 | 9825 |
9581 /** JSON template for verification codes in Directory API. */ | 9826 /// JSON template for verification codes in Directory API. |
9582 class VerificationCode { | 9827 class VerificationCode { |
9583 /** ETag of the resource. */ | 9828 /// ETag of the resource. |
9584 core.String etag; | 9829 core.String etag; |
9585 /** | 9830 |
9586 * The type of the resource. This is always admin#directory#verificationCode. | 9831 /// The type of the resource. This is always |
9587 */ | 9832 /// admin#directory#verificationCode. |
9588 core.String kind; | 9833 core.String kind; |
9589 /** The obfuscated unique ID of the user. */ | 9834 |
| 9835 /// The obfuscated unique ID of the user. |
9590 core.String userId; | 9836 core.String userId; |
9591 /** | 9837 |
9592 * A current verification code for the user. Invalidated or used verification | 9838 /// A current verification code for the user. Invalidated or used |
9593 * codes are not returned as part of the result. | 9839 /// verification codes are not returned as part of the result. |
9594 */ | |
9595 core.String verificationCode; | 9840 core.String verificationCode; |
9596 | 9841 |
9597 VerificationCode(); | 9842 VerificationCode(); |
9598 | 9843 |
9599 VerificationCode.fromJson(core.Map _json) { | 9844 VerificationCode.fromJson(core.Map _json) { |
9600 if (_json.containsKey("etag")) { | 9845 if (_json.containsKey("etag")) { |
9601 etag = _json["etag"]; | 9846 etag = _json["etag"]; |
9602 } | 9847 } |
9603 if (_json.containsKey("kind")) { | 9848 if (_json.containsKey("kind")) { |
9604 kind = _json["kind"]; | 9849 kind = _json["kind"]; |
9605 } | 9850 } |
9606 if (_json.containsKey("userId")) { | 9851 if (_json.containsKey("userId")) { |
9607 userId = _json["userId"]; | 9852 userId = _json["userId"]; |
9608 } | 9853 } |
9609 if (_json.containsKey("verificationCode")) { | 9854 if (_json.containsKey("verificationCode")) { |
9610 verificationCode = _json["verificationCode"]; | 9855 verificationCode = _json["verificationCode"]; |
9611 } | 9856 } |
9612 } | 9857 } |
9613 | 9858 |
9614 core.Map<core.String, core.Object> toJson() { | 9859 core.Map<core.String, core.Object> toJson() { |
9615 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 9860 final core.Map<core.String, core.Object> _json = |
| 9861 new core.Map<core.String, core.Object>(); |
9616 if (etag != null) { | 9862 if (etag != null) { |
9617 _json["etag"] = etag; | 9863 _json["etag"] = etag; |
9618 } | 9864 } |
9619 if (kind != null) { | 9865 if (kind != null) { |
9620 _json["kind"] = kind; | 9866 _json["kind"] = kind; |
9621 } | 9867 } |
9622 if (userId != null) { | 9868 if (userId != null) { |
9623 _json["userId"] = userId; | 9869 _json["userId"] = userId; |
9624 } | 9870 } |
9625 if (verificationCode != null) { | 9871 if (verificationCode != null) { |
9626 _json["verificationCode"] = verificationCode; | 9872 _json["verificationCode"] = verificationCode; |
9627 } | 9873 } |
9628 return _json; | 9874 return _json; |
9629 } | 9875 } |
9630 } | 9876 } |
9631 | 9877 |
9632 /** | 9878 /// JSON response template for List verification codes operation in Directory |
9633 * JSON response template for List verification codes operation in Directory | 9879 /// API. |
9634 * API. | |
9635 */ | |
9636 class VerificationCodes { | 9880 class VerificationCodes { |
9637 /** ETag of the resource. */ | 9881 /// ETag of the resource. |
9638 core.String etag; | 9882 core.String etag; |
9639 /** A list of verification code resources. */ | 9883 |
| 9884 /// A list of verification code resources. |
9640 core.List<VerificationCode> items; | 9885 core.List<VerificationCode> items; |
9641 /** | 9886 |
9642 * The type of the resource. This is always | 9887 /// The type of the resource. This is always |
9643 * admin#directory#verificationCodesList. | 9888 /// admin#directory#verificationCodesList. |
9644 */ | |
9645 core.String kind; | 9889 core.String kind; |
9646 | 9890 |
9647 VerificationCodes(); | 9891 VerificationCodes(); |
9648 | 9892 |
9649 VerificationCodes.fromJson(core.Map _json) { | 9893 VerificationCodes.fromJson(core.Map _json) { |
9650 if (_json.containsKey("etag")) { | 9894 if (_json.containsKey("etag")) { |
9651 etag = _json["etag"]; | 9895 etag = _json["etag"]; |
9652 } | 9896 } |
9653 if (_json.containsKey("items")) { | 9897 if (_json.containsKey("items")) { |
9654 items = _json["items"].map((value) => new VerificationCode.fromJson(value)
).toList(); | 9898 items = _json["items"] |
| 9899 .map((value) => new VerificationCode.fromJson(value)) |
| 9900 .toList(); |
9655 } | 9901 } |
9656 if (_json.containsKey("kind")) { | 9902 if (_json.containsKey("kind")) { |
9657 kind = _json["kind"]; | 9903 kind = _json["kind"]; |
9658 } | 9904 } |
9659 } | 9905 } |
9660 | 9906 |
9661 core.Map<core.String, core.Object> toJson() { | 9907 core.Map<core.String, core.Object> toJson() { |
9662 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 9908 final core.Map<core.String, core.Object> _json = |
| 9909 new core.Map<core.String, core.Object>(); |
9663 if (etag != null) { | 9910 if (etag != null) { |
9664 _json["etag"] = etag; | 9911 _json["etag"] = etag; |
9665 } | 9912 } |
9666 if (items != null) { | 9913 if (items != null) { |
9667 _json["items"] = items.map((value) => (value).toJson()).toList(); | 9914 _json["items"] = items.map((value) => (value).toJson()).toList(); |
9668 } | 9915 } |
9669 if (kind != null) { | 9916 if (kind != null) { |
9670 _json["kind"] = kind; | 9917 _json["kind"] = kind; |
9671 } | 9918 } |
9672 return _json; | 9919 return _json; |
9673 } | 9920 } |
9674 } | 9921 } |
OLD | NEW |