Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(540)

Side by Side Diff: generated/googleapis_beta/lib/oslogin/v1alpha.dart

Issue 3006323002: Api-Roll 54: 2017-09-11 (Closed)
Patch Set: use 2.0.0-dev.infinity sdk constraint in pubspecs Created 3 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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_beta.oslogin.v1alpha; 3 library googleapis_beta.oslogin.v1alpha;
4 4
5 import 'dart:core' as core; 5 import 'dart:core' as core;
6 import 'dart:async' as async; 6 import 'dart:async' as async;
7 import 'dart:convert' as convert; 7 import 'dart:convert' as convert;
8 8
9 import 'package:_discoveryapis_commons/_discoveryapis_commons.dart' as commons; 9 import 'package:_discoveryapis_commons/_discoveryapis_commons.dart' as commons;
10 import 'package:http/http.dart' as http; 10 import 'package:http/http.dart' as http;
11 11
12 export 'package:_discoveryapis_commons/_discoveryapis_commons.dart' show 12 export 'package:_discoveryapis_commons/_discoveryapis_commons.dart'
13 ApiRequestError, DetailedApiRequestError; 13 show ApiRequestError, DetailedApiRequestError;
14 14
15 const core.String USER_AGENT = 'dart-api-client oslogin/v1alpha'; 15 const core.String USER_AGENT = 'dart-api-client oslogin/v1alpha';
16 16
17 /** Manages OS login configuration for Directory API users. */ 17 /// Manages OS login configuration for Directory API users.
18 class OsloginApi { 18 class OsloginApi {
19 /** View and manage your data across Google Cloud Platform services */ 19 /// View and manage your data across Google Cloud Platform services
20 static const CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platf orm"; 20 static const CloudPlatformScope =
21 "https://www.googleapis.com/auth/cloud-platform";
21 22
22 /** View your data across Google Cloud Platform services */ 23 /// View your data across Google Cloud Platform services
23 static const CloudPlatformReadOnlyScope = "https://www.googleapis.com/auth/clo ud-platform.read-only"; 24 static const CloudPlatformReadOnlyScope =
24 25 "https://www.googleapis.com/auth/cloud-platform.read-only";
25 26
26 final commons.ApiRequester _requester; 27 final commons.ApiRequester _requester;
27 28
28 UsersResourceApi get users => new UsersResourceApi(_requester); 29 UsersResourceApi get users => new UsersResourceApi(_requester);
29 30
30 OsloginApi(http.Client client, {core.String rootUrl: "https://oslogin.googleap is.com/", core.String servicePath: ""}) : 31 OsloginApi(http.Client client,
31 _requester = new commons.ApiRequester(client, rootUrl, servicePath, USER_A GENT); 32 {core.String rootUrl: "https://oslogin.googleapis.com/",
33 core.String servicePath: ""})
34 : _requester =
35 new commons.ApiRequester(client, rootUrl, servicePath, USER_AGENT);
32 } 36 }
33 37
34
35 class UsersResourceApi { 38 class UsersResourceApi {
36 final commons.ApiRequester _requester; 39 final commons.ApiRequester _requester;
37 40
38 UsersSshPublicKeysResourceApi get sshPublicKeys => new UsersSshPublicKeysResou rceApi(_requester); 41 UsersSshPublicKeysResourceApi get sshPublicKeys =>
42 new UsersSshPublicKeysResourceApi(_requester);
39 43
40 UsersResourceApi(commons.ApiRequester client) : 44 UsersResourceApi(commons.ApiRequester client) : _requester = client;
41 _requester = client;
42 45
43 /** 46 /// Retrieves the profile information used for logging in to a virtual
44 * Retrieves the profile information used for logging in to a virtual machine 47 /// machine
45 * on Google Compute Engine. 48 /// on Google Compute Engine.
46 * 49 ///
47 * Request parameters: 50 /// Request parameters:
48 * 51 ///
49 * [name] - The unique ID for the user in format `users/{user}`. 52 /// [name] - The unique ID for the user in format `users/{user}`.
50 * Value must have pattern "^users/[^/]+$". 53 /// Value must have pattern "^users/[^/]+$".
51 * 54 ///
52 * Completes with a [LoginProfile]. 55 /// Completes with a [LoginProfile].
53 * 56 ///
54 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 57 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
55 * error. 58 /// an error.
56 * 59 ///
57 * If the used [http.Client] completes with an error when making a REST call, 60 /// If the used [http.Client] completes with an error when making a REST
58 * this method will complete with the same error. 61 /// call, this method will complete with the same error.
59 */
60 async.Future<LoginProfile> getLoginProfile(core.String name) { 62 async.Future<LoginProfile> getLoginProfile(core.String name) {
61 var _url = null; 63 var _url = null;
62 var _queryParams = new core.Map(); 64 var _queryParams = new core.Map();
63 var _uploadMedia = null; 65 var _uploadMedia = null;
64 var _uploadOptions = null; 66 var _uploadOptions = null;
65 var _downloadOptions = commons.DownloadOptions.Metadata; 67 var _downloadOptions = commons.DownloadOptions.Metadata;
66 var _body = null; 68 var _body = null;
67 69
68 if (name == null) { 70 if (name == null) {
69 throw new core.ArgumentError("Parameter name is required."); 71 throw new core.ArgumentError("Parameter name is required.");
70 } 72 }
71 73
72 _url = 'v1alpha/' + commons.Escaper.ecapeVariableReserved('$name') + '/login Profile'; 74 _url = 'v1alpha/' +
75 commons.Escaper.ecapeVariableReserved('$name') +
76 '/loginProfile';
73 77
74 var _response = _requester.request(_url, 78 var _response = _requester.request(_url, "GET",
75 "GET", 79 body: _body,
76 body: _body, 80 queryParams: _queryParams,
77 queryParams: _queryParams, 81 uploadOptions: _uploadOptions,
78 uploadOptions: _uploadOptions, 82 uploadMedia: _uploadMedia,
79 uploadMedia: _uploadMedia, 83 downloadOptions: _downloadOptions);
80 downloadOptions: _downloadOptions);
81 return _response.then((data) => new LoginProfile.fromJson(data)); 84 return _response.then((data) => new LoginProfile.fromJson(data));
82 } 85 }
83 86
84 /** 87 /// Adds an SSH public key and returns the profile information. Default POSIX
85 * Adds an SSH public key and returns the profile information. Default POSIX 88 /// account information is set when no username and UID exist as part of the
86 * account information is set when no username and UID exist as part of the 89 /// login profile.
87 * login profile. 90 ///
88 * 91 /// [request] - The metadata request object.
89 * [request] - The metadata request object. 92 ///
90 * 93 /// Request parameters:
91 * Request parameters: 94 ///
92 * 95 /// [parent] - The unique ID for the user in format `users/{user}`.
93 * [parent] - The unique ID for the user in format `users/{user}`. 96 /// Value must have pattern "^users/[^/]+$".
94 * Value must have pattern "^users/[^/]+$". 97 ///
95 * 98 /// Completes with a [ImportSshPublicKeyResponse].
96 * Completes with a [ImportSshPublicKeyResponse]. 99 ///
97 * 100 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
98 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 101 /// an error.
99 * error. 102 ///
100 * 103 /// If the used [http.Client] completes with an error when making a REST
101 * If the used [http.Client] completes with an error when making a REST call, 104 /// call, this method will complete with the same error.
102 * this method will complete with the same error. 105 async.Future<ImportSshPublicKeyResponse> importSshPublicKey(
103 */ 106 SshPublicKey request, core.String parent) {
104 async.Future<ImportSshPublicKeyResponse> importSshPublicKey(SshPublicKey reque st, core.String parent) {
105 var _url = null; 107 var _url = null;
106 var _queryParams = new core.Map(); 108 var _queryParams = new core.Map();
107 var _uploadMedia = null; 109 var _uploadMedia = null;
108 var _uploadOptions = null; 110 var _uploadOptions = null;
109 var _downloadOptions = commons.DownloadOptions.Metadata; 111 var _downloadOptions = commons.DownloadOptions.Metadata;
110 var _body = null; 112 var _body = null;
111 113
112 if (request != null) { 114 if (request != null) {
113 _body = convert.JSON.encode((request).toJson()); 115 _body = convert.JSON.encode((request).toJson());
114 } 116 }
115 if (parent == null) { 117 if (parent == null) {
116 throw new core.ArgumentError("Parameter parent is required."); 118 throw new core.ArgumentError("Parameter parent is required.");
117 } 119 }
118 120
119 _url = 'v1alpha/' + commons.Escaper.ecapeVariableReserved('$parent') + ':imp ortSshPublicKey'; 121 _url = 'v1alpha/' +
122 commons.Escaper.ecapeVariableReserved('$parent') +
123 ':importSshPublicKey';
120 124
121 var _response = _requester.request(_url, 125 var _response = _requester.request(_url, "POST",
122 "POST", 126 body: _body,
123 body: _body, 127 queryParams: _queryParams,
124 queryParams: _queryParams, 128 uploadOptions: _uploadOptions,
125 uploadOptions: _uploadOptions, 129 uploadMedia: _uploadMedia,
126 uploadMedia: _uploadMedia, 130 downloadOptions: _downloadOptions);
127 downloadOptions: _downloadOptions); 131 return _response
128 return _response.then((data) => new ImportSshPublicKeyResponse.fromJson(data )); 132 .then((data) => new ImportSshPublicKeyResponse.fromJson(data));
129 } 133 }
130
131 } 134 }
132 135
133
134 class UsersSshPublicKeysResourceApi { 136 class UsersSshPublicKeysResourceApi {
135 final commons.ApiRequester _requester; 137 final commons.ApiRequester _requester;
136 138
137 UsersSshPublicKeysResourceApi(commons.ApiRequester client) : 139 UsersSshPublicKeysResourceApi(commons.ApiRequester client)
138 _requester = client; 140 : _requester = client;
139 141
140 /** 142 /// Deletes an SSH public key.
141 * Deletes an SSH public key. 143 ///
142 * 144 /// Request parameters:
143 * Request parameters: 145 ///
144 * 146 /// [name] - The fingerprint of the public key to update. Public keys are
145 * [name] - The fingerprint of the public key to update. Public keys are 147 /// identified by
146 * identified by 148 /// their SHA-256 fingerprint. The fingerprint of the public key is in format
147 * their SHA-256 fingerprint. The fingerprint of the public key is in format 149 /// `users/{user}/sshPublicKeys/{fingerprint}`.
148 * `users/{user}/sshPublicKeys/{fingerprint}`. 150 /// Value must have pattern "^users/[^/]+/sshPublicKeys/[^/]+$".
149 * Value must have pattern "^users/[^/]+/sshPublicKeys/[^/]+$". 151 ///
150 * 152 /// Completes with a [Empty].
151 * Completes with a [Empty]. 153 ///
152 * 154 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
153 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 155 /// an error.
154 * error. 156 ///
155 * 157 /// If the used [http.Client] completes with an error when making a REST
156 * If the used [http.Client] completes with an error when making a REST call, 158 /// call, this method will complete with the same error.
157 * this method will complete with the same error.
158 */
159 async.Future<Empty> delete(core.String name) { 159 async.Future<Empty> delete(core.String name) {
160 var _url = null; 160 var _url = null;
161 var _queryParams = new core.Map(); 161 var _queryParams = new core.Map();
162 var _uploadMedia = null; 162 var _uploadMedia = null;
163 var _uploadOptions = null; 163 var _uploadOptions = null;
164 var _downloadOptions = commons.DownloadOptions.Metadata; 164 var _downloadOptions = commons.DownloadOptions.Metadata;
165 var _body = null; 165 var _body = null;
166 166
167 if (name == null) { 167 if (name == null) {
168 throw new core.ArgumentError("Parameter name is required."); 168 throw new core.ArgumentError("Parameter name is required.");
169 } 169 }
170 170
171 _url = 'v1alpha/' + commons.Escaper.ecapeVariableReserved('$name'); 171 _url = 'v1alpha/' + commons.Escaper.ecapeVariableReserved('$name');
172 172
173 var _response = _requester.request(_url, 173 var _response = _requester.request(_url, "DELETE",
174 "DELETE", 174 body: _body,
175 body: _body, 175 queryParams: _queryParams,
176 queryParams: _queryParams, 176 uploadOptions: _uploadOptions,
177 uploadOptions: _uploadOptions, 177 uploadMedia: _uploadMedia,
178 uploadMedia: _uploadMedia, 178 downloadOptions: _downloadOptions);
179 downloadOptions: _downloadOptions);
180 return _response.then((data) => new Empty.fromJson(data)); 179 return _response.then((data) => new Empty.fromJson(data));
181 } 180 }
182 181
183 /** 182 /// Retrieves an SSH public key.
184 * Retrieves an SSH public key. 183 ///
185 * 184 /// Request parameters:
186 * Request parameters: 185 ///
187 * 186 /// [name] - The fingerprint of the public key to retrieve. Public keys are
188 * [name] - The fingerprint of the public key to retrieve. Public keys are 187 /// identified
189 * identified 188 /// by their SHA-256 fingerprint. The fingerprint of the public key is in
190 * by their SHA-256 fingerprint. The fingerprint of the public key is in 189 /// format `users/{user}/sshPublicKeys/{fingerprint}`.
191 * format `users/{user}/sshPublicKeys/{fingerprint}`. 190 /// Value must have pattern "^users/[^/]+/sshPublicKeys/[^/]+$".
192 * Value must have pattern "^users/[^/]+/sshPublicKeys/[^/]+$". 191 ///
193 * 192 /// Completes with a [SshPublicKey].
194 * Completes with a [SshPublicKey]. 193 ///
195 * 194 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
196 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 195 /// an error.
197 * error. 196 ///
198 * 197 /// 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, 198 /// call, this method will complete with the same error.
200 * this method will complete with the same error.
201 */
202 async.Future<SshPublicKey> get(core.String name) { 199 async.Future<SshPublicKey> get(core.String name) {
203 var _url = null; 200 var _url = null;
204 var _queryParams = new core.Map(); 201 var _queryParams = new core.Map();
205 var _uploadMedia = null; 202 var _uploadMedia = null;
206 var _uploadOptions = null; 203 var _uploadOptions = null;
207 var _downloadOptions = commons.DownloadOptions.Metadata; 204 var _downloadOptions = commons.DownloadOptions.Metadata;
208 var _body = null; 205 var _body = null;
209 206
210 if (name == null) { 207 if (name == null) {
211 throw new core.ArgumentError("Parameter name is required."); 208 throw new core.ArgumentError("Parameter name is required.");
212 } 209 }
213 210
214 _url = 'v1alpha/' + commons.Escaper.ecapeVariableReserved('$name'); 211 _url = 'v1alpha/' + commons.Escaper.ecapeVariableReserved('$name');
215 212
216 var _response = _requester.request(_url, 213 var _response = _requester.request(_url, "GET",
217 "GET", 214 body: _body,
218 body: _body, 215 queryParams: _queryParams,
219 queryParams: _queryParams, 216 uploadOptions: _uploadOptions,
220 uploadOptions: _uploadOptions, 217 uploadMedia: _uploadMedia,
221 uploadMedia: _uploadMedia, 218 downloadOptions: _downloadOptions);
222 downloadOptions: _downloadOptions);
223 return _response.then((data) => new SshPublicKey.fromJson(data)); 219 return _response.then((data) => new SshPublicKey.fromJson(data));
224 } 220 }
225 221
226 /** 222 /// Updates an SSH public key and returns the profile information. This
227 * Updates an SSH public key and returns the profile information. This method 223 /// method
228 * supports patch semantics. 224 /// supports patch semantics.
229 * 225 ///
230 * [request] - The metadata request object. 226 /// [request] - The metadata request object.
231 * 227 ///
232 * Request parameters: 228 /// Request parameters:
233 * 229 ///
234 * [name] - The fingerprint of the public key to update. Public keys are 230 /// [name] - The fingerprint of the public key to update. Public keys are
235 * identified by 231 /// identified by
236 * their SHA-256 fingerprint. The fingerprint of the public key is in format 232 /// their SHA-256 fingerprint. The fingerprint of the public key is in format
237 * `users/{user}/sshPublicKeys/{fingerprint}`. 233 /// `users/{user}/sshPublicKeys/{fingerprint}`.
238 * Value must have pattern "^users/[^/]+/sshPublicKeys/[^/]+$". 234 /// Value must have pattern "^users/[^/]+/sshPublicKeys/[^/]+$".
239 * 235 ///
240 * [updateMask] - Mask to control which fields get updated. Updates all if not 236 /// [updateMask] - Mask to control which fields get updated. Updates all if
241 * present. 237 /// not present.
242 * 238 ///
243 * Completes with a [SshPublicKey]. 239 /// Completes with a [SshPublicKey].
244 * 240 ///
245 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 241 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
246 * error. 242 /// an error.
247 * 243 ///
248 * If the used [http.Client] completes with an error when making a REST call, 244 /// If the used [http.Client] completes with an error when making a REST
249 * this method will complete with the same error. 245 /// call, this method will complete with the same error.
250 */ 246 async.Future<SshPublicKey> patch(SshPublicKey request, core.String name,
251 async.Future<SshPublicKey> patch(SshPublicKey request, core.String name, {core .String updateMask}) { 247 {core.String updateMask}) {
252 var _url = null; 248 var _url = null;
253 var _queryParams = new core.Map(); 249 var _queryParams = new core.Map();
254 var _uploadMedia = null; 250 var _uploadMedia = null;
255 var _uploadOptions = null; 251 var _uploadOptions = null;
256 var _downloadOptions = commons.DownloadOptions.Metadata; 252 var _downloadOptions = commons.DownloadOptions.Metadata;
257 var _body = null; 253 var _body = null;
258 254
259 if (request != null) { 255 if (request != null) {
260 _body = convert.JSON.encode((request).toJson()); 256 _body = convert.JSON.encode((request).toJson());
261 } 257 }
262 if (name == null) { 258 if (name == null) {
263 throw new core.ArgumentError("Parameter name is required."); 259 throw new core.ArgumentError("Parameter name is required.");
264 } 260 }
265 if (updateMask != null) { 261 if (updateMask != null) {
266 _queryParams["updateMask"] = [updateMask]; 262 _queryParams["updateMask"] = [updateMask];
267 } 263 }
268 264
269 _url = 'v1alpha/' + commons.Escaper.ecapeVariableReserved('$name'); 265 _url = 'v1alpha/' + commons.Escaper.ecapeVariableReserved('$name');
270 266
271 var _response = _requester.request(_url, 267 var _response = _requester.request(_url, "PATCH",
272 "PATCH", 268 body: _body,
273 body: _body, 269 queryParams: _queryParams,
274 queryParams: _queryParams, 270 uploadOptions: _uploadOptions,
275 uploadOptions: _uploadOptions, 271 uploadMedia: _uploadMedia,
276 uploadMedia: _uploadMedia, 272 downloadOptions: _downloadOptions);
277 downloadOptions: _downloadOptions);
278 return _response.then((data) => new SshPublicKey.fromJson(data)); 273 return _response.then((data) => new SshPublicKey.fromJson(data));
279 } 274 }
280
281 } 275 }
282 276
283 277 /// A generic empty message that you can re-use to avoid defining duplicated
284 278 /// empty messages in your APIs. A typical example is to use it as the request
285 /** 279 /// or the response type of an API method. For instance:
286 * A generic empty message that you can re-use to avoid defining duplicated 280 ///
287 * empty messages in your APIs. A typical example is to use it as the request 281 /// service Foo {
288 * or the response type of an API method. For instance: 282 /// rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
289 * 283 /// }
290 * service Foo { 284 ///
291 * rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); 285 /// The JSON representation for `Empty` is empty JSON object `{}`.
292 * }
293 *
294 * The JSON representation for `Empty` is empty JSON object `{}`.
295 */
296 class Empty { 286 class Empty {
297
298 Empty(); 287 Empty();
299 288
300 Empty.fromJson(core.Map _json) { 289 Empty.fromJson(core.Map _json) {}
301 }
302 290
303 core.Map<core.String, core.Object> toJson() { 291 core.Map<core.String, core.Object> toJson() {
304 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 292 final core.Map<core.String, core.Object> _json =
293 new core.Map<core.String, core.Object>();
305 return _json; 294 return _json;
306 } 295 }
307 } 296 }
308 297
309 /** A response message for importing an SSH public key. */ 298 /// A response message for importing an SSH public key.
310 class ImportSshPublicKeyResponse { 299 class ImportSshPublicKeyResponse {
311 /** The login profile information for the user. */ 300 /// The login profile information for the user.
312 LoginProfile loginProfile; 301 LoginProfile loginProfile;
313 302
314 ImportSshPublicKeyResponse(); 303 ImportSshPublicKeyResponse();
315 304
316 ImportSshPublicKeyResponse.fromJson(core.Map _json) { 305 ImportSshPublicKeyResponse.fromJson(core.Map _json) {
317 if (_json.containsKey("loginProfile")) { 306 if (_json.containsKey("loginProfile")) {
318 loginProfile = new LoginProfile.fromJson(_json["loginProfile"]); 307 loginProfile = new LoginProfile.fromJson(_json["loginProfile"]);
319 } 308 }
320 } 309 }
321 310
322 core.Map<core.String, core.Object> toJson() { 311 core.Map<core.String, core.Object> toJson() {
323 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 312 final core.Map<core.String, core.Object> _json =
313 new core.Map<core.String, core.Object>();
324 if (loginProfile != null) { 314 if (loginProfile != null) {
325 _json["loginProfile"] = (loginProfile).toJson(); 315 _json["loginProfile"] = (loginProfile).toJson();
326 } 316 }
327 return _json; 317 return _json;
328 } 318 }
329 } 319 }
330 320
331 /** 321 /// The Directory API profile information used for logging in to a virtual
332 * The Directory API profile information used for logging in to a virtual 322 /// machine on Google Compute Engine.
333 * machine on Google Compute Engine.
334 */
335 class LoginProfile { 323 class LoginProfile {
336 /** A unique user ID for identifying the user. */ 324 /// A unique user ID for identifying the user.
337 core.String name; 325 core.String name;
338 /** The list of POSIX accounts associated with the Directory API user. */ 326
327 /// The list of POSIX accounts associated with the Directory API user.
339 core.List<PosixAccount> posixAccounts; 328 core.List<PosixAccount> posixAccounts;
340 /** A map from SSH public key fingerprint to the associated key object. */ 329
330 /// A map from SSH public key fingerprint to the associated key object.
341 core.Map<core.String, SshPublicKey> sshPublicKeys; 331 core.Map<core.String, SshPublicKey> sshPublicKeys;
342 /** Indicates if the user is suspended. */ 332
333 /// Indicates if the user is suspended.
343 core.bool suspended; 334 core.bool suspended;
344 335
345 LoginProfile(); 336 LoginProfile();
346 337
347 LoginProfile.fromJson(core.Map _json) { 338 LoginProfile.fromJson(core.Map _json) {
348 if (_json.containsKey("name")) { 339 if (_json.containsKey("name")) {
349 name = _json["name"]; 340 name = _json["name"];
350 } 341 }
351 if (_json.containsKey("posixAccounts")) { 342 if (_json.containsKey("posixAccounts")) {
352 posixAccounts = _json["posixAccounts"].map((value) => new PosixAccount.fro mJson(value)).toList(); 343 posixAccounts = _json["posixAccounts"]
344 .map((value) => new PosixAccount.fromJson(value))
345 .toList();
353 } 346 }
354 if (_json.containsKey("sshPublicKeys")) { 347 if (_json.containsKey("sshPublicKeys")) {
355 sshPublicKeys = commons.mapMap<core.Map<core.String, core.Object>, SshPubl icKey>(_json["sshPublicKeys"], (core.Map<core.String, core.Object> item) => new SshPublicKey.fromJson(item)); 348 sshPublicKeys =
349 commons.mapMap<core.Map<core.String, core.Object>, SshPublicKey>(
350 _json["sshPublicKeys"],
351 (core.Map<core.String, core.Object> item) =>
352 new SshPublicKey.fromJson(item));
356 } 353 }
357 if (_json.containsKey("suspended")) { 354 if (_json.containsKey("suspended")) {
358 suspended = _json["suspended"]; 355 suspended = _json["suspended"];
359 } 356 }
360 } 357 }
361 358
362 core.Map<core.String, core.Object> toJson() { 359 core.Map<core.String, core.Object> toJson() {
363 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 360 final core.Map<core.String, core.Object> _json =
361 new core.Map<core.String, core.Object>();
364 if (name != null) { 362 if (name != null) {
365 _json["name"] = name; 363 _json["name"] = name;
366 } 364 }
367 if (posixAccounts != null) { 365 if (posixAccounts != null) {
368 _json["posixAccounts"] = posixAccounts.map((value) => (value).toJson()).to List(); 366 _json["posixAccounts"] =
367 posixAccounts.map((value) => (value).toJson()).toList();
369 } 368 }
370 if (sshPublicKeys != null) { 369 if (sshPublicKeys != null) {
371 _json["sshPublicKeys"] = commons.mapMap<SshPublicKey, core.Map<core.String , core.Object>>(sshPublicKeys, (SshPublicKey item) => (item).toJson()); 370 _json["sshPublicKeys"] =
371 commons.mapMap<SshPublicKey, core.Map<core.String, core.Object>>(
372 sshPublicKeys, (SshPublicKey item) => (item).toJson());
372 } 373 }
373 if (suspended != null) { 374 if (suspended != null) {
374 _json["suspended"] = suspended; 375 _json["suspended"] = suspended;
375 } 376 }
376 return _json; 377 return _json;
377 } 378 }
378 } 379 }
379 380
380 /** The POSIX account information associated with a Directory API User. */ 381 /// The POSIX account information associated with a Directory API User.
381 class PosixAccount { 382 class PosixAccount {
382 /** The GECOS (user information) entry for this account. */ 383 /// The GECOS (user information) entry for this account.
383 core.String gecos; 384 core.String gecos;
384 /** The default group ID. */ 385
386 /// The default group ID.
385 core.int gid; 387 core.int gid;
386 /** The path to the home directory for this account. */ 388
389 /// The path to the home directory for this account.
387 core.String homeDirectory; 390 core.String homeDirectory;
388 /** Only one POSIX account can be marked as primary. */ 391
392 /// Only one POSIX account can be marked as primary.
389 core.bool primary; 393 core.bool primary;
390 /** The path to the logic shell for this account. */ 394
395 /// The path to the logic shell for this account.
391 core.String shell; 396 core.String shell;
392 /** 397
393 * System identifier for which account the username or uid applies to. 398 /// System identifier for which account the username or uid applies to.
394 * By default, the empty value is used. 399 /// By default, the empty value is used.
395 */
396 core.String systemId; 400 core.String systemId;
397 /** The user ID. */ 401
402 /// The user ID.
398 core.int uid; 403 core.int uid;
399 /** The username of the POSIX account. */ 404
405 /// The username of the POSIX account.
400 core.String username; 406 core.String username;
401 407
402 PosixAccount(); 408 PosixAccount();
403 409
404 PosixAccount.fromJson(core.Map _json) { 410 PosixAccount.fromJson(core.Map _json) {
405 if (_json.containsKey("gecos")) { 411 if (_json.containsKey("gecos")) {
406 gecos = _json["gecos"]; 412 gecos = _json["gecos"];
407 } 413 }
408 if (_json.containsKey("gid")) { 414 if (_json.containsKey("gid")) {
409 gid = _json["gid"]; 415 gid = _json["gid"];
(...skipping 12 matching lines...) Expand all
422 } 428 }
423 if (_json.containsKey("uid")) { 429 if (_json.containsKey("uid")) {
424 uid = _json["uid"]; 430 uid = _json["uid"];
425 } 431 }
426 if (_json.containsKey("username")) { 432 if (_json.containsKey("username")) {
427 username = _json["username"]; 433 username = _json["username"];
428 } 434 }
429 } 435 }
430 436
431 core.Map<core.String, core.Object> toJson() { 437 core.Map<core.String, core.Object> toJson() {
432 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 438 final core.Map<core.String, core.Object> _json =
439 new core.Map<core.String, core.Object>();
433 if (gecos != null) { 440 if (gecos != null) {
434 _json["gecos"] = gecos; 441 _json["gecos"] = gecos;
435 } 442 }
436 if (gid != null) { 443 if (gid != null) {
437 _json["gid"] = gid; 444 _json["gid"] = gid;
438 } 445 }
439 if (homeDirectory != null) { 446 if (homeDirectory != null) {
440 _json["homeDirectory"] = homeDirectory; 447 _json["homeDirectory"] = homeDirectory;
441 } 448 }
442 if (primary != null) { 449 if (primary != null) {
443 _json["primary"] = primary; 450 _json["primary"] = primary;
444 } 451 }
445 if (shell != null) { 452 if (shell != null) {
446 _json["shell"] = shell; 453 _json["shell"] = shell;
447 } 454 }
448 if (systemId != null) { 455 if (systemId != null) {
449 _json["systemId"] = systemId; 456 _json["systemId"] = systemId;
450 } 457 }
451 if (uid != null) { 458 if (uid != null) {
452 _json["uid"] = uid; 459 _json["uid"] = uid;
453 } 460 }
454 if (username != null) { 461 if (username != null) {
455 _json["username"] = username; 462 _json["username"] = username;
456 } 463 }
457 return _json; 464 return _json;
458 } 465 }
459 } 466 }
460 467
461 /** The SSH public key information associated with a Directory API User. */ 468 /// The SSH public key information associated with a Directory API User.
462 class SshPublicKey { 469 class SshPublicKey {
463 /** An expiration time in microseconds since epoch. */ 470 /// An expiration time in microseconds since epoch.
464 core.String expirationTimeUsec; 471 core.String expirationTimeUsec;
465 /** [Output Only] The SHA-256 fingerprint of the SSH public key. */ 472
473 /// [Output Only] The SHA-256 fingerprint of the SSH public key.
466 core.String fingerprint; 474 core.String fingerprint;
467 /** 475
468 * Public key text in SSH format, defined by 476 /// Public key text in SSH format, defined by
469 * <a href="https://www.ietf.org/rfc/rfc4253.txt" target="_blank">RFC4253</a> 477 /// <a href="https://www.ietf.org/rfc/rfc4253.txt"
470 * section 6.6. 478 /// target="_blank">RFC4253</a>
471 */ 479 /// section 6.6.
472 core.String key; 480 core.String key;
473 481
474 SshPublicKey(); 482 SshPublicKey();
475 483
476 SshPublicKey.fromJson(core.Map _json) { 484 SshPublicKey.fromJson(core.Map _json) {
477 if (_json.containsKey("expirationTimeUsec")) { 485 if (_json.containsKey("expirationTimeUsec")) {
478 expirationTimeUsec = _json["expirationTimeUsec"]; 486 expirationTimeUsec = _json["expirationTimeUsec"];
479 } 487 }
480 if (_json.containsKey("fingerprint")) { 488 if (_json.containsKey("fingerprint")) {
481 fingerprint = _json["fingerprint"]; 489 fingerprint = _json["fingerprint"];
482 } 490 }
483 if (_json.containsKey("key")) { 491 if (_json.containsKey("key")) {
484 key = _json["key"]; 492 key = _json["key"];
485 } 493 }
486 } 494 }
487 495
488 core.Map<core.String, core.Object> toJson() { 496 core.Map<core.String, core.Object> toJson() {
489 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 497 final core.Map<core.String, core.Object> _json =
498 new core.Map<core.String, core.Object>();
490 if (expirationTimeUsec != null) { 499 if (expirationTimeUsec != null) {
491 _json["expirationTimeUsec"] = expirationTimeUsec; 500 _json["expirationTimeUsec"] = expirationTimeUsec;
492 } 501 }
493 if (fingerprint != null) { 502 if (fingerprint != null) {
494 _json["fingerprint"] = fingerprint; 503 _json["fingerprint"] = fingerprint;
495 } 504 }
496 if (key != null) { 505 if (key != null) {
497 _json["key"] = key; 506 _json["key"] = key;
498 } 507 }
499 return _json; 508 return _json;
500 } 509 }
501 } 510 }
OLDNEW
« no previous file with comments | « generated/googleapis_beta/lib/logging/v2beta1.dart ('k') | generated/googleapis_beta/lib/proximitybeacon/v1beta1.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698