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

Side by Side Diff: generated/googleapis_beta/lib/sqladmin/v1beta4.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.sqladmin.v1beta4; 3 library googleapis_beta.sqladmin.v1beta4;
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 sqladmin/v1beta4'; 15 const core.String USER_AGENT = 'dart-api-client sqladmin/v1beta4';
16 16
17 /** 17 /// Creates and configures Cloud SQL instances, which provide fully-managed
18 * Creates and configures Cloud SQL instances, which provide fully-managed MySQL 18 /// MySQL databases.
19 * databases.
20 */
21 class SqladminApi { 19 class SqladminApi {
22 /** View and manage your data across Google Cloud Platform services */ 20 /// View and manage your data across Google Cloud Platform services
23 static const CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platf orm"; 21 static const CloudPlatformScope =
22 "https://www.googleapis.com/auth/cloud-platform";
24 23
25 /** Manage your Google SQL Service instances */ 24 /// Manage your Google SQL Service instances
26 static const SqlserviceAdminScope = "https://www.googleapis.com/auth/sqlservic e.admin"; 25 static const SqlserviceAdminScope =
27 26 "https://www.googleapis.com/auth/sqlservice.admin";
28 27
29 final commons.ApiRequester _requester; 28 final commons.ApiRequester _requester;
30 29
31 BackupRunsResourceApi get backupRuns => new BackupRunsResourceApi(_requester); 30 BackupRunsResourceApi get backupRuns => new BackupRunsResourceApi(_requester);
32 DatabasesResourceApi get databases => new DatabasesResourceApi(_requester); 31 DatabasesResourceApi get databases => new DatabasesResourceApi(_requester);
33 FlagsResourceApi get flags => new FlagsResourceApi(_requester); 32 FlagsResourceApi get flags => new FlagsResourceApi(_requester);
34 InstancesResourceApi get instances => new InstancesResourceApi(_requester); 33 InstancesResourceApi get instances => new InstancesResourceApi(_requester);
35 OperationsResourceApi get operations => new OperationsResourceApi(_requester); 34 OperationsResourceApi get operations => new OperationsResourceApi(_requester);
36 SslCertsResourceApi get sslCerts => new SslCertsResourceApi(_requester); 35 SslCertsResourceApi get sslCerts => new SslCertsResourceApi(_requester);
37 TiersResourceApi get tiers => new TiersResourceApi(_requester); 36 TiersResourceApi get tiers => new TiersResourceApi(_requester);
38 UsersResourceApi get users => new UsersResourceApi(_requester); 37 UsersResourceApi get users => new UsersResourceApi(_requester);
39 38
40 SqladminApi(http.Client client, {core.String rootUrl: "https://www.googleapis. com/", core.String servicePath: "sql/v1beta4/"}) : 39 SqladminApi(http.Client client,
41 _requester = new commons.ApiRequester(client, rootUrl, servicePath, USER_A GENT); 40 {core.String rootUrl: "https://www.googleapis.com/",
41 core.String servicePath: "sql/v1beta4/"})
42 : _requester =
43 new commons.ApiRequester(client, rootUrl, servicePath, USER_AGENT);
42 } 44 }
43 45
44
45 class BackupRunsResourceApi { 46 class BackupRunsResourceApi {
46 final commons.ApiRequester _requester; 47 final commons.ApiRequester _requester;
47 48
48 BackupRunsResourceApi(commons.ApiRequester client) : 49 BackupRunsResourceApi(commons.ApiRequester client) : _requester = client;
49 _requester = client;
50 50
51 /** 51 /// Deletes the backup taken by a backup run.
52 * Deletes the backup taken by a backup run. 52 ///
53 * 53 /// Request parameters:
54 * Request parameters: 54 ///
55 * 55 /// [project] - Project ID of the project that contains the instance.
56 * [project] - Project ID of the project that contains the instance. 56 ///
57 * 57 /// [instance] - Cloud SQL instance ID. This does not include the project ID.
58 * [instance] - Cloud SQL instance ID. This does not include the project ID. 58 ///
59 * 59 /// [id] - The ID of the Backup Run to delete. To find a Backup Run ID, use
60 * [id] - The ID of the Backup Run to delete. To find a Backup Run ID, use the 60 /// the list method.
61 * list method. 61 ///
62 * 62 /// Completes with a [Operation].
63 * Completes with a [Operation]. 63 ///
64 * 64 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
65 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 65 /// an error.
66 * error. 66 ///
67 * 67 /// If the used [http.Client] completes with an error when making a REST
68 * If the used [http.Client] completes with an error when making a REST call, 68 /// call, this method will complete with the same error.
69 * this method will complete with the same error. 69 async.Future<Operation> delete(
70 */ 70 core.String project, core.String instance, core.String id) {
71 async.Future<Operation> delete(core.String project, core.String instance, core .String id) {
72 var _url = null; 71 var _url = null;
73 var _queryParams = new core.Map(); 72 var _queryParams = new core.Map();
74 var _uploadMedia = null; 73 var _uploadMedia = null;
75 var _uploadOptions = null; 74 var _uploadOptions = null;
76 var _downloadOptions = commons.DownloadOptions.Metadata; 75 var _downloadOptions = commons.DownloadOptions.Metadata;
77 var _body = null; 76 var _body = null;
78 77
79 if (project == null) { 78 if (project == null) {
80 throw new core.ArgumentError("Parameter project is required."); 79 throw new core.ArgumentError("Parameter project is required.");
81 } 80 }
82 if (instance == null) { 81 if (instance == null) {
83 throw new core.ArgumentError("Parameter instance is required."); 82 throw new core.ArgumentError("Parameter instance is required.");
84 } 83 }
85 if (id == null) { 84 if (id == null) {
86 throw new core.ArgumentError("Parameter id is required."); 85 throw new core.ArgumentError("Parameter id is required.");
87 } 86 }
88 87
89 _url = 'projects/' + commons.Escaper.ecapeVariable('$project') + '/instances /' + commons.Escaper.ecapeVariable('$instance') + '/backupRuns/' + commons.Escap er.ecapeVariable('$id'); 88 _url = 'projects/' +
89 commons.Escaper.ecapeVariable('$project') +
90 '/instances/' +
91 commons.Escaper.ecapeVariable('$instance') +
92 '/backupRuns/' +
93 commons.Escaper.ecapeVariable('$id');
90 94
91 var _response = _requester.request(_url, 95 var _response = _requester.request(_url, "DELETE",
92 "DELETE", 96 body: _body,
93 body: _body, 97 queryParams: _queryParams,
94 queryParams: _queryParams, 98 uploadOptions: _uploadOptions,
95 uploadOptions: _uploadOptions, 99 uploadMedia: _uploadMedia,
96 uploadMedia: _uploadMedia, 100 downloadOptions: _downloadOptions);
97 downloadOptions: _downloadOptions);
98 return _response.then((data) => new Operation.fromJson(data)); 101 return _response.then((data) => new Operation.fromJson(data));
99 } 102 }
100 103
101 /** 104 /// Retrieves a resource containing information about a backup run.
102 * Retrieves a resource containing information about a backup run. 105 ///
103 * 106 /// Request parameters:
104 * Request parameters: 107 ///
105 * 108 /// [project] - Project ID of the project that contains the instance.
106 * [project] - Project ID of the project that contains the instance. 109 ///
107 * 110 /// [instance] - Cloud SQL instance ID. This does not include the project ID.
108 * [instance] - Cloud SQL instance ID. This does not include the project ID. 111 ///
109 * 112 /// [id] - The ID of this Backup Run.
110 * [id] - The ID of this Backup Run. 113 ///
111 * 114 /// Completes with a [BackupRun].
112 * Completes with a [BackupRun]. 115 ///
113 * 116 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
114 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 117 /// an error.
115 * error. 118 ///
116 * 119 /// If the used [http.Client] completes with an error when making a REST
117 * If the used [http.Client] completes with an error when making a REST call, 120 /// call, this method will complete with the same error.
118 * this method will complete with the same error. 121 async.Future<BackupRun> get(
119 */ 122 core.String project, core.String instance, core.String id) {
120 async.Future<BackupRun> get(core.String project, core.String instance, core.St ring id) {
121 var _url = null; 123 var _url = null;
122 var _queryParams = new core.Map(); 124 var _queryParams = new core.Map();
123 var _uploadMedia = null; 125 var _uploadMedia = null;
124 var _uploadOptions = null; 126 var _uploadOptions = null;
125 var _downloadOptions = commons.DownloadOptions.Metadata; 127 var _downloadOptions = commons.DownloadOptions.Metadata;
126 var _body = null; 128 var _body = null;
127 129
128 if (project == null) { 130 if (project == null) {
129 throw new core.ArgumentError("Parameter project is required."); 131 throw new core.ArgumentError("Parameter project is required.");
130 } 132 }
131 if (instance == null) { 133 if (instance == null) {
132 throw new core.ArgumentError("Parameter instance is required."); 134 throw new core.ArgumentError("Parameter instance is required.");
133 } 135 }
134 if (id == null) { 136 if (id == null) {
135 throw new core.ArgumentError("Parameter id is required."); 137 throw new core.ArgumentError("Parameter id is required.");
136 } 138 }
137 139
138 _url = 'projects/' + commons.Escaper.ecapeVariable('$project') + '/instances /' + commons.Escaper.ecapeVariable('$instance') + '/backupRuns/' + commons.Escap er.ecapeVariable('$id'); 140 _url = 'projects/' +
141 commons.Escaper.ecapeVariable('$project') +
142 '/instances/' +
143 commons.Escaper.ecapeVariable('$instance') +
144 '/backupRuns/' +
145 commons.Escaper.ecapeVariable('$id');
139 146
140 var _response = _requester.request(_url, 147 var _response = _requester.request(_url, "GET",
141 "GET", 148 body: _body,
142 body: _body, 149 queryParams: _queryParams,
143 queryParams: _queryParams, 150 uploadOptions: _uploadOptions,
144 uploadOptions: _uploadOptions, 151 uploadMedia: _uploadMedia,
145 uploadMedia: _uploadMedia, 152 downloadOptions: _downloadOptions);
146 downloadOptions: _downloadOptions);
147 return _response.then((data) => new BackupRun.fromJson(data)); 153 return _response.then((data) => new BackupRun.fromJson(data));
148 } 154 }
149 155
150 /** 156 /// Creates a new backup run on demand. This method is applicable only to
151 * Creates a new backup run on demand. This method is applicable only to 157 /// Second Generation instances.
152 * Second Generation instances. 158 ///
153 * 159 /// [request] - The metadata request object.
154 * [request] - The metadata request object. 160 ///
155 * 161 /// Request parameters:
156 * Request parameters: 162 ///
157 * 163 /// [project] - Project ID of the project that contains the instance.
158 * [project] - Project ID of the project that contains the instance. 164 ///
159 * 165 /// [instance] - Cloud SQL instance ID. This does not include the project ID.
160 * [instance] - Cloud SQL instance ID. This does not include the project ID. 166 ///
161 * 167 /// Completes with a [Operation].
162 * Completes with a [Operation]. 168 ///
163 * 169 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
164 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 170 /// an error.
165 * error. 171 ///
166 * 172 /// If the used [http.Client] completes with an error when making a REST
167 * If the used [http.Client] completes with an error when making a REST call, 173 /// call, this method will complete with the same error.
168 * this method will complete with the same error. 174 async.Future<Operation> insert(
169 */ 175 BackupRun request, core.String project, core.String instance) {
170 async.Future<Operation> insert(BackupRun request, core.String project, core.St ring instance) {
171 var _url = null; 176 var _url = null;
172 var _queryParams = new core.Map(); 177 var _queryParams = new core.Map();
173 var _uploadMedia = null; 178 var _uploadMedia = null;
174 var _uploadOptions = null; 179 var _uploadOptions = null;
175 var _downloadOptions = commons.DownloadOptions.Metadata; 180 var _downloadOptions = commons.DownloadOptions.Metadata;
176 var _body = null; 181 var _body = null;
177 182
178 if (request != null) { 183 if (request != null) {
179 _body = convert.JSON.encode((request).toJson()); 184 _body = convert.JSON.encode((request).toJson());
180 } 185 }
181 if (project == null) { 186 if (project == null) {
182 throw new core.ArgumentError("Parameter project is required."); 187 throw new core.ArgumentError("Parameter project is required.");
183 } 188 }
184 if (instance == null) { 189 if (instance == null) {
185 throw new core.ArgumentError("Parameter instance is required."); 190 throw new core.ArgumentError("Parameter instance is required.");
186 } 191 }
187 192
188 _url = 'projects/' + commons.Escaper.ecapeVariable('$project') + '/instances /' + commons.Escaper.ecapeVariable('$instance') + '/backupRuns'; 193 _url = 'projects/' +
194 commons.Escaper.ecapeVariable('$project') +
195 '/instances/' +
196 commons.Escaper.ecapeVariable('$instance') +
197 '/backupRuns';
189 198
190 var _response = _requester.request(_url, 199 var _response = _requester.request(_url, "POST",
191 "POST", 200 body: _body,
192 body: _body, 201 queryParams: _queryParams,
193 queryParams: _queryParams, 202 uploadOptions: _uploadOptions,
194 uploadOptions: _uploadOptions, 203 uploadMedia: _uploadMedia,
195 uploadMedia: _uploadMedia, 204 downloadOptions: _downloadOptions);
196 downloadOptions: _downloadOptions);
197 return _response.then((data) => new Operation.fromJson(data)); 205 return _response.then((data) => new Operation.fromJson(data));
198 } 206 }
199 207
200 /** 208 /// Lists all backup runs associated with a given instance and configuration
201 * Lists all backup runs associated with a given instance and configuration in 209 /// in the reverse chronological order of the enqueued time.
202 * the reverse chronological order of the enqueued time. 210 ///
203 * 211 /// Request parameters:
204 * Request parameters: 212 ///
205 * 213 /// [project] - Project ID of the project that contains the instance.
206 * [project] - Project ID of the project that contains the instance. 214 ///
207 * 215 /// [instance] - Cloud SQL instance ID. This does not include the project ID.
208 * [instance] - Cloud SQL instance ID. This does not include the project ID. 216 ///
209 * 217 /// [maxResults] - Maximum number of backup runs per response.
210 * [maxResults] - Maximum number of backup runs per response. 218 ///
211 * 219 /// [pageToken] - A previously-returned page token representing part of the
212 * [pageToken] - A previously-returned page token representing part of the 220 /// larger set of results to view.
213 * larger set of results to view. 221 ///
214 * 222 /// Completes with a [BackupRunsListResponse].
215 * Completes with a [BackupRunsListResponse]. 223 ///
216 * 224 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
217 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 225 /// an error.
218 * error. 226 ///
219 * 227 /// If the used [http.Client] completes with an error when making a REST
220 * If the used [http.Client] completes with an error when making a REST call, 228 /// call, this method will complete with the same error.
221 * this method will complete with the same error. 229 async.Future<BackupRunsListResponse> list(
222 */ 230 core.String project, core.String instance,
223 async.Future<BackupRunsListResponse> list(core.String project, core.String ins tance, {core.int maxResults, core.String pageToken}) { 231 {core.int maxResults, core.String pageToken}) {
224 var _url = null; 232 var _url = null;
225 var _queryParams = new core.Map(); 233 var _queryParams = new core.Map();
226 var _uploadMedia = null; 234 var _uploadMedia = null;
227 var _uploadOptions = null; 235 var _uploadOptions = null;
228 var _downloadOptions = commons.DownloadOptions.Metadata; 236 var _downloadOptions = commons.DownloadOptions.Metadata;
229 var _body = null; 237 var _body = null;
230 238
231 if (project == null) { 239 if (project == null) {
232 throw new core.ArgumentError("Parameter project is required."); 240 throw new core.ArgumentError("Parameter project is required.");
233 } 241 }
234 if (instance == null) { 242 if (instance == null) {
235 throw new core.ArgumentError("Parameter instance is required."); 243 throw new core.ArgumentError("Parameter instance is required.");
236 } 244 }
237 if (maxResults != null) { 245 if (maxResults != null) {
238 _queryParams["maxResults"] = ["${maxResults}"]; 246 _queryParams["maxResults"] = ["${maxResults}"];
239 } 247 }
240 if (pageToken != null) { 248 if (pageToken != null) {
241 _queryParams["pageToken"] = [pageToken]; 249 _queryParams["pageToken"] = [pageToken];
242 } 250 }
243 251
244 _url = 'projects/' + commons.Escaper.ecapeVariable('$project') + '/instances /' + commons.Escaper.ecapeVariable('$instance') + '/backupRuns'; 252 _url = 'projects/' +
253 commons.Escaper.ecapeVariable('$project') +
254 '/instances/' +
255 commons.Escaper.ecapeVariable('$instance') +
256 '/backupRuns';
245 257
246 var _response = _requester.request(_url, 258 var _response = _requester.request(_url, "GET",
247 "GET", 259 body: _body,
248 body: _body, 260 queryParams: _queryParams,
249 queryParams: _queryParams, 261 uploadOptions: _uploadOptions,
250 uploadOptions: _uploadOptions, 262 uploadMedia: _uploadMedia,
251 uploadMedia: _uploadMedia, 263 downloadOptions: _downloadOptions);
252 downloadOptions: _downloadOptions);
253 return _response.then((data) => new BackupRunsListResponse.fromJson(data)); 264 return _response.then((data) => new BackupRunsListResponse.fromJson(data));
254 } 265 }
255
256 } 266 }
257 267
258
259 class DatabasesResourceApi { 268 class DatabasesResourceApi {
260 final commons.ApiRequester _requester; 269 final commons.ApiRequester _requester;
261 270
262 DatabasesResourceApi(commons.ApiRequester client) : 271 DatabasesResourceApi(commons.ApiRequester client) : _requester = client;
263 _requester = client;
264 272
265 /** 273 /// Deletes a database from a Cloud SQL instance.
266 * Deletes a database from a Cloud SQL instance. 274 ///
267 * 275 /// Request parameters:
268 * Request parameters: 276 ///
269 * 277 /// [project] - Project ID of the project that contains the instance.
270 * [project] - Project ID of the project that contains the instance. 278 ///
271 * 279 /// [instance] - Database instance ID. This does not include the project ID.
272 * [instance] - Database instance ID. This does not include the project ID. 280 ///
273 * 281 /// [database] - Name of the database to be deleted in the instance.
274 * [database] - Name of the database to be deleted in the instance. 282 ///
275 * 283 /// Completes with a [Operation].
276 * Completes with a [Operation]. 284 ///
277 * 285 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
278 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 286 /// an error.
279 * error. 287 ///
280 * 288 /// If the used [http.Client] completes with an error when making a REST
281 * If the used [http.Client] completes with an error when making a REST call, 289 /// call, this method will complete with the same error.
282 * this method will complete with the same error. 290 async.Future<Operation> delete(
283 */ 291 core.String project, core.String instance, core.String database) {
284 async.Future<Operation> delete(core.String project, core.String instance, core .String database) {
285 var _url = null; 292 var _url = null;
286 var _queryParams = new core.Map(); 293 var _queryParams = new core.Map();
287 var _uploadMedia = null; 294 var _uploadMedia = null;
288 var _uploadOptions = null; 295 var _uploadOptions = null;
289 var _downloadOptions = commons.DownloadOptions.Metadata; 296 var _downloadOptions = commons.DownloadOptions.Metadata;
290 var _body = null; 297 var _body = null;
291 298
292 if (project == null) { 299 if (project == null) {
293 throw new core.ArgumentError("Parameter project is required."); 300 throw new core.ArgumentError("Parameter project is required.");
294 } 301 }
295 if (instance == null) { 302 if (instance == null) {
296 throw new core.ArgumentError("Parameter instance is required."); 303 throw new core.ArgumentError("Parameter instance is required.");
297 } 304 }
298 if (database == null) { 305 if (database == null) {
299 throw new core.ArgumentError("Parameter database is required."); 306 throw new core.ArgumentError("Parameter database is required.");
300 } 307 }
301 308
302 _url = 'projects/' + commons.Escaper.ecapeVariable('$project') + '/instances /' + commons.Escaper.ecapeVariable('$instance') + '/databases/' + commons.Escape r.ecapeVariable('$database'); 309 _url = 'projects/' +
310 commons.Escaper.ecapeVariable('$project') +
311 '/instances/' +
312 commons.Escaper.ecapeVariable('$instance') +
313 '/databases/' +
314 commons.Escaper.ecapeVariable('$database');
303 315
304 var _response = _requester.request(_url, 316 var _response = _requester.request(_url, "DELETE",
305 "DELETE", 317 body: _body,
306 body: _body, 318 queryParams: _queryParams,
307 queryParams: _queryParams, 319 uploadOptions: _uploadOptions,
308 uploadOptions: _uploadOptions, 320 uploadMedia: _uploadMedia,
309 uploadMedia: _uploadMedia, 321 downloadOptions: _downloadOptions);
310 downloadOptions: _downloadOptions);
311 return _response.then((data) => new Operation.fromJson(data)); 322 return _response.then((data) => new Operation.fromJson(data));
312 } 323 }
313 324
314 /** 325 /// Retrieves a resource containing information about a database inside a
315 * Retrieves a resource containing information about a database inside a Cloud 326 /// Cloud SQL instance.
316 * SQL instance. 327 ///
317 * 328 /// Request parameters:
318 * Request parameters: 329 ///
319 * 330 /// [project] - Project ID of the project that contains the instance.
320 * [project] - Project ID of the project that contains the instance. 331 ///
321 * 332 /// [instance] - Database instance ID. This does not include the project ID.
322 * [instance] - Database instance ID. This does not include the project ID. 333 ///
323 * 334 /// [database] - Name of the database in the instance.
324 * [database] - Name of the database in the instance. 335 ///
325 * 336 /// Completes with a [Database].
326 * Completes with a [Database]. 337 ///
327 * 338 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
328 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 339 /// an error.
329 * error. 340 ///
330 * 341 /// If the used [http.Client] completes with an error when making a REST
331 * If the used [http.Client] completes with an error when making a REST call, 342 /// call, this method will complete with the same error.
332 * this method will complete with the same error. 343 async.Future<Database> get(
333 */ 344 core.String project, core.String instance, core.String database) {
334 async.Future<Database> get(core.String project, core.String instance, core.Str ing database) {
335 var _url = null; 345 var _url = null;
336 var _queryParams = new core.Map(); 346 var _queryParams = new core.Map();
337 var _uploadMedia = null; 347 var _uploadMedia = null;
338 var _uploadOptions = null; 348 var _uploadOptions = null;
339 var _downloadOptions = commons.DownloadOptions.Metadata; 349 var _downloadOptions = commons.DownloadOptions.Metadata;
340 var _body = null; 350 var _body = null;
341 351
342 if (project == null) { 352 if (project == null) {
343 throw new core.ArgumentError("Parameter project is required."); 353 throw new core.ArgumentError("Parameter project is required.");
344 } 354 }
345 if (instance == null) { 355 if (instance == null) {
346 throw new core.ArgumentError("Parameter instance is required."); 356 throw new core.ArgumentError("Parameter instance is required.");
347 } 357 }
348 if (database == null) { 358 if (database == null) {
349 throw new core.ArgumentError("Parameter database is required."); 359 throw new core.ArgumentError("Parameter database is required.");
350 } 360 }
351 361
352 _url = 'projects/' + commons.Escaper.ecapeVariable('$project') + '/instances /' + commons.Escaper.ecapeVariable('$instance') + '/databases/' + commons.Escape r.ecapeVariable('$database'); 362 _url = 'projects/' +
363 commons.Escaper.ecapeVariable('$project') +
364 '/instances/' +
365 commons.Escaper.ecapeVariable('$instance') +
366 '/databases/' +
367 commons.Escaper.ecapeVariable('$database');
353 368
354 var _response = _requester.request(_url, 369 var _response = _requester.request(_url, "GET",
355 "GET", 370 body: _body,
356 body: _body, 371 queryParams: _queryParams,
357 queryParams: _queryParams, 372 uploadOptions: _uploadOptions,
358 uploadOptions: _uploadOptions, 373 uploadMedia: _uploadMedia,
359 uploadMedia: _uploadMedia, 374 downloadOptions: _downloadOptions);
360 downloadOptions: _downloadOptions);
361 return _response.then((data) => new Database.fromJson(data)); 375 return _response.then((data) => new Database.fromJson(data));
362 } 376 }
363 377
364 /** 378 /// Inserts a resource containing information about a database inside a Cloud
365 * Inserts a resource containing information about a database inside a Cloud 379 /// SQL instance.
366 * SQL instance. 380 ///
367 * 381 /// [request] - The metadata request object.
368 * [request] - The metadata request object. 382 ///
369 * 383 /// Request parameters:
370 * Request parameters: 384 ///
371 * 385 /// [project] - Project ID of the project that contains the instance.
372 * [project] - Project ID of the project that contains the instance. 386 ///
373 * 387 /// [instance] - Database instance ID. This does not include the project ID.
374 * [instance] - Database instance ID. This does not include the project ID. 388 ///
375 * 389 /// Completes with a [Operation].
376 * Completes with a [Operation]. 390 ///
377 * 391 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
378 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 392 /// an error.
379 * error. 393 ///
380 * 394 /// If the used [http.Client] completes with an error when making a REST
381 * If the used [http.Client] completes with an error when making a REST call, 395 /// call, this method will complete with the same error.
382 * this method will complete with the same error. 396 async.Future<Operation> insert(
383 */ 397 Database request, core.String project, core.String instance) {
384 async.Future<Operation> insert(Database request, core.String project, core.Str ing instance) {
385 var _url = null; 398 var _url = null;
386 var _queryParams = new core.Map(); 399 var _queryParams = new core.Map();
387 var _uploadMedia = null; 400 var _uploadMedia = null;
388 var _uploadOptions = null; 401 var _uploadOptions = null;
389 var _downloadOptions = commons.DownloadOptions.Metadata; 402 var _downloadOptions = commons.DownloadOptions.Metadata;
390 var _body = null; 403 var _body = null;
391 404
392 if (request != null) { 405 if (request != null) {
393 _body = convert.JSON.encode((request).toJson()); 406 _body = convert.JSON.encode((request).toJson());
394 } 407 }
395 if (project == null) { 408 if (project == null) {
396 throw new core.ArgumentError("Parameter project is required."); 409 throw new core.ArgumentError("Parameter project is required.");
397 } 410 }
398 if (instance == null) { 411 if (instance == null) {
399 throw new core.ArgumentError("Parameter instance is required."); 412 throw new core.ArgumentError("Parameter instance is required.");
400 } 413 }
401 414
402 _url = 'projects/' + commons.Escaper.ecapeVariable('$project') + '/instances /' + commons.Escaper.ecapeVariable('$instance') + '/databases'; 415 _url = 'projects/' +
416 commons.Escaper.ecapeVariable('$project') +
417 '/instances/' +
418 commons.Escaper.ecapeVariable('$instance') +
419 '/databases';
403 420
404 var _response = _requester.request(_url, 421 var _response = _requester.request(_url, "POST",
405 "POST", 422 body: _body,
406 body: _body, 423 queryParams: _queryParams,
407 queryParams: _queryParams, 424 uploadOptions: _uploadOptions,
408 uploadOptions: _uploadOptions, 425 uploadMedia: _uploadMedia,
409 uploadMedia: _uploadMedia, 426 downloadOptions: _downloadOptions);
410 downloadOptions: _downloadOptions);
411 return _response.then((data) => new Operation.fromJson(data)); 427 return _response.then((data) => new Operation.fromJson(data));
412 } 428 }
413 429
414 /** 430 /// Lists databases in the specified Cloud SQL instance.
415 * Lists databases in the specified Cloud SQL instance. 431 ///
416 * 432 /// Request parameters:
417 * Request parameters: 433 ///
418 * 434 /// [project] - Project ID of the project for which to list Cloud SQL
419 * [project] - Project ID of the project for which to list Cloud SQL 435 /// instances.
420 * instances. 436 ///
421 * 437 /// [instance] - Cloud SQL instance ID. This does not include the project ID.
422 * [instance] - Cloud SQL instance ID. This does not include the project ID. 438 ///
423 * 439 /// Completes with a [DatabasesListResponse].
424 * Completes with a [DatabasesListResponse]. 440 ///
425 * 441 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
426 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 442 /// an error.
427 * error. 443 ///
428 * 444 /// If the used [http.Client] completes with an error when making a REST
429 * If the used [http.Client] completes with an error when making a REST call, 445 /// call, this method will complete with the same error.
430 * this method will complete with the same error. 446 async.Future<DatabasesListResponse> list(
431 */ 447 core.String project, core.String instance) {
432 async.Future<DatabasesListResponse> list(core.String project, core.String inst ance) {
433 var _url = null; 448 var _url = null;
434 var _queryParams = new core.Map(); 449 var _queryParams = new core.Map();
435 var _uploadMedia = null; 450 var _uploadMedia = null;
436 var _uploadOptions = null; 451 var _uploadOptions = null;
437 var _downloadOptions = commons.DownloadOptions.Metadata; 452 var _downloadOptions = commons.DownloadOptions.Metadata;
438 var _body = null; 453 var _body = null;
439 454
440 if (project == null) { 455 if (project == null) {
441 throw new core.ArgumentError("Parameter project is required."); 456 throw new core.ArgumentError("Parameter project is required.");
442 } 457 }
443 if (instance == null) { 458 if (instance == null) {
444 throw new core.ArgumentError("Parameter instance is required."); 459 throw new core.ArgumentError("Parameter instance is required.");
445 } 460 }
446 461
447 _url = 'projects/' + commons.Escaper.ecapeVariable('$project') + '/instances /' + commons.Escaper.ecapeVariable('$instance') + '/databases'; 462 _url = 'projects/' +
463 commons.Escaper.ecapeVariable('$project') +
464 '/instances/' +
465 commons.Escaper.ecapeVariable('$instance') +
466 '/databases';
448 467
449 var _response = _requester.request(_url, 468 var _response = _requester.request(_url, "GET",
450 "GET", 469 body: _body,
451 body: _body, 470 queryParams: _queryParams,
452 queryParams: _queryParams, 471 uploadOptions: _uploadOptions,
453 uploadOptions: _uploadOptions, 472 uploadMedia: _uploadMedia,
454 uploadMedia: _uploadMedia, 473 downloadOptions: _downloadOptions);
455 downloadOptions: _downloadOptions);
456 return _response.then((data) => new DatabasesListResponse.fromJson(data)); 474 return _response.then((data) => new DatabasesListResponse.fromJson(data));
457 } 475 }
458 476
459 /** 477 /// Updates a resource containing information about a database inside a Cloud
460 * Updates a resource containing information about a database inside a Cloud 478 /// SQL instance. This method supports patch semantics.
461 * SQL instance. This method supports patch semantics. 479 ///
462 * 480 /// [request] - The metadata request object.
463 * [request] - The metadata request object. 481 ///
464 * 482 /// Request parameters:
465 * Request parameters: 483 ///
466 * 484 /// [project] - Project ID of the project that contains the instance.
467 * [project] - Project ID of the project that contains the instance. 485 ///
468 * 486 /// [instance] - Database instance ID. This does not include the project ID.
469 * [instance] - Database instance ID. This does not include the project ID. 487 ///
470 * 488 /// [database] - Name of the database to be updated in the instance.
471 * [database] - Name of the database to be updated in the instance. 489 ///
472 * 490 /// Completes with a [Operation].
473 * Completes with a [Operation]. 491 ///
474 * 492 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
475 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 493 /// an error.
476 * error. 494 ///
477 * 495 /// If the used [http.Client] completes with an error when making a REST
478 * If the used [http.Client] completes with an error when making a REST call, 496 /// call, this method will complete with the same error.
479 * this method will complete with the same error. 497 async.Future<Operation> patch(Database request, core.String project,
480 */ 498 core.String instance, core.String database) {
481 async.Future<Operation> patch(Database request, core.String project, core.Stri ng instance, core.String database) {
482 var _url = null; 499 var _url = null;
483 var _queryParams = new core.Map(); 500 var _queryParams = new core.Map();
484 var _uploadMedia = null; 501 var _uploadMedia = null;
485 var _uploadOptions = null; 502 var _uploadOptions = null;
486 var _downloadOptions = commons.DownloadOptions.Metadata; 503 var _downloadOptions = commons.DownloadOptions.Metadata;
487 var _body = null; 504 var _body = null;
488 505
489 if (request != null) { 506 if (request != null) {
490 _body = convert.JSON.encode((request).toJson()); 507 _body = convert.JSON.encode((request).toJson());
491 } 508 }
492 if (project == null) { 509 if (project == null) {
493 throw new core.ArgumentError("Parameter project is required."); 510 throw new core.ArgumentError("Parameter project is required.");
494 } 511 }
495 if (instance == null) { 512 if (instance == null) {
496 throw new core.ArgumentError("Parameter instance is required."); 513 throw new core.ArgumentError("Parameter instance is required.");
497 } 514 }
498 if (database == null) { 515 if (database == null) {
499 throw new core.ArgumentError("Parameter database is required."); 516 throw new core.ArgumentError("Parameter database is required.");
500 } 517 }
501 518
502 _url = 'projects/' + commons.Escaper.ecapeVariable('$project') + '/instances /' + commons.Escaper.ecapeVariable('$instance') + '/databases/' + commons.Escape r.ecapeVariable('$database'); 519 _url = 'projects/' +
520 commons.Escaper.ecapeVariable('$project') +
521 '/instances/' +
522 commons.Escaper.ecapeVariable('$instance') +
523 '/databases/' +
524 commons.Escaper.ecapeVariable('$database');
503 525
504 var _response = _requester.request(_url, 526 var _response = _requester.request(_url, "PATCH",
505 "PATCH", 527 body: _body,
506 body: _body, 528 queryParams: _queryParams,
507 queryParams: _queryParams, 529 uploadOptions: _uploadOptions,
508 uploadOptions: _uploadOptions, 530 uploadMedia: _uploadMedia,
509 uploadMedia: _uploadMedia, 531 downloadOptions: _downloadOptions);
510 downloadOptions: _downloadOptions);
511 return _response.then((data) => new Operation.fromJson(data)); 532 return _response.then((data) => new Operation.fromJson(data));
512 } 533 }
513 534
514 /** 535 /// Updates a resource containing information about a database inside a Cloud
515 * Updates a resource containing information about a database inside a Cloud 536 /// SQL instance.
516 * SQL instance. 537 ///
517 * 538 /// [request] - The metadata request object.
518 * [request] - The metadata request object. 539 ///
519 * 540 /// Request parameters:
520 * Request parameters: 541 ///
521 * 542 /// [project] - Project ID of the project that contains the instance.
522 * [project] - Project ID of the project that contains the instance. 543 ///
523 * 544 /// [instance] - Database instance ID. This does not include the project ID.
524 * [instance] - Database instance ID. This does not include the project ID. 545 ///
525 * 546 /// [database] - Name of the database to be updated in the instance.
526 * [database] - Name of the database to be updated in the instance. 547 ///
527 * 548 /// Completes with a [Operation].
528 * Completes with a [Operation]. 549 ///
529 * 550 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
530 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 551 /// an error.
531 * error. 552 ///
532 * 553 /// If the used [http.Client] completes with an error when making a REST
533 * If the used [http.Client] completes with an error when making a REST call, 554 /// call, this method will complete with the same error.
534 * this method will complete with the same error. 555 async.Future<Operation> update(Database request, core.String project,
535 */ 556 core.String instance, core.String database) {
536 async.Future<Operation> update(Database request, core.String project, core.Str ing instance, core.String database) {
537 var _url = null; 557 var _url = null;
538 var _queryParams = new core.Map(); 558 var _queryParams = new core.Map();
539 var _uploadMedia = null; 559 var _uploadMedia = null;
540 var _uploadOptions = null; 560 var _uploadOptions = null;
541 var _downloadOptions = commons.DownloadOptions.Metadata; 561 var _downloadOptions = commons.DownloadOptions.Metadata;
542 var _body = null; 562 var _body = null;
543 563
544 if (request != null) { 564 if (request != null) {
545 _body = convert.JSON.encode((request).toJson()); 565 _body = convert.JSON.encode((request).toJson());
546 } 566 }
547 if (project == null) { 567 if (project == null) {
548 throw new core.ArgumentError("Parameter project is required."); 568 throw new core.ArgumentError("Parameter project is required.");
549 } 569 }
550 if (instance == null) { 570 if (instance == null) {
551 throw new core.ArgumentError("Parameter instance is required."); 571 throw new core.ArgumentError("Parameter instance is required.");
552 } 572 }
553 if (database == null) { 573 if (database == null) {
554 throw new core.ArgumentError("Parameter database is required."); 574 throw new core.ArgumentError("Parameter database is required.");
555 } 575 }
556 576
557 _url = 'projects/' + commons.Escaper.ecapeVariable('$project') + '/instances /' + commons.Escaper.ecapeVariable('$instance') + '/databases/' + commons.Escape r.ecapeVariable('$database'); 577 _url = 'projects/' +
578 commons.Escaper.ecapeVariable('$project') +
579 '/instances/' +
580 commons.Escaper.ecapeVariable('$instance') +
581 '/databases/' +
582 commons.Escaper.ecapeVariable('$database');
558 583
559 var _response = _requester.request(_url, 584 var _response = _requester.request(_url, "PUT",
560 "PUT", 585 body: _body,
561 body: _body, 586 queryParams: _queryParams,
562 queryParams: _queryParams, 587 uploadOptions: _uploadOptions,
563 uploadOptions: _uploadOptions, 588 uploadMedia: _uploadMedia,
564 uploadMedia: _uploadMedia, 589 downloadOptions: _downloadOptions);
565 downloadOptions: _downloadOptions);
566 return _response.then((data) => new Operation.fromJson(data)); 590 return _response.then((data) => new Operation.fromJson(data));
567 } 591 }
568
569 } 592 }
570 593
571
572 class FlagsResourceApi { 594 class FlagsResourceApi {
573 final commons.ApiRequester _requester; 595 final commons.ApiRequester _requester;
574 596
575 FlagsResourceApi(commons.ApiRequester client) : 597 FlagsResourceApi(commons.ApiRequester client) : _requester = client;
576 _requester = client;
577 598
578 /** 599 /// List all available database flags for Google Cloud SQL instances.
579 * List all available database flags for Google Cloud SQL instances. 600 ///
580 * 601 /// Request parameters:
581 * Request parameters: 602 ///
582 * 603 /// [databaseVersion] - Database version for flag retrieval. Flags are
583 * [databaseVersion] - Database version for flag retrieval. Flags are specific 604 /// specific to the database version.
584 * to the database version. 605 ///
585 * 606 /// Completes with a [FlagsListResponse].
586 * Completes with a [FlagsListResponse]. 607 ///
587 * 608 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
588 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 609 /// an error.
589 * error. 610 ///
590 * 611 /// If the used [http.Client] completes with an error when making a REST
591 * If the used [http.Client] completes with an error when making a REST call, 612 /// call, this method will complete with the same error.
592 * this method will complete with the same error.
593 */
594 async.Future<FlagsListResponse> list({core.String databaseVersion}) { 613 async.Future<FlagsListResponse> list({core.String databaseVersion}) {
595 var _url = null; 614 var _url = null;
596 var _queryParams = new core.Map(); 615 var _queryParams = new core.Map();
597 var _uploadMedia = null; 616 var _uploadMedia = null;
598 var _uploadOptions = null; 617 var _uploadOptions = null;
599 var _downloadOptions = commons.DownloadOptions.Metadata; 618 var _downloadOptions = commons.DownloadOptions.Metadata;
600 var _body = null; 619 var _body = null;
601 620
602 if (databaseVersion != null) { 621 if (databaseVersion != null) {
603 _queryParams["databaseVersion"] = [databaseVersion]; 622 _queryParams["databaseVersion"] = [databaseVersion];
604 } 623 }
605 624
606 _url = 'flags'; 625 _url = 'flags';
607 626
608 var _response = _requester.request(_url, 627 var _response = _requester.request(_url, "GET",
609 "GET", 628 body: _body,
610 body: _body, 629 queryParams: _queryParams,
611 queryParams: _queryParams, 630 uploadOptions: _uploadOptions,
612 uploadOptions: _uploadOptions, 631 uploadMedia: _uploadMedia,
613 uploadMedia: _uploadMedia, 632 downloadOptions: _downloadOptions);
614 downloadOptions: _downloadOptions);
615 return _response.then((data) => new FlagsListResponse.fromJson(data)); 633 return _response.then((data) => new FlagsListResponse.fromJson(data));
616 } 634 }
617
618 } 635 }
619 636
620
621 class InstancesResourceApi { 637 class InstancesResourceApi {
622 final commons.ApiRequester _requester; 638 final commons.ApiRequester _requester;
623 639
624 InstancesResourceApi(commons.ApiRequester client) : 640 InstancesResourceApi(commons.ApiRequester client) : _requester = client;
625 _requester = client;
626 641
627 /** 642 /// Creates a Cloud SQL instance as a clone of the source instance. The API
628 * Creates a Cloud SQL instance as a clone of the source instance. The API is 643 /// is not ready for Second Generation instances yet.
629 * not ready for Second Generation instances yet. 644 ///
630 * 645 /// [request] - The metadata request object.
631 * [request] - The metadata request object. 646 ///
632 * 647 /// Request parameters:
633 * Request parameters: 648 ///
634 * 649 /// [project] - Project ID of the source as well as the clone Cloud SQL
635 * [project] - Project ID of the source as well as the clone Cloud SQL 650 /// instance.
636 * instance. 651 ///
637 * 652 /// [instance] - The ID of the Cloud SQL instance to be cloned (source). This
638 * [instance] - The ID of the Cloud SQL instance to be cloned (source). This 653 /// does not include the project ID.
639 * does not include the project ID. 654 ///
640 * 655 /// Completes with a [Operation].
641 * Completes with a [Operation]. 656 ///
642 * 657 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
643 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 658 /// an error.
644 * error. 659 ///
645 * 660 /// If the used [http.Client] completes with an error when making a REST
646 * If the used [http.Client] completes with an error when making a REST call, 661 /// call, this method will complete with the same error.
647 * this method will complete with the same error. 662 async.Future<Operation> clone(InstancesCloneRequest request,
648 */ 663 core.String project, core.String instance) {
649 async.Future<Operation> clone(InstancesCloneRequest request, core.String proje ct, core.String instance) {
650 var _url = null; 664 var _url = null;
651 var _queryParams = new core.Map(); 665 var _queryParams = new core.Map();
652 var _uploadMedia = null; 666 var _uploadMedia = null;
653 var _uploadOptions = null; 667 var _uploadOptions = null;
654 var _downloadOptions = commons.DownloadOptions.Metadata; 668 var _downloadOptions = commons.DownloadOptions.Metadata;
655 var _body = null; 669 var _body = null;
656 670
657 if (request != null) { 671 if (request != null) {
658 _body = convert.JSON.encode((request).toJson()); 672 _body = convert.JSON.encode((request).toJson());
659 } 673 }
660 if (project == null) { 674 if (project == null) {
661 throw new core.ArgumentError("Parameter project is required."); 675 throw new core.ArgumentError("Parameter project is required.");
662 } 676 }
663 if (instance == null) { 677 if (instance == null) {
664 throw new core.ArgumentError("Parameter instance is required."); 678 throw new core.ArgumentError("Parameter instance is required.");
665 } 679 }
666 680
667 _url = 'projects/' + commons.Escaper.ecapeVariable('$project') + '/instances /' + commons.Escaper.ecapeVariable('$instance') + '/clone'; 681 _url = 'projects/' +
682 commons.Escaper.ecapeVariable('$project') +
683 '/instances/' +
684 commons.Escaper.ecapeVariable('$instance') +
685 '/clone';
668 686
669 var _response = _requester.request(_url, 687 var _response = _requester.request(_url, "POST",
670 "POST", 688 body: _body,
671 body: _body, 689 queryParams: _queryParams,
672 queryParams: _queryParams, 690 uploadOptions: _uploadOptions,
673 uploadOptions: _uploadOptions, 691 uploadMedia: _uploadMedia,
674 uploadMedia: _uploadMedia, 692 downloadOptions: _downloadOptions);
675 downloadOptions: _downloadOptions);
676 return _response.then((data) => new Operation.fromJson(data)); 693 return _response.then((data) => new Operation.fromJson(data));
677 } 694 }
678 695
679 /** 696 /// Deletes a Cloud SQL instance.
680 * Deletes a Cloud SQL instance. 697 ///
681 * 698 /// Request parameters:
682 * Request parameters: 699 ///
683 * 700 /// [project] - Project ID of the project that contains the instance to be
684 * [project] - Project ID of the project that contains the instance to be 701 /// deleted.
685 * deleted. 702 ///
686 * 703 /// [instance] - Cloud SQL instance ID. This does not include the project ID.
687 * [instance] - Cloud SQL instance ID. This does not include the project ID. 704 ///
688 * 705 /// Completes with a [Operation].
689 * Completes with a [Operation]. 706 ///
690 * 707 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
691 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 708 /// an error.
692 * error. 709 ///
693 * 710 /// If the used [http.Client] completes with an error when making a REST
694 * If the used [http.Client] completes with an error when making a REST call, 711 /// call, this method will complete with the same error.
695 * this method will complete with the same error.
696 */
697 async.Future<Operation> delete(core.String project, core.String instance) { 712 async.Future<Operation> delete(core.String project, core.String instance) {
698 var _url = null; 713 var _url = null;
699 var _queryParams = new core.Map(); 714 var _queryParams = new core.Map();
700 var _uploadMedia = null; 715 var _uploadMedia = null;
701 var _uploadOptions = null; 716 var _uploadOptions = null;
702 var _downloadOptions = commons.DownloadOptions.Metadata; 717 var _downloadOptions = commons.DownloadOptions.Metadata;
703 var _body = null; 718 var _body = null;
704 719
705 if (project == null) { 720 if (project == null) {
706 throw new core.ArgumentError("Parameter project is required."); 721 throw new core.ArgumentError("Parameter project is required.");
707 } 722 }
708 if (instance == null) { 723 if (instance == null) {
709 throw new core.ArgumentError("Parameter instance is required."); 724 throw new core.ArgumentError("Parameter instance is required.");
710 } 725 }
711 726
712 _url = 'projects/' + commons.Escaper.ecapeVariable('$project') + '/instances /' + commons.Escaper.ecapeVariable('$instance'); 727 _url = 'projects/' +
728 commons.Escaper.ecapeVariable('$project') +
729 '/instances/' +
730 commons.Escaper.ecapeVariable('$instance');
713 731
714 var _response = _requester.request(_url, 732 var _response = _requester.request(_url, "DELETE",
715 "DELETE", 733 body: _body,
716 body: _body, 734 queryParams: _queryParams,
717 queryParams: _queryParams, 735 uploadOptions: _uploadOptions,
718 uploadOptions: _uploadOptions, 736 uploadMedia: _uploadMedia,
719 uploadMedia: _uploadMedia, 737 downloadOptions: _downloadOptions);
720 downloadOptions: _downloadOptions);
721 return _response.then((data) => new Operation.fromJson(data)); 738 return _response.then((data) => new Operation.fromJson(data));
722 } 739 }
723 740
724 /** 741 /// Exports data from a Cloud SQL instance to a Google Cloud Storage bucket
725 * Exports data from a Cloud SQL instance to a Google Cloud Storage bucket as 742 /// as a MySQL dump file.
726 * a MySQL dump file. 743 ///
727 * 744 /// [request] - The metadata request object.
728 * [request] - The metadata request object. 745 ///
729 * 746 /// Request parameters:
730 * Request parameters: 747 ///
731 * 748 /// [project] - Project ID of the project that contains the instance to be
732 * [project] - Project ID of the project that contains the instance to be 749 /// exported.
733 * exported. 750 ///
734 * 751 /// [instance] - Cloud SQL instance ID. This does not include the project ID.
735 * [instance] - Cloud SQL instance ID. This does not include the project ID. 752 ///
736 * 753 /// Completes with a [Operation].
737 * Completes with a [Operation]. 754 ///
738 * 755 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
739 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 756 /// an error.
740 * error. 757 ///
741 * 758 /// If the used [http.Client] completes with an error when making a REST
742 * If the used [http.Client] completes with an error when making a REST call, 759 /// call, this method will complete with the same error.
743 * this method will complete with the same error. 760 async.Future<Operation> export(InstancesExportRequest request,
744 */ 761 core.String project, core.String instance) {
745 async.Future<Operation> export(InstancesExportRequest request, core.String pro ject, core.String instance) {
746 var _url = null; 762 var _url = null;
747 var _queryParams = new core.Map(); 763 var _queryParams = new core.Map();
748 var _uploadMedia = null; 764 var _uploadMedia = null;
749 var _uploadOptions = null; 765 var _uploadOptions = null;
750 var _downloadOptions = commons.DownloadOptions.Metadata; 766 var _downloadOptions = commons.DownloadOptions.Metadata;
751 var _body = null; 767 var _body = null;
752 768
753 if (request != null) { 769 if (request != null) {
754 _body = convert.JSON.encode((request).toJson()); 770 _body = convert.JSON.encode((request).toJson());
755 } 771 }
756 if (project == null) { 772 if (project == null) {
757 throw new core.ArgumentError("Parameter project is required."); 773 throw new core.ArgumentError("Parameter project is required.");
758 } 774 }
759 if (instance == null) { 775 if (instance == null) {
760 throw new core.ArgumentError("Parameter instance is required."); 776 throw new core.ArgumentError("Parameter instance is required.");
761 } 777 }
762 778
763 _url = 'projects/' + commons.Escaper.ecapeVariable('$project') + '/instances /' + commons.Escaper.ecapeVariable('$instance') + '/export'; 779 _url = 'projects/' +
780 commons.Escaper.ecapeVariable('$project') +
781 '/instances/' +
782 commons.Escaper.ecapeVariable('$instance') +
783 '/export';
764 784
765 var _response = _requester.request(_url, 785 var _response = _requester.request(_url, "POST",
766 "POST", 786 body: _body,
767 body: _body, 787 queryParams: _queryParams,
768 queryParams: _queryParams, 788 uploadOptions: _uploadOptions,
769 uploadOptions: _uploadOptions, 789 uploadMedia: _uploadMedia,
770 uploadMedia: _uploadMedia, 790 downloadOptions: _downloadOptions);
771 downloadOptions: _downloadOptions);
772 return _response.then((data) => new Operation.fromJson(data)); 791 return _response.then((data) => new Operation.fromJson(data));
773 } 792 }
774 793
775 /** 794 /// Failover the instance to its failover replica instance.
776 * Failover the instance to its failover replica instance. 795 ///
777 * 796 /// [request] - The metadata request object.
778 * [request] - The metadata request object. 797 ///
779 * 798 /// Request parameters:
780 * Request parameters: 799 ///
781 * 800 /// [project] - ID of the project that contains the read replica.
782 * [project] - ID of the project that contains the read replica. 801 ///
783 * 802 /// [instance] - Cloud SQL instance ID. This does not include the project ID.
784 * [instance] - Cloud SQL instance ID. This does not include the project ID. 803 ///
785 * 804 /// Completes with a [Operation].
786 * Completes with a [Operation]. 805 ///
787 * 806 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
788 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 807 /// an error.
789 * error. 808 ///
790 * 809 /// If the used [http.Client] completes with an error when making a REST
791 * If the used [http.Client] completes with an error when making a REST call, 810 /// call, this method will complete with the same error.
792 * this method will complete with the same error. 811 async.Future<Operation> failover(InstancesFailoverRequest request,
793 */ 812 core.String project, core.String instance) {
794 async.Future<Operation> failover(InstancesFailoverRequest request, core.String project, core.String instance) {
795 var _url = null; 813 var _url = null;
796 var _queryParams = new core.Map(); 814 var _queryParams = new core.Map();
797 var _uploadMedia = null; 815 var _uploadMedia = null;
798 var _uploadOptions = null; 816 var _uploadOptions = null;
799 var _downloadOptions = commons.DownloadOptions.Metadata; 817 var _downloadOptions = commons.DownloadOptions.Metadata;
800 var _body = null; 818 var _body = null;
801 819
802 if (request != null) { 820 if (request != null) {
803 _body = convert.JSON.encode((request).toJson()); 821 _body = convert.JSON.encode((request).toJson());
804 } 822 }
805 if (project == null) { 823 if (project == null) {
806 throw new core.ArgumentError("Parameter project is required."); 824 throw new core.ArgumentError("Parameter project is required.");
807 } 825 }
808 if (instance == null) { 826 if (instance == null) {
809 throw new core.ArgumentError("Parameter instance is required."); 827 throw new core.ArgumentError("Parameter instance is required.");
810 } 828 }
811 829
812 _url = 'projects/' + commons.Escaper.ecapeVariable('$project') + '/instances /' + commons.Escaper.ecapeVariable('$instance') + '/failover'; 830 _url = 'projects/' +
831 commons.Escaper.ecapeVariable('$project') +
832 '/instances/' +
833 commons.Escaper.ecapeVariable('$instance') +
834 '/failover';
813 835
814 var _response = _requester.request(_url, 836 var _response = _requester.request(_url, "POST",
815 "POST", 837 body: _body,
816 body: _body, 838 queryParams: _queryParams,
817 queryParams: _queryParams, 839 uploadOptions: _uploadOptions,
818 uploadOptions: _uploadOptions, 840 uploadMedia: _uploadMedia,
819 uploadMedia: _uploadMedia, 841 downloadOptions: _downloadOptions);
820 downloadOptions: _downloadOptions);
821 return _response.then((data) => new Operation.fromJson(data)); 842 return _response.then((data) => new Operation.fromJson(data));
822 } 843 }
823 844
824 /** 845 /// Retrieves a resource containing information about a Cloud SQL instance.
825 * Retrieves a resource containing information about a Cloud SQL instance. 846 ///
826 * 847 /// Request parameters:
827 * Request parameters: 848 ///
828 * 849 /// [project] - Project ID of the project that contains the instance.
829 * [project] - Project ID of the project that contains the instance. 850 ///
830 * 851 /// [instance] - Database instance ID. This does not include the project ID.
831 * [instance] - Database instance ID. This does not include the project ID. 852 ///
832 * 853 /// Completes with a [DatabaseInstance].
833 * Completes with a [DatabaseInstance]. 854 ///
834 * 855 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
835 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 856 /// an error.
836 * error. 857 ///
837 * 858 /// If the used [http.Client] completes with an error when making a REST
838 * If the used [http.Client] completes with an error when making a REST call, 859 /// call, this method will complete with the same error.
839 * this method will complete with the same error. 860 async.Future<DatabaseInstance> get(
840 */ 861 core.String project, core.String instance) {
841 async.Future<DatabaseInstance> get(core.String project, core.String instance) {
842 var _url = null; 862 var _url = null;
843 var _queryParams = new core.Map(); 863 var _queryParams = new core.Map();
844 var _uploadMedia = null; 864 var _uploadMedia = null;
845 var _uploadOptions = null; 865 var _uploadOptions = null;
846 var _downloadOptions = commons.DownloadOptions.Metadata; 866 var _downloadOptions = commons.DownloadOptions.Metadata;
847 var _body = null; 867 var _body = null;
848 868
849 if (project == null) { 869 if (project == null) {
850 throw new core.ArgumentError("Parameter project is required."); 870 throw new core.ArgumentError("Parameter project is required.");
851 } 871 }
852 if (instance == null) { 872 if (instance == null) {
853 throw new core.ArgumentError("Parameter instance is required."); 873 throw new core.ArgumentError("Parameter instance is required.");
854 } 874 }
855 875
856 _url = 'projects/' + commons.Escaper.ecapeVariable('$project') + '/instances /' + commons.Escaper.ecapeVariable('$instance'); 876 _url = 'projects/' +
877 commons.Escaper.ecapeVariable('$project') +
878 '/instances/' +
879 commons.Escaper.ecapeVariable('$instance');
857 880
858 var _response = _requester.request(_url, 881 var _response = _requester.request(_url, "GET",
859 "GET", 882 body: _body,
860 body: _body, 883 queryParams: _queryParams,
861 queryParams: _queryParams, 884 uploadOptions: _uploadOptions,
862 uploadOptions: _uploadOptions, 885 uploadMedia: _uploadMedia,
863 uploadMedia: _uploadMedia, 886 downloadOptions: _downloadOptions);
864 downloadOptions: _downloadOptions);
865 return _response.then((data) => new DatabaseInstance.fromJson(data)); 887 return _response.then((data) => new DatabaseInstance.fromJson(data));
866 } 888 }
867 889
868 /** 890 /// Imports data into a Cloud SQL instance from a MySQL dump file in Google
869 * Imports data into a Cloud SQL instance from a MySQL dump file in Google 891 /// Cloud Storage.
870 * Cloud Storage. 892 ///
871 * 893 /// [request] - The metadata request object.
872 * [request] - The metadata request object. 894 ///
873 * 895 /// Request parameters:
874 * Request parameters: 896 ///
875 * 897 /// [project] - Project ID of the project that contains the instance.
876 * [project] - Project ID of the project that contains the instance. 898 ///
877 * 899 /// [instance] - Cloud SQL instance ID. This does not include the project ID.
878 * [instance] - Cloud SQL instance ID. This does not include the project ID. 900 ///
879 * 901 /// Completes with a [Operation].
880 * Completes with a [Operation]. 902 ///
881 * 903 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
882 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 904 /// an error.
883 * error. 905 ///
884 * 906 /// If the used [http.Client] completes with an error when making a REST
885 * If the used [http.Client] completes with an error when making a REST call, 907 /// call, this method will complete with the same error.
886 * this method will complete with the same error. 908 async.Future<Operation> import(InstancesImportRequest request,
887 */ 909 core.String project, core.String instance) {
888 async.Future<Operation> import(InstancesImportRequest request, core.String pro ject, core.String instance) {
889 var _url = null; 910 var _url = null;
890 var _queryParams = new core.Map(); 911 var _queryParams = new core.Map();
891 var _uploadMedia = null; 912 var _uploadMedia = null;
892 var _uploadOptions = null; 913 var _uploadOptions = null;
893 var _downloadOptions = commons.DownloadOptions.Metadata; 914 var _downloadOptions = commons.DownloadOptions.Metadata;
894 var _body = null; 915 var _body = null;
895 916
896 if (request != null) { 917 if (request != null) {
897 _body = convert.JSON.encode((request).toJson()); 918 _body = convert.JSON.encode((request).toJson());
898 } 919 }
899 if (project == null) { 920 if (project == null) {
900 throw new core.ArgumentError("Parameter project is required."); 921 throw new core.ArgumentError("Parameter project is required.");
901 } 922 }
902 if (instance == null) { 923 if (instance == null) {
903 throw new core.ArgumentError("Parameter instance is required."); 924 throw new core.ArgumentError("Parameter instance is required.");
904 } 925 }
905 926
906 _url = 'projects/' + commons.Escaper.ecapeVariable('$project') + '/instances /' + commons.Escaper.ecapeVariable('$instance') + '/import'; 927 _url = 'projects/' +
928 commons.Escaper.ecapeVariable('$project') +
929 '/instances/' +
930 commons.Escaper.ecapeVariable('$instance') +
931 '/import';
907 932
908 var _response = _requester.request(_url, 933 var _response = _requester.request(_url, "POST",
909 "POST", 934 body: _body,
910 body: _body, 935 queryParams: _queryParams,
911 queryParams: _queryParams, 936 uploadOptions: _uploadOptions,
912 uploadOptions: _uploadOptions, 937 uploadMedia: _uploadMedia,
913 uploadMedia: _uploadMedia, 938 downloadOptions: _downloadOptions);
914 downloadOptions: _downloadOptions);
915 return _response.then((data) => new Operation.fromJson(data)); 939 return _response.then((data) => new Operation.fromJson(data));
916 } 940 }
917 941
918 /** 942 /// Creates a new Cloud SQL instance.
919 * Creates a new Cloud SQL instance. 943 ///
920 * 944 /// [request] - The metadata request object.
921 * [request] - The metadata request object. 945 ///
922 * 946 /// Request parameters:
923 * Request parameters: 947 ///
924 * 948 /// [project] - Project ID of the project to which the newly created Cloud
925 * [project] - Project ID of the project to which the newly created Cloud SQL 949 /// SQL instances should belong.
926 * instances should belong. 950 ///
927 * 951 /// Completes with a [Operation].
928 * Completes with a [Operation]. 952 ///
929 * 953 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
930 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 954 /// an error.
931 * error. 955 ///
932 * 956 /// 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, 957 /// call, this method will complete with the same error.
934 * this method will complete with the same error. 958 async.Future<Operation> insert(
935 */ 959 DatabaseInstance request, core.String project) {
936 async.Future<Operation> insert(DatabaseInstance request, core.String project) {
937 var _url = null; 960 var _url = null;
938 var _queryParams = new core.Map(); 961 var _queryParams = new core.Map();
939 var _uploadMedia = null; 962 var _uploadMedia = null;
940 var _uploadOptions = null; 963 var _uploadOptions = null;
941 var _downloadOptions = commons.DownloadOptions.Metadata; 964 var _downloadOptions = commons.DownloadOptions.Metadata;
942 var _body = null; 965 var _body = null;
943 966
944 if (request != null) { 967 if (request != null) {
945 _body = convert.JSON.encode((request).toJson()); 968 _body = convert.JSON.encode((request).toJson());
946 } 969 }
947 if (project == null) { 970 if (project == null) {
948 throw new core.ArgumentError("Parameter project is required."); 971 throw new core.ArgumentError("Parameter project is required.");
949 } 972 }
950 973
951 _url = 'projects/' + commons.Escaper.ecapeVariable('$project') + '/instances '; 974 _url =
975 'projects/' + commons.Escaper.ecapeVariable('$project') + '/instances';
952 976
953 var _response = _requester.request(_url, 977 var _response = _requester.request(_url, "POST",
954 "POST", 978 body: _body,
955 body: _body, 979 queryParams: _queryParams,
956 queryParams: _queryParams, 980 uploadOptions: _uploadOptions,
957 uploadOptions: _uploadOptions, 981 uploadMedia: _uploadMedia,
958 uploadMedia: _uploadMedia, 982 downloadOptions: _downloadOptions);
959 downloadOptions: _downloadOptions);
960 return _response.then((data) => new Operation.fromJson(data)); 983 return _response.then((data) => new Operation.fromJson(data));
961 } 984 }
962 985
963 /** 986 /// Lists instances under a given project in the alphabetical order of the
964 * Lists instances under a given project in the alphabetical order of the 987 /// instance name.
965 * instance name. 988 ///
966 * 989 /// Request parameters:
967 * Request parameters: 990 ///
968 * 991 /// [project] - Project ID of the project for which to list Cloud SQL
969 * [project] - Project ID of the project for which to list Cloud SQL 992 /// instances.
970 * instances. 993 ///
971 * 994 /// [filter] - An expression for filtering the results of the request, such
972 * [filter] - An expression for filtering the results of the request, such as 995 /// as by name or label.
973 * by name or label. 996 ///
974 * 997 /// [maxResults] - The maximum number of results to return per response.
975 * [maxResults] - The maximum number of results to return per response. 998 ///
976 * 999 /// [pageToken] - A previously-returned page token representing part of the
977 * [pageToken] - A previously-returned page token representing part of the 1000 /// larger set of results to view.
978 * larger set of results to view. 1001 ///
979 * 1002 /// Completes with a [InstancesListResponse].
980 * Completes with a [InstancesListResponse]. 1003 ///
981 * 1004 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
982 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 1005 /// an error.
983 * error. 1006 ///
984 * 1007 /// If the used [http.Client] completes with an error when making a REST
985 * If the used [http.Client] completes with an error when making a REST call, 1008 /// call, this method will complete with the same error.
986 * this method will complete with the same error. 1009 async.Future<InstancesListResponse> list(core.String project,
987 */ 1010 {core.String filter, core.int maxResults, core.String pageToken}) {
988 async.Future<InstancesListResponse> list(core.String project, {core.String fil ter, core.int maxResults, core.String pageToken}) {
989 var _url = null; 1011 var _url = null;
990 var _queryParams = new core.Map(); 1012 var _queryParams = new core.Map();
991 var _uploadMedia = null; 1013 var _uploadMedia = null;
992 var _uploadOptions = null; 1014 var _uploadOptions = null;
993 var _downloadOptions = commons.DownloadOptions.Metadata; 1015 var _downloadOptions = commons.DownloadOptions.Metadata;
994 var _body = null; 1016 var _body = null;
995 1017
996 if (project == null) { 1018 if (project == null) {
997 throw new core.ArgumentError("Parameter project is required."); 1019 throw new core.ArgumentError("Parameter project is required.");
998 } 1020 }
999 if (filter != null) { 1021 if (filter != null) {
1000 _queryParams["filter"] = [filter]; 1022 _queryParams["filter"] = [filter];
1001 } 1023 }
1002 if (maxResults != null) { 1024 if (maxResults != null) {
1003 _queryParams["maxResults"] = ["${maxResults}"]; 1025 _queryParams["maxResults"] = ["${maxResults}"];
1004 } 1026 }
1005 if (pageToken != null) { 1027 if (pageToken != null) {
1006 _queryParams["pageToken"] = [pageToken]; 1028 _queryParams["pageToken"] = [pageToken];
1007 } 1029 }
1008 1030
1009 _url = 'projects/' + commons.Escaper.ecapeVariable('$project') + '/instances '; 1031 _url =
1032 'projects/' + commons.Escaper.ecapeVariable('$project') + '/instances';
1010 1033
1011 var _response = _requester.request(_url, 1034 var _response = _requester.request(_url, "GET",
1012 "GET", 1035 body: _body,
1013 body: _body, 1036 queryParams: _queryParams,
1014 queryParams: _queryParams, 1037 uploadOptions: _uploadOptions,
1015 uploadOptions: _uploadOptions, 1038 uploadMedia: _uploadMedia,
1016 uploadMedia: _uploadMedia, 1039 downloadOptions: _downloadOptions);
1017 downloadOptions: _downloadOptions);
1018 return _response.then((data) => new InstancesListResponse.fromJson(data)); 1040 return _response.then((data) => new InstancesListResponse.fromJson(data));
1019 } 1041 }
1020 1042
1021 /** 1043 /// Updates settings of a Cloud SQL instance. Caution: This is not a partial
1022 * Updates settings of a Cloud SQL instance. Caution: This is not a partial 1044 /// update, so you must include values for all the settings that you want to
1023 * update, so you must include values for all the settings that you want to 1045 /// retain. For partial updates, use patch.. This method supports patch
1024 * retain. For partial updates, use patch.. This method supports patch 1046 /// semantics.
1025 * semantics. 1047 ///
1026 * 1048 /// [request] - The metadata request object.
1027 * [request] - The metadata request object. 1049 ///
1028 * 1050 /// Request parameters:
1029 * Request parameters: 1051 ///
1030 * 1052 /// [project] - Project ID of the project that contains the instance.
1031 * [project] - Project ID of the project that contains the instance. 1053 ///
1032 * 1054 /// [instance] - Cloud SQL instance ID. This does not include the project ID.
1033 * [instance] - Cloud SQL instance ID. This does not include the project ID. 1055 ///
1034 * 1056 /// Completes with a [Operation].
1035 * Completes with a [Operation]. 1057 ///
1036 * 1058 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
1037 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 1059 /// an error.
1038 * error. 1060 ///
1039 * 1061 /// If the used [http.Client] completes with an error when making a REST
1040 * If the used [http.Client] completes with an error when making a REST call, 1062 /// call, this method will complete with the same error.
1041 * this method will complete with the same error. 1063 async.Future<Operation> patch(
1042 */ 1064 DatabaseInstance request, core.String project, core.String instance) {
1043 async.Future<Operation> patch(DatabaseInstance request, core.String project, c ore.String instance) {
1044 var _url = null; 1065 var _url = null;
1045 var _queryParams = new core.Map(); 1066 var _queryParams = new core.Map();
1046 var _uploadMedia = null; 1067 var _uploadMedia = null;
1047 var _uploadOptions = null; 1068 var _uploadOptions = null;
1048 var _downloadOptions = commons.DownloadOptions.Metadata; 1069 var _downloadOptions = commons.DownloadOptions.Metadata;
1049 var _body = null; 1070 var _body = null;
1050 1071
1051 if (request != null) { 1072 if (request != null) {
1052 _body = convert.JSON.encode((request).toJson()); 1073 _body = convert.JSON.encode((request).toJson());
1053 } 1074 }
1054 if (project == null) { 1075 if (project == null) {
1055 throw new core.ArgumentError("Parameter project is required."); 1076 throw new core.ArgumentError("Parameter project is required.");
1056 } 1077 }
1057 if (instance == null) { 1078 if (instance == null) {
1058 throw new core.ArgumentError("Parameter instance is required."); 1079 throw new core.ArgumentError("Parameter instance is required.");
1059 } 1080 }
1060 1081
1061 _url = 'projects/' + commons.Escaper.ecapeVariable('$project') + '/instances /' + commons.Escaper.ecapeVariable('$instance'); 1082 _url = 'projects/' +
1083 commons.Escaper.ecapeVariable('$project') +
1084 '/instances/' +
1085 commons.Escaper.ecapeVariable('$instance');
1062 1086
1063 var _response = _requester.request(_url, 1087 var _response = _requester.request(_url, "PATCH",
1064 "PATCH", 1088 body: _body,
1065 body: _body, 1089 queryParams: _queryParams,
1066 queryParams: _queryParams, 1090 uploadOptions: _uploadOptions,
1067 uploadOptions: _uploadOptions, 1091 uploadMedia: _uploadMedia,
1068 uploadMedia: _uploadMedia, 1092 downloadOptions: _downloadOptions);
1069 downloadOptions: _downloadOptions);
1070 return _response.then((data) => new Operation.fromJson(data)); 1093 return _response.then((data) => new Operation.fromJson(data));
1071 } 1094 }
1072 1095
1073 /** 1096 /// Promotes the read replica instance to be a stand-alone Cloud SQL
1074 * Promotes the read replica instance to be a stand-alone Cloud SQL instance. 1097 /// instance.
1075 * 1098 ///
1076 * Request parameters: 1099 /// Request parameters:
1077 * 1100 ///
1078 * [project] - ID of the project that contains the read replica. 1101 /// [project] - ID of the project that contains the read replica.
1079 * 1102 ///
1080 * [instance] - Cloud SQL read replica instance name. 1103 /// [instance] - Cloud SQL read replica instance name.
1081 * 1104 ///
1082 * Completes with a [Operation]. 1105 /// Completes with a [Operation].
1083 * 1106 ///
1084 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 1107 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
1085 * error. 1108 /// an error.
1086 * 1109 ///
1087 * If the used [http.Client] completes with an error when making a REST call, 1110 /// If the used [http.Client] completes with an error when making a REST
1088 * this method will complete with the same error. 1111 /// call, this method will complete with the same error.
1089 */ 1112 async.Future<Operation> promoteReplica(
1090 async.Future<Operation> promoteReplica(core.String project, core.String instan ce) { 1113 core.String project, core.String instance) {
1091 var _url = null; 1114 var _url = null;
1092 var _queryParams = new core.Map(); 1115 var _queryParams = new core.Map();
1093 var _uploadMedia = null; 1116 var _uploadMedia = null;
1094 var _uploadOptions = null; 1117 var _uploadOptions = null;
1095 var _downloadOptions = commons.DownloadOptions.Metadata; 1118 var _downloadOptions = commons.DownloadOptions.Metadata;
1096 var _body = null; 1119 var _body = null;
1097 1120
1098 if (project == null) { 1121 if (project == null) {
1099 throw new core.ArgumentError("Parameter project is required."); 1122 throw new core.ArgumentError("Parameter project is required.");
1100 } 1123 }
1101 if (instance == null) { 1124 if (instance == null) {
1102 throw new core.ArgumentError("Parameter instance is required."); 1125 throw new core.ArgumentError("Parameter instance is required.");
1103 } 1126 }
1104 1127
1105 _url = 'projects/' + commons.Escaper.ecapeVariable('$project') + '/instances /' + commons.Escaper.ecapeVariable('$instance') + '/promoteReplica'; 1128 _url = 'projects/' +
1129 commons.Escaper.ecapeVariable('$project') +
1130 '/instances/' +
1131 commons.Escaper.ecapeVariable('$instance') +
1132 '/promoteReplica';
1106 1133
1107 var _response = _requester.request(_url, 1134 var _response = _requester.request(_url, "POST",
1108 "POST", 1135 body: _body,
1109 body: _body, 1136 queryParams: _queryParams,
1110 queryParams: _queryParams, 1137 uploadOptions: _uploadOptions,
1111 uploadOptions: _uploadOptions, 1138 uploadMedia: _uploadMedia,
1112 uploadMedia: _uploadMedia, 1139 downloadOptions: _downloadOptions);
1113 downloadOptions: _downloadOptions);
1114 return _response.then((data) => new Operation.fromJson(data)); 1140 return _response.then((data) => new Operation.fromJson(data));
1115 } 1141 }
1116 1142
1117 /** 1143 /// Deletes all client certificates and generates a new server SSL
1118 * Deletes all client certificates and generates a new server SSL certificate 1144 /// certificate for the instance. The changes will not take effect until the
1119 * for the instance. The changes will not take effect until the instance is 1145 /// instance is restarted. Existing instances without a server certificate
1120 * restarted. Existing instances without a server certificate will need to 1146 /// will need to call this once to set a server certificate.
1121 * call this once to set a server certificate. 1147 ///
1122 * 1148 /// Request parameters:
1123 * Request parameters: 1149 ///
1124 * 1150 /// [project] - Project ID of the project that contains the instance.
1125 * [project] - Project ID of the project that contains the instance. 1151 ///
1126 * 1152 /// [instance] - Cloud SQL instance ID. This does not include the project ID.
1127 * [instance] - Cloud SQL instance ID. This does not include the project ID. 1153 ///
1128 * 1154 /// Completes with a [Operation].
1129 * Completes with a [Operation]. 1155 ///
1130 * 1156 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
1131 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 1157 /// an error.
1132 * error. 1158 ///
1133 * 1159 /// If the used [http.Client] completes with an error when making a REST
1134 * If the used [http.Client] completes with an error when making a REST call, 1160 /// call, this method will complete with the same error.
1135 * this method will complete with the same error. 1161 async.Future<Operation> resetSslConfig(
1136 */ 1162 core.String project, core.String instance) {
1137 async.Future<Operation> resetSslConfig(core.String project, core.String instan ce) {
1138 var _url = null; 1163 var _url = null;
1139 var _queryParams = new core.Map(); 1164 var _queryParams = new core.Map();
1140 var _uploadMedia = null; 1165 var _uploadMedia = null;
1141 var _uploadOptions = null; 1166 var _uploadOptions = null;
1142 var _downloadOptions = commons.DownloadOptions.Metadata; 1167 var _downloadOptions = commons.DownloadOptions.Metadata;
1143 var _body = null; 1168 var _body = null;
1144 1169
1145 if (project == null) { 1170 if (project == null) {
1146 throw new core.ArgumentError("Parameter project is required."); 1171 throw new core.ArgumentError("Parameter project is required.");
1147 } 1172 }
1148 if (instance == null) { 1173 if (instance == null) {
1149 throw new core.ArgumentError("Parameter instance is required."); 1174 throw new core.ArgumentError("Parameter instance is required.");
1150 } 1175 }
1151 1176
1152 _url = 'projects/' + commons.Escaper.ecapeVariable('$project') + '/instances /' + commons.Escaper.ecapeVariable('$instance') + '/resetSslConfig'; 1177 _url = 'projects/' +
1178 commons.Escaper.ecapeVariable('$project') +
1179 '/instances/' +
1180 commons.Escaper.ecapeVariable('$instance') +
1181 '/resetSslConfig';
1153 1182
1154 var _response = _requester.request(_url, 1183 var _response = _requester.request(_url, "POST",
1155 "POST", 1184 body: _body,
1156 body: _body, 1185 queryParams: _queryParams,
1157 queryParams: _queryParams, 1186 uploadOptions: _uploadOptions,
1158 uploadOptions: _uploadOptions, 1187 uploadMedia: _uploadMedia,
1159 uploadMedia: _uploadMedia, 1188 downloadOptions: _downloadOptions);
1160 downloadOptions: _downloadOptions);
1161 return _response.then((data) => new Operation.fromJson(data)); 1189 return _response.then((data) => new Operation.fromJson(data));
1162 } 1190 }
1163 1191
1164 /** 1192 /// Restarts a Cloud SQL instance.
1165 * Restarts a Cloud SQL instance. 1193 ///
1166 * 1194 /// Request parameters:
1167 * Request parameters: 1195 ///
1168 * 1196 /// [project] - Project ID of the project that contains the instance to be
1169 * [project] - Project ID of the project that contains the instance to be 1197 /// restarted.
1170 * restarted. 1198 ///
1171 * 1199 /// [instance] - Cloud SQL instance ID. This does not include the project ID.
1172 * [instance] - Cloud SQL instance ID. This does not include the project ID. 1200 ///
1173 * 1201 /// Completes with a [Operation].
1174 * Completes with a [Operation]. 1202 ///
1175 * 1203 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
1176 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 1204 /// an error.
1177 * error. 1205 ///
1178 * 1206 /// If the used [http.Client] completes with an error when making a REST
1179 * If the used [http.Client] completes with an error when making a REST call, 1207 /// call, this method will complete with the same error.
1180 * this method will complete with the same error.
1181 */
1182 async.Future<Operation> restart(core.String project, core.String instance) { 1208 async.Future<Operation> restart(core.String project, core.String instance) {
1183 var _url = null; 1209 var _url = null;
1184 var _queryParams = new core.Map(); 1210 var _queryParams = new core.Map();
1185 var _uploadMedia = null; 1211 var _uploadMedia = null;
1186 var _uploadOptions = null; 1212 var _uploadOptions = null;
1187 var _downloadOptions = commons.DownloadOptions.Metadata; 1213 var _downloadOptions = commons.DownloadOptions.Metadata;
1188 var _body = null; 1214 var _body = null;
1189 1215
1190 if (project == null) { 1216 if (project == null) {
1191 throw new core.ArgumentError("Parameter project is required."); 1217 throw new core.ArgumentError("Parameter project is required.");
1192 } 1218 }
1193 if (instance == null) { 1219 if (instance == null) {
1194 throw new core.ArgumentError("Parameter instance is required."); 1220 throw new core.ArgumentError("Parameter instance is required.");
1195 } 1221 }
1196 1222
1197 _url = 'projects/' + commons.Escaper.ecapeVariable('$project') + '/instances /' + commons.Escaper.ecapeVariable('$instance') + '/restart'; 1223 _url = 'projects/' +
1224 commons.Escaper.ecapeVariable('$project') +
1225 '/instances/' +
1226 commons.Escaper.ecapeVariable('$instance') +
1227 '/restart';
1198 1228
1199 var _response = _requester.request(_url, 1229 var _response = _requester.request(_url, "POST",
1200 "POST", 1230 body: _body,
1201 body: _body, 1231 queryParams: _queryParams,
1202 queryParams: _queryParams, 1232 uploadOptions: _uploadOptions,
1203 uploadOptions: _uploadOptions, 1233 uploadMedia: _uploadMedia,
1204 uploadMedia: _uploadMedia, 1234 downloadOptions: _downloadOptions);
1205 downloadOptions: _downloadOptions);
1206 return _response.then((data) => new Operation.fromJson(data)); 1235 return _response.then((data) => new Operation.fromJson(data));
1207 } 1236 }
1208 1237
1209 /** 1238 /// Restores a backup of a Cloud SQL instance.
1210 * Restores a backup of a Cloud SQL instance. 1239 ///
1211 * 1240 /// [request] - The metadata request object.
1212 * [request] - The metadata request object. 1241 ///
1213 * 1242 /// Request parameters:
1214 * Request parameters: 1243 ///
1215 * 1244 /// [project] - Project ID of the project that contains the instance.
1216 * [project] - Project ID of the project that contains the instance. 1245 ///
1217 * 1246 /// [instance] - Cloud SQL instance ID. This does not include the project ID.
1218 * [instance] - Cloud SQL instance ID. This does not include the project ID. 1247 ///
1219 * 1248 /// Completes with a [Operation].
1220 * Completes with a [Operation]. 1249 ///
1221 * 1250 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
1222 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 1251 /// an error.
1223 * error. 1252 ///
1224 * 1253 /// If the used [http.Client] completes with an error when making a REST
1225 * If the used [http.Client] completes with an error when making a REST call, 1254 /// call, this method will complete with the same error.
1226 * this method will complete with the same error. 1255 async.Future<Operation> restoreBackup(InstancesRestoreBackupRequest request,
1227 */ 1256 core.String project, core.String instance) {
1228 async.Future<Operation> restoreBackup(InstancesRestoreBackupRequest request, c ore.String project, core.String instance) {
1229 var _url = null; 1257 var _url = null;
1230 var _queryParams = new core.Map(); 1258 var _queryParams = new core.Map();
1231 var _uploadMedia = null; 1259 var _uploadMedia = null;
1232 var _uploadOptions = null; 1260 var _uploadOptions = null;
1233 var _downloadOptions = commons.DownloadOptions.Metadata; 1261 var _downloadOptions = commons.DownloadOptions.Metadata;
1234 var _body = null; 1262 var _body = null;
1235 1263
1236 if (request != null) { 1264 if (request != null) {
1237 _body = convert.JSON.encode((request).toJson()); 1265 _body = convert.JSON.encode((request).toJson());
1238 } 1266 }
1239 if (project == null) { 1267 if (project == null) {
1240 throw new core.ArgumentError("Parameter project is required."); 1268 throw new core.ArgumentError("Parameter project is required.");
1241 } 1269 }
1242 if (instance == null) { 1270 if (instance == null) {
1243 throw new core.ArgumentError("Parameter instance is required."); 1271 throw new core.ArgumentError("Parameter instance is required.");
1244 } 1272 }
1245 1273
1246 _url = 'projects/' + commons.Escaper.ecapeVariable('$project') + '/instances /' + commons.Escaper.ecapeVariable('$instance') + '/restoreBackup'; 1274 _url = 'projects/' +
1275 commons.Escaper.ecapeVariable('$project') +
1276 '/instances/' +
1277 commons.Escaper.ecapeVariable('$instance') +
1278 '/restoreBackup';
1247 1279
1248 var _response = _requester.request(_url, 1280 var _response = _requester.request(_url, "POST",
1249 "POST", 1281 body: _body,
1250 body: _body, 1282 queryParams: _queryParams,
1251 queryParams: _queryParams, 1283 uploadOptions: _uploadOptions,
1252 uploadOptions: _uploadOptions, 1284 uploadMedia: _uploadMedia,
1253 uploadMedia: _uploadMedia, 1285 downloadOptions: _downloadOptions);
1254 downloadOptions: _downloadOptions);
1255 return _response.then((data) => new Operation.fromJson(data)); 1286 return _response.then((data) => new Operation.fromJson(data));
1256 } 1287 }
1257 1288
1258 /** 1289 /// Starts the replication in the read replica instance.
1259 * Starts the replication in the read replica instance. 1290 ///
1260 * 1291 /// Request parameters:
1261 * Request parameters: 1292 ///
1262 * 1293 /// [project] - ID of the project that contains the read replica.
1263 * [project] - ID of the project that contains the read replica. 1294 ///
1264 * 1295 /// [instance] - Cloud SQL read replica instance name.
1265 * [instance] - Cloud SQL read replica instance name. 1296 ///
1266 * 1297 /// Completes with a [Operation].
1267 * Completes with a [Operation]. 1298 ///
1268 * 1299 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
1269 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 1300 /// an error.
1270 * error. 1301 ///
1271 * 1302 /// If the used [http.Client] completes with an error when making a REST
1272 * If the used [http.Client] completes with an error when making a REST call, 1303 /// call, this method will complete with the same error.
1273 * this method will complete with the same error. 1304 async.Future<Operation> startReplica(
1274 */ 1305 core.String project, core.String instance) {
1275 async.Future<Operation> startReplica(core.String project, core.String instance ) {
1276 var _url = null; 1306 var _url = null;
1277 var _queryParams = new core.Map(); 1307 var _queryParams = new core.Map();
1278 var _uploadMedia = null; 1308 var _uploadMedia = null;
1279 var _uploadOptions = null; 1309 var _uploadOptions = null;
1280 var _downloadOptions = commons.DownloadOptions.Metadata; 1310 var _downloadOptions = commons.DownloadOptions.Metadata;
1281 var _body = null; 1311 var _body = null;
1282 1312
1283 if (project == null) { 1313 if (project == null) {
1284 throw new core.ArgumentError("Parameter project is required."); 1314 throw new core.ArgumentError("Parameter project is required.");
1285 } 1315 }
1286 if (instance == null) { 1316 if (instance == null) {
1287 throw new core.ArgumentError("Parameter instance is required."); 1317 throw new core.ArgumentError("Parameter instance is required.");
1288 } 1318 }
1289 1319
1290 _url = 'projects/' + commons.Escaper.ecapeVariable('$project') + '/instances /' + commons.Escaper.ecapeVariable('$instance') + '/startReplica'; 1320 _url = 'projects/' +
1321 commons.Escaper.ecapeVariable('$project') +
1322 '/instances/' +
1323 commons.Escaper.ecapeVariable('$instance') +
1324 '/startReplica';
1291 1325
1292 var _response = _requester.request(_url, 1326 var _response = _requester.request(_url, "POST",
1293 "POST", 1327 body: _body,
1294 body: _body, 1328 queryParams: _queryParams,
1295 queryParams: _queryParams, 1329 uploadOptions: _uploadOptions,
1296 uploadOptions: _uploadOptions, 1330 uploadMedia: _uploadMedia,
1297 uploadMedia: _uploadMedia, 1331 downloadOptions: _downloadOptions);
1298 downloadOptions: _downloadOptions);
1299 return _response.then((data) => new Operation.fromJson(data)); 1332 return _response.then((data) => new Operation.fromJson(data));
1300 } 1333 }
1301 1334
1302 /** 1335 /// Stops the replication in the read replica instance.
1303 * Stops the replication in the read replica instance. 1336 ///
1304 * 1337 /// Request parameters:
1305 * Request parameters: 1338 ///
1306 * 1339 /// [project] - ID of the project that contains the read replica.
1307 * [project] - ID of the project that contains the read replica. 1340 ///
1308 * 1341 /// [instance] - Cloud SQL read replica instance name.
1309 * [instance] - Cloud SQL read replica instance name. 1342 ///
1310 * 1343 /// Completes with a [Operation].
1311 * Completes with a [Operation]. 1344 ///
1312 * 1345 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
1313 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 1346 /// an error.
1314 * error. 1347 ///
1315 * 1348 /// If the used [http.Client] completes with an error when making a REST
1316 * If the used [http.Client] completes with an error when making a REST call, 1349 /// call, this method will complete with the same error.
1317 * this method will complete with the same error. 1350 async.Future<Operation> stopReplica(
1318 */ 1351 core.String project, core.String instance) {
1319 async.Future<Operation> stopReplica(core.String project, core.String instance) {
1320 var _url = null; 1352 var _url = null;
1321 var _queryParams = new core.Map(); 1353 var _queryParams = new core.Map();
1322 var _uploadMedia = null; 1354 var _uploadMedia = null;
1323 var _uploadOptions = null; 1355 var _uploadOptions = null;
1324 var _downloadOptions = commons.DownloadOptions.Metadata; 1356 var _downloadOptions = commons.DownloadOptions.Metadata;
1325 var _body = null; 1357 var _body = null;
1326 1358
1327 if (project == null) { 1359 if (project == null) {
1328 throw new core.ArgumentError("Parameter project is required."); 1360 throw new core.ArgumentError("Parameter project is required.");
1329 } 1361 }
1330 if (instance == null) { 1362 if (instance == null) {
1331 throw new core.ArgumentError("Parameter instance is required."); 1363 throw new core.ArgumentError("Parameter instance is required.");
1332 } 1364 }
1333 1365
1334 _url = 'projects/' + commons.Escaper.ecapeVariable('$project') + '/instances /' + commons.Escaper.ecapeVariable('$instance') + '/stopReplica'; 1366 _url = 'projects/' +
1367 commons.Escaper.ecapeVariable('$project') +
1368 '/instances/' +
1369 commons.Escaper.ecapeVariable('$instance') +
1370 '/stopReplica';
1335 1371
1336 var _response = _requester.request(_url, 1372 var _response = _requester.request(_url, "POST",
1337 "POST", 1373 body: _body,
1338 body: _body, 1374 queryParams: _queryParams,
1339 queryParams: _queryParams, 1375 uploadOptions: _uploadOptions,
1340 uploadOptions: _uploadOptions, 1376 uploadMedia: _uploadMedia,
1341 uploadMedia: _uploadMedia, 1377 downloadOptions: _downloadOptions);
1342 downloadOptions: _downloadOptions);
1343 return _response.then((data) => new Operation.fromJson(data)); 1378 return _response.then((data) => new Operation.fromJson(data));
1344 } 1379 }
1345 1380
1346 /** 1381 /// Truncate MySQL general and slow query log tables
1347 * Truncate MySQL general and slow query log tables 1382 ///
1348 * 1383 /// [request] - The metadata request object.
1349 * [request] - The metadata request object. 1384 ///
1350 * 1385 /// Request parameters:
1351 * Request parameters: 1386 ///
1352 * 1387 /// [project] - Project ID of the Cloud SQL project.
1353 * [project] - Project ID of the Cloud SQL project. 1388 ///
1354 * 1389 /// [instance] - Cloud SQL instance ID. This does not include the project ID.
1355 * [instance] - Cloud SQL instance ID. This does not include the project ID. 1390 ///
1356 * 1391 /// Completes with a [Operation].
1357 * Completes with a [Operation]. 1392 ///
1358 * 1393 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
1359 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 1394 /// an error.
1360 * error. 1395 ///
1361 * 1396 /// If the used [http.Client] completes with an error when making a REST
1362 * If the used [http.Client] completes with an error when making a REST call, 1397 /// call, this method will complete with the same error.
1363 * this method will complete with the same error. 1398 async.Future<Operation> truncateLog(InstancesTruncateLogRequest request,
1364 */ 1399 core.String project, core.String instance) {
1365 async.Future<Operation> truncateLog(InstancesTruncateLogRequest request, core. String project, core.String instance) {
1366 var _url = null; 1400 var _url = null;
1367 var _queryParams = new core.Map(); 1401 var _queryParams = new core.Map();
1368 var _uploadMedia = null; 1402 var _uploadMedia = null;
1369 var _uploadOptions = null; 1403 var _uploadOptions = null;
1370 var _downloadOptions = commons.DownloadOptions.Metadata; 1404 var _downloadOptions = commons.DownloadOptions.Metadata;
1371 var _body = null; 1405 var _body = null;
1372 1406
1373 if (request != null) { 1407 if (request != null) {
1374 _body = convert.JSON.encode((request).toJson()); 1408 _body = convert.JSON.encode((request).toJson());
1375 } 1409 }
1376 if (project == null) { 1410 if (project == null) {
1377 throw new core.ArgumentError("Parameter project is required."); 1411 throw new core.ArgumentError("Parameter project is required.");
1378 } 1412 }
1379 if (instance == null) { 1413 if (instance == null) {
1380 throw new core.ArgumentError("Parameter instance is required."); 1414 throw new core.ArgumentError("Parameter instance is required.");
1381 } 1415 }
1382 1416
1383 _url = 'projects/' + commons.Escaper.ecapeVariable('$project') + '/instances /' + commons.Escaper.ecapeVariable('$instance') + '/truncateLog'; 1417 _url = 'projects/' +
1418 commons.Escaper.ecapeVariable('$project') +
1419 '/instances/' +
1420 commons.Escaper.ecapeVariable('$instance') +
1421 '/truncateLog';
1384 1422
1385 var _response = _requester.request(_url, 1423 var _response = _requester.request(_url, "POST",
1386 "POST", 1424 body: _body,
1387 body: _body, 1425 queryParams: _queryParams,
1388 queryParams: _queryParams, 1426 uploadOptions: _uploadOptions,
1389 uploadOptions: _uploadOptions, 1427 uploadMedia: _uploadMedia,
1390 uploadMedia: _uploadMedia, 1428 downloadOptions: _downloadOptions);
1391 downloadOptions: _downloadOptions);
1392 return _response.then((data) => new Operation.fromJson(data)); 1429 return _response.then((data) => new Operation.fromJson(data));
1393 } 1430 }
1394 1431
1395 /** 1432 /// Updates settings of a Cloud SQL instance. Caution: This is not a partial
1396 * Updates settings of a Cloud SQL instance. Caution: This is not a partial 1433 /// update, so you must include values for all the settings that you want to
1397 * update, so you must include values for all the settings that you want to 1434 /// retain. For partial updates, use patch.
1398 * retain. For partial updates, use patch. 1435 ///
1399 * 1436 /// [request] - The metadata request object.
1400 * [request] - The metadata request object. 1437 ///
1401 * 1438 /// Request parameters:
1402 * Request parameters: 1439 ///
1403 * 1440 /// [project] - Project ID of the project that contains the instance.
1404 * [project] - Project ID of the project that contains the instance. 1441 ///
1405 * 1442 /// [instance] - Cloud SQL instance ID. This does not include the project ID.
1406 * [instance] - Cloud SQL instance ID. This does not include the project ID. 1443 ///
1407 * 1444 /// Completes with a [Operation].
1408 * Completes with a [Operation]. 1445 ///
1409 * 1446 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
1410 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 1447 /// an error.
1411 * error. 1448 ///
1412 * 1449 /// If the used [http.Client] completes with an error when making a REST
1413 * If the used [http.Client] completes with an error when making a REST call, 1450 /// call, this method will complete with the same error.
1414 * this method will complete with the same error. 1451 async.Future<Operation> update(
1415 */ 1452 DatabaseInstance request, core.String project, core.String instance) {
1416 async.Future<Operation> update(DatabaseInstance request, core.String project, core.String instance) {
1417 var _url = null; 1453 var _url = null;
1418 var _queryParams = new core.Map(); 1454 var _queryParams = new core.Map();
1419 var _uploadMedia = null; 1455 var _uploadMedia = null;
1420 var _uploadOptions = null; 1456 var _uploadOptions = null;
1421 var _downloadOptions = commons.DownloadOptions.Metadata; 1457 var _downloadOptions = commons.DownloadOptions.Metadata;
1422 var _body = null; 1458 var _body = null;
1423 1459
1424 if (request != null) { 1460 if (request != null) {
1425 _body = convert.JSON.encode((request).toJson()); 1461 _body = convert.JSON.encode((request).toJson());
1426 } 1462 }
1427 if (project == null) { 1463 if (project == null) {
1428 throw new core.ArgumentError("Parameter project is required."); 1464 throw new core.ArgumentError("Parameter project is required.");
1429 } 1465 }
1430 if (instance == null) { 1466 if (instance == null) {
1431 throw new core.ArgumentError("Parameter instance is required."); 1467 throw new core.ArgumentError("Parameter instance is required.");
1432 } 1468 }
1433 1469
1434 _url = 'projects/' + commons.Escaper.ecapeVariable('$project') + '/instances /' + commons.Escaper.ecapeVariable('$instance'); 1470 _url = 'projects/' +
1471 commons.Escaper.ecapeVariable('$project') +
1472 '/instances/' +
1473 commons.Escaper.ecapeVariable('$instance');
1435 1474
1436 var _response = _requester.request(_url, 1475 var _response = _requester.request(_url, "PUT",
1437 "PUT", 1476 body: _body,
1438 body: _body, 1477 queryParams: _queryParams,
1439 queryParams: _queryParams, 1478 uploadOptions: _uploadOptions,
1440 uploadOptions: _uploadOptions, 1479 uploadMedia: _uploadMedia,
1441 uploadMedia: _uploadMedia, 1480 downloadOptions: _downloadOptions);
1442 downloadOptions: _downloadOptions);
1443 return _response.then((data) => new Operation.fromJson(data)); 1481 return _response.then((data) => new Operation.fromJson(data));
1444 } 1482 }
1445
1446 } 1483 }
1447 1484
1448
1449 class OperationsResourceApi { 1485 class OperationsResourceApi {
1450 final commons.ApiRequester _requester; 1486 final commons.ApiRequester _requester;
1451 1487
1452 OperationsResourceApi(commons.ApiRequester client) : 1488 OperationsResourceApi(commons.ApiRequester client) : _requester = client;
1453 _requester = client;
1454 1489
1455 /** 1490 /// Retrieves an instance operation that has been performed on an instance.
1456 * Retrieves an instance operation that has been performed on an instance. 1491 ///
1457 * 1492 /// Request parameters:
1458 * Request parameters: 1493 ///
1459 * 1494 /// [project] - Project ID of the project that contains the instance.
1460 * [project] - Project ID of the project that contains the instance. 1495 ///
1461 * 1496 /// [operation] - Instance operation ID.
1462 * [operation] - Instance operation ID. 1497 ///
1463 * 1498 /// Completes with a [Operation].
1464 * Completes with a [Operation]. 1499 ///
1465 * 1500 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
1466 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 1501 /// an error.
1467 * error. 1502 ///
1468 * 1503 /// If the used [http.Client] completes with an error when making a REST
1469 * If the used [http.Client] completes with an error when making a REST call, 1504 /// call, this method will complete with the same error.
1470 * this method will complete with the same error.
1471 */
1472 async.Future<Operation> get(core.String project, core.String operation) { 1505 async.Future<Operation> get(core.String project, core.String operation) {
1473 var _url = null; 1506 var _url = null;
1474 var _queryParams = new core.Map(); 1507 var _queryParams = new core.Map();
1475 var _uploadMedia = null; 1508 var _uploadMedia = null;
1476 var _uploadOptions = null; 1509 var _uploadOptions = null;
1477 var _downloadOptions = commons.DownloadOptions.Metadata; 1510 var _downloadOptions = commons.DownloadOptions.Metadata;
1478 var _body = null; 1511 var _body = null;
1479 1512
1480 if (project == null) { 1513 if (project == null) {
1481 throw new core.ArgumentError("Parameter project is required."); 1514 throw new core.ArgumentError("Parameter project is required.");
1482 } 1515 }
1483 if (operation == null) { 1516 if (operation == null) {
1484 throw new core.ArgumentError("Parameter operation is required."); 1517 throw new core.ArgumentError("Parameter operation is required.");
1485 } 1518 }
1486 1519
1487 _url = 'projects/' + commons.Escaper.ecapeVariable('$project') + '/operation s/' + commons.Escaper.ecapeVariable('$operation'); 1520 _url = 'projects/' +
1521 commons.Escaper.ecapeVariable('$project') +
1522 '/operations/' +
1523 commons.Escaper.ecapeVariable('$operation');
1488 1524
1489 var _response = _requester.request(_url, 1525 var _response = _requester.request(_url, "GET",
1490 "GET", 1526 body: _body,
1491 body: _body, 1527 queryParams: _queryParams,
1492 queryParams: _queryParams, 1528 uploadOptions: _uploadOptions,
1493 uploadOptions: _uploadOptions, 1529 uploadMedia: _uploadMedia,
1494 uploadMedia: _uploadMedia, 1530 downloadOptions: _downloadOptions);
1495 downloadOptions: _downloadOptions);
1496 return _response.then((data) => new Operation.fromJson(data)); 1531 return _response.then((data) => new Operation.fromJson(data));
1497 } 1532 }
1498 1533
1499 /** 1534 /// Lists all instance operations that have been performed on the given Cloud
1500 * Lists all instance operations that have been performed on the given Cloud 1535 /// SQL instance in the reverse chronological order of the start time.
1501 * SQL instance in the reverse chronological order of the start time. 1536 ///
1502 * 1537 /// Request parameters:
1503 * Request parameters: 1538 ///
1504 * 1539 /// [project] - Project ID of the project that contains the instance.
1505 * [project] - Project ID of the project that contains the instance. 1540 ///
1506 * 1541 /// [instance] - Cloud SQL instance ID. This does not include the project ID.
1507 * [instance] - Cloud SQL instance ID. This does not include the project ID. 1542 ///
1508 * 1543 /// [maxResults] - Maximum number of operations per response.
1509 * [maxResults] - Maximum number of operations per response. 1544 ///
1510 * 1545 /// [pageToken] - A previously-returned page token representing part of the
1511 * [pageToken] - A previously-returned page token representing part of the 1546 /// larger set of results to view.
1512 * larger set of results to view. 1547 ///
1513 * 1548 /// Completes with a [OperationsListResponse].
1514 * Completes with a [OperationsListResponse]. 1549 ///
1515 * 1550 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
1516 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 1551 /// an error.
1517 * error. 1552 ///
1518 * 1553 /// If the used [http.Client] completes with an error when making a REST
1519 * If the used [http.Client] completes with an error when making a REST call, 1554 /// call, this method will complete with the same error.
1520 * this method will complete with the same error. 1555 async.Future<OperationsListResponse> list(
1521 */ 1556 core.String project, core.String instance,
1522 async.Future<OperationsListResponse> list(core.String project, core.String ins tance, {core.int maxResults, core.String pageToken}) { 1557 {core.int maxResults, core.String pageToken}) {
1523 var _url = null; 1558 var _url = null;
1524 var _queryParams = new core.Map(); 1559 var _queryParams = new core.Map();
1525 var _uploadMedia = null; 1560 var _uploadMedia = null;
1526 var _uploadOptions = null; 1561 var _uploadOptions = null;
1527 var _downloadOptions = commons.DownloadOptions.Metadata; 1562 var _downloadOptions = commons.DownloadOptions.Metadata;
1528 var _body = null; 1563 var _body = null;
1529 1564
1530 if (project == null) { 1565 if (project == null) {
1531 throw new core.ArgumentError("Parameter project is required."); 1566 throw new core.ArgumentError("Parameter project is required.");
1532 } 1567 }
1533 if (instance == null) { 1568 if (instance == null) {
1534 throw new core.ArgumentError("Parameter instance is required."); 1569 throw new core.ArgumentError("Parameter instance is required.");
1535 } 1570 }
1536 _queryParams["instance"] = [instance]; 1571 _queryParams["instance"] = [instance];
1537 if (maxResults != null) { 1572 if (maxResults != null) {
1538 _queryParams["maxResults"] = ["${maxResults}"]; 1573 _queryParams["maxResults"] = ["${maxResults}"];
1539 } 1574 }
1540 if (pageToken != null) { 1575 if (pageToken != null) {
1541 _queryParams["pageToken"] = [pageToken]; 1576 _queryParams["pageToken"] = [pageToken];
1542 } 1577 }
1543 1578
1544 _url = 'projects/' + commons.Escaper.ecapeVariable('$project') + '/operation s'; 1579 _url =
1580 'projects/' + commons.Escaper.ecapeVariable('$project') + '/operations';
1545 1581
1546 var _response = _requester.request(_url, 1582 var _response = _requester.request(_url, "GET",
1547 "GET", 1583 body: _body,
1548 body: _body, 1584 queryParams: _queryParams,
1549 queryParams: _queryParams, 1585 uploadOptions: _uploadOptions,
1550 uploadOptions: _uploadOptions, 1586 uploadMedia: _uploadMedia,
1551 uploadMedia: _uploadMedia, 1587 downloadOptions: _downloadOptions);
1552 downloadOptions: _downloadOptions);
1553 return _response.then((data) => new OperationsListResponse.fromJson(data)); 1588 return _response.then((data) => new OperationsListResponse.fromJson(data));
1554 } 1589 }
1555
1556 } 1590 }
1557 1591
1558
1559 class SslCertsResourceApi { 1592 class SslCertsResourceApi {
1560 final commons.ApiRequester _requester; 1593 final commons.ApiRequester _requester;
1561 1594
1562 SslCertsResourceApi(commons.ApiRequester client) : 1595 SslCertsResourceApi(commons.ApiRequester client) : _requester = client;
1563 _requester = client;
1564 1596
1565 /** 1597 /// Generates a short-lived X509 certificate containing the provided public
1566 * Generates a short-lived X509 certificate containing the provided public key 1598 /// key and signed by a private key specific to the target instance. Users
1567 * and signed by a private key specific to the target instance. Users may use 1599 /// may use the certificate to authenticate as themselves when connecting to
1568 * the certificate to authenticate as themselves when connecting to the 1600 /// the database.
1569 * database. 1601 ///
1570 * 1602 /// [request] - The metadata request object.
1571 * [request] - The metadata request object. 1603 ///
1572 * 1604 /// Request parameters:
1573 * Request parameters: 1605 ///
1574 * 1606 /// [project] - Project ID of the Cloud SQL project.
1575 * [project] - Project ID of the Cloud SQL project. 1607 ///
1576 * 1608 /// [instance] - Cloud SQL instance ID. This does not include the project ID.
1577 * [instance] - Cloud SQL instance ID. This does not include the project ID. 1609 ///
1578 * 1610 /// Completes with a [SslCert].
1579 * Completes with a [SslCert]. 1611 ///
1580 * 1612 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
1581 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 1613 /// an error.
1582 * error. 1614 ///
1583 * 1615 /// If the used [http.Client] completes with an error when making a REST
1584 * If the used [http.Client] completes with an error when making a REST call, 1616 /// call, this method will complete with the same error.
1585 * this method will complete with the same error. 1617 async.Future<SslCert> createEphemeral(SslCertsCreateEphemeralRequest request,
1586 */ 1618 core.String project, core.String instance) {
1587 async.Future<SslCert> createEphemeral(SslCertsCreateEphemeralRequest request, core.String project, core.String instance) {
1588 var _url = null; 1619 var _url = null;
1589 var _queryParams = new core.Map(); 1620 var _queryParams = new core.Map();
1590 var _uploadMedia = null; 1621 var _uploadMedia = null;
1591 var _uploadOptions = null; 1622 var _uploadOptions = null;
1592 var _downloadOptions = commons.DownloadOptions.Metadata; 1623 var _downloadOptions = commons.DownloadOptions.Metadata;
1593 var _body = null; 1624 var _body = null;
1594 1625
1595 if (request != null) { 1626 if (request != null) {
1596 _body = convert.JSON.encode((request).toJson()); 1627 _body = convert.JSON.encode((request).toJson());
1597 } 1628 }
1598 if (project == null) { 1629 if (project == null) {
1599 throw new core.ArgumentError("Parameter project is required."); 1630 throw new core.ArgumentError("Parameter project is required.");
1600 } 1631 }
1601 if (instance == null) { 1632 if (instance == null) {
1602 throw new core.ArgumentError("Parameter instance is required."); 1633 throw new core.ArgumentError("Parameter instance is required.");
1603 } 1634 }
1604 1635
1605 _url = 'projects/' + commons.Escaper.ecapeVariable('$project') + '/instances /' + commons.Escaper.ecapeVariable('$instance') + '/createEphemeral'; 1636 _url = 'projects/' +
1637 commons.Escaper.ecapeVariable('$project') +
1638 '/instances/' +
1639 commons.Escaper.ecapeVariable('$instance') +
1640 '/createEphemeral';
1606 1641
1607 var _response = _requester.request(_url, 1642 var _response = _requester.request(_url, "POST",
1608 "POST", 1643 body: _body,
1609 body: _body, 1644 queryParams: _queryParams,
1610 queryParams: _queryParams, 1645 uploadOptions: _uploadOptions,
1611 uploadOptions: _uploadOptions, 1646 uploadMedia: _uploadMedia,
1612 uploadMedia: _uploadMedia, 1647 downloadOptions: _downloadOptions);
1613 downloadOptions: _downloadOptions);
1614 return _response.then((data) => new SslCert.fromJson(data)); 1648 return _response.then((data) => new SslCert.fromJson(data));
1615 } 1649 }
1616 1650
1617 /** 1651 /// Deletes the SSL certificate. The change will not take effect until the
1618 * Deletes the SSL certificate. The change will not take effect until the 1652 /// instance is restarted.
1619 * instance is restarted. 1653 ///
1620 * 1654 /// Request parameters:
1621 * Request parameters: 1655 ///
1622 * 1656 /// [project] - Project ID of the project that contains the instance to be
1623 * [project] - Project ID of the project that contains the instance to be 1657 /// deleted.
1624 * deleted. 1658 ///
1625 * 1659 /// [instance] - Cloud SQL instance ID. This does not include the project ID.
1626 * [instance] - Cloud SQL instance ID. This does not include the project ID. 1660 ///
1627 * 1661 /// [sha1Fingerprint] - Sha1 FingerPrint.
1628 * [sha1Fingerprint] - Sha1 FingerPrint. 1662 ///
1629 * 1663 /// Completes with a [Operation].
1630 * Completes with a [Operation]. 1664 ///
1631 * 1665 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
1632 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 1666 /// an error.
1633 * error. 1667 ///
1634 * 1668 /// If the used [http.Client] completes with an error when making a REST
1635 * If the used [http.Client] completes with an error when making a REST call, 1669 /// call, this method will complete with the same error.
1636 * this method will complete with the same error. 1670 async.Future<Operation> delete(
1637 */ 1671 core.String project, core.String instance, core.String sha1Fingerprint) {
1638 async.Future<Operation> delete(core.String project, core.String instance, core .String sha1Fingerprint) {
1639 var _url = null; 1672 var _url = null;
1640 var _queryParams = new core.Map(); 1673 var _queryParams = new core.Map();
1641 var _uploadMedia = null; 1674 var _uploadMedia = null;
1642 var _uploadOptions = null; 1675 var _uploadOptions = null;
1643 var _downloadOptions = commons.DownloadOptions.Metadata; 1676 var _downloadOptions = commons.DownloadOptions.Metadata;
1644 var _body = null; 1677 var _body = null;
1645 1678
1646 if (project == null) { 1679 if (project == null) {
1647 throw new core.ArgumentError("Parameter project is required."); 1680 throw new core.ArgumentError("Parameter project is required.");
1648 } 1681 }
1649 if (instance == null) { 1682 if (instance == null) {
1650 throw new core.ArgumentError("Parameter instance is required."); 1683 throw new core.ArgumentError("Parameter instance is required.");
1651 } 1684 }
1652 if (sha1Fingerprint == null) { 1685 if (sha1Fingerprint == null) {
1653 throw new core.ArgumentError("Parameter sha1Fingerprint is required."); 1686 throw new core.ArgumentError("Parameter sha1Fingerprint is required.");
1654 } 1687 }
1655 1688
1656 _url = 'projects/' + commons.Escaper.ecapeVariable('$project') + '/instances /' + commons.Escaper.ecapeVariable('$instance') + '/sslCerts/' + commons.Escaper .ecapeVariable('$sha1Fingerprint'); 1689 _url = 'projects/' +
1690 commons.Escaper.ecapeVariable('$project') +
1691 '/instances/' +
1692 commons.Escaper.ecapeVariable('$instance') +
1693 '/sslCerts/' +
1694 commons.Escaper.ecapeVariable('$sha1Fingerprint');
1657 1695
1658 var _response = _requester.request(_url, 1696 var _response = _requester.request(_url, "DELETE",
1659 "DELETE", 1697 body: _body,
1660 body: _body, 1698 queryParams: _queryParams,
1661 queryParams: _queryParams, 1699 uploadOptions: _uploadOptions,
1662 uploadOptions: _uploadOptions, 1700 uploadMedia: _uploadMedia,
1663 uploadMedia: _uploadMedia, 1701 downloadOptions: _downloadOptions);
1664 downloadOptions: _downloadOptions);
1665 return _response.then((data) => new Operation.fromJson(data)); 1702 return _response.then((data) => new Operation.fromJson(data));
1666 } 1703 }
1667 1704
1668 /** 1705 /// Retrieves a particular SSL certificate. Does not include the private key
1669 * Retrieves a particular SSL certificate. Does not include the private key 1706 /// (required for usage). The private key must be saved from the response to
1670 * (required for usage). The private key must be saved from the response to 1707 /// initial creation.
1671 * initial creation. 1708 ///
1672 * 1709 /// Request parameters:
1673 * Request parameters: 1710 ///
1674 * 1711 /// [project] - Project ID of the project that contains the instance.
1675 * [project] - Project ID of the project that contains the instance. 1712 ///
1676 * 1713 /// [instance] - Cloud SQL instance ID. This does not include the project ID.
1677 * [instance] - Cloud SQL instance ID. This does not include the project ID. 1714 ///
1678 * 1715 /// [sha1Fingerprint] - Sha1 FingerPrint.
1679 * [sha1Fingerprint] - Sha1 FingerPrint. 1716 ///
1680 * 1717 /// Completes with a [SslCert].
1681 * Completes with a [SslCert]. 1718 ///
1682 * 1719 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
1683 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 1720 /// an error.
1684 * error. 1721 ///
1685 * 1722 /// If the used [http.Client] completes with an error when making a REST
1686 * If the used [http.Client] completes with an error when making a REST call, 1723 /// call, this method will complete with the same error.
1687 * this method will complete with the same error. 1724 async.Future<SslCert> get(
1688 */ 1725 core.String project, core.String instance, core.String sha1Fingerprint) {
1689 async.Future<SslCert> get(core.String project, core.String instance, core.Stri ng sha1Fingerprint) {
1690 var _url = null; 1726 var _url = null;
1691 var _queryParams = new core.Map(); 1727 var _queryParams = new core.Map();
1692 var _uploadMedia = null; 1728 var _uploadMedia = null;
1693 var _uploadOptions = null; 1729 var _uploadOptions = null;
1694 var _downloadOptions = commons.DownloadOptions.Metadata; 1730 var _downloadOptions = commons.DownloadOptions.Metadata;
1695 var _body = null; 1731 var _body = null;
1696 1732
1697 if (project == null) { 1733 if (project == null) {
1698 throw new core.ArgumentError("Parameter project is required."); 1734 throw new core.ArgumentError("Parameter project is required.");
1699 } 1735 }
1700 if (instance == null) { 1736 if (instance == null) {
1701 throw new core.ArgumentError("Parameter instance is required."); 1737 throw new core.ArgumentError("Parameter instance is required.");
1702 } 1738 }
1703 if (sha1Fingerprint == null) { 1739 if (sha1Fingerprint == null) {
1704 throw new core.ArgumentError("Parameter sha1Fingerprint is required."); 1740 throw new core.ArgumentError("Parameter sha1Fingerprint is required.");
1705 } 1741 }
1706 1742
1707 _url = 'projects/' + commons.Escaper.ecapeVariable('$project') + '/instances /' + commons.Escaper.ecapeVariable('$instance') + '/sslCerts/' + commons.Escaper .ecapeVariable('$sha1Fingerprint'); 1743 _url = 'projects/' +
1744 commons.Escaper.ecapeVariable('$project') +
1745 '/instances/' +
1746 commons.Escaper.ecapeVariable('$instance') +
1747 '/sslCerts/' +
1748 commons.Escaper.ecapeVariable('$sha1Fingerprint');
1708 1749
1709 var _response = _requester.request(_url, 1750 var _response = _requester.request(_url, "GET",
1710 "GET", 1751 body: _body,
1711 body: _body, 1752 queryParams: _queryParams,
1712 queryParams: _queryParams, 1753 uploadOptions: _uploadOptions,
1713 uploadOptions: _uploadOptions, 1754 uploadMedia: _uploadMedia,
1714 uploadMedia: _uploadMedia, 1755 downloadOptions: _downloadOptions);
1715 downloadOptions: _downloadOptions);
1716 return _response.then((data) => new SslCert.fromJson(data)); 1756 return _response.then((data) => new SslCert.fromJson(data));
1717 } 1757 }
1718 1758
1719 /** 1759 /// Creates an SSL certificate and returns it along with the private key and
1720 * Creates an SSL certificate and returns it along with the private key and 1760 /// server certificate authority. The new certificate will not be usable
1721 * server certificate authority. The new certificate will not be usable until 1761 /// until the instance is restarted.
1722 * the instance is restarted. 1762 ///
1723 * 1763 /// [request] - The metadata request object.
1724 * [request] - The metadata request object. 1764 ///
1725 * 1765 /// Request parameters:
1726 * Request parameters: 1766 ///
1727 * 1767 /// [project] - Project ID of the project to which the newly created Cloud
1728 * [project] - Project ID of the project to which the newly created Cloud SQL 1768 /// SQL instances should belong.
1729 * instances should belong. 1769 ///
1730 * 1770 /// [instance] - Cloud SQL instance ID. This does not include the project ID.
1731 * [instance] - Cloud SQL instance ID. This does not include the project ID. 1771 ///
1732 * 1772 /// Completes with a [SslCertsInsertResponse].
1733 * Completes with a [SslCertsInsertResponse]. 1773 ///
1734 * 1774 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
1735 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 1775 /// an error.
1736 * error. 1776 ///
1737 * 1777 /// If the used [http.Client] completes with an error when making a REST
1738 * If the used [http.Client] completes with an error when making a REST call, 1778 /// call, this method will complete with the same error.
1739 * this method will complete with the same error. 1779 async.Future<SslCertsInsertResponse> insert(SslCertsInsertRequest request,
1740 */ 1780 core.String project, core.String instance) {
1741 async.Future<SslCertsInsertResponse> insert(SslCertsInsertRequest request, cor e.String project, core.String instance) {
1742 var _url = null; 1781 var _url = null;
1743 var _queryParams = new core.Map(); 1782 var _queryParams = new core.Map();
1744 var _uploadMedia = null; 1783 var _uploadMedia = null;
1745 var _uploadOptions = null; 1784 var _uploadOptions = null;
1746 var _downloadOptions = commons.DownloadOptions.Metadata; 1785 var _downloadOptions = commons.DownloadOptions.Metadata;
1747 var _body = null; 1786 var _body = null;
1748 1787
1749 if (request != null) { 1788 if (request != null) {
1750 _body = convert.JSON.encode((request).toJson()); 1789 _body = convert.JSON.encode((request).toJson());
1751 } 1790 }
1752 if (project == null) { 1791 if (project == null) {
1753 throw new core.ArgumentError("Parameter project is required."); 1792 throw new core.ArgumentError("Parameter project is required.");
1754 } 1793 }
1755 if (instance == null) { 1794 if (instance == null) {
1756 throw new core.ArgumentError("Parameter instance is required."); 1795 throw new core.ArgumentError("Parameter instance is required.");
1757 } 1796 }
1758 1797
1759 _url = 'projects/' + commons.Escaper.ecapeVariable('$project') + '/instances /' + commons.Escaper.ecapeVariable('$instance') + '/sslCerts'; 1798 _url = 'projects/' +
1799 commons.Escaper.ecapeVariable('$project') +
1800 '/instances/' +
1801 commons.Escaper.ecapeVariable('$instance') +
1802 '/sslCerts';
1760 1803
1761 var _response = _requester.request(_url, 1804 var _response = _requester.request(_url, "POST",
1762 "POST", 1805 body: _body,
1763 body: _body, 1806 queryParams: _queryParams,
1764 queryParams: _queryParams, 1807 uploadOptions: _uploadOptions,
1765 uploadOptions: _uploadOptions, 1808 uploadMedia: _uploadMedia,
1766 uploadMedia: _uploadMedia, 1809 downloadOptions: _downloadOptions);
1767 downloadOptions: _downloadOptions);
1768 return _response.then((data) => new SslCertsInsertResponse.fromJson(data)); 1810 return _response.then((data) => new SslCertsInsertResponse.fromJson(data));
1769 } 1811 }
1770 1812
1771 /** 1813 /// Lists all of the current SSL certificates for the instance.
1772 * Lists all of the current SSL certificates for the instance. 1814 ///
1773 * 1815 /// Request parameters:
1774 * Request parameters: 1816 ///
1775 * 1817 /// [project] - Project ID of the project for which to list Cloud SQL
1776 * [project] - Project ID of the project for which to list Cloud SQL 1818 /// instances.
1777 * instances. 1819 ///
1778 * 1820 /// [instance] - Cloud SQL instance ID. This does not include the project ID.
1779 * [instance] - Cloud SQL instance ID. This does not include the project ID. 1821 ///
1780 * 1822 /// Completes with a [SslCertsListResponse].
1781 * Completes with a [SslCertsListResponse]. 1823 ///
1782 * 1824 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
1783 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 1825 /// an error.
1784 * error. 1826 ///
1785 * 1827 /// If the used [http.Client] completes with an error when making a REST
1786 * If the used [http.Client] completes with an error when making a REST call, 1828 /// call, this method will complete with the same error.
1787 * this method will complete with the same error. 1829 async.Future<SslCertsListResponse> list(
1788 */ 1830 core.String project, core.String instance) {
1789 async.Future<SslCertsListResponse> list(core.String project, core.String insta nce) {
1790 var _url = null; 1831 var _url = null;
1791 var _queryParams = new core.Map(); 1832 var _queryParams = new core.Map();
1792 var _uploadMedia = null; 1833 var _uploadMedia = null;
1793 var _uploadOptions = null; 1834 var _uploadOptions = null;
1794 var _downloadOptions = commons.DownloadOptions.Metadata; 1835 var _downloadOptions = commons.DownloadOptions.Metadata;
1795 var _body = null; 1836 var _body = null;
1796 1837
1797 if (project == null) { 1838 if (project == null) {
1798 throw new core.ArgumentError("Parameter project is required."); 1839 throw new core.ArgumentError("Parameter project is required.");
1799 } 1840 }
1800 if (instance == null) { 1841 if (instance == null) {
1801 throw new core.ArgumentError("Parameter instance is required."); 1842 throw new core.ArgumentError("Parameter instance is required.");
1802 } 1843 }
1803 1844
1804 _url = 'projects/' + commons.Escaper.ecapeVariable('$project') + '/instances /' + commons.Escaper.ecapeVariable('$instance') + '/sslCerts'; 1845 _url = 'projects/' +
1846 commons.Escaper.ecapeVariable('$project') +
1847 '/instances/' +
1848 commons.Escaper.ecapeVariable('$instance') +
1849 '/sslCerts';
1805 1850
1806 var _response = _requester.request(_url, 1851 var _response = _requester.request(_url, "GET",
1807 "GET", 1852 body: _body,
1808 body: _body, 1853 queryParams: _queryParams,
1809 queryParams: _queryParams, 1854 uploadOptions: _uploadOptions,
1810 uploadOptions: _uploadOptions, 1855 uploadMedia: _uploadMedia,
1811 uploadMedia: _uploadMedia, 1856 downloadOptions: _downloadOptions);
1812 downloadOptions: _downloadOptions);
1813 return _response.then((data) => new SslCertsListResponse.fromJson(data)); 1857 return _response.then((data) => new SslCertsListResponse.fromJson(data));
1814 } 1858 }
1815
1816 } 1859 }
1817 1860
1818
1819 class TiersResourceApi { 1861 class TiersResourceApi {
1820 final commons.ApiRequester _requester; 1862 final commons.ApiRequester _requester;
1821 1863
1822 TiersResourceApi(commons.ApiRequester client) : 1864 TiersResourceApi(commons.ApiRequester client) : _requester = client;
1823 _requester = client;
1824 1865
1825 /** 1866 /// Lists all available service tiers for Google Cloud SQL, for example D1,
1826 * Lists all available service tiers for Google Cloud SQL, for example D1, D2. 1867 /// D2. For related information, see Pricing.
1827 * For related information, see Pricing. 1868 ///
1828 * 1869 /// Request parameters:
1829 * Request parameters: 1870 ///
1830 * 1871 /// [project] - Project ID of the project for which to list tiers.
1831 * [project] - Project ID of the project for which to list tiers. 1872 ///
1832 * 1873 /// Completes with a [TiersListResponse].
1833 * Completes with a [TiersListResponse]. 1874 ///
1834 * 1875 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
1835 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 1876 /// an error.
1836 * error. 1877 ///
1837 * 1878 /// If the used [http.Client] completes with an error when making a REST
1838 * If the used [http.Client] completes with an error when making a REST call, 1879 /// call, this method will complete with the same error.
1839 * this method will complete with the same error.
1840 */
1841 async.Future<TiersListResponse> list(core.String project) { 1880 async.Future<TiersListResponse> list(core.String project) {
1842 var _url = null; 1881 var _url = null;
1843 var _queryParams = new core.Map(); 1882 var _queryParams = new core.Map();
1844 var _uploadMedia = null; 1883 var _uploadMedia = null;
1845 var _uploadOptions = null; 1884 var _uploadOptions = null;
1846 var _downloadOptions = commons.DownloadOptions.Metadata; 1885 var _downloadOptions = commons.DownloadOptions.Metadata;
1847 var _body = null; 1886 var _body = null;
1848 1887
1849 if (project == null) { 1888 if (project == null) {
1850 throw new core.ArgumentError("Parameter project is required."); 1889 throw new core.ArgumentError("Parameter project is required.");
1851 } 1890 }
1852 1891
1853 _url = 'projects/' + commons.Escaper.ecapeVariable('$project') + '/tiers'; 1892 _url = 'projects/' + commons.Escaper.ecapeVariable('$project') + '/tiers';
1854 1893
1855 var _response = _requester.request(_url, 1894 var _response = _requester.request(_url, "GET",
1856 "GET", 1895 body: _body,
1857 body: _body, 1896 queryParams: _queryParams,
1858 queryParams: _queryParams, 1897 uploadOptions: _uploadOptions,
1859 uploadOptions: _uploadOptions, 1898 uploadMedia: _uploadMedia,
1860 uploadMedia: _uploadMedia, 1899 downloadOptions: _downloadOptions);
1861 downloadOptions: _downloadOptions);
1862 return _response.then((data) => new TiersListResponse.fromJson(data)); 1900 return _response.then((data) => new TiersListResponse.fromJson(data));
1863 } 1901 }
1864
1865 } 1902 }
1866 1903
1867
1868 class UsersResourceApi { 1904 class UsersResourceApi {
1869 final commons.ApiRequester _requester; 1905 final commons.ApiRequester _requester;
1870 1906
1871 UsersResourceApi(commons.ApiRequester client) : 1907 UsersResourceApi(commons.ApiRequester client) : _requester = client;
1872 _requester = client;
1873 1908
1874 /** 1909 /// Deletes a user from a Cloud SQL instance.
1875 * Deletes a user from a Cloud SQL instance. 1910 ///
1876 * 1911 /// Request parameters:
1877 * Request parameters: 1912 ///
1878 * 1913 /// [project] - Project ID of the project that contains the instance.
1879 * [project] - Project ID of the project that contains the instance. 1914 ///
1880 * 1915 /// [instance] - Database instance ID. This does not include the project ID.
1881 * [instance] - Database instance ID. This does not include the project ID. 1916 ///
1882 * 1917 /// [host] - Host of the user in the instance.
1883 * [host] - Host of the user in the instance. 1918 ///
1884 * 1919 /// [name] - Name of the user in the instance.
1885 * [name] - Name of the user in the instance. 1920 ///
1886 * 1921 /// Completes with a [Operation].
1887 * Completes with a [Operation]. 1922 ///
1888 * 1923 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
1889 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 1924 /// an error.
1890 * error. 1925 ///
1891 * 1926 /// If the used [http.Client] completes with an error when making a REST
1892 * If the used [http.Client] completes with an error when making a REST call, 1927 /// call, this method will complete with the same error.
1893 * this method will complete with the same error. 1928 async.Future<Operation> delete(core.String project, core.String instance,
1894 */ 1929 core.String host, core.String name) {
1895 async.Future<Operation> delete(core.String project, core.String instance, core .String host, core.String name) {
1896 var _url = null; 1930 var _url = null;
1897 var _queryParams = new core.Map(); 1931 var _queryParams = new core.Map();
1898 var _uploadMedia = null; 1932 var _uploadMedia = null;
1899 var _uploadOptions = null; 1933 var _uploadOptions = null;
1900 var _downloadOptions = commons.DownloadOptions.Metadata; 1934 var _downloadOptions = commons.DownloadOptions.Metadata;
1901 var _body = null; 1935 var _body = null;
1902 1936
1903 if (project == null) { 1937 if (project == null) {
1904 throw new core.ArgumentError("Parameter project is required."); 1938 throw new core.ArgumentError("Parameter project is required.");
1905 } 1939 }
1906 if (instance == null) { 1940 if (instance == null) {
1907 throw new core.ArgumentError("Parameter instance is required."); 1941 throw new core.ArgumentError("Parameter instance is required.");
1908 } 1942 }
1909 if (host == null) { 1943 if (host == null) {
1910 throw new core.ArgumentError("Parameter host is required."); 1944 throw new core.ArgumentError("Parameter host is required.");
1911 } 1945 }
1912 _queryParams["host"] = [host]; 1946 _queryParams["host"] = [host];
1913 if (name == null) { 1947 if (name == null) {
1914 throw new core.ArgumentError("Parameter name is required."); 1948 throw new core.ArgumentError("Parameter name is required.");
1915 } 1949 }
1916 _queryParams["name"] = [name]; 1950 _queryParams["name"] = [name];
1917 1951
1918 _url = 'projects/' + commons.Escaper.ecapeVariable('$project') + '/instances /' + commons.Escaper.ecapeVariable('$instance') + '/users'; 1952 _url = 'projects/' +
1953 commons.Escaper.ecapeVariable('$project') +
1954 '/instances/' +
1955 commons.Escaper.ecapeVariable('$instance') +
1956 '/users';
1919 1957
1920 var _response = _requester.request(_url, 1958 var _response = _requester.request(_url, "DELETE",
1921 "DELETE", 1959 body: _body,
1922 body: _body, 1960 queryParams: _queryParams,
1923 queryParams: _queryParams, 1961 uploadOptions: _uploadOptions,
1924 uploadOptions: _uploadOptions, 1962 uploadMedia: _uploadMedia,
1925 uploadMedia: _uploadMedia, 1963 downloadOptions: _downloadOptions);
1926 downloadOptions: _downloadOptions);
1927 return _response.then((data) => new Operation.fromJson(data)); 1964 return _response.then((data) => new Operation.fromJson(data));
1928 } 1965 }
1929 1966
1930 /** 1967 /// Creates a new user in a Cloud SQL instance.
1931 * Creates a new user in a Cloud SQL instance. 1968 ///
1932 * 1969 /// [request] - The metadata request object.
1933 * [request] - The metadata request object. 1970 ///
1934 * 1971 /// Request parameters:
1935 * Request parameters: 1972 ///
1936 * 1973 /// [project] - Project ID of the project that contains the instance.
1937 * [project] - Project ID of the project that contains the instance. 1974 ///
1938 * 1975 /// [instance] - Database instance ID. This does not include the project ID.
1939 * [instance] - Database instance ID. This does not include the project ID. 1976 ///
1940 * 1977 /// Completes with a [Operation].
1941 * Completes with a [Operation]. 1978 ///
1942 * 1979 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
1943 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 1980 /// an error.
1944 * error. 1981 ///
1945 * 1982 /// If the used [http.Client] completes with an error when making a REST
1946 * If the used [http.Client] completes with an error when making a REST call, 1983 /// call, this method will complete with the same error.
1947 * this method will complete with the same error. 1984 async.Future<Operation> insert(
1948 */ 1985 User request, core.String project, core.String instance) {
1949 async.Future<Operation> insert(User request, core.String project, core.String instance) {
1950 var _url = null; 1986 var _url = null;
1951 var _queryParams = new core.Map(); 1987 var _queryParams = new core.Map();
1952 var _uploadMedia = null; 1988 var _uploadMedia = null;
1953 var _uploadOptions = null; 1989 var _uploadOptions = null;
1954 var _downloadOptions = commons.DownloadOptions.Metadata; 1990 var _downloadOptions = commons.DownloadOptions.Metadata;
1955 var _body = null; 1991 var _body = null;
1956 1992
1957 if (request != null) { 1993 if (request != null) {
1958 _body = convert.JSON.encode((request).toJson()); 1994 _body = convert.JSON.encode((request).toJson());
1959 } 1995 }
1960 if (project == null) { 1996 if (project == null) {
1961 throw new core.ArgumentError("Parameter project is required."); 1997 throw new core.ArgumentError("Parameter project is required.");
1962 } 1998 }
1963 if (instance == null) { 1999 if (instance == null) {
1964 throw new core.ArgumentError("Parameter instance is required."); 2000 throw new core.ArgumentError("Parameter instance is required.");
1965 } 2001 }
1966 2002
1967 _url = 'projects/' + commons.Escaper.ecapeVariable('$project') + '/instances /' + commons.Escaper.ecapeVariable('$instance') + '/users'; 2003 _url = 'projects/' +
2004 commons.Escaper.ecapeVariable('$project') +
2005 '/instances/' +
2006 commons.Escaper.ecapeVariable('$instance') +
2007 '/users';
1968 2008
1969 var _response = _requester.request(_url, 2009 var _response = _requester.request(_url, "POST",
1970 "POST", 2010 body: _body,
1971 body: _body, 2011 queryParams: _queryParams,
1972 queryParams: _queryParams, 2012 uploadOptions: _uploadOptions,
1973 uploadOptions: _uploadOptions, 2013 uploadMedia: _uploadMedia,
1974 uploadMedia: _uploadMedia, 2014 downloadOptions: _downloadOptions);
1975 downloadOptions: _downloadOptions);
1976 return _response.then((data) => new Operation.fromJson(data)); 2015 return _response.then((data) => new Operation.fromJson(data));
1977 } 2016 }
1978 2017
1979 /** 2018 /// Lists users in the specified Cloud SQL instance.
1980 * Lists users in the specified Cloud SQL instance. 2019 ///
1981 * 2020 /// Request parameters:
1982 * Request parameters: 2021 ///
1983 * 2022 /// [project] - Project ID of the project that contains the instance.
1984 * [project] - Project ID of the project that contains the instance. 2023 ///
1985 * 2024 /// [instance] - Database instance ID. This does not include the project ID.
1986 * [instance] - Database instance ID. This does not include the project ID. 2025 ///
1987 * 2026 /// Completes with a [UsersListResponse].
1988 * Completes with a [UsersListResponse]. 2027 ///
1989 * 2028 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
1990 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 2029 /// an error.
1991 * error. 2030 ///
1992 * 2031 /// If the used [http.Client] completes with an error when making a REST
1993 * If the used [http.Client] completes with an error when making a REST call, 2032 /// call, this method will complete with the same error.
1994 * this method will complete with the same error. 2033 async.Future<UsersListResponse> list(
1995 */ 2034 core.String project, core.String instance) {
1996 async.Future<UsersListResponse> list(core.String project, core.String instance ) {
1997 var _url = null; 2035 var _url = null;
1998 var _queryParams = new core.Map(); 2036 var _queryParams = new core.Map();
1999 var _uploadMedia = null; 2037 var _uploadMedia = null;
2000 var _uploadOptions = null; 2038 var _uploadOptions = null;
2001 var _downloadOptions = commons.DownloadOptions.Metadata; 2039 var _downloadOptions = commons.DownloadOptions.Metadata;
2002 var _body = null; 2040 var _body = null;
2003 2041
2004 if (project == null) { 2042 if (project == null) {
2005 throw new core.ArgumentError("Parameter project is required."); 2043 throw new core.ArgumentError("Parameter project is required.");
2006 } 2044 }
2007 if (instance == null) { 2045 if (instance == null) {
2008 throw new core.ArgumentError("Parameter instance is required."); 2046 throw new core.ArgumentError("Parameter instance is required.");
2009 } 2047 }
2010 2048
2011 _url = 'projects/' + commons.Escaper.ecapeVariable('$project') + '/instances /' + commons.Escaper.ecapeVariable('$instance') + '/users'; 2049 _url = 'projects/' +
2050 commons.Escaper.ecapeVariable('$project') +
2051 '/instances/' +
2052 commons.Escaper.ecapeVariable('$instance') +
2053 '/users';
2012 2054
2013 var _response = _requester.request(_url, 2055 var _response = _requester.request(_url, "GET",
2014 "GET", 2056 body: _body,
2015 body: _body, 2057 queryParams: _queryParams,
2016 queryParams: _queryParams, 2058 uploadOptions: _uploadOptions,
2017 uploadOptions: _uploadOptions, 2059 uploadMedia: _uploadMedia,
2018 uploadMedia: _uploadMedia, 2060 downloadOptions: _downloadOptions);
2019 downloadOptions: _downloadOptions);
2020 return _response.then((data) => new UsersListResponse.fromJson(data)); 2061 return _response.then((data) => new UsersListResponse.fromJson(data));
2021 } 2062 }
2022 2063
2023 /** 2064 /// Updates an existing user in a Cloud SQL instance.
2024 * Updates an existing user in a Cloud SQL instance. 2065 ///
2025 * 2066 /// [request] - The metadata request object.
2026 * [request] - The metadata request object. 2067 ///
2027 * 2068 /// Request parameters:
2028 * Request parameters: 2069 ///
2029 * 2070 /// [project] - Project ID of the project that contains the instance.
2030 * [project] - Project ID of the project that contains the instance. 2071 ///
2031 * 2072 /// [instance] - Database instance ID. This does not include the project ID.
2032 * [instance] - Database instance ID. This does not include the project ID. 2073 ///
2033 * 2074 /// [host] - Host of the user in the instance.
2034 * [host] - Host of the user in the instance. 2075 ///
2035 * 2076 /// [name] - Name of the user in the instance.
2036 * [name] - Name of the user in the instance. 2077 ///
2037 * 2078 /// Completes with a [Operation].
2038 * Completes with a [Operation]. 2079 ///
2039 * 2080 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
2040 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 2081 /// an error.
2041 * error. 2082 ///
2042 * 2083 /// If the used [http.Client] completes with an error when making a REST
2043 * If the used [http.Client] completes with an error when making a REST call, 2084 /// call, this method will complete with the same error.
2044 * this method will complete with the same error. 2085 async.Future<Operation> update(User request, core.String project,
2045 */ 2086 core.String instance, core.String host, core.String name) {
2046 async.Future<Operation> update(User request, core.String project, core.String instance, core.String host, core.String name) {
2047 var _url = null; 2087 var _url = null;
2048 var _queryParams = new core.Map(); 2088 var _queryParams = new core.Map();
2049 var _uploadMedia = null; 2089 var _uploadMedia = null;
2050 var _uploadOptions = null; 2090 var _uploadOptions = null;
2051 var _downloadOptions = commons.DownloadOptions.Metadata; 2091 var _downloadOptions = commons.DownloadOptions.Metadata;
2052 var _body = null; 2092 var _body = null;
2053 2093
2054 if (request != null) { 2094 if (request != null) {
2055 _body = convert.JSON.encode((request).toJson()); 2095 _body = convert.JSON.encode((request).toJson());
2056 } 2096 }
2057 if (project == null) { 2097 if (project == null) {
2058 throw new core.ArgumentError("Parameter project is required."); 2098 throw new core.ArgumentError("Parameter project is required.");
2059 } 2099 }
2060 if (instance == null) { 2100 if (instance == null) {
2061 throw new core.ArgumentError("Parameter instance is required."); 2101 throw new core.ArgumentError("Parameter instance is required.");
2062 } 2102 }
2063 if (host == null) { 2103 if (host == null) {
2064 throw new core.ArgumentError("Parameter host is required."); 2104 throw new core.ArgumentError("Parameter host is required.");
2065 } 2105 }
2066 _queryParams["host"] = [host]; 2106 _queryParams["host"] = [host];
2067 if (name == null) { 2107 if (name == null) {
2068 throw new core.ArgumentError("Parameter name is required."); 2108 throw new core.ArgumentError("Parameter name is required.");
2069 } 2109 }
2070 _queryParams["name"] = [name]; 2110 _queryParams["name"] = [name];
2071 2111
2072 _url = 'projects/' + commons.Escaper.ecapeVariable('$project') + '/instances /' + commons.Escaper.ecapeVariable('$instance') + '/users'; 2112 _url = 'projects/' +
2113 commons.Escaper.ecapeVariable('$project') +
2114 '/instances/' +
2115 commons.Escaper.ecapeVariable('$instance') +
2116 '/users';
2073 2117
2074 var _response = _requester.request(_url, 2118 var _response = _requester.request(_url, "PUT",
2075 "PUT", 2119 body: _body,
2076 body: _body, 2120 queryParams: _queryParams,
2077 queryParams: _queryParams, 2121 uploadOptions: _uploadOptions,
2078 uploadOptions: _uploadOptions, 2122 uploadMedia: _uploadMedia,
2079 uploadMedia: _uploadMedia, 2123 downloadOptions: _downloadOptions);
2080 downloadOptions: _downloadOptions);
2081 return _response.then((data) => new Operation.fromJson(data)); 2124 return _response.then((data) => new Operation.fromJson(data));
2082 } 2125 }
2083
2084 } 2126 }
2085 2127
2128 /// An entry for an Access Control list.
2129 class AclEntry {
2130 /// The time when this access control entry expires in RFC 3339 format, for
2131 /// example 2012-11-15T16:19:00.094Z.
2132 core.DateTime expirationTime;
2086 2133
2134 /// This is always sql#aclEntry.
2135 core.String kind;
2087 2136
2088 /** An entry for an Access Control list. */ 2137 /// An optional label to identify this entry.
2089 class AclEntry {
2090 /**
2091 * The time when this access control entry expires in RFC 3339 format, for
2092 * example 2012-11-15T16:19:00.094Z.
2093 */
2094 core.DateTime expirationTime;
2095 /** This is always sql#aclEntry. */
2096 core.String kind;
2097 /** An optional label to identify this entry. */
2098 core.String name; 2138 core.String name;
2099 /** The whitelisted value for the access control list. */ 2139
2140 /// The whitelisted value for the access control list.
2100 core.String value; 2141 core.String value;
2101 2142
2102 AclEntry(); 2143 AclEntry();
2103 2144
2104 AclEntry.fromJson(core.Map _json) { 2145 AclEntry.fromJson(core.Map _json) {
2105 if (_json.containsKey("expirationTime")) { 2146 if (_json.containsKey("expirationTime")) {
2106 expirationTime = core.DateTime.parse(_json["expirationTime"]); 2147 expirationTime = core.DateTime.parse(_json["expirationTime"]);
2107 } 2148 }
2108 if (_json.containsKey("kind")) { 2149 if (_json.containsKey("kind")) {
2109 kind = _json["kind"]; 2150 kind = _json["kind"];
2110 } 2151 }
2111 if (_json.containsKey("name")) { 2152 if (_json.containsKey("name")) {
2112 name = _json["name"]; 2153 name = _json["name"];
2113 } 2154 }
2114 if (_json.containsKey("value")) { 2155 if (_json.containsKey("value")) {
2115 value = _json["value"]; 2156 value = _json["value"];
2116 } 2157 }
2117 } 2158 }
2118 2159
2119 core.Map<core.String, core.Object> toJson() { 2160 core.Map<core.String, core.Object> toJson() {
2120 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 2161 final core.Map<core.String, core.Object> _json =
2162 new core.Map<core.String, core.Object>();
2121 if (expirationTime != null) { 2163 if (expirationTime != null) {
2122 _json["expirationTime"] = (expirationTime).toIso8601String(); 2164 _json["expirationTime"] = (expirationTime).toIso8601String();
2123 } 2165 }
2124 if (kind != null) { 2166 if (kind != null) {
2125 _json["kind"] = kind; 2167 _json["kind"] = kind;
2126 } 2168 }
2127 if (name != null) { 2169 if (name != null) {
2128 _json["name"] = name; 2170 _json["name"] = name;
2129 } 2171 }
2130 if (value != null) { 2172 if (value != null) {
2131 _json["value"] = value; 2173 _json["value"] = value;
2132 } 2174 }
2133 return _json; 2175 return _json;
2134 } 2176 }
2135 } 2177 }
2136 2178
2137 /** Database instance backup configuration. */ 2179 /// Database instance backup configuration.
2138 class BackupConfiguration { 2180 class BackupConfiguration {
2139 /** 2181 /// Whether binary log is enabled. If backup configuration is disabled,
2140 * Whether binary log is enabled. If backup configuration is disabled, binary 2182 /// binary log must be disabled as well.
2141 * log must be disabled as well.
2142 */
2143 core.bool binaryLogEnabled; 2183 core.bool binaryLogEnabled;
2144 /** Whether this configuration is enabled. */ 2184
2185 /// Whether this configuration is enabled.
2145 core.bool enabled; 2186 core.bool enabled;
2146 /** This is always sql#backupConfiguration. */ 2187
2188 /// This is always sql#backupConfiguration.
2147 core.String kind; 2189 core.String kind;
2148 /** 2190
2149 * Start time for the daily backup configuration in UTC timezone in the 24 2191 /// Start time for the daily backup configuration in UTC timezone in the 24
2150 * hour format - HH:MM. 2192 /// hour format - HH:MM.
2151 */
2152 core.String startTime; 2193 core.String startTime;
2153 2194
2154 BackupConfiguration(); 2195 BackupConfiguration();
2155 2196
2156 BackupConfiguration.fromJson(core.Map _json) { 2197 BackupConfiguration.fromJson(core.Map _json) {
2157 if (_json.containsKey("binaryLogEnabled")) { 2198 if (_json.containsKey("binaryLogEnabled")) {
2158 binaryLogEnabled = _json["binaryLogEnabled"]; 2199 binaryLogEnabled = _json["binaryLogEnabled"];
2159 } 2200 }
2160 if (_json.containsKey("enabled")) { 2201 if (_json.containsKey("enabled")) {
2161 enabled = _json["enabled"]; 2202 enabled = _json["enabled"];
2162 } 2203 }
2163 if (_json.containsKey("kind")) { 2204 if (_json.containsKey("kind")) {
2164 kind = _json["kind"]; 2205 kind = _json["kind"];
2165 } 2206 }
2166 if (_json.containsKey("startTime")) { 2207 if (_json.containsKey("startTime")) {
2167 startTime = _json["startTime"]; 2208 startTime = _json["startTime"];
2168 } 2209 }
2169 } 2210 }
2170 2211
2171 core.Map<core.String, core.Object> toJson() { 2212 core.Map<core.String, core.Object> toJson() {
2172 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 2213 final core.Map<core.String, core.Object> _json =
2214 new core.Map<core.String, core.Object>();
2173 if (binaryLogEnabled != null) { 2215 if (binaryLogEnabled != null) {
2174 _json["binaryLogEnabled"] = binaryLogEnabled; 2216 _json["binaryLogEnabled"] = binaryLogEnabled;
2175 } 2217 }
2176 if (enabled != null) { 2218 if (enabled != null) {
2177 _json["enabled"] = enabled; 2219 _json["enabled"] = enabled;
2178 } 2220 }
2179 if (kind != null) { 2221 if (kind != null) {
2180 _json["kind"] = kind; 2222 _json["kind"] = kind;
2181 } 2223 }
2182 if (startTime != null) { 2224 if (startTime != null) {
2183 _json["startTime"] = startTime; 2225 _json["startTime"] = startTime;
2184 } 2226 }
2185 return _json; 2227 return _json;
2186 } 2228 }
2187 } 2229 }
2188 2230
2189 /** A database instance backup run resource. */ 2231 /// A database instance backup run resource.
2190 class BackupRun { 2232 class BackupRun {
2191 /** The description of this run, only applicable to on-demand backups. */ 2233 /// The description of this run, only applicable to on-demand backups.
2192 core.String description; 2234 core.String description;
2193 /** 2235
2194 * The time the backup operation completed in UTC timezone in RFC 3339 format, 2236 /// The time the backup operation completed in UTC timezone in RFC 3339
2195 * for example 2012-11-15T16:19:00.094Z. 2237 /// format, for example 2012-11-15T16:19:00.094Z.
2196 */
2197 core.DateTime endTime; 2238 core.DateTime endTime;
2198 /** 2239
2199 * The time the run was enqueued in UTC timezone in RFC 3339 format, for 2240 /// The time the run was enqueued in UTC timezone in RFC 3339 format, for
2200 * example 2012-11-15T16:19:00.094Z. 2241 /// example 2012-11-15T16:19:00.094Z.
2201 */
2202 core.DateTime enqueuedTime; 2242 core.DateTime enqueuedTime;
2203 /** 2243
2204 * Information about why the backup operation failed. This is only present if 2244 /// Information about why the backup operation failed. This is only present
2205 * the run has the FAILED status. 2245 /// if the run has the FAILED status.
2206 */
2207 OperationError error; 2246 OperationError error;
2208 /** 2247
2209 * A unique identifier for this backup run. Note that this is unique only 2248 /// A unique identifier for this backup run. Note that this is unique only
2210 * within the scope of a particular Cloud SQL instance. 2249 /// within the scope of a particular Cloud SQL instance.
2211 */
2212 core.String id; 2250 core.String id;
2213 /** Name of the database instance. */ 2251
2252 /// Name of the database instance.
2214 core.String instance; 2253 core.String instance;
2215 /** This is always sql#backupRun. */ 2254
2255 /// This is always sql#backupRun.
2216 core.String kind; 2256 core.String kind;
2217 /** The URI of this resource. */ 2257
2258 /// The URI of this resource.
2218 core.String selfLink; 2259 core.String selfLink;
2219 /** 2260
2220 * The time the backup operation actually started in UTC timezone in RFC 3339 2261 /// The time the backup operation actually started in UTC timezone in RFC
2221 * format, for example 2012-11-15T16:19:00.094Z. 2262 /// 3339 format, for example 2012-11-15T16:19:00.094Z.
2222 */
2223 core.DateTime startTime; 2263 core.DateTime startTime;
2224 /** The status of this run. */ 2264
2265 /// The status of this run.
2225 core.String status; 2266 core.String status;
2226 /** The type of this run; can be either "AUTOMATED" or "ON_DEMAND". */ 2267
2268 /// The type of this run; can be either "AUTOMATED" or "ON_DEMAND".
2227 core.String type; 2269 core.String type;
2228 /** 2270
2229 * The start time of the backup window during which this the backup was 2271 /// The start time of the backup window during which this the backup was
2230 * attempted in RFC 3339 format, for example 2012-11-15T16:19:00.094Z. 2272 /// attempted in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
2231 */
2232 core.DateTime windowStartTime; 2273 core.DateTime windowStartTime;
2233 2274
2234 BackupRun(); 2275 BackupRun();
2235 2276
2236 BackupRun.fromJson(core.Map _json) { 2277 BackupRun.fromJson(core.Map _json) {
2237 if (_json.containsKey("description")) { 2278 if (_json.containsKey("description")) {
2238 description = _json["description"]; 2279 description = _json["description"];
2239 } 2280 }
2240 if (_json.containsKey("endTime")) { 2281 if (_json.containsKey("endTime")) {
2241 endTime = core.DateTime.parse(_json["endTime"]); 2282 endTime = core.DateTime.parse(_json["endTime"]);
(...skipping 24 matching lines...) Expand all
2266 } 2307 }
2267 if (_json.containsKey("type")) { 2308 if (_json.containsKey("type")) {
2268 type = _json["type"]; 2309 type = _json["type"];
2269 } 2310 }
2270 if (_json.containsKey("windowStartTime")) { 2311 if (_json.containsKey("windowStartTime")) {
2271 windowStartTime = core.DateTime.parse(_json["windowStartTime"]); 2312 windowStartTime = core.DateTime.parse(_json["windowStartTime"]);
2272 } 2313 }
2273 } 2314 }
2274 2315
2275 core.Map<core.String, core.Object> toJson() { 2316 core.Map<core.String, core.Object> toJson() {
2276 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 2317 final core.Map<core.String, core.Object> _json =
2318 new core.Map<core.String, core.Object>();
2277 if (description != null) { 2319 if (description != null) {
2278 _json["description"] = description; 2320 _json["description"] = description;
2279 } 2321 }
2280 if (endTime != null) { 2322 if (endTime != null) {
2281 _json["endTime"] = (endTime).toIso8601String(); 2323 _json["endTime"] = (endTime).toIso8601String();
2282 } 2324 }
2283 if (enqueuedTime != null) { 2325 if (enqueuedTime != null) {
2284 _json["enqueuedTime"] = (enqueuedTime).toIso8601String(); 2326 _json["enqueuedTime"] = (enqueuedTime).toIso8601String();
2285 } 2327 }
2286 if (error != null) { 2328 if (error != null) {
(...skipping 20 matching lines...) Expand all
2307 if (type != null) { 2349 if (type != null) {
2308 _json["type"] = type; 2350 _json["type"] = type;
2309 } 2351 }
2310 if (windowStartTime != null) { 2352 if (windowStartTime != null) {
2311 _json["windowStartTime"] = (windowStartTime).toIso8601String(); 2353 _json["windowStartTime"] = (windowStartTime).toIso8601String();
2312 } 2354 }
2313 return _json; 2355 return _json;
2314 } 2356 }
2315 } 2357 }
2316 2358
2317 /** Backup run list results. */ 2359 /// Backup run list results.
2318 class BackupRunsListResponse { 2360 class BackupRunsListResponse {
2319 /** 2361 /// A list of backup runs in reverse chronological order of the enqueued
2320 * A list of backup runs in reverse chronological order of the enqueued time. 2362 /// time.
2321 */
2322 core.List<BackupRun> items; 2363 core.List<BackupRun> items;
2323 /** This is always sql#backupRunsList. */ 2364
2365 /// This is always sql#backupRunsList.
2324 core.String kind; 2366 core.String kind;
2325 /** 2367
2326 * The continuation token, used to page through large result sets. Provide 2368 /// The continuation token, used to page through large result sets. Provide
2327 * this value in a subsequent request to return the next page of results. 2369 /// this value in a subsequent request to return the next page of results.
2328 */
2329 core.String nextPageToken; 2370 core.String nextPageToken;
2330 2371
2331 BackupRunsListResponse(); 2372 BackupRunsListResponse();
2332 2373
2333 BackupRunsListResponse.fromJson(core.Map _json) { 2374 BackupRunsListResponse.fromJson(core.Map _json) {
2334 if (_json.containsKey("items")) { 2375 if (_json.containsKey("items")) {
2335 items = _json["items"].map((value) => new BackupRun.fromJson(value)).toLis t(); 2376 items =
2377 _json["items"].map((value) => new BackupRun.fromJson(value)).toList();
2336 } 2378 }
2337 if (_json.containsKey("kind")) { 2379 if (_json.containsKey("kind")) {
2338 kind = _json["kind"]; 2380 kind = _json["kind"];
2339 } 2381 }
2340 if (_json.containsKey("nextPageToken")) { 2382 if (_json.containsKey("nextPageToken")) {
2341 nextPageToken = _json["nextPageToken"]; 2383 nextPageToken = _json["nextPageToken"];
2342 } 2384 }
2343 } 2385 }
2344 2386
2345 core.Map<core.String, core.Object> toJson() { 2387 core.Map<core.String, core.Object> toJson() {
2346 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 2388 final core.Map<core.String, core.Object> _json =
2389 new core.Map<core.String, core.Object>();
2347 if (items != null) { 2390 if (items != null) {
2348 _json["items"] = items.map((value) => (value).toJson()).toList(); 2391 _json["items"] = items.map((value) => (value).toJson()).toList();
2349 } 2392 }
2350 if (kind != null) { 2393 if (kind != null) {
2351 _json["kind"] = kind; 2394 _json["kind"] = kind;
2352 } 2395 }
2353 if (nextPageToken != null) { 2396 if (nextPageToken != null) {
2354 _json["nextPageToken"] = nextPageToken; 2397 _json["nextPageToken"] = nextPageToken;
2355 } 2398 }
2356 return _json; 2399 return _json;
2357 } 2400 }
2358 } 2401 }
2359 2402
2360 /** Binary log coordinates. */ 2403 /// Binary log coordinates.
2361 class BinLogCoordinates { 2404 class BinLogCoordinates {
2362 /** Name of the binary log file for a Cloud SQL instance. */ 2405 /// Name of the binary log file for a Cloud SQL instance.
2363 core.String binLogFileName; 2406 core.String binLogFileName;
2364 /** Position (offset) within the binary log file. */ 2407
2408 /// Position (offset) within the binary log file.
2365 core.String binLogPosition; 2409 core.String binLogPosition;
2366 /** This is always sql#binLogCoordinates. */ 2410
2411 /// This is always sql#binLogCoordinates.
2367 core.String kind; 2412 core.String kind;
2368 2413
2369 BinLogCoordinates(); 2414 BinLogCoordinates();
2370 2415
2371 BinLogCoordinates.fromJson(core.Map _json) { 2416 BinLogCoordinates.fromJson(core.Map _json) {
2372 if (_json.containsKey("binLogFileName")) { 2417 if (_json.containsKey("binLogFileName")) {
2373 binLogFileName = _json["binLogFileName"]; 2418 binLogFileName = _json["binLogFileName"];
2374 } 2419 }
2375 if (_json.containsKey("binLogPosition")) { 2420 if (_json.containsKey("binLogPosition")) {
2376 binLogPosition = _json["binLogPosition"]; 2421 binLogPosition = _json["binLogPosition"];
2377 } 2422 }
2378 if (_json.containsKey("kind")) { 2423 if (_json.containsKey("kind")) {
2379 kind = _json["kind"]; 2424 kind = _json["kind"];
2380 } 2425 }
2381 } 2426 }
2382 2427
2383 core.Map<core.String, core.Object> toJson() { 2428 core.Map<core.String, core.Object> toJson() {
2384 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 2429 final core.Map<core.String, core.Object> _json =
2430 new core.Map<core.String, core.Object>();
2385 if (binLogFileName != null) { 2431 if (binLogFileName != null) {
2386 _json["binLogFileName"] = binLogFileName; 2432 _json["binLogFileName"] = binLogFileName;
2387 } 2433 }
2388 if (binLogPosition != null) { 2434 if (binLogPosition != null) {
2389 _json["binLogPosition"] = binLogPosition; 2435 _json["binLogPosition"] = binLogPosition;
2390 } 2436 }
2391 if (kind != null) { 2437 if (kind != null) {
2392 _json["kind"] = kind; 2438 _json["kind"] = kind;
2393 } 2439 }
2394 return _json; 2440 return _json;
2395 } 2441 }
2396 } 2442 }
2397 2443
2398 /** Database instance clone context. */ 2444 /// Database instance clone context.
2399 class CloneContext { 2445 class CloneContext {
2400 /** 2446 /// Binary log coordinates, if specified, indentify the the position up to
2401 * Binary log coordinates, if specified, indentify the the position up to 2447 /// which the source instance should be cloned. If not specified, the source
2402 * which the source instance should be cloned. If not specified, the source 2448 /// instance is cloned up to the most recent binary log coordintes.
2403 * instance is cloned up to the most recent binary log coordintes.
2404 */
2405 BinLogCoordinates binLogCoordinates; 2449 BinLogCoordinates binLogCoordinates;
2406 /** Name of the Cloud SQL instance to be created as a clone. */ 2450
2451 /// Name of the Cloud SQL instance to be created as a clone.
2407 core.String destinationInstanceName; 2452 core.String destinationInstanceName;
2408 /** This is always sql#cloneContext. */ 2453
2454 /// This is always sql#cloneContext.
2409 core.String kind; 2455 core.String kind;
2410 2456
2411 CloneContext(); 2457 CloneContext();
2412 2458
2413 CloneContext.fromJson(core.Map _json) { 2459 CloneContext.fromJson(core.Map _json) {
2414 if (_json.containsKey("binLogCoordinates")) { 2460 if (_json.containsKey("binLogCoordinates")) {
2415 binLogCoordinates = new BinLogCoordinates.fromJson(_json["binLogCoordinate s"]); 2461 binLogCoordinates =
2462 new BinLogCoordinates.fromJson(_json["binLogCoordinates"]);
2416 } 2463 }
2417 if (_json.containsKey("destinationInstanceName")) { 2464 if (_json.containsKey("destinationInstanceName")) {
2418 destinationInstanceName = _json["destinationInstanceName"]; 2465 destinationInstanceName = _json["destinationInstanceName"];
2419 } 2466 }
2420 if (_json.containsKey("kind")) { 2467 if (_json.containsKey("kind")) {
2421 kind = _json["kind"]; 2468 kind = _json["kind"];
2422 } 2469 }
2423 } 2470 }
2424 2471
2425 core.Map<core.String, core.Object> toJson() { 2472 core.Map<core.String, core.Object> toJson() {
2426 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 2473 final core.Map<core.String, core.Object> _json =
2474 new core.Map<core.String, core.Object>();
2427 if (binLogCoordinates != null) { 2475 if (binLogCoordinates != null) {
2428 _json["binLogCoordinates"] = (binLogCoordinates).toJson(); 2476 _json["binLogCoordinates"] = (binLogCoordinates).toJson();
2429 } 2477 }
2430 if (destinationInstanceName != null) { 2478 if (destinationInstanceName != null) {
2431 _json["destinationInstanceName"] = destinationInstanceName; 2479 _json["destinationInstanceName"] = destinationInstanceName;
2432 } 2480 }
2433 if (kind != null) { 2481 if (kind != null) {
2434 _json["kind"] = kind; 2482 _json["kind"] = kind;
2435 } 2483 }
2436 return _json; 2484 return _json;
2437 } 2485 }
2438 } 2486 }
2439 2487
2440 /** A database resource inside a Cloud SQL instance. */ 2488 /// A database resource inside a Cloud SQL instance.
2441 class Database { 2489 class Database {
2442 /** The MySQL charset value. */ 2490 /// The MySQL charset value.
2443 core.String charset; 2491 core.String charset;
2444 /** The MySQL collation value. */ 2492
2493 /// The MySQL collation value.
2445 core.String collation; 2494 core.String collation;
2446 /** HTTP 1.1 Entity tag for the resource. */ 2495
2496 /// HTTP 1.1 Entity tag for the resource.
2447 core.String etag; 2497 core.String etag;
2448 /** 2498
2449 * The name of the Cloud SQL instance. This does not include the project ID. 2499 /// The name of the Cloud SQL instance. This does not include the project ID.
2450 */
2451 core.String instance; 2500 core.String instance;
2452 /** This is always sql#database. */ 2501
2502 /// This is always sql#database.
2453 core.String kind; 2503 core.String kind;
2454 /** 2504
2455 * The name of the database in the Cloud SQL instance. This does not include 2505 /// The name of the database in the Cloud SQL instance. This does not include
2456 * the project ID or instance name. 2506 /// the project ID or instance name.
2457 */
2458 core.String name; 2507 core.String name;
2459 /** 2508
2460 * The project ID of the project containing the Cloud SQL database. The Google 2509 /// The project ID of the project containing the Cloud SQL database. The
2461 * apps domain is prefixed if applicable. 2510 /// Google apps domain is prefixed if applicable.
2462 */
2463 core.String project; 2511 core.String project;
2464 /** The URI of this resource. */ 2512
2513 /// The URI of this resource.
2465 core.String selfLink; 2514 core.String selfLink;
2466 2515
2467 Database(); 2516 Database();
2468 2517
2469 Database.fromJson(core.Map _json) { 2518 Database.fromJson(core.Map _json) {
2470 if (_json.containsKey("charset")) { 2519 if (_json.containsKey("charset")) {
2471 charset = _json["charset"]; 2520 charset = _json["charset"];
2472 } 2521 }
2473 if (_json.containsKey("collation")) { 2522 if (_json.containsKey("collation")) {
2474 collation = _json["collation"]; 2523 collation = _json["collation"];
(...skipping 12 matching lines...) Expand all
2487 } 2536 }
2488 if (_json.containsKey("project")) { 2537 if (_json.containsKey("project")) {
2489 project = _json["project"]; 2538 project = _json["project"];
2490 } 2539 }
2491 if (_json.containsKey("selfLink")) { 2540 if (_json.containsKey("selfLink")) {
2492 selfLink = _json["selfLink"]; 2541 selfLink = _json["selfLink"];
2493 } 2542 }
2494 } 2543 }
2495 2544
2496 core.Map<core.String, core.Object> toJson() { 2545 core.Map<core.String, core.Object> toJson() {
2497 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 2546 final core.Map<core.String, core.Object> _json =
2547 new core.Map<core.String, core.Object>();
2498 if (charset != null) { 2548 if (charset != null) {
2499 _json["charset"] = charset; 2549 _json["charset"] = charset;
2500 } 2550 }
2501 if (collation != null) { 2551 if (collation != null) {
2502 _json["collation"] = collation; 2552 _json["collation"] = collation;
2503 } 2553 }
2504 if (etag != null) { 2554 if (etag != null) {
2505 _json["etag"] = etag; 2555 _json["etag"] = etag;
2506 } 2556 }
2507 if (instance != null) { 2557 if (instance != null) {
2508 _json["instance"] = instance; 2558 _json["instance"] = instance;
2509 } 2559 }
2510 if (kind != null) { 2560 if (kind != null) {
2511 _json["kind"] = kind; 2561 _json["kind"] = kind;
2512 } 2562 }
2513 if (name != null) { 2563 if (name != null) {
2514 _json["name"] = name; 2564 _json["name"] = name;
2515 } 2565 }
2516 if (project != null) { 2566 if (project != null) {
2517 _json["project"] = project; 2567 _json["project"] = project;
2518 } 2568 }
2519 if (selfLink != null) { 2569 if (selfLink != null) {
2520 _json["selfLink"] = selfLink; 2570 _json["selfLink"] = selfLink;
2521 } 2571 }
2522 return _json; 2572 return _json;
2523 } 2573 }
2524 } 2574 }
2525 2575
2526 /** MySQL flags for Cloud SQL instances. */ 2576 /// MySQL flags for Cloud SQL instances.
2527 class DatabaseFlags { 2577 class DatabaseFlags {
2528 /** 2578 /// The name of the flag. These flags are passed at instance startup, so
2529 * The name of the flag. These flags are passed at instance startup, so 2579 /// include both MySQL server options and MySQL system variables. Flags
2530 * include both MySQL server options and MySQL system variables. Flags should 2580 /// should be specified with underscores, not hyphens. For more information,
2531 * be specified with underscores, not hyphens. For more information, see 2581 /// see Configuring MySQL Flags in the Google Cloud SQL documentation, as
2532 * Configuring MySQL Flags in the Google Cloud SQL documentation, as well as 2582 /// well as the official MySQL documentation for server options and system
2533 * the official MySQL documentation for server options and system variables. 2583 /// variables.
2534 */
2535 core.String name; 2584 core.String name;
2536 /** 2585
2537 * The value of the flag. Booleans should be set to on for true and off for 2586 /// The value of the flag. Booleans should be set to on for true and off for
2538 * false. This field must be omitted if the flag doesn't take a value. 2587 /// false. This field must be omitted if the flag doesn't take a value.
2539 */
2540 core.String value; 2588 core.String value;
2541 2589
2542 DatabaseFlags(); 2590 DatabaseFlags();
2543 2591
2544 DatabaseFlags.fromJson(core.Map _json) { 2592 DatabaseFlags.fromJson(core.Map _json) {
2545 if (_json.containsKey("name")) { 2593 if (_json.containsKey("name")) {
2546 name = _json["name"]; 2594 name = _json["name"];
2547 } 2595 }
2548 if (_json.containsKey("value")) { 2596 if (_json.containsKey("value")) {
2549 value = _json["value"]; 2597 value = _json["value"];
2550 } 2598 }
2551 } 2599 }
2552 2600
2553 core.Map<core.String, core.Object> toJson() { 2601 core.Map<core.String, core.Object> toJson() {
2554 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 2602 final core.Map<core.String, core.Object> _json =
2603 new core.Map<core.String, core.Object>();
2555 if (name != null) { 2604 if (name != null) {
2556 _json["name"] = name; 2605 _json["name"] = name;
2557 } 2606 }
2558 if (value != null) { 2607 if (value != null) {
2559 _json["value"] = value; 2608 _json["value"] = value;
2560 } 2609 }
2561 return _json; 2610 return _json;
2562 } 2611 }
2563 } 2612 }
2564 2613
2565 /** 2614 /// The name and status of the failover replica. This property is applicable
2566 * The name and status of the failover replica. This property is applicable only 2615 /// only to Second Generation instances.
2567 * to Second Generation instances.
2568 */
2569 class DatabaseInstanceFailoverReplica { 2616 class DatabaseInstanceFailoverReplica {
2570 /** 2617 /// The availability status of the failover replica. A false status indicates
2571 * The availability status of the failover replica. A false status indicates 2618 /// that the failover replica is out of sync. The master can only failover to
2572 * that the failover replica is out of sync. The master can only failover to 2619 /// the falover replica when the status is true.
2573 * the falover replica when the status is true.
2574 */
2575 core.bool available; 2620 core.bool available;
2576 /** 2621
2577 * The name of the failover replica. If specified at instance creation, a 2622 /// The name of the failover replica. If specified at instance creation, a
2578 * failover replica is created for the instance. The name doesn't include the 2623 /// failover replica is created for the instance. The name doesn't include
2579 * project ID. This property is applicable only to Second Generation 2624 /// the project ID. This property is applicable only to Second Generation
2580 * instances. 2625 /// instances.
2581 */
2582 core.String name; 2626 core.String name;
2583 2627
2584 DatabaseInstanceFailoverReplica(); 2628 DatabaseInstanceFailoverReplica();
2585 2629
2586 DatabaseInstanceFailoverReplica.fromJson(core.Map _json) { 2630 DatabaseInstanceFailoverReplica.fromJson(core.Map _json) {
2587 if (_json.containsKey("available")) { 2631 if (_json.containsKey("available")) {
2588 available = _json["available"]; 2632 available = _json["available"];
2589 } 2633 }
2590 if (_json.containsKey("name")) { 2634 if (_json.containsKey("name")) {
2591 name = _json["name"]; 2635 name = _json["name"];
2592 } 2636 }
2593 } 2637 }
2594 2638
2595 core.Map<core.String, core.Object> toJson() { 2639 core.Map<core.String, core.Object> toJson() {
2596 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 2640 final core.Map<core.String, core.Object> _json =
2641 new core.Map<core.String, core.Object>();
2597 if (available != null) { 2642 if (available != null) {
2598 _json["available"] = available; 2643 _json["available"] = available;
2599 } 2644 }
2600 if (name != null) { 2645 if (name != null) {
2601 _json["name"] = name; 2646 _json["name"] = name;
2602 } 2647 }
2603 return _json; 2648 return _json;
2604 } 2649 }
2605 } 2650 }
2606 2651
2607 /** A Cloud SQL instance resource. */ 2652 /// A Cloud SQL instance resource.
2608 class DatabaseInstance { 2653 class DatabaseInstance {
2609 /** 2654 /// FIRST_GEN: Basic Cloud SQL instance that runs in a Google-managed
2610 * FIRST_GEN: Basic Cloud SQL instance that runs in a Google-managed 2655 /// container.
2611 * container. 2656 /// SECOND_GEN: A newer Cloud SQL backend that runs in a Compute Engine VM.
2612 * SECOND_GEN: A newer Cloud SQL backend that runs in a Compute Engine VM. 2657 /// EXTERNAL: A MySQL server that is not managed by Google.
2613 * EXTERNAL: A MySQL server that is not managed by Google.
2614 */
2615 core.String backendType; 2658 core.String backendType;
2616 /** Connection name of the Cloud SQL instance used in connection strings. */ 2659
2660 /// Connection name of the Cloud SQL instance used in connection strings.
2617 core.String connectionName; 2661 core.String connectionName;
2618 /** 2662
2619 * The current disk usage of the instance in bytes. This property has been 2663 /// The current disk usage of the instance in bytes. This property has been
2620 * deprecated. Users should use the 2664 /// deprecated. Users should use the
2621 * "cloudsql.googleapis.com/database/disk/bytes_used" metric in Cloud 2665 /// "cloudsql.googleapis.com/database/disk/bytes_used" metric in Cloud
2622 * Monitoring API instead. Please see 2666 /// Monitoring API instead. Please see
2623 * https://groups.google.com/d/msg/google-cloud-sql-announce/I_7-F9EBhT0/BtvFt dFeAgAJ 2667 /// https://groups.google.com/d/msg/google-cloud-sql-announce/I_7-F9EBhT0/BtvF tdFeAgAJ
2624 * for details. 2668 /// for details.
2625 */
2626 core.String currentDiskSize; 2669 core.String currentDiskSize;
2627 /** 2670
2628 * The database engine type and version. The databaseVersion field can not be 2671 /// The database engine type and version. The databaseVersion field can not
2629 * changed after instance creation. MySQL Second Generation instances: 2672 /// be changed after instance creation. MySQL Second Generation instances:
2630 * MYSQL_5_7 (default) or MYSQL_5_6. PostgreSQL instances: POSTGRES_9_6 MySQL 2673 /// MYSQL_5_7 (default) or MYSQL_5_6. PostgreSQL instances: POSTGRES_9_6
2631 * First Generation instances: MYSQL_5_6 (default) or MYSQL_5_5 2674 /// MySQL First Generation instances: MYSQL_5_6 (default) or MYSQL_5_5
2632 */
2633 core.String databaseVersion; 2675 core.String databaseVersion;
2634 /** HTTP 1.1 Entity tag for the resource. */ 2676
2677 /// HTTP 1.1 Entity tag for the resource.
2635 core.String etag; 2678 core.String etag;
2636 /** 2679
2637 * The name and status of the failover replica. This property is applicable 2680 /// The name and status of the failover replica. This property is applicable
2638 * only to Second Generation instances. 2681 /// only to Second Generation instances.
2639 */
2640 DatabaseInstanceFailoverReplica failoverReplica; 2682 DatabaseInstanceFailoverReplica failoverReplica;
2641 /** 2683
2642 * The GCE zone that the instance is serving from. In case when the instance 2684 /// The GCE zone that the instance is serving from. In case when the instance
2643 * is failed over to standby zone, this value may be different with what user 2685 /// is failed over to standby zone, this value may be different with what
2644 * specified in the settings. 2686 /// user specified in the settings.
2645 */
2646 core.String gceZone; 2687 core.String gceZone;
2647 /** 2688
2648 * The instance type. This can be one of the following. 2689 /// The instance type. This can be one of the following.
2649 * CLOUD_SQL_INSTANCE: A Cloud SQL instance that is not replicating from a 2690 /// CLOUD_SQL_INSTANCE: A Cloud SQL instance that is not replicating from a
2650 * master. 2691 /// master.
2651 * ON_PREMISES_INSTANCE: An instance running on the customer's premises. 2692 /// ON_PREMISES_INSTANCE: An instance running on the customer's premises.
2652 * READ_REPLICA_INSTANCE: A Cloud SQL instance configured as a read-replica. 2693 /// READ_REPLICA_INSTANCE: A Cloud SQL instance configured as a read-replica.
2653 */
2654 core.String instanceType; 2694 core.String instanceType;
2655 /** The assigned IP addresses for the instance. */ 2695
2696 /// The assigned IP addresses for the instance.
2656 core.List<IpMapping> ipAddresses; 2697 core.List<IpMapping> ipAddresses;
2657 /** 2698
2658 * The IPv6 address assigned to the instance. This property is applicable only 2699 /// The IPv6 address assigned to the instance. This property is applicable
2659 * to First Generation instances. 2700 /// only to First Generation instances.
2660 */
2661 core.String ipv6Address; 2701 core.String ipv6Address;
2662 /** This is always sql#instance. */ 2702
2703 /// This is always sql#instance.
2663 core.String kind; 2704 core.String kind;
2664 /** 2705
2665 * The name of the instance which will act as master in the replication setup. 2706 /// The name of the instance which will act as master in the replication
2666 */ 2707 /// setup.
2667 core.String masterInstanceName; 2708 core.String masterInstanceName;
2668 /** The maximum disk size of the instance in bytes. */ 2709
2710 /// The maximum disk size of the instance in bytes.
2669 core.String maxDiskSize; 2711 core.String maxDiskSize;
2670 /** Name of the Cloud SQL instance. This does not include the project ID. */ 2712
2713 /// Name of the Cloud SQL instance. This does not include the project ID.
2671 core.String name; 2714 core.String name;
2672 /** Configuration specific to on-premises instances. */ 2715
2716 /// Configuration specific to on-premises instances.
2673 OnPremisesConfiguration onPremisesConfiguration; 2717 OnPremisesConfiguration onPremisesConfiguration;
2674 /** 2718
2675 * The project ID of the project containing the Cloud SQL instance. The Google 2719 /// The project ID of the project containing the Cloud SQL instance. The
2676 * apps domain is prefixed if applicable. 2720 /// Google apps domain is prefixed if applicable.
2677 */
2678 core.String project; 2721 core.String project;
2679 /** 2722
2680 * The geographical region. Can be us-central (FIRST_GEN instances only), 2723 /// The geographical region. Can be us-central (FIRST_GEN instances only),
2681 * us-central1 (SECOND_GEN instances only), asia-east1 or europe-west1. 2724 /// us-central1 (SECOND_GEN instances only), asia-east1 or europe-west1.
2682 * Defaults to us-central or us-central1 depending on the instance type (First 2725 /// Defaults to us-central or us-central1 depending on the instance type
2683 * Generation or Second Generation). The region can not be changed after 2726 /// (First Generation or Second Generation). The region can not be changed
2684 * instance creation. 2727 /// after instance creation.
2685 */
2686 core.String region; 2728 core.String region;
2687 /** 2729
2688 * Configuration specific to read-replicas replicating from on-premises 2730 /// Configuration specific to read-replicas replicating from on-premises
2689 * masters. 2731 /// masters.
2690 */
2691 ReplicaConfiguration replicaConfiguration; 2732 ReplicaConfiguration replicaConfiguration;
2692 /** The replicas of the instance. */ 2733
2734 /// The replicas of the instance.
2693 core.List<core.String> replicaNames; 2735 core.List<core.String> replicaNames;
2694 /** The URI of this resource. */ 2736
2737 /// The URI of this resource.
2695 core.String selfLink; 2738 core.String selfLink;
2696 /** SSL configuration. */ 2739
2740 /// SSL configuration.
2697 SslCert serverCaCert; 2741 SslCert serverCaCert;
2698 /** 2742
2699 * The service account email address assigned to the instance. This property 2743 /// The service account email address assigned to the instance. This property
2700 * is applicable only to Second Generation instances. 2744 /// is applicable only to Second Generation instances.
2701 */
2702 core.String serviceAccountEmailAddress; 2745 core.String serviceAccountEmailAddress;
2703 /** The user settings. */ 2746
2747 /// The user settings.
2704 Settings settings; 2748 Settings settings;
2705 /** 2749
2706 * The current serving state of the Cloud SQL instance. This can be one of the 2750 /// The current serving state of the Cloud SQL instance. This can be one of
2707 * following. 2751 /// the following.
2708 * RUNNABLE: The instance is running, or is ready to run when accessed. 2752 /// RUNNABLE: The instance is running, or is ready to run when accessed.
2709 * SUSPENDED: The instance is not available, for example due to problems with 2753 /// SUSPENDED: The instance is not available, for example due to problems
2710 * billing. 2754 /// with billing.
2711 * PENDING_CREATE: The instance is being created. 2755 /// PENDING_CREATE: The instance is being created.
2712 * MAINTENANCE: The instance is down for maintenance. 2756 /// MAINTENANCE: The instance is down for maintenance.
2713 * FAILED: The instance creation failed. 2757 /// FAILED: The instance creation failed.
2714 * UNKNOWN_STATE: The state of the instance is unknown. 2758 /// UNKNOWN_STATE: The state of the instance is unknown.
2715 */
2716 core.String state; 2759 core.String state;
2717 /** If the instance state is SUSPENDED, the reason for the suspension. */ 2760
2761 /// If the instance state is SUSPENDED, the reason for the suspension.
2718 core.List<core.String> suspensionReason; 2762 core.List<core.String> suspensionReason;
2719 2763
2720 DatabaseInstance(); 2764 DatabaseInstance();
2721 2765
2722 DatabaseInstance.fromJson(core.Map _json) { 2766 DatabaseInstance.fromJson(core.Map _json) {
2723 if (_json.containsKey("backendType")) { 2767 if (_json.containsKey("backendType")) {
2724 backendType = _json["backendType"]; 2768 backendType = _json["backendType"];
2725 } 2769 }
2726 if (_json.containsKey("connectionName")) { 2770 if (_json.containsKey("connectionName")) {
2727 connectionName = _json["connectionName"]; 2771 connectionName = _json["connectionName"];
2728 } 2772 }
2729 if (_json.containsKey("currentDiskSize")) { 2773 if (_json.containsKey("currentDiskSize")) {
2730 currentDiskSize = _json["currentDiskSize"]; 2774 currentDiskSize = _json["currentDiskSize"];
2731 } 2775 }
2732 if (_json.containsKey("databaseVersion")) { 2776 if (_json.containsKey("databaseVersion")) {
2733 databaseVersion = _json["databaseVersion"]; 2777 databaseVersion = _json["databaseVersion"];
2734 } 2778 }
2735 if (_json.containsKey("etag")) { 2779 if (_json.containsKey("etag")) {
2736 etag = _json["etag"]; 2780 etag = _json["etag"];
2737 } 2781 }
2738 if (_json.containsKey("failoverReplica")) { 2782 if (_json.containsKey("failoverReplica")) {
2739 failoverReplica = new DatabaseInstanceFailoverReplica.fromJson(_json["fail overReplica"]); 2783 failoverReplica = new DatabaseInstanceFailoverReplica.fromJson(
2784 _json["failoverReplica"]);
2740 } 2785 }
2741 if (_json.containsKey("gceZone")) { 2786 if (_json.containsKey("gceZone")) {
2742 gceZone = _json["gceZone"]; 2787 gceZone = _json["gceZone"];
2743 } 2788 }
2744 if (_json.containsKey("instanceType")) { 2789 if (_json.containsKey("instanceType")) {
2745 instanceType = _json["instanceType"]; 2790 instanceType = _json["instanceType"];
2746 } 2791 }
2747 if (_json.containsKey("ipAddresses")) { 2792 if (_json.containsKey("ipAddresses")) {
2748 ipAddresses = _json["ipAddresses"].map((value) => new IpMapping.fromJson(v alue)).toList(); 2793 ipAddresses = _json["ipAddresses"]
2794 .map((value) => new IpMapping.fromJson(value))
2795 .toList();
2749 } 2796 }
2750 if (_json.containsKey("ipv6Address")) { 2797 if (_json.containsKey("ipv6Address")) {
2751 ipv6Address = _json["ipv6Address"]; 2798 ipv6Address = _json["ipv6Address"];
2752 } 2799 }
2753 if (_json.containsKey("kind")) { 2800 if (_json.containsKey("kind")) {
2754 kind = _json["kind"]; 2801 kind = _json["kind"];
2755 } 2802 }
2756 if (_json.containsKey("masterInstanceName")) { 2803 if (_json.containsKey("masterInstanceName")) {
2757 masterInstanceName = _json["masterInstanceName"]; 2804 masterInstanceName = _json["masterInstanceName"];
2758 } 2805 }
2759 if (_json.containsKey("maxDiskSize")) { 2806 if (_json.containsKey("maxDiskSize")) {
2760 maxDiskSize = _json["maxDiskSize"]; 2807 maxDiskSize = _json["maxDiskSize"];
2761 } 2808 }
2762 if (_json.containsKey("name")) { 2809 if (_json.containsKey("name")) {
2763 name = _json["name"]; 2810 name = _json["name"];
2764 } 2811 }
2765 if (_json.containsKey("onPremisesConfiguration")) { 2812 if (_json.containsKey("onPremisesConfiguration")) {
2766 onPremisesConfiguration = new OnPremisesConfiguration.fromJson(_json["onPr emisesConfiguration"]); 2813 onPremisesConfiguration = new OnPremisesConfiguration.fromJson(
2814 _json["onPremisesConfiguration"]);
2767 } 2815 }
2768 if (_json.containsKey("project")) { 2816 if (_json.containsKey("project")) {
2769 project = _json["project"]; 2817 project = _json["project"];
2770 } 2818 }
2771 if (_json.containsKey("region")) { 2819 if (_json.containsKey("region")) {
2772 region = _json["region"]; 2820 region = _json["region"];
2773 } 2821 }
2774 if (_json.containsKey("replicaConfiguration")) { 2822 if (_json.containsKey("replicaConfiguration")) {
2775 replicaConfiguration = new ReplicaConfiguration.fromJson(_json["replicaCon figuration"]); 2823 replicaConfiguration =
2824 new ReplicaConfiguration.fromJson(_json["replicaConfiguration"]);
2776 } 2825 }
2777 if (_json.containsKey("replicaNames")) { 2826 if (_json.containsKey("replicaNames")) {
2778 replicaNames = _json["replicaNames"]; 2827 replicaNames = _json["replicaNames"];
2779 } 2828 }
2780 if (_json.containsKey("selfLink")) { 2829 if (_json.containsKey("selfLink")) {
2781 selfLink = _json["selfLink"]; 2830 selfLink = _json["selfLink"];
2782 } 2831 }
2783 if (_json.containsKey("serverCaCert")) { 2832 if (_json.containsKey("serverCaCert")) {
2784 serverCaCert = new SslCert.fromJson(_json["serverCaCert"]); 2833 serverCaCert = new SslCert.fromJson(_json["serverCaCert"]);
2785 } 2834 }
2786 if (_json.containsKey("serviceAccountEmailAddress")) { 2835 if (_json.containsKey("serviceAccountEmailAddress")) {
2787 serviceAccountEmailAddress = _json["serviceAccountEmailAddress"]; 2836 serviceAccountEmailAddress = _json["serviceAccountEmailAddress"];
2788 } 2837 }
2789 if (_json.containsKey("settings")) { 2838 if (_json.containsKey("settings")) {
2790 settings = new Settings.fromJson(_json["settings"]); 2839 settings = new Settings.fromJson(_json["settings"]);
2791 } 2840 }
2792 if (_json.containsKey("state")) { 2841 if (_json.containsKey("state")) {
2793 state = _json["state"]; 2842 state = _json["state"];
2794 } 2843 }
2795 if (_json.containsKey("suspensionReason")) { 2844 if (_json.containsKey("suspensionReason")) {
2796 suspensionReason = _json["suspensionReason"]; 2845 suspensionReason = _json["suspensionReason"];
2797 } 2846 }
2798 } 2847 }
2799 2848
2800 core.Map<core.String, core.Object> toJson() { 2849 core.Map<core.String, core.Object> toJson() {
2801 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 2850 final core.Map<core.String, core.Object> _json =
2851 new core.Map<core.String, core.Object>();
2802 if (backendType != null) { 2852 if (backendType != null) {
2803 _json["backendType"] = backendType; 2853 _json["backendType"] = backendType;
2804 } 2854 }
2805 if (connectionName != null) { 2855 if (connectionName != null) {
2806 _json["connectionName"] = connectionName; 2856 _json["connectionName"] = connectionName;
2807 } 2857 }
2808 if (currentDiskSize != null) { 2858 if (currentDiskSize != null) {
2809 _json["currentDiskSize"] = currentDiskSize; 2859 _json["currentDiskSize"] = currentDiskSize;
2810 } 2860 }
2811 if (databaseVersion != null) { 2861 if (databaseVersion != null) {
2812 _json["databaseVersion"] = databaseVersion; 2862 _json["databaseVersion"] = databaseVersion;
2813 } 2863 }
2814 if (etag != null) { 2864 if (etag != null) {
2815 _json["etag"] = etag; 2865 _json["etag"] = etag;
2816 } 2866 }
2817 if (failoverReplica != null) { 2867 if (failoverReplica != null) {
2818 _json["failoverReplica"] = (failoverReplica).toJson(); 2868 _json["failoverReplica"] = (failoverReplica).toJson();
2819 } 2869 }
2820 if (gceZone != null) { 2870 if (gceZone != null) {
2821 _json["gceZone"] = gceZone; 2871 _json["gceZone"] = gceZone;
2822 } 2872 }
2823 if (instanceType != null) { 2873 if (instanceType != null) {
2824 _json["instanceType"] = instanceType; 2874 _json["instanceType"] = instanceType;
2825 } 2875 }
2826 if (ipAddresses != null) { 2876 if (ipAddresses != null) {
2827 _json["ipAddresses"] = ipAddresses.map((value) => (value).toJson()).toList (); 2877 _json["ipAddresses"] =
2878 ipAddresses.map((value) => (value).toJson()).toList();
2828 } 2879 }
2829 if (ipv6Address != null) { 2880 if (ipv6Address != null) {
2830 _json["ipv6Address"] = ipv6Address; 2881 _json["ipv6Address"] = ipv6Address;
2831 } 2882 }
2832 if (kind != null) { 2883 if (kind != null) {
2833 _json["kind"] = kind; 2884 _json["kind"] = kind;
2834 } 2885 }
2835 if (masterInstanceName != null) { 2886 if (masterInstanceName != null) {
2836 _json["masterInstanceName"] = masterInstanceName; 2887 _json["masterInstanceName"] = masterInstanceName;
2837 } 2888 }
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
2871 if (state != null) { 2922 if (state != null) {
2872 _json["state"] = state; 2923 _json["state"] = state;
2873 } 2924 }
2874 if (suspensionReason != null) { 2925 if (suspensionReason != null) {
2875 _json["suspensionReason"] = suspensionReason; 2926 _json["suspensionReason"] = suspensionReason;
2876 } 2927 }
2877 return _json; 2928 return _json;
2878 } 2929 }
2879 } 2930 }
2880 2931
2881 /** Database list response. */ 2932 /// Database list response.
2882 class DatabasesListResponse { 2933 class DatabasesListResponse {
2883 /** List of database resources in the instance. */ 2934 /// List of database resources in the instance.
2884 core.List<Database> items; 2935 core.List<Database> items;
2885 /** This is always sql#databasesList. */ 2936
2937 /// This is always sql#databasesList.
2886 core.String kind; 2938 core.String kind;
2887 2939
2888 DatabasesListResponse(); 2940 DatabasesListResponse();
2889 2941
2890 DatabasesListResponse.fromJson(core.Map _json) { 2942 DatabasesListResponse.fromJson(core.Map _json) {
2891 if (_json.containsKey("items")) { 2943 if (_json.containsKey("items")) {
2892 items = _json["items"].map((value) => new Database.fromJson(value)).toList (); 2944 items =
2945 _json["items"].map((value) => new Database.fromJson(value)).toList();
2893 } 2946 }
2894 if (_json.containsKey("kind")) { 2947 if (_json.containsKey("kind")) {
2895 kind = _json["kind"]; 2948 kind = _json["kind"];
2896 } 2949 }
2897 } 2950 }
2898 2951
2899 core.Map<core.String, core.Object> toJson() { 2952 core.Map<core.String, core.Object> toJson() {
2900 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 2953 final core.Map<core.String, core.Object> _json =
2954 new core.Map<core.String, core.Object>();
2901 if (items != null) { 2955 if (items != null) {
2902 _json["items"] = items.map((value) => (value).toJson()).toList(); 2956 _json["items"] = items.map((value) => (value).toJson()).toList();
2903 } 2957 }
2904 if (kind != null) { 2958 if (kind != null) {
2905 _json["kind"] = kind; 2959 _json["kind"] = kind;
2906 } 2960 }
2907 return _json; 2961 return _json;
2908 } 2962 }
2909 } 2963 }
2910 2964
2911 /** Options for exporting data as CSV. */ 2965 /// Options for exporting data as CSV.
2912 class ExportContextCsvExportOptions { 2966 class ExportContextCsvExportOptions {
2913 /** The select query used to extract the data. */ 2967 /// The select query used to extract the data.
2914 core.String selectQuery; 2968 core.String selectQuery;
2915 2969
2916 ExportContextCsvExportOptions(); 2970 ExportContextCsvExportOptions();
2917 2971
2918 ExportContextCsvExportOptions.fromJson(core.Map _json) { 2972 ExportContextCsvExportOptions.fromJson(core.Map _json) {
2919 if (_json.containsKey("selectQuery")) { 2973 if (_json.containsKey("selectQuery")) {
2920 selectQuery = _json["selectQuery"]; 2974 selectQuery = _json["selectQuery"];
2921 } 2975 }
2922 } 2976 }
2923 2977
2924 core.Map<core.String, core.Object> toJson() { 2978 core.Map<core.String, core.Object> toJson() {
2925 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 2979 final core.Map<core.String, core.Object> _json =
2980 new core.Map<core.String, core.Object>();
2926 if (selectQuery != null) { 2981 if (selectQuery != null) {
2927 _json["selectQuery"] = selectQuery; 2982 _json["selectQuery"] = selectQuery;
2928 } 2983 }
2929 return _json; 2984 return _json;
2930 } 2985 }
2931 } 2986 }
2932 2987
2933 /** Options for exporting data as SQL statements. */ 2988 /// Options for exporting data as SQL statements.
2934 class ExportContextSqlExportOptions { 2989 class ExportContextSqlExportOptions {
2935 /** Export only schemas. */ 2990 /// Export only schemas.
2936 core.bool schemaOnly; 2991 core.bool schemaOnly;
2937 /** 2992
2938 * Tables to export, or that were exported, from the specified database. If 2993 /// Tables to export, or that were exported, from the specified database. If
2939 * you specify tables, specify one and only one database. 2994 /// you specify tables, specify one and only one database.
2940 */
2941 core.List<core.String> tables; 2995 core.List<core.String> tables;
2942 2996
2943 ExportContextSqlExportOptions(); 2997 ExportContextSqlExportOptions();
2944 2998
2945 ExportContextSqlExportOptions.fromJson(core.Map _json) { 2999 ExportContextSqlExportOptions.fromJson(core.Map _json) {
2946 if (_json.containsKey("schemaOnly")) { 3000 if (_json.containsKey("schemaOnly")) {
2947 schemaOnly = _json["schemaOnly"]; 3001 schemaOnly = _json["schemaOnly"];
2948 } 3002 }
2949 if (_json.containsKey("tables")) { 3003 if (_json.containsKey("tables")) {
2950 tables = _json["tables"]; 3004 tables = _json["tables"];
2951 } 3005 }
2952 } 3006 }
2953 3007
2954 core.Map<core.String, core.Object> toJson() { 3008 core.Map<core.String, core.Object> toJson() {
2955 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 3009 final core.Map<core.String, core.Object> _json =
3010 new core.Map<core.String, core.Object>();
2956 if (schemaOnly != null) { 3011 if (schemaOnly != null) {
2957 _json["schemaOnly"] = schemaOnly; 3012 _json["schemaOnly"] = schemaOnly;
2958 } 3013 }
2959 if (tables != null) { 3014 if (tables != null) {
2960 _json["tables"] = tables; 3015 _json["tables"] = tables;
2961 } 3016 }
2962 return _json; 3017 return _json;
2963 } 3018 }
2964 } 3019 }
2965 3020
2966 /** Database instance export context. */ 3021 /// Database instance export context.
2967 class ExportContext { 3022 class ExportContext {
2968 /** Options for exporting data as CSV. */ 3023 /// Options for exporting data as CSV.
2969 ExportContextCsvExportOptions csvExportOptions; 3024 ExportContextCsvExportOptions csvExportOptions;
2970 /** 3025
2971 * Databases (for example, guestbook) from which the export is made. If 3026 /// Databases (for example, guestbook) from which the export is made. If
2972 * fileType is SQL and no database is specified, all databases are exported. 3027 /// fileType is SQL and no database is specified, all databases are exported.
2973 * If fileType is CSV, you can optionally specify at most one database to 3028 /// If fileType is CSV, you can optionally specify at most one database to
2974 * export. If csvExportOptions.selectQuery also specifies the database, this 3029 /// export. If csvExportOptions.selectQuery also specifies the database, this
2975 * field will be ignored. 3030 /// field will be ignored.
2976 */
2977 core.List<core.String> databases; 3031 core.List<core.String> databases;
2978 /** 3032
2979 * The file type for the specified uri. 3033 /// The file type for the specified uri.
2980 * SQL: The file contains SQL statements. 3034 /// SQL: The file contains SQL statements.
2981 * CSV: The file contains CSV data. 3035 /// CSV: The file contains CSV data.
2982 */
2983 core.String fileType; 3036 core.String fileType;
2984 /** This is always sql#exportContext. */ 3037
3038 /// This is always sql#exportContext.
2985 core.String kind; 3039 core.String kind;
2986 /** Options for exporting data as SQL statements. */ 3040
3041 /// Options for exporting data as SQL statements.
2987 ExportContextSqlExportOptions sqlExportOptions; 3042 ExportContextSqlExportOptions sqlExportOptions;
2988 /** 3043
2989 * The path to the file in Google Cloud Storage where the export will be 3044 /// The path to the file in Google Cloud Storage where the export will be
2990 * stored. The URI is in the form gs://bucketName/fileName. If the file 3045 /// stored. The URI is in the form gs://bucketName/fileName. If the file
2991 * already exists, the operation fails. If fileType is SQL and the filename 3046 /// already exists, the operation fails. If fileType is SQL and the filename
2992 * ends with .gz, the contents are compressed. 3047 /// ends with .gz, the contents are compressed.
2993 */
2994 core.String uri; 3048 core.String uri;
2995 3049
2996 ExportContext(); 3050 ExportContext();
2997 3051
2998 ExportContext.fromJson(core.Map _json) { 3052 ExportContext.fromJson(core.Map _json) {
2999 if (_json.containsKey("csvExportOptions")) { 3053 if (_json.containsKey("csvExportOptions")) {
3000 csvExportOptions = new ExportContextCsvExportOptions.fromJson(_json["csvEx portOptions"]); 3054 csvExportOptions =
3055 new ExportContextCsvExportOptions.fromJson(_json["csvExportOptions"]);
3001 } 3056 }
3002 if (_json.containsKey("databases")) { 3057 if (_json.containsKey("databases")) {
3003 databases = _json["databases"]; 3058 databases = _json["databases"];
3004 } 3059 }
3005 if (_json.containsKey("fileType")) { 3060 if (_json.containsKey("fileType")) {
3006 fileType = _json["fileType"]; 3061 fileType = _json["fileType"];
3007 } 3062 }
3008 if (_json.containsKey("kind")) { 3063 if (_json.containsKey("kind")) {
3009 kind = _json["kind"]; 3064 kind = _json["kind"];
3010 } 3065 }
3011 if (_json.containsKey("sqlExportOptions")) { 3066 if (_json.containsKey("sqlExportOptions")) {
3012 sqlExportOptions = new ExportContextSqlExportOptions.fromJson(_json["sqlEx portOptions"]); 3067 sqlExportOptions =
3068 new ExportContextSqlExportOptions.fromJson(_json["sqlExportOptions"]);
3013 } 3069 }
3014 if (_json.containsKey("uri")) { 3070 if (_json.containsKey("uri")) {
3015 uri = _json["uri"]; 3071 uri = _json["uri"];
3016 } 3072 }
3017 } 3073 }
3018 3074
3019 core.Map<core.String, core.Object> toJson() { 3075 core.Map<core.String, core.Object> toJson() {
3020 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 3076 final core.Map<core.String, core.Object> _json =
3077 new core.Map<core.String, core.Object>();
3021 if (csvExportOptions != null) { 3078 if (csvExportOptions != null) {
3022 _json["csvExportOptions"] = (csvExportOptions).toJson(); 3079 _json["csvExportOptions"] = (csvExportOptions).toJson();
3023 } 3080 }
3024 if (databases != null) { 3081 if (databases != null) {
3025 _json["databases"] = databases; 3082 _json["databases"] = databases;
3026 } 3083 }
3027 if (fileType != null) { 3084 if (fileType != null) {
3028 _json["fileType"] = fileType; 3085 _json["fileType"] = fileType;
3029 } 3086 }
3030 if (kind != null) { 3087 if (kind != null) {
3031 _json["kind"] = kind; 3088 _json["kind"] = kind;
3032 } 3089 }
3033 if (sqlExportOptions != null) { 3090 if (sqlExportOptions != null) {
3034 _json["sqlExportOptions"] = (sqlExportOptions).toJson(); 3091 _json["sqlExportOptions"] = (sqlExportOptions).toJson();
3035 } 3092 }
3036 if (uri != null) { 3093 if (uri != null) {
3037 _json["uri"] = uri; 3094 _json["uri"] = uri;
3038 } 3095 }
3039 return _json; 3096 return _json;
3040 } 3097 }
3041 } 3098 }
3042 3099
3043 /** Database instance failover context. */ 3100 /// Database instance failover context.
3044 class FailoverContext { 3101 class FailoverContext {
3045 /** This is always sql#failoverContext. */ 3102 /// This is always sql#failoverContext.
3046 core.String kind; 3103 core.String kind;
3047 /** 3104
3048 * The current settings version of this instance. Request will be rejected if 3105 /// The current settings version of this instance. Request will be rejected
3049 * this version doesn't match the current settings version. 3106 /// if this version doesn't match the current settings version.
3050 */
3051 core.String settingsVersion; 3107 core.String settingsVersion;
3052 3108
3053 FailoverContext(); 3109 FailoverContext();
3054 3110
3055 FailoverContext.fromJson(core.Map _json) { 3111 FailoverContext.fromJson(core.Map _json) {
3056 if (_json.containsKey("kind")) { 3112 if (_json.containsKey("kind")) {
3057 kind = _json["kind"]; 3113 kind = _json["kind"];
3058 } 3114 }
3059 if (_json.containsKey("settingsVersion")) { 3115 if (_json.containsKey("settingsVersion")) {
3060 settingsVersion = _json["settingsVersion"]; 3116 settingsVersion = _json["settingsVersion"];
3061 } 3117 }
3062 } 3118 }
3063 3119
3064 core.Map<core.String, core.Object> toJson() { 3120 core.Map<core.String, core.Object> toJson() {
3065 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 3121 final core.Map<core.String, core.Object> _json =
3122 new core.Map<core.String, core.Object>();
3066 if (kind != null) { 3123 if (kind != null) {
3067 _json["kind"] = kind; 3124 _json["kind"] = kind;
3068 } 3125 }
3069 if (settingsVersion != null) { 3126 if (settingsVersion != null) {
3070 _json["settingsVersion"] = settingsVersion; 3127 _json["settingsVersion"] = settingsVersion;
3071 } 3128 }
3072 return _json; 3129 return _json;
3073 } 3130 }
3074 } 3131 }
3075 3132
3076 /** A Google Cloud SQL service flag resource. */ 3133 /// A Google Cloud SQL service flag resource.
3077 class Flag { 3134 class Flag {
3078 /** For STRING flags, a list of strings that the value can be set to. */ 3135 /// For STRING flags, a list of strings that the value can be set to.
3079 core.List<core.String> allowedStringValues; 3136 core.List<core.String> allowedStringValues;
3080 /** 3137
3081 * The database version this flag applies to. Can be MYSQL_5_5, MYSQL_5_6, or 3138 /// The database version this flag applies to. Can be MYSQL_5_5, MYSQL_5_6,
3082 * MYSQL_5_7. MYSQL_5_7 is applicable only to Second Generation instances. 3139 /// or MYSQL_5_7. MYSQL_5_7 is applicable only to Second Generation
3083 */ 3140 /// instances.
3084 core.List<core.String> appliesTo; 3141 core.List<core.String> appliesTo;
3085 /** This is always sql#flag. */ 3142
3143 /// This is always sql#flag.
3086 core.String kind; 3144 core.String kind;
3087 /** For INTEGER flags, the maximum allowed value. */ 3145
3146 /// For INTEGER flags, the maximum allowed value.
3088 core.String maxValue; 3147 core.String maxValue;
3089 /** For INTEGER flags, the minimum allowed value. */ 3148
3149 /// For INTEGER flags, the minimum allowed value.
3090 core.String minValue; 3150 core.String minValue;
3091 /** 3151
3092 * This is the name of the flag. Flag names always use underscores, not 3152 /// This is the name of the flag. Flag names always use underscores, not
3093 * hyphens, e.g. max_allowed_packet 3153 /// hyphens, e.g. max_allowed_packet
3094 */
3095 core.String name; 3154 core.String name;
3096 /** 3155
3097 * Indicates whether changing this flag will trigger a database restart. Only 3156 /// Indicates whether changing this flag will trigger a database restart.
3098 * applicable to Second Generation instances. 3157 /// Only applicable to Second Generation instances.
3099 */
3100 core.bool requiresRestart; 3158 core.bool requiresRestart;
3101 /** 3159
3102 * The type of the flag. Flags are typed to being BOOLEAN, STRING, INTEGER or 3160 /// The type of the flag. Flags are typed to being BOOLEAN, STRING, INTEGER
3103 * NONE. NONE is used for flags which do not take a value, such as 3161 /// or NONE. NONE is used for flags which do not take a value, such as
3104 * skip_grant_tables. 3162 /// skip_grant_tables.
3105 */
3106 core.String type; 3163 core.String type;
3107 3164
3108 Flag(); 3165 Flag();
3109 3166
3110 Flag.fromJson(core.Map _json) { 3167 Flag.fromJson(core.Map _json) {
3111 if (_json.containsKey("allowedStringValues")) { 3168 if (_json.containsKey("allowedStringValues")) {
3112 allowedStringValues = _json["allowedStringValues"]; 3169 allowedStringValues = _json["allowedStringValues"];
3113 } 3170 }
3114 if (_json.containsKey("appliesTo")) { 3171 if (_json.containsKey("appliesTo")) {
3115 appliesTo = _json["appliesTo"]; 3172 appliesTo = _json["appliesTo"];
(...skipping 12 matching lines...) Expand all
3128 } 3185 }
3129 if (_json.containsKey("requiresRestart")) { 3186 if (_json.containsKey("requiresRestart")) {
3130 requiresRestart = _json["requiresRestart"]; 3187 requiresRestart = _json["requiresRestart"];
3131 } 3188 }
3132 if (_json.containsKey("type")) { 3189 if (_json.containsKey("type")) {
3133 type = _json["type"]; 3190 type = _json["type"];
3134 } 3191 }
3135 } 3192 }
3136 3193
3137 core.Map<core.String, core.Object> toJson() { 3194 core.Map<core.String, core.Object> toJson() {
3138 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 3195 final core.Map<core.String, core.Object> _json =
3196 new core.Map<core.String, core.Object>();
3139 if (allowedStringValues != null) { 3197 if (allowedStringValues != null) {
3140 _json["allowedStringValues"] = allowedStringValues; 3198 _json["allowedStringValues"] = allowedStringValues;
3141 } 3199 }
3142 if (appliesTo != null) { 3200 if (appliesTo != null) {
3143 _json["appliesTo"] = appliesTo; 3201 _json["appliesTo"] = appliesTo;
3144 } 3202 }
3145 if (kind != null) { 3203 if (kind != null) {
3146 _json["kind"] = kind; 3204 _json["kind"] = kind;
3147 } 3205 }
3148 if (maxValue != null) { 3206 if (maxValue != null) {
3149 _json["maxValue"] = maxValue; 3207 _json["maxValue"] = maxValue;
3150 } 3208 }
3151 if (minValue != null) { 3209 if (minValue != null) {
3152 _json["minValue"] = minValue; 3210 _json["minValue"] = minValue;
3153 } 3211 }
3154 if (name != null) { 3212 if (name != null) {
3155 _json["name"] = name; 3213 _json["name"] = name;
3156 } 3214 }
3157 if (requiresRestart != null) { 3215 if (requiresRestart != null) {
3158 _json["requiresRestart"] = requiresRestart; 3216 _json["requiresRestart"] = requiresRestart;
3159 } 3217 }
3160 if (type != null) { 3218 if (type != null) {
3161 _json["type"] = type; 3219 _json["type"] = type;
3162 } 3220 }
3163 return _json; 3221 return _json;
3164 } 3222 }
3165 } 3223 }
3166 3224
3167 /** Flags list response. */ 3225 /// Flags list response.
3168 class FlagsListResponse { 3226 class FlagsListResponse {
3169 /** List of flags. */ 3227 /// List of flags.
3170 core.List<Flag> items; 3228 core.List<Flag> items;
3171 /** This is always sql#flagsList. */ 3229
3230 /// This is always sql#flagsList.
3172 core.String kind; 3231 core.String kind;
3173 3232
3174 FlagsListResponse(); 3233 FlagsListResponse();
3175 3234
3176 FlagsListResponse.fromJson(core.Map _json) { 3235 FlagsListResponse.fromJson(core.Map _json) {
3177 if (_json.containsKey("items")) { 3236 if (_json.containsKey("items")) {
3178 items = _json["items"].map((value) => new Flag.fromJson(value)).toList(); 3237 items = _json["items"].map((value) => new Flag.fromJson(value)).toList();
3179 } 3238 }
3180 if (_json.containsKey("kind")) { 3239 if (_json.containsKey("kind")) {
3181 kind = _json["kind"]; 3240 kind = _json["kind"];
3182 } 3241 }
3183 } 3242 }
3184 3243
3185 core.Map<core.String, core.Object> toJson() { 3244 core.Map<core.String, core.Object> toJson() {
3186 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 3245 final core.Map<core.String, core.Object> _json =
3246 new core.Map<core.String, core.Object>();
3187 if (items != null) { 3247 if (items != null) {
3188 _json["items"] = items.map((value) => (value).toJson()).toList(); 3248 _json["items"] = items.map((value) => (value).toJson()).toList();
3189 } 3249 }
3190 if (kind != null) { 3250 if (kind != null) {
3191 _json["kind"] = kind; 3251 _json["kind"] = kind;
3192 } 3252 }
3193 return _json; 3253 return _json;
3194 } 3254 }
3195 } 3255 }
3196 3256
3197 /** Options for importing data as CSV. */ 3257 /// Options for importing data as CSV.
3198 class ImportContextCsvImportOptions { 3258 class ImportContextCsvImportOptions {
3199 /** 3259 /// The columns to which CSV data is imported. If not specified, all columns
3200 * The columns to which CSV data is imported. If not specified, all columns of 3260 /// of the database table are loaded with CSV data.
3201 * the database table are loaded with CSV data.
3202 */
3203 core.List<core.String> columns; 3261 core.List<core.String> columns;
3204 /** The table to which CSV data is imported. */ 3262
3263 /// The table to which CSV data is imported.
3205 core.String table; 3264 core.String table;
3206 3265
3207 ImportContextCsvImportOptions(); 3266 ImportContextCsvImportOptions();
3208 3267
3209 ImportContextCsvImportOptions.fromJson(core.Map _json) { 3268 ImportContextCsvImportOptions.fromJson(core.Map _json) {
3210 if (_json.containsKey("columns")) { 3269 if (_json.containsKey("columns")) {
3211 columns = _json["columns"]; 3270 columns = _json["columns"];
3212 } 3271 }
3213 if (_json.containsKey("table")) { 3272 if (_json.containsKey("table")) {
3214 table = _json["table"]; 3273 table = _json["table"];
3215 } 3274 }
3216 } 3275 }
3217 3276
3218 core.Map<core.String, core.Object> toJson() { 3277 core.Map<core.String, core.Object> toJson() {
3219 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 3278 final core.Map<core.String, core.Object> _json =
3279 new core.Map<core.String, core.Object>();
3220 if (columns != null) { 3280 if (columns != null) {
3221 _json["columns"] = columns; 3281 _json["columns"] = columns;
3222 } 3282 }
3223 if (table != null) { 3283 if (table != null) {
3224 _json["table"] = table; 3284 _json["table"] = table;
3225 } 3285 }
3226 return _json; 3286 return _json;
3227 } 3287 }
3228 } 3288 }
3229 3289
3230 /** Database instance import context. */ 3290 /// Database instance import context.
3231 class ImportContext { 3291 class ImportContext {
3232 /** Options for importing data as CSV. */ 3292 /// Options for importing data as CSV.
3233 ImportContextCsvImportOptions csvImportOptions; 3293 ImportContextCsvImportOptions csvImportOptions;
3234 /** 3294
3235 * The database (for example, guestbook) to which the import is made. If 3295 /// The database (for example, guestbook) to which the import is made. If
3236 * fileType is SQL and no database is specified, it is assumed that the 3296 /// fileType is SQL and no database is specified, it is assumed that the
3237 * database is specified in the file to be imported. If fileType is CSV, it 3297 /// database is specified in the file to be imported. If fileType is CSV, it
3238 * must be specified. 3298 /// must be specified.
3239 */
3240 core.String database; 3299 core.String database;
3241 /** 3300
3242 * The file type for the specified uri. 3301 /// The file type for the specified uri.
3243 * SQL: The file contains SQL statements. 3302 /// SQL: The file contains SQL statements.
3244 * CSV: The file contains CSV data. 3303 /// CSV: The file contains CSV data.
3245 */
3246 core.String fileType; 3304 core.String fileType;
3247 /** 3305
3248 * The PostgreSQL user for this import operation. Defaults to 3306 /// The PostgreSQL user for this import operation. Defaults to
3249 * cloudsqlsuperuser. Used only for PostgreSQL instances. 3307 /// cloudsqlsuperuser. Used only for PostgreSQL instances.
3250 */
3251 core.String importUser; 3308 core.String importUser;
3252 /** This is always sql#importContext. */ 3309
3310 /// This is always sql#importContext.
3253 core.String kind; 3311 core.String kind;
3254 /** 3312
3255 * A path to the file in Google Cloud Storage from which the import is made. 3313 /// A path to the file in Google Cloud Storage from which the import is made.
3256 * The URI is in the form gs://bucketName/fileName. Compressed gzip files 3314 /// The URI is in the form gs://bucketName/fileName. Compressed gzip files
3257 * (.gz) are supported when fileType is SQL. 3315 /// (.gz) are supported when fileType is SQL.
3258 */
3259 core.String uri; 3316 core.String uri;
3260 3317
3261 ImportContext(); 3318 ImportContext();
3262 3319
3263 ImportContext.fromJson(core.Map _json) { 3320 ImportContext.fromJson(core.Map _json) {
3264 if (_json.containsKey("csvImportOptions")) { 3321 if (_json.containsKey("csvImportOptions")) {
3265 csvImportOptions = new ImportContextCsvImportOptions.fromJson(_json["csvIm portOptions"]); 3322 csvImportOptions =
3323 new ImportContextCsvImportOptions.fromJson(_json["csvImportOptions"]);
3266 } 3324 }
3267 if (_json.containsKey("database")) { 3325 if (_json.containsKey("database")) {
3268 database = _json["database"]; 3326 database = _json["database"];
3269 } 3327 }
3270 if (_json.containsKey("fileType")) { 3328 if (_json.containsKey("fileType")) {
3271 fileType = _json["fileType"]; 3329 fileType = _json["fileType"];
3272 } 3330 }
3273 if (_json.containsKey("importUser")) { 3331 if (_json.containsKey("importUser")) {
3274 importUser = _json["importUser"]; 3332 importUser = _json["importUser"];
3275 } 3333 }
3276 if (_json.containsKey("kind")) { 3334 if (_json.containsKey("kind")) {
3277 kind = _json["kind"]; 3335 kind = _json["kind"];
3278 } 3336 }
3279 if (_json.containsKey("uri")) { 3337 if (_json.containsKey("uri")) {
3280 uri = _json["uri"]; 3338 uri = _json["uri"];
3281 } 3339 }
3282 } 3340 }
3283 3341
3284 core.Map<core.String, core.Object> toJson() { 3342 core.Map<core.String, core.Object> toJson() {
3285 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 3343 final core.Map<core.String, core.Object> _json =
3344 new core.Map<core.String, core.Object>();
3286 if (csvImportOptions != null) { 3345 if (csvImportOptions != null) {
3287 _json["csvImportOptions"] = (csvImportOptions).toJson(); 3346 _json["csvImportOptions"] = (csvImportOptions).toJson();
3288 } 3347 }
3289 if (database != null) { 3348 if (database != null) {
3290 _json["database"] = database; 3349 _json["database"] = database;
3291 } 3350 }
3292 if (fileType != null) { 3351 if (fileType != null) {
3293 _json["fileType"] = fileType; 3352 _json["fileType"] = fileType;
3294 } 3353 }
3295 if (importUser != null) { 3354 if (importUser != null) {
3296 _json["importUser"] = importUser; 3355 _json["importUser"] = importUser;
3297 } 3356 }
3298 if (kind != null) { 3357 if (kind != null) {
3299 _json["kind"] = kind; 3358 _json["kind"] = kind;
3300 } 3359 }
3301 if (uri != null) { 3360 if (uri != null) {
3302 _json["uri"] = uri; 3361 _json["uri"] = uri;
3303 } 3362 }
3304 return _json; 3363 return _json;
3305 } 3364 }
3306 } 3365 }
3307 3366
3308 /** Database instance clone request. */ 3367 /// Database instance clone request.
3309 class InstancesCloneRequest { 3368 class InstancesCloneRequest {
3310 /** Contains details about the clone operation. */ 3369 /// Contains details about the clone operation.
3311 CloneContext cloneContext; 3370 CloneContext cloneContext;
3312 3371
3313 InstancesCloneRequest(); 3372 InstancesCloneRequest();
3314 3373
3315 InstancesCloneRequest.fromJson(core.Map _json) { 3374 InstancesCloneRequest.fromJson(core.Map _json) {
3316 if (_json.containsKey("cloneContext")) { 3375 if (_json.containsKey("cloneContext")) {
3317 cloneContext = new CloneContext.fromJson(_json["cloneContext"]); 3376 cloneContext = new CloneContext.fromJson(_json["cloneContext"]);
3318 } 3377 }
3319 } 3378 }
3320 3379
3321 core.Map<core.String, core.Object> toJson() { 3380 core.Map<core.String, core.Object> toJson() {
3322 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 3381 final core.Map<core.String, core.Object> _json =
3382 new core.Map<core.String, core.Object>();
3323 if (cloneContext != null) { 3383 if (cloneContext != null) {
3324 _json["cloneContext"] = (cloneContext).toJson(); 3384 _json["cloneContext"] = (cloneContext).toJson();
3325 } 3385 }
3326 return _json; 3386 return _json;
3327 } 3387 }
3328 } 3388 }
3329 3389
3330 /** Database instance export request. */ 3390 /// Database instance export request.
3331 class InstancesExportRequest { 3391 class InstancesExportRequest {
3332 /** Contains details about the export operation. */ 3392 /// Contains details about the export operation.
3333 ExportContext exportContext; 3393 ExportContext exportContext;
3334 3394
3335 InstancesExportRequest(); 3395 InstancesExportRequest();
3336 3396
3337 InstancesExportRequest.fromJson(core.Map _json) { 3397 InstancesExportRequest.fromJson(core.Map _json) {
3338 if (_json.containsKey("exportContext")) { 3398 if (_json.containsKey("exportContext")) {
3339 exportContext = new ExportContext.fromJson(_json["exportContext"]); 3399 exportContext = new ExportContext.fromJson(_json["exportContext"]);
3340 } 3400 }
3341 } 3401 }
3342 3402
3343 core.Map<core.String, core.Object> toJson() { 3403 core.Map<core.String, core.Object> toJson() {
3344 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 3404 final core.Map<core.String, core.Object> _json =
3405 new core.Map<core.String, core.Object>();
3345 if (exportContext != null) { 3406 if (exportContext != null) {
3346 _json["exportContext"] = (exportContext).toJson(); 3407 _json["exportContext"] = (exportContext).toJson();
3347 } 3408 }
3348 return _json; 3409 return _json;
3349 } 3410 }
3350 } 3411 }
3351 3412
3352 /** Instance failover request. */ 3413 /// Instance failover request.
3353 class InstancesFailoverRequest { 3414 class InstancesFailoverRequest {
3354 /** Failover Context. */ 3415 /// Failover Context.
3355 FailoverContext failoverContext; 3416 FailoverContext failoverContext;
3356 3417
3357 InstancesFailoverRequest(); 3418 InstancesFailoverRequest();
3358 3419
3359 InstancesFailoverRequest.fromJson(core.Map _json) { 3420 InstancesFailoverRequest.fromJson(core.Map _json) {
3360 if (_json.containsKey("failoverContext")) { 3421 if (_json.containsKey("failoverContext")) {
3361 failoverContext = new FailoverContext.fromJson(_json["failoverContext"]); 3422 failoverContext = new FailoverContext.fromJson(_json["failoverContext"]);
3362 } 3423 }
3363 } 3424 }
3364 3425
3365 core.Map<core.String, core.Object> toJson() { 3426 core.Map<core.String, core.Object> toJson() {
3366 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 3427 final core.Map<core.String, core.Object> _json =
3428 new core.Map<core.String, core.Object>();
3367 if (failoverContext != null) { 3429 if (failoverContext != null) {
3368 _json["failoverContext"] = (failoverContext).toJson(); 3430 _json["failoverContext"] = (failoverContext).toJson();
3369 } 3431 }
3370 return _json; 3432 return _json;
3371 } 3433 }
3372 } 3434 }
3373 3435
3374 /** Database instance import request. */ 3436 /// Database instance import request.
3375 class InstancesImportRequest { 3437 class InstancesImportRequest {
3376 /** Contains details about the import operation. */ 3438 /// Contains details about the import operation.
3377 ImportContext importContext; 3439 ImportContext importContext;
3378 3440
3379 InstancesImportRequest(); 3441 InstancesImportRequest();
3380 3442
3381 InstancesImportRequest.fromJson(core.Map _json) { 3443 InstancesImportRequest.fromJson(core.Map _json) {
3382 if (_json.containsKey("importContext")) { 3444 if (_json.containsKey("importContext")) {
3383 importContext = new ImportContext.fromJson(_json["importContext"]); 3445 importContext = new ImportContext.fromJson(_json["importContext"]);
3384 } 3446 }
3385 } 3447 }
3386 3448
3387 core.Map<core.String, core.Object> toJson() { 3449 core.Map<core.String, core.Object> toJson() {
3388 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 3450 final core.Map<core.String, core.Object> _json =
3451 new core.Map<core.String, core.Object>();
3389 if (importContext != null) { 3452 if (importContext != null) {
3390 _json["importContext"] = (importContext).toJson(); 3453 _json["importContext"] = (importContext).toJson();
3391 } 3454 }
3392 return _json; 3455 return _json;
3393 } 3456 }
3394 } 3457 }
3395 3458
3396 /** Database instances list response. */ 3459 /// Database instances list response.
3397 class InstancesListResponse { 3460 class InstancesListResponse {
3398 /** List of database instance resources. */ 3461 /// List of database instance resources.
3399 core.List<DatabaseInstance> items; 3462 core.List<DatabaseInstance> items;
3400 /** This is always sql#instancesList. */ 3463
3464 /// This is always sql#instancesList.
3401 core.String kind; 3465 core.String kind;
3402 /** 3466
3403 * The continuation token, used to page through large result sets. Provide 3467 /// The continuation token, used to page through large result sets. Provide
3404 * this value in a subsequent request to return the next page of results. 3468 /// this value in a subsequent request to return the next page of results.
3405 */
3406 core.String nextPageToken; 3469 core.String nextPageToken;
3407 3470
3408 InstancesListResponse(); 3471 InstancesListResponse();
3409 3472
3410 InstancesListResponse.fromJson(core.Map _json) { 3473 InstancesListResponse.fromJson(core.Map _json) {
3411 if (_json.containsKey("items")) { 3474 if (_json.containsKey("items")) {
3412 items = _json["items"].map((value) => new DatabaseInstance.fromJson(value) ).toList(); 3475 items = _json["items"]
3476 .map((value) => new DatabaseInstance.fromJson(value))
3477 .toList();
3413 } 3478 }
3414 if (_json.containsKey("kind")) { 3479 if (_json.containsKey("kind")) {
3415 kind = _json["kind"]; 3480 kind = _json["kind"];
3416 } 3481 }
3417 if (_json.containsKey("nextPageToken")) { 3482 if (_json.containsKey("nextPageToken")) {
3418 nextPageToken = _json["nextPageToken"]; 3483 nextPageToken = _json["nextPageToken"];
3419 } 3484 }
3420 } 3485 }
3421 3486
3422 core.Map<core.String, core.Object> toJson() { 3487 core.Map<core.String, core.Object> toJson() {
3423 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 3488 final core.Map<core.String, core.Object> _json =
3489 new core.Map<core.String, core.Object>();
3424 if (items != null) { 3490 if (items != null) {
3425 _json["items"] = items.map((value) => (value).toJson()).toList(); 3491 _json["items"] = items.map((value) => (value).toJson()).toList();
3426 } 3492 }
3427 if (kind != null) { 3493 if (kind != null) {
3428 _json["kind"] = kind; 3494 _json["kind"] = kind;
3429 } 3495 }
3430 if (nextPageToken != null) { 3496 if (nextPageToken != null) {
3431 _json["nextPageToken"] = nextPageToken; 3497 _json["nextPageToken"] = nextPageToken;
3432 } 3498 }
3433 return _json; 3499 return _json;
3434 } 3500 }
3435 } 3501 }
3436 3502
3437 /** Database instance restore backup request. */ 3503 /// Database instance restore backup request.
3438 class InstancesRestoreBackupRequest { 3504 class InstancesRestoreBackupRequest {
3439 /** Parameters required to perform the restore backup operation. */ 3505 /// Parameters required to perform the restore backup operation.
3440 RestoreBackupContext restoreBackupContext; 3506 RestoreBackupContext restoreBackupContext;
3441 3507
3442 InstancesRestoreBackupRequest(); 3508 InstancesRestoreBackupRequest();
3443 3509
3444 InstancesRestoreBackupRequest.fromJson(core.Map _json) { 3510 InstancesRestoreBackupRequest.fromJson(core.Map _json) {
3445 if (_json.containsKey("restoreBackupContext")) { 3511 if (_json.containsKey("restoreBackupContext")) {
3446 restoreBackupContext = new RestoreBackupContext.fromJson(_json["restoreBac kupContext"]); 3512 restoreBackupContext =
3513 new RestoreBackupContext.fromJson(_json["restoreBackupContext"]);
3447 } 3514 }
3448 } 3515 }
3449 3516
3450 core.Map<core.String, core.Object> toJson() { 3517 core.Map<core.String, core.Object> toJson() {
3451 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 3518 final core.Map<core.String, core.Object> _json =
3519 new core.Map<core.String, core.Object>();
3452 if (restoreBackupContext != null) { 3520 if (restoreBackupContext != null) {
3453 _json["restoreBackupContext"] = (restoreBackupContext).toJson(); 3521 _json["restoreBackupContext"] = (restoreBackupContext).toJson();
3454 } 3522 }
3455 return _json; 3523 return _json;
3456 } 3524 }
3457 } 3525 }
3458 3526
3459 /** Instance truncate log request. */ 3527 /// Instance truncate log request.
3460 class InstancesTruncateLogRequest { 3528 class InstancesTruncateLogRequest {
3461 /** Contains details about the truncate log operation. */ 3529 /// Contains details about the truncate log operation.
3462 TruncateLogContext truncateLogContext; 3530 TruncateLogContext truncateLogContext;
3463 3531
3464 InstancesTruncateLogRequest(); 3532 InstancesTruncateLogRequest();
3465 3533
3466 InstancesTruncateLogRequest.fromJson(core.Map _json) { 3534 InstancesTruncateLogRequest.fromJson(core.Map _json) {
3467 if (_json.containsKey("truncateLogContext")) { 3535 if (_json.containsKey("truncateLogContext")) {
3468 truncateLogContext = new TruncateLogContext.fromJson(_json["truncateLogCon text"]); 3536 truncateLogContext =
3537 new TruncateLogContext.fromJson(_json["truncateLogContext"]);
3469 } 3538 }
3470 } 3539 }
3471 3540
3472 core.Map<core.String, core.Object> toJson() { 3541 core.Map<core.String, core.Object> toJson() {
3473 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 3542 final core.Map<core.String, core.Object> _json =
3543 new core.Map<core.String, core.Object>();
3474 if (truncateLogContext != null) { 3544 if (truncateLogContext != null) {
3475 _json["truncateLogContext"] = (truncateLogContext).toJson(); 3545 _json["truncateLogContext"] = (truncateLogContext).toJson();
3476 } 3546 }
3477 return _json; 3547 return _json;
3478 } 3548 }
3479 } 3549 }
3480 3550
3481 /** IP Management configuration. */ 3551 /// IP Management configuration.
3482 class IpConfiguration { 3552 class IpConfiguration {
3483 /** 3553 /// The list of external networks that are allowed to connect to the instance
3484 * The list of external networks that are allowed to connect to the instance 3554 /// using the IP. In CIDR notation, also known as 'slash' notation (e.g.
3485 * using the IP. In CIDR notation, also known as 'slash' notation (e.g. 3555 /// 192.168.100.0/24).
3486 * 192.168.100.0/24).
3487 */
3488 core.List<AclEntry> authorizedNetworks; 3556 core.List<AclEntry> authorizedNetworks;
3489 /** Whether the instance should be assigned an IP address or not. */ 3557
3558 /// Whether the instance should be assigned an IP address or not.
3490 core.bool ipv4Enabled; 3559 core.bool ipv4Enabled;
3491 /** Whether SSL connections over IP should be enforced or not. */ 3560
3561 /// Whether SSL connections over IP should be enforced or not.
3492 core.bool requireSsl; 3562 core.bool requireSsl;
3493 3563
3494 IpConfiguration(); 3564 IpConfiguration();
3495 3565
3496 IpConfiguration.fromJson(core.Map _json) { 3566 IpConfiguration.fromJson(core.Map _json) {
3497 if (_json.containsKey("authorizedNetworks")) { 3567 if (_json.containsKey("authorizedNetworks")) {
3498 authorizedNetworks = _json["authorizedNetworks"].map((value) => new AclEnt ry.fromJson(value)).toList(); 3568 authorizedNetworks = _json["authorizedNetworks"]
3569 .map((value) => new AclEntry.fromJson(value))
3570 .toList();
3499 } 3571 }
3500 if (_json.containsKey("ipv4Enabled")) { 3572 if (_json.containsKey("ipv4Enabled")) {
3501 ipv4Enabled = _json["ipv4Enabled"]; 3573 ipv4Enabled = _json["ipv4Enabled"];
3502 } 3574 }
3503 if (_json.containsKey("requireSsl")) { 3575 if (_json.containsKey("requireSsl")) {
3504 requireSsl = _json["requireSsl"]; 3576 requireSsl = _json["requireSsl"];
3505 } 3577 }
3506 } 3578 }
3507 3579
3508 core.Map<core.String, core.Object> toJson() { 3580 core.Map<core.String, core.Object> toJson() {
3509 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 3581 final core.Map<core.String, core.Object> _json =
3582 new core.Map<core.String, core.Object>();
3510 if (authorizedNetworks != null) { 3583 if (authorizedNetworks != null) {
3511 _json["authorizedNetworks"] = authorizedNetworks.map((value) => (value).to Json()).toList(); 3584 _json["authorizedNetworks"] =
3585 authorizedNetworks.map((value) => (value).toJson()).toList();
3512 } 3586 }
3513 if (ipv4Enabled != null) { 3587 if (ipv4Enabled != null) {
3514 _json["ipv4Enabled"] = ipv4Enabled; 3588 _json["ipv4Enabled"] = ipv4Enabled;
3515 } 3589 }
3516 if (requireSsl != null) { 3590 if (requireSsl != null) {
3517 _json["requireSsl"] = requireSsl; 3591 _json["requireSsl"] = requireSsl;
3518 } 3592 }
3519 return _json; 3593 return _json;
3520 } 3594 }
3521 } 3595 }
3522 3596
3523 /** Database instance IP Mapping. */ 3597 /// Database instance IP Mapping.
3524 class IpMapping { 3598 class IpMapping {
3525 /** The IP address assigned. */ 3599 /// The IP address assigned.
3526 core.String ipAddress; 3600 core.String ipAddress;
3527 /** 3601
3528 * The due time for this IP to be retired in RFC 3339 format, for example 3602 /// The due time for this IP to be retired in RFC 3339 format, for example
3529 * 2012-11-15T16:19:00.094Z. This field is only available when the IP is 3603 /// 2012-11-15T16:19:00.094Z. This field is only available when the IP is
3530 * scheduled to be retired. 3604 /// scheduled to be retired.
3531 */
3532 core.DateTime timeToRetire; 3605 core.DateTime timeToRetire;
3533 /** 3606
3534 * The type of this IP address. A PRIMARY address is an address that can 3607 /// The type of this IP address. A PRIMARY address is an address that can
3535 * accept incoming connections. An OUTGOING address is the source address of 3608 /// accept incoming connections. An OUTGOING address is the source address of
3536 * connections originating from the instance, if supported. 3609 /// connections originating from the instance, if supported.
3537 */
3538 core.String type; 3610 core.String type;
3539 3611
3540 IpMapping(); 3612 IpMapping();
3541 3613
3542 IpMapping.fromJson(core.Map _json) { 3614 IpMapping.fromJson(core.Map _json) {
3543 if (_json.containsKey("ipAddress")) { 3615 if (_json.containsKey("ipAddress")) {
3544 ipAddress = _json["ipAddress"]; 3616 ipAddress = _json["ipAddress"];
3545 } 3617 }
3546 if (_json.containsKey("timeToRetire")) { 3618 if (_json.containsKey("timeToRetire")) {
3547 timeToRetire = core.DateTime.parse(_json["timeToRetire"]); 3619 timeToRetire = core.DateTime.parse(_json["timeToRetire"]);
3548 } 3620 }
3549 if (_json.containsKey("type")) { 3621 if (_json.containsKey("type")) {
3550 type = _json["type"]; 3622 type = _json["type"];
3551 } 3623 }
3552 } 3624 }
3553 3625
3554 core.Map<core.String, core.Object> toJson() { 3626 core.Map<core.String, core.Object> toJson() {
3555 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 3627 final core.Map<core.String, core.Object> _json =
3628 new core.Map<core.String, core.Object>();
3556 if (ipAddress != null) { 3629 if (ipAddress != null) {
3557 _json["ipAddress"] = ipAddress; 3630 _json["ipAddress"] = ipAddress;
3558 } 3631 }
3559 if (timeToRetire != null) { 3632 if (timeToRetire != null) {
3560 _json["timeToRetire"] = (timeToRetire).toIso8601String(); 3633 _json["timeToRetire"] = (timeToRetire).toIso8601String();
3561 } 3634 }
3562 if (type != null) { 3635 if (type != null) {
3563 _json["type"] = type; 3636 _json["type"] = type;
3564 } 3637 }
3565 return _json; 3638 return _json;
3566 } 3639 }
3567 } 3640 }
3568 3641
3569 /** 3642 /// Preferred location. This specifies where a Cloud SQL instance should
3570 * Preferred location. This specifies where a Cloud SQL instance should 3643 /// preferably be located, either in a specific Compute Engine zone, or
3571 * preferably be located, either in a specific Compute Engine zone, or 3644 /// co-located with an App Engine application. Note that if the preferred
3572 * co-located with an App Engine application. Note that if the preferred 3645 /// location is not available, the instance will be located as close as
3573 * location is not available, the instance will be located as close as possible 3646 /// possible within the region. Only one location may be specified.
3574 * within the region. Only one location may be specified.
3575 */
3576 class LocationPreference { 3647 class LocationPreference {
3577 /** 3648 /// The AppEngine application to follow, it must be in the same region as the
3578 * The AppEngine application to follow, it must be in the same region as the 3649 /// Cloud SQL instance.
3579 * Cloud SQL instance.
3580 */
3581 core.String followGaeApplication; 3650 core.String followGaeApplication;
3582 /** This is always sql#locationPreference. */ 3651
3652 /// This is always sql#locationPreference.
3583 core.String kind; 3653 core.String kind;
3584 /** 3654
3585 * The preferred Compute Engine zone (e.g. us-centra1-a, us-central1-b, etc.). 3655 /// The preferred Compute Engine zone (e.g. us-centra1-a, us-central1-b,
3586 */ 3656 /// etc.).
3587 core.String zone; 3657 core.String zone;
3588 3658
3589 LocationPreference(); 3659 LocationPreference();
3590 3660
3591 LocationPreference.fromJson(core.Map _json) { 3661 LocationPreference.fromJson(core.Map _json) {
3592 if (_json.containsKey("followGaeApplication")) { 3662 if (_json.containsKey("followGaeApplication")) {
3593 followGaeApplication = _json["followGaeApplication"]; 3663 followGaeApplication = _json["followGaeApplication"];
3594 } 3664 }
3595 if (_json.containsKey("kind")) { 3665 if (_json.containsKey("kind")) {
3596 kind = _json["kind"]; 3666 kind = _json["kind"];
3597 } 3667 }
3598 if (_json.containsKey("zone")) { 3668 if (_json.containsKey("zone")) {
3599 zone = _json["zone"]; 3669 zone = _json["zone"];
3600 } 3670 }
3601 } 3671 }
3602 3672
3603 core.Map<core.String, core.Object> toJson() { 3673 core.Map<core.String, core.Object> toJson() {
3604 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 3674 final core.Map<core.String, core.Object> _json =
3675 new core.Map<core.String, core.Object>();
3605 if (followGaeApplication != null) { 3676 if (followGaeApplication != null) {
3606 _json["followGaeApplication"] = followGaeApplication; 3677 _json["followGaeApplication"] = followGaeApplication;
3607 } 3678 }
3608 if (kind != null) { 3679 if (kind != null) {
3609 _json["kind"] = kind; 3680 _json["kind"] = kind;
3610 } 3681 }
3611 if (zone != null) { 3682 if (zone != null) {
3612 _json["zone"] = zone; 3683 _json["zone"] = zone;
3613 } 3684 }
3614 return _json; 3685 return _json;
3615 } 3686 }
3616 } 3687 }
3617 3688
3618 /** 3689 /// Maintenance window. This specifies when a v2 Cloud SQL instance should
3619 * Maintenance window. This specifies when a v2 Cloud SQL instance should 3690 /// preferably be restarted for system maintenance puruposes.
3620 * preferably be restarted for system maintenance puruposes.
3621 */
3622 class MaintenanceWindow { 3691 class MaintenanceWindow {
3623 /** day of week (1-7), starting on Monday. */ 3692 /// day of week (1-7), starting on Monday.
3624 core.int day; 3693 core.int day;
3625 /** hour of day - 0 to 23. */ 3694
3695 /// hour of day - 0 to 23.
3626 core.int hour; 3696 core.int hour;
3627 /** This is always sql#maintenanceWindow. */ 3697
3698 /// This is always sql#maintenanceWindow.
3628 core.String kind; 3699 core.String kind;
3629 core.String updateTrack; 3700 core.String updateTrack;
3630 3701
3631 MaintenanceWindow(); 3702 MaintenanceWindow();
3632 3703
3633 MaintenanceWindow.fromJson(core.Map _json) { 3704 MaintenanceWindow.fromJson(core.Map _json) {
3634 if (_json.containsKey("day")) { 3705 if (_json.containsKey("day")) {
3635 day = _json["day"]; 3706 day = _json["day"];
3636 } 3707 }
3637 if (_json.containsKey("hour")) { 3708 if (_json.containsKey("hour")) {
3638 hour = _json["hour"]; 3709 hour = _json["hour"];
3639 } 3710 }
3640 if (_json.containsKey("kind")) { 3711 if (_json.containsKey("kind")) {
3641 kind = _json["kind"]; 3712 kind = _json["kind"];
3642 } 3713 }
3643 if (_json.containsKey("updateTrack")) { 3714 if (_json.containsKey("updateTrack")) {
3644 updateTrack = _json["updateTrack"]; 3715 updateTrack = _json["updateTrack"];
3645 } 3716 }
3646 } 3717 }
3647 3718
3648 core.Map<core.String, core.Object> toJson() { 3719 core.Map<core.String, core.Object> toJson() {
3649 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 3720 final core.Map<core.String, core.Object> _json =
3721 new core.Map<core.String, core.Object>();
3650 if (day != null) { 3722 if (day != null) {
3651 _json["day"] = day; 3723 _json["day"] = day;
3652 } 3724 }
3653 if (hour != null) { 3725 if (hour != null) {
3654 _json["hour"] = hour; 3726 _json["hour"] = hour;
3655 } 3727 }
3656 if (kind != null) { 3728 if (kind != null) {
3657 _json["kind"] = kind; 3729 _json["kind"] = kind;
3658 } 3730 }
3659 if (updateTrack != null) { 3731 if (updateTrack != null) {
3660 _json["updateTrack"] = updateTrack; 3732 _json["updateTrack"] = updateTrack;
3661 } 3733 }
3662 return _json; 3734 return _json;
3663 } 3735 }
3664 } 3736 }
3665 3737
3666 /** Read-replica configuration specific to MySQL databases. */ 3738 /// Read-replica configuration specific to MySQL databases.
3667 class MySqlReplicaConfiguration { 3739 class MySqlReplicaConfiguration {
3668 /** PEM representation of the trusted CA's x509 certificate. */ 3740 /// PEM representation of the trusted CA's x509 certificate.
3669 core.String caCertificate; 3741 core.String caCertificate;
3670 /** PEM representation of the slave's x509 certificate. */ 3742
3743 /// PEM representation of the slave's x509 certificate.
3671 core.String clientCertificate; 3744 core.String clientCertificate;
3672 /** 3745
3673 * PEM representation of the slave's private key. The corresponsing public key 3746 /// PEM representation of the slave's private key. The corresponsing public
3674 * is encoded in the client's certificate. 3747 /// key is encoded in the client's certificate.
3675 */
3676 core.String clientKey; 3748 core.String clientKey;
3677 /** 3749
3678 * Seconds to wait between connect retries. MySQL's default is 60 seconds. 3750 /// Seconds to wait between connect retries. MySQL's default is 60 seconds.
3679 */
3680 core.int connectRetryInterval; 3751 core.int connectRetryInterval;
3681 /** 3752
3682 * Path to a SQL dump file in Google Cloud Storage from which the slave 3753 /// Path to a SQL dump file in Google Cloud Storage from which the slave
3683 * instance is to be created. The URI is in the form gs://bucketName/fileName. 3754 /// instance is to be created. The URI is in the form
3684 * Compressed gzip files (.gz) are also supported. Dumps should have the 3755 /// gs://bucketName/fileName. Compressed gzip files (.gz) are also supported.
3685 * binlog co-ordinates from which replication should begin. This can be 3756 /// Dumps should have the binlog co-ordinates from which replication should
3686 * accomplished by setting --master-data to 1 when using mysqldump. 3757 /// begin. This can be accomplished by setting --master-data to 1 when using
3687 */ 3758 /// mysqldump.
3688 core.String dumpFilePath; 3759 core.String dumpFilePath;
3689 /** This is always sql#mysqlReplicaConfiguration. */ 3760
3761 /// This is always sql#mysqlReplicaConfiguration.
3690 core.String kind; 3762 core.String kind;
3691 /** Interval in milliseconds between replication heartbeats. */ 3763
3764 /// Interval in milliseconds between replication heartbeats.
3692 core.String masterHeartbeatPeriod; 3765 core.String masterHeartbeatPeriod;
3693 /** The password for the replication connection. */ 3766
3767 /// The password for the replication connection.
3694 core.String password; 3768 core.String password;
3695 /** A list of permissible ciphers to use for SSL encryption. */ 3769
3770 /// A list of permissible ciphers to use for SSL encryption.
3696 core.String sslCipher; 3771 core.String sslCipher;
3697 /** The username for the replication connection. */ 3772
3773 /// The username for the replication connection.
3698 core.String username; 3774 core.String username;
3699 /** 3775
3700 * Whether or not to check the master's Common Name value in the certificate 3776 /// Whether or not to check the master's Common Name value in the certificate
3701 * that it sends during the SSL handshake. 3777 /// that it sends during the SSL handshake.
3702 */
3703 core.bool verifyServerCertificate; 3778 core.bool verifyServerCertificate;
3704 3779
3705 MySqlReplicaConfiguration(); 3780 MySqlReplicaConfiguration();
3706 3781
3707 MySqlReplicaConfiguration.fromJson(core.Map _json) { 3782 MySqlReplicaConfiguration.fromJson(core.Map _json) {
3708 if (_json.containsKey("caCertificate")) { 3783 if (_json.containsKey("caCertificate")) {
3709 caCertificate = _json["caCertificate"]; 3784 caCertificate = _json["caCertificate"];
3710 } 3785 }
3711 if (_json.containsKey("clientCertificate")) { 3786 if (_json.containsKey("clientCertificate")) {
3712 clientCertificate = _json["clientCertificate"]; 3787 clientCertificate = _json["clientCertificate"];
(...skipping 21 matching lines...) Expand all
3734 } 3809 }
3735 if (_json.containsKey("username")) { 3810 if (_json.containsKey("username")) {
3736 username = _json["username"]; 3811 username = _json["username"];
3737 } 3812 }
3738 if (_json.containsKey("verifyServerCertificate")) { 3813 if (_json.containsKey("verifyServerCertificate")) {
3739 verifyServerCertificate = _json["verifyServerCertificate"]; 3814 verifyServerCertificate = _json["verifyServerCertificate"];
3740 } 3815 }
3741 } 3816 }
3742 3817
3743 core.Map<core.String, core.Object> toJson() { 3818 core.Map<core.String, core.Object> toJson() {
3744 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 3819 final core.Map<core.String, core.Object> _json =
3820 new core.Map<core.String, core.Object>();
3745 if (caCertificate != null) { 3821 if (caCertificate != null) {
3746 _json["caCertificate"] = caCertificate; 3822 _json["caCertificate"] = caCertificate;
3747 } 3823 }
3748 if (clientCertificate != null) { 3824 if (clientCertificate != null) {
3749 _json["clientCertificate"] = clientCertificate; 3825 _json["clientCertificate"] = clientCertificate;
3750 } 3826 }
3751 if (clientKey != null) { 3827 if (clientKey != null) {
3752 _json["clientKey"] = clientKey; 3828 _json["clientKey"] = clientKey;
3753 } 3829 }
3754 if (connectRetryInterval != null) { 3830 if (connectRetryInterval != null) {
(...skipping 17 matching lines...) Expand all
3772 if (username != null) { 3848 if (username != null) {
3773 _json["username"] = username; 3849 _json["username"] = username;
3774 } 3850 }
3775 if (verifyServerCertificate != null) { 3851 if (verifyServerCertificate != null) {
3776 _json["verifyServerCertificate"] = verifyServerCertificate; 3852 _json["verifyServerCertificate"] = verifyServerCertificate;
3777 } 3853 }
3778 return _json; 3854 return _json;
3779 } 3855 }
3780 } 3856 }
3781 3857
3782 /** On-premises instance configuration. */ 3858 /// On-premises instance configuration.
3783 class OnPremisesConfiguration { 3859 class OnPremisesConfiguration {
3784 /** The host and port of the on-premises instance in host:port format */ 3860 /// The host and port of the on-premises instance in host:port format
3785 core.String hostPort; 3861 core.String hostPort;
3786 /** This is always sql#onPremisesConfiguration. */ 3862
3863 /// This is always sql#onPremisesConfiguration.
3787 core.String kind; 3864 core.String kind;
3788 3865
3789 OnPremisesConfiguration(); 3866 OnPremisesConfiguration();
3790 3867
3791 OnPremisesConfiguration.fromJson(core.Map _json) { 3868 OnPremisesConfiguration.fromJson(core.Map _json) {
3792 if (_json.containsKey("hostPort")) { 3869 if (_json.containsKey("hostPort")) {
3793 hostPort = _json["hostPort"]; 3870 hostPort = _json["hostPort"];
3794 } 3871 }
3795 if (_json.containsKey("kind")) { 3872 if (_json.containsKey("kind")) {
3796 kind = _json["kind"]; 3873 kind = _json["kind"];
3797 } 3874 }
3798 } 3875 }
3799 3876
3800 core.Map<core.String, core.Object> toJson() { 3877 core.Map<core.String, core.Object> toJson() {
3801 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 3878 final core.Map<core.String, core.Object> _json =
3879 new core.Map<core.String, core.Object>();
3802 if (hostPort != null) { 3880 if (hostPort != null) {
3803 _json["hostPort"] = hostPort; 3881 _json["hostPort"] = hostPort;
3804 } 3882 }
3805 if (kind != null) { 3883 if (kind != null) {
3806 _json["kind"] = kind; 3884 _json["kind"] = kind;
3807 } 3885 }
3808 return _json; 3886 return _json;
3809 } 3887 }
3810 } 3888 }
3811 3889
3812 /** 3890 /// An Operations resource contains information about database instance
3813 * An Operations resource contains information about database instance 3891 /// operations such as create, delete, and restart. Operations resources are
3814 * operations such as create, delete, and restart. Operations resources are 3892 /// created in response to operations that were initiated; you never create
3815 * created in response to operations that were initiated; you never create them 3893 /// them directly.
3816 * directly.
3817 */
3818 class Operation { 3894 class Operation {
3819 /** 3895 /// The time this operation finished in UTC timezone in RFC 3339 format, for
3820 * The time this operation finished in UTC timezone in RFC 3339 format, for 3896 /// example 2012-11-15T16:19:00.094Z.
3821 * example 2012-11-15T16:19:00.094Z.
3822 */
3823 core.DateTime endTime; 3897 core.DateTime endTime;
3824 /** 3898
3825 * If errors occurred during processing of this operation, this field will be 3899 /// If errors occurred during processing of this operation, this field will
3826 * populated. 3900 /// be populated.
3827 */
3828 OperationErrors error; 3901 OperationErrors error;
3829 /** The context for export operation, if applicable. */ 3902
3903 /// The context for export operation, if applicable.
3830 ExportContext exportContext; 3904 ExportContext exportContext;
3831 /** The context for import operation, if applicable. */ 3905
3906 /// The context for import operation, if applicable.
3832 ImportContext importContext; 3907 ImportContext importContext;
3833 /** 3908
3834 * The time this operation was enqueued in UTC timezone in RFC 3339 format, 3909 /// The time this operation was enqueued in UTC timezone in RFC 3339 format,
3835 * for example 2012-11-15T16:19:00.094Z. 3910 /// for example 2012-11-15T16:19:00.094Z.
3836 */
3837 core.DateTime insertTime; 3911 core.DateTime insertTime;
3838 /** This is always sql#operation. */ 3912
3913 /// This is always sql#operation.
3839 core.String kind; 3914 core.String kind;
3840 /** 3915
3841 * An identifier that uniquely identifies the operation. You can use this 3916 /// An identifier that uniquely identifies the operation. You can use this
3842 * identifier to retrieve the Operations resource that has information about 3917 /// identifier to retrieve the Operations resource that has information about
3843 * the operation. 3918 /// the operation.
3844 */
3845 core.String name; 3919 core.String name;
3846 /** 3920
3847 * The type of the operation. Valid values are CREATE, DELETE, UPDATE, 3921 /// The type of the operation. Valid values are CREATE, DELETE, UPDATE,
3848 * RESTART, IMPORT, EXPORT, BACKUP_VOLUME, RESTORE_VOLUME, CREATE_USER, 3922 /// RESTART, IMPORT, EXPORT, BACKUP_VOLUME, RESTORE_VOLUME, CREATE_USER,
3849 * DELETE_USER, CREATE_DATABASE, DELETE_DATABASE . 3923 /// DELETE_USER, CREATE_DATABASE, DELETE_DATABASE .
3850 */
3851 core.String operationType; 3924 core.String operationType;
3852 /** The URI of this resource. */ 3925
3926 /// The URI of this resource.
3853 core.String selfLink; 3927 core.String selfLink;
3854 /** 3928
3855 * The time this operation actually started in UTC timezone in RFC 3339 3929 /// The time this operation actually started in UTC timezone in RFC 3339
3856 * format, for example 2012-11-15T16:19:00.094Z. 3930 /// format, for example 2012-11-15T16:19:00.094Z.
3857 */
3858 core.DateTime startTime; 3931 core.DateTime startTime;
3859 /** 3932
3860 * The status of an operation. Valid values are PENDING, RUNNING, DONE, 3933 /// The status of an operation. Valid values are PENDING, RUNNING, DONE,
3861 * UNKNOWN. 3934 /// UNKNOWN.
3862 */
3863 core.String status; 3935 core.String status;
3864 /** Name of the database instance related to this operation. */ 3936
3937 /// Name of the database instance related to this operation.
3865 core.String targetId; 3938 core.String targetId;
3866 core.String targetLink; 3939 core.String targetLink;
3867 /** The project ID of the target instance related to this operation. */ 3940
3941 /// The project ID of the target instance related to this operation.
3868 core.String targetProject; 3942 core.String targetProject;
3869 /** The email address of the user who initiated this operation. */ 3943
3944 /// The email address of the user who initiated this operation.
3870 core.String user; 3945 core.String user;
3871 3946
3872 Operation(); 3947 Operation();
3873 3948
3874 Operation.fromJson(core.Map _json) { 3949 Operation.fromJson(core.Map _json) {
3875 if (_json.containsKey("endTime")) { 3950 if (_json.containsKey("endTime")) {
3876 endTime = core.DateTime.parse(_json["endTime"]); 3951 endTime = core.DateTime.parse(_json["endTime"]);
3877 } 3952 }
3878 if (_json.containsKey("error")) { 3953 if (_json.containsKey("error")) {
3879 error = new OperationErrors.fromJson(_json["error"]); 3954 error = new OperationErrors.fromJson(_json["error"]);
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
3913 } 3988 }
3914 if (_json.containsKey("targetProject")) { 3989 if (_json.containsKey("targetProject")) {
3915 targetProject = _json["targetProject"]; 3990 targetProject = _json["targetProject"];
3916 } 3991 }
3917 if (_json.containsKey("user")) { 3992 if (_json.containsKey("user")) {
3918 user = _json["user"]; 3993 user = _json["user"];
3919 } 3994 }
3920 } 3995 }
3921 3996
3922 core.Map<core.String, core.Object> toJson() { 3997 core.Map<core.String, core.Object> toJson() {
3923 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 3998 final core.Map<core.String, core.Object> _json =
3999 new core.Map<core.String, core.Object>();
3924 if (endTime != null) { 4000 if (endTime != null) {
3925 _json["endTime"] = (endTime).toIso8601String(); 4001 _json["endTime"] = (endTime).toIso8601String();
3926 } 4002 }
3927 if (error != null) { 4003 if (error != null) {
3928 _json["error"] = (error).toJson(); 4004 _json["error"] = (error).toJson();
3929 } 4005 }
3930 if (exportContext != null) { 4006 if (exportContext != null) {
3931 _json["exportContext"] = (exportContext).toJson(); 4007 _json["exportContext"] = (exportContext).toJson();
3932 } 4008 }
3933 if (importContext != null) { 4009 if (importContext != null) {
(...skipping 29 matching lines...) Expand all
3963 if (targetProject != null) { 4039 if (targetProject != null) {
3964 _json["targetProject"] = targetProject; 4040 _json["targetProject"] = targetProject;
3965 } 4041 }
3966 if (user != null) { 4042 if (user != null) {
3967 _json["user"] = user; 4043 _json["user"] = user;
3968 } 4044 }
3969 return _json; 4045 return _json;
3970 } 4046 }
3971 } 4047 }
3972 4048
3973 /** Database instance operation error. */ 4049 /// Database instance operation error.
3974 class OperationError { 4050 class OperationError {
3975 /** Identifies the specific error that occurred. */ 4051 /// Identifies the specific error that occurred.
3976 core.String code; 4052 core.String code;
3977 /** This is always sql#operationError. */ 4053
4054 /// This is always sql#operationError.
3978 core.String kind; 4055 core.String kind;
3979 /** Additional information about the error encountered. */ 4056
4057 /// Additional information about the error encountered.
3980 core.String message; 4058 core.String message;
3981 4059
3982 OperationError(); 4060 OperationError();
3983 4061
3984 OperationError.fromJson(core.Map _json) { 4062 OperationError.fromJson(core.Map _json) {
3985 if (_json.containsKey("code")) { 4063 if (_json.containsKey("code")) {
3986 code = _json["code"]; 4064 code = _json["code"];
3987 } 4065 }
3988 if (_json.containsKey("kind")) { 4066 if (_json.containsKey("kind")) {
3989 kind = _json["kind"]; 4067 kind = _json["kind"];
3990 } 4068 }
3991 if (_json.containsKey("message")) { 4069 if (_json.containsKey("message")) {
3992 message = _json["message"]; 4070 message = _json["message"];
3993 } 4071 }
3994 } 4072 }
3995 4073
3996 core.Map<core.String, core.Object> toJson() { 4074 core.Map<core.String, core.Object> toJson() {
3997 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 4075 final core.Map<core.String, core.Object> _json =
4076 new core.Map<core.String, core.Object>();
3998 if (code != null) { 4077 if (code != null) {
3999 _json["code"] = code; 4078 _json["code"] = code;
4000 } 4079 }
4001 if (kind != null) { 4080 if (kind != null) {
4002 _json["kind"] = kind; 4081 _json["kind"] = kind;
4003 } 4082 }
4004 if (message != null) { 4083 if (message != null) {
4005 _json["message"] = message; 4084 _json["message"] = message;
4006 } 4085 }
4007 return _json; 4086 return _json;
4008 } 4087 }
4009 } 4088 }
4010 4089
4011 /** Database instance operation errors list wrapper. */ 4090 /// Database instance operation errors list wrapper.
4012 class OperationErrors { 4091 class OperationErrors {
4013 /** The list of errors encountered while processing this operation. */ 4092 /// The list of errors encountered while processing this operation.
4014 core.List<OperationError> errors; 4093 core.List<OperationError> errors;
4015 /** This is always sql#operationErrors. */ 4094
4095 /// This is always sql#operationErrors.
4016 core.String kind; 4096 core.String kind;
4017 4097
4018 OperationErrors(); 4098 OperationErrors();
4019 4099
4020 OperationErrors.fromJson(core.Map _json) { 4100 OperationErrors.fromJson(core.Map _json) {
4021 if (_json.containsKey("errors")) { 4101 if (_json.containsKey("errors")) {
4022 errors = _json["errors"].map((value) => new OperationError.fromJson(value) ).toList(); 4102 errors = _json["errors"]
4103 .map((value) => new OperationError.fromJson(value))
4104 .toList();
4023 } 4105 }
4024 if (_json.containsKey("kind")) { 4106 if (_json.containsKey("kind")) {
4025 kind = _json["kind"]; 4107 kind = _json["kind"];
4026 } 4108 }
4027 } 4109 }
4028 4110
4029 core.Map<core.String, core.Object> toJson() { 4111 core.Map<core.String, core.Object> toJson() {
4030 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 4112 final core.Map<core.String, core.Object> _json =
4113 new core.Map<core.String, core.Object>();
4031 if (errors != null) { 4114 if (errors != null) {
4032 _json["errors"] = errors.map((value) => (value).toJson()).toList(); 4115 _json["errors"] = errors.map((value) => (value).toJson()).toList();
4033 } 4116 }
4034 if (kind != null) { 4117 if (kind != null) {
4035 _json["kind"] = kind; 4118 _json["kind"] = kind;
4036 } 4119 }
4037 return _json; 4120 return _json;
4038 } 4121 }
4039 } 4122 }
4040 4123
4041 /** Database instance list operations response. */ 4124 /// Database instance list operations response.
4042 class OperationsListResponse { 4125 class OperationsListResponse {
4043 /** List of operation resources. */ 4126 /// List of operation resources.
4044 core.List<Operation> items; 4127 core.List<Operation> items;
4045 /** This is always sql#operationsList. */ 4128
4129 /// This is always sql#operationsList.
4046 core.String kind; 4130 core.String kind;
4047 /** 4131
4048 * The continuation token, used to page through large result sets. Provide 4132 /// The continuation token, used to page through large result sets. Provide
4049 * this value in a subsequent request to return the next page of results. 4133 /// this value in a subsequent request to return the next page of results.
4050 */
4051 core.String nextPageToken; 4134 core.String nextPageToken;
4052 4135
4053 OperationsListResponse(); 4136 OperationsListResponse();
4054 4137
4055 OperationsListResponse.fromJson(core.Map _json) { 4138 OperationsListResponse.fromJson(core.Map _json) {
4056 if (_json.containsKey("items")) { 4139 if (_json.containsKey("items")) {
4057 items = _json["items"].map((value) => new Operation.fromJson(value)).toLis t(); 4140 items =
4141 _json["items"].map((value) => new Operation.fromJson(value)).toList();
4058 } 4142 }
4059 if (_json.containsKey("kind")) { 4143 if (_json.containsKey("kind")) {
4060 kind = _json["kind"]; 4144 kind = _json["kind"];
4061 } 4145 }
4062 if (_json.containsKey("nextPageToken")) { 4146 if (_json.containsKey("nextPageToken")) {
4063 nextPageToken = _json["nextPageToken"]; 4147 nextPageToken = _json["nextPageToken"];
4064 } 4148 }
4065 } 4149 }
4066 4150
4067 core.Map<core.String, core.Object> toJson() { 4151 core.Map<core.String, core.Object> toJson() {
4068 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 4152 final core.Map<core.String, core.Object> _json =
4153 new core.Map<core.String, core.Object>();
4069 if (items != null) { 4154 if (items != null) {
4070 _json["items"] = items.map((value) => (value).toJson()).toList(); 4155 _json["items"] = items.map((value) => (value).toJson()).toList();
4071 } 4156 }
4072 if (kind != null) { 4157 if (kind != null) {
4073 _json["kind"] = kind; 4158 _json["kind"] = kind;
4074 } 4159 }
4075 if (nextPageToken != null) { 4160 if (nextPageToken != null) {
4076 _json["nextPageToken"] = nextPageToken; 4161 _json["nextPageToken"] = nextPageToken;
4077 } 4162 }
4078 return _json; 4163 return _json;
4079 } 4164 }
4080 } 4165 }
4081 4166
4082 /** Read-replica configuration for connecting to the master. */ 4167 /// Read-replica configuration for connecting to the master.
4083 class ReplicaConfiguration { 4168 class ReplicaConfiguration {
4084 /** 4169 /// Specifies if the replica is the failover target. If the field is set to
4085 * Specifies if the replica is the failover target. If the field is set to 4170 /// true the replica will be designated as a failover replica. In case the
4086 * true the replica will be designated as a failover replica. In case the 4171 /// master instance fails, the replica instance will be promoted as the new
4087 * master instance fails, the replica instance will be promoted as the new 4172 /// master instance.
4088 * master instance. 4173 /// Only one replica can be specified as failover target, and the replica has
4089 * Only one replica can be specified as failover target, and the replica has 4174 /// to be in different zone with the master instance.
4090 * to be in different zone with the master instance.
4091 */
4092 core.bool failoverTarget; 4175 core.bool failoverTarget;
4093 /** This is always sql#replicaConfiguration. */ 4176
4177 /// This is always sql#replicaConfiguration.
4094 core.String kind; 4178 core.String kind;
4095 /** 4179
4096 * MySQL specific configuration when replicating from a MySQL on-premises 4180 /// MySQL specific configuration when replicating from a MySQL on-premises
4097 * master. Replication configuration information such as the username, 4181 /// master. Replication configuration information such as the username,
4098 * password, certificates, and keys are not stored in the instance metadata. 4182 /// password, certificates, and keys are not stored in the instance metadata.
4099 * The configuration information is used only to set up the replication 4183 /// The configuration information is used only to set up the replication
4100 * connection and is stored by MySQL in a file named master.info in the data 4184 /// connection and is stored by MySQL in a file named master.info in the data
4101 * directory. 4185 /// directory.
4102 */
4103 MySqlReplicaConfiguration mysqlReplicaConfiguration; 4186 MySqlReplicaConfiguration mysqlReplicaConfiguration;
4104 4187
4105 ReplicaConfiguration(); 4188 ReplicaConfiguration();
4106 4189
4107 ReplicaConfiguration.fromJson(core.Map _json) { 4190 ReplicaConfiguration.fromJson(core.Map _json) {
4108 if (_json.containsKey("failoverTarget")) { 4191 if (_json.containsKey("failoverTarget")) {
4109 failoverTarget = _json["failoverTarget"]; 4192 failoverTarget = _json["failoverTarget"];
4110 } 4193 }
4111 if (_json.containsKey("kind")) { 4194 if (_json.containsKey("kind")) {
4112 kind = _json["kind"]; 4195 kind = _json["kind"];
4113 } 4196 }
4114 if (_json.containsKey("mysqlReplicaConfiguration")) { 4197 if (_json.containsKey("mysqlReplicaConfiguration")) {
4115 mysqlReplicaConfiguration = new MySqlReplicaConfiguration.fromJson(_json[" mysqlReplicaConfiguration"]); 4198 mysqlReplicaConfiguration = new MySqlReplicaConfiguration.fromJson(
4199 _json["mysqlReplicaConfiguration"]);
4116 } 4200 }
4117 } 4201 }
4118 4202
4119 core.Map<core.String, core.Object> toJson() { 4203 core.Map<core.String, core.Object> toJson() {
4120 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 4204 final core.Map<core.String, core.Object> _json =
4205 new core.Map<core.String, core.Object>();
4121 if (failoverTarget != null) { 4206 if (failoverTarget != null) {
4122 _json["failoverTarget"] = failoverTarget; 4207 _json["failoverTarget"] = failoverTarget;
4123 } 4208 }
4124 if (kind != null) { 4209 if (kind != null) {
4125 _json["kind"] = kind; 4210 _json["kind"] = kind;
4126 } 4211 }
4127 if (mysqlReplicaConfiguration != null) { 4212 if (mysqlReplicaConfiguration != null) {
4128 _json["mysqlReplicaConfiguration"] = (mysqlReplicaConfiguration).toJson(); 4213 _json["mysqlReplicaConfiguration"] = (mysqlReplicaConfiguration).toJson();
4129 } 4214 }
4130 return _json; 4215 return _json;
4131 } 4216 }
4132 } 4217 }
4133 4218
4134 /** Database instance restore from backup context. */ 4219 /// Database instance restore from backup context.
4135 class RestoreBackupContext { 4220 class RestoreBackupContext {
4136 /** The ID of the backup run to restore from. */ 4221 /// The ID of the backup run to restore from.
4137 core.String backupRunId; 4222 core.String backupRunId;
4138 /** The ID of the instance that the backup was taken from. */ 4223
4224 /// The ID of the instance that the backup was taken from.
4139 core.String instanceId; 4225 core.String instanceId;
4140 /** This is always sql#restoreBackupContext. */ 4226
4227 /// This is always sql#restoreBackupContext.
4141 core.String kind; 4228 core.String kind;
4142 4229
4143 RestoreBackupContext(); 4230 RestoreBackupContext();
4144 4231
4145 RestoreBackupContext.fromJson(core.Map _json) { 4232 RestoreBackupContext.fromJson(core.Map _json) {
4146 if (_json.containsKey("backupRunId")) { 4233 if (_json.containsKey("backupRunId")) {
4147 backupRunId = _json["backupRunId"]; 4234 backupRunId = _json["backupRunId"];
4148 } 4235 }
4149 if (_json.containsKey("instanceId")) { 4236 if (_json.containsKey("instanceId")) {
4150 instanceId = _json["instanceId"]; 4237 instanceId = _json["instanceId"];
4151 } 4238 }
4152 if (_json.containsKey("kind")) { 4239 if (_json.containsKey("kind")) {
4153 kind = _json["kind"]; 4240 kind = _json["kind"];
4154 } 4241 }
4155 } 4242 }
4156 4243
4157 core.Map<core.String, core.Object> toJson() { 4244 core.Map<core.String, core.Object> toJson() {
4158 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 4245 final core.Map<core.String, core.Object> _json =
4246 new core.Map<core.String, core.Object>();
4159 if (backupRunId != null) { 4247 if (backupRunId != null) {
4160 _json["backupRunId"] = backupRunId; 4248 _json["backupRunId"] = backupRunId;
4161 } 4249 }
4162 if (instanceId != null) { 4250 if (instanceId != null) {
4163 _json["instanceId"] = instanceId; 4251 _json["instanceId"] = instanceId;
4164 } 4252 }
4165 if (kind != null) { 4253 if (kind != null) {
4166 _json["kind"] = kind; 4254 _json["kind"] = kind;
4167 } 4255 }
4168 return _json; 4256 return _json;
4169 } 4257 }
4170 } 4258 }
4171 4259
4172 /** Database instance settings. */ 4260 /// Database instance settings.
4173 class Settings { 4261 class Settings {
4174 /** 4262 /// The activation policy specifies when the instance is activated; it is
4175 * The activation policy specifies when the instance is activated; it is 4263 /// applicable only when the instance state is RUNNABLE. The activation
4176 * applicable only when the instance state is RUNNABLE. The activation policy 4264 /// policy cannot be updated together with other settings for Second
4177 * cannot be updated together with other settings for Second Generation 4265 /// Generation instances. Valid values:
4178 * instances. Valid values: 4266 /// ALWAYS: The instance is on; it is not deactivated by inactivity.
4179 * ALWAYS: The instance is on; it is not deactivated by inactivity. 4267 /// NEVER: The instance is off; it is not activated, even if a connection
4180 * NEVER: The instance is off; it is not activated, even if a connection 4268 /// request arrives.
4181 * request arrives. 4269 /// ON_DEMAND: The instance responds to incoming requests, and turns itself
4182 * ON_DEMAND: The instance responds to incoming requests, and turns itself off 4270 /// off when not in use. Instances with PER_USE pricing turn off after 15
4183 * when not in use. Instances with PER_USE pricing turn off after 15 minutes 4271 /// minutes of inactivity. Instances with PER_PACKAGE pricing turn off after
4184 * of inactivity. Instances with PER_PACKAGE pricing turn off after 12 hours 4272 /// 12 hours of inactivity.
4185 * of inactivity.
4186 */
4187 core.String activationPolicy; 4273 core.String activationPolicy;
4188 /** 4274
4189 * The App Engine app IDs that can access this instance. This property is only 4275 /// The App Engine app IDs that can access this instance. This property is
4190 * applicable to First Generation instances. 4276 /// only applicable to First Generation instances.
4191 */
4192 core.List<core.String> authorizedGaeApplications; 4277 core.List<core.String> authorizedGaeApplications;
4193 /** Reserved for future use. */ 4278
4279 /// Reserved for future use.
4194 core.String availabilityType; 4280 core.String availabilityType;
4195 /** The daily backup configuration for the instance. */ 4281
4282 /// The daily backup configuration for the instance.
4196 BackupConfiguration backupConfiguration; 4283 BackupConfiguration backupConfiguration;
4197 /** 4284
4198 * Configuration specific to read replica instances. Indicates whether 4285 /// Configuration specific to read replica instances. Indicates whether
4199 * database flags for crash-safe replication are enabled. This property is 4286 /// database flags for crash-safe replication are enabled. This property is
4200 * only applicable to First Generation instances. 4287 /// only applicable to First Generation instances.
4201 */
4202 core.bool crashSafeReplicationEnabled; 4288 core.bool crashSafeReplicationEnabled;
4203 /** 4289
4204 * The size of data disk, in GB. The data disk size minimum is 10GB. Applies 4290 /// The size of data disk, in GB. The data disk size minimum is 10GB. Applies
4205 * only to Second Generation instances. 4291 /// only to Second Generation instances.
4206 */
4207 core.String dataDiskSizeGb; 4292 core.String dataDiskSizeGb;
4208 /** 4293
4209 * The type of data disk. Only supported for Second Generation instances. The 4294 /// The type of data disk. Only supported for Second Generation instances.
4210 * default type is PD_SSD. Applies only to Second Generation instances. 4295 /// The default type is PD_SSD. Applies only to Second Generation instances.
4211 */
4212 core.String dataDiskType; 4296 core.String dataDiskType;
4213 /** The database flags passed to the instance at startup. */ 4297
4298 /// The database flags passed to the instance at startup.
4214 core.List<DatabaseFlags> databaseFlags; 4299 core.List<DatabaseFlags> databaseFlags;
4215 /** 4300
4216 * Configuration specific to read replica instances. Indicates whether 4301 /// Configuration specific to read replica instances. Indicates whether
4217 * replication is enabled or not. 4302 /// replication is enabled or not.
4218 */
4219 core.bool databaseReplicationEnabled; 4303 core.bool databaseReplicationEnabled;
4220 /** 4304
4221 * The settings for IP Management. This allows to enable or disable the 4305 /// The settings for IP Management. This allows to enable or disable the
4222 * instance IP and manage which external networks can connect to the instance. 4306 /// instance IP and manage which external networks can connect to the
4223 * The IPv4 address cannot be disabled for Second Generation instances. 4307 /// instance. The IPv4 address cannot be disabled for Second Generation
4224 */ 4308 /// instances.
4225 IpConfiguration ipConfiguration; 4309 IpConfiguration ipConfiguration;
4226 /** This is always sql#settings. */ 4310
4311 /// This is always sql#settings.
4227 core.String kind; 4312 core.String kind;
4228 /** 4313
4229 * The location preference settings. This allows the instance to be located as 4314 /// The location preference settings. This allows the instance to be located
4230 * near as possible to either an App Engine app or GCE zone for better 4315 /// as near as possible to either an App Engine app or GCE zone for better
4231 * performance. App Engine co-location is only applicable to First Generation 4316 /// performance. App Engine co-location is only applicable to First
4232 * instances. 4317 /// Generation instances.
4233 */
4234 LocationPreference locationPreference; 4318 LocationPreference locationPreference;
4235 /** 4319
4236 * The maintenance window for this instance. This specifies when the instance 4320 /// The maintenance window for this instance. This specifies when the
4237 * may be restarted for maintenance purposes. Applies only to Second 4321 /// instance may be restarted for maintenance purposes. Applies only to
4238 * Generation instances. 4322 /// Second Generation instances.
4239 */
4240 MaintenanceWindow maintenanceWindow; 4323 MaintenanceWindow maintenanceWindow;
4241 /** 4324
4242 * The pricing plan for this instance. This can be either PER_USE or PACKAGE. 4325 /// The pricing plan for this instance. This can be either PER_USE or
4243 * Only PER_USE is supported for Second Generation instances. 4326 /// PACKAGE. Only PER_USE is supported for Second Generation instances.
4244 */
4245 core.String pricingPlan; 4327 core.String pricingPlan;
4246 /** 4328
4247 * The type of replication this instance uses. This can be either ASYNCHRONOUS 4329 /// The type of replication this instance uses. This can be either
4248 * or SYNCHRONOUS. This property is only applicable to First Generation 4330 /// ASYNCHRONOUS or SYNCHRONOUS. This property is only applicable to First
4249 * instances. 4331 /// Generation instances.
4250 */
4251 core.String replicationType; 4332 core.String replicationType;
4252 /** 4333
4253 * The version of instance settings. This is a required field for update 4334 /// The version of instance settings. This is a required field for update
4254 * method to make sure concurrent updates are handled properly. During update, 4335 /// method to make sure concurrent updates are handled properly. During
4255 * use the most recent settingsVersion value for this instance and do not try 4336 /// update, use the most recent settingsVersion value for this instance and
4256 * to update this value. 4337 /// do not try to update this value.
4257 */
4258 core.String settingsVersion; 4338 core.String settingsVersion;
4259 /** 4339
4260 * Configuration to increase storage size automatically. The default value is 4340 /// Configuration to increase storage size automatically. The default value
4261 * true. Applies only to Second Generation instances. 4341 /// is true. Applies only to Second Generation instances.
4262 */
4263 core.bool storageAutoResize; 4342 core.bool storageAutoResize;
4264 /** 4343
4265 * The maximum size to which storage capacity can be automatically increased. 4344 /// The maximum size to which storage capacity can be automatically
4266 * The default value is 0, which specifies that there is no limit. Applies 4345 /// increased. The default value is 0, which specifies that there is no
4267 * only to Second Generation instances. 4346 /// limit. Applies only to Second Generation instances.
4268 */
4269 core.String storageAutoResizeLimit; 4347 core.String storageAutoResizeLimit;
4270 /** 4348
4271 * The tier of service for this instance, for example D1, D2. For more 4349 /// The tier of service for this instance, for example D1, D2. For more
4272 * information, see pricing. 4350 /// information, see pricing.
4273 */
4274 core.String tier; 4351 core.String tier;
4275 /** 4352
4276 * User-provided labels, represented as a dictionary where each label is a 4353 /// User-provided labels, represented as a dictionary where each label is a
4277 * single key value pair. 4354 /// single key value pair.
4278 */
4279 core.Map<core.String, core.String> userLabels; 4355 core.Map<core.String, core.String> userLabels;
4280 4356
4281 Settings(); 4357 Settings();
4282 4358
4283 Settings.fromJson(core.Map _json) { 4359 Settings.fromJson(core.Map _json) {
4284 if (_json.containsKey("activationPolicy")) { 4360 if (_json.containsKey("activationPolicy")) {
4285 activationPolicy = _json["activationPolicy"]; 4361 activationPolicy = _json["activationPolicy"];
4286 } 4362 }
4287 if (_json.containsKey("authorizedGaeApplications")) { 4363 if (_json.containsKey("authorizedGaeApplications")) {
4288 authorizedGaeApplications = _json["authorizedGaeApplications"]; 4364 authorizedGaeApplications = _json["authorizedGaeApplications"];
4289 } 4365 }
4290 if (_json.containsKey("availabilityType")) { 4366 if (_json.containsKey("availabilityType")) {
4291 availabilityType = _json["availabilityType"]; 4367 availabilityType = _json["availabilityType"];
4292 } 4368 }
4293 if (_json.containsKey("backupConfiguration")) { 4369 if (_json.containsKey("backupConfiguration")) {
4294 backupConfiguration = new BackupConfiguration.fromJson(_json["backupConfig uration"]); 4370 backupConfiguration =
4371 new BackupConfiguration.fromJson(_json["backupConfiguration"]);
4295 } 4372 }
4296 if (_json.containsKey("crashSafeReplicationEnabled")) { 4373 if (_json.containsKey("crashSafeReplicationEnabled")) {
4297 crashSafeReplicationEnabled = _json["crashSafeReplicationEnabled"]; 4374 crashSafeReplicationEnabled = _json["crashSafeReplicationEnabled"];
4298 } 4375 }
4299 if (_json.containsKey("dataDiskSizeGb")) { 4376 if (_json.containsKey("dataDiskSizeGb")) {
4300 dataDiskSizeGb = _json["dataDiskSizeGb"]; 4377 dataDiskSizeGb = _json["dataDiskSizeGb"];
4301 } 4378 }
4302 if (_json.containsKey("dataDiskType")) { 4379 if (_json.containsKey("dataDiskType")) {
4303 dataDiskType = _json["dataDiskType"]; 4380 dataDiskType = _json["dataDiskType"];
4304 } 4381 }
4305 if (_json.containsKey("databaseFlags")) { 4382 if (_json.containsKey("databaseFlags")) {
4306 databaseFlags = _json["databaseFlags"].map((value) => new DatabaseFlags.fr omJson(value)).toList(); 4383 databaseFlags = _json["databaseFlags"]
4384 .map((value) => new DatabaseFlags.fromJson(value))
4385 .toList();
4307 } 4386 }
4308 if (_json.containsKey("databaseReplicationEnabled")) { 4387 if (_json.containsKey("databaseReplicationEnabled")) {
4309 databaseReplicationEnabled = _json["databaseReplicationEnabled"]; 4388 databaseReplicationEnabled = _json["databaseReplicationEnabled"];
4310 } 4389 }
4311 if (_json.containsKey("ipConfiguration")) { 4390 if (_json.containsKey("ipConfiguration")) {
4312 ipConfiguration = new IpConfiguration.fromJson(_json["ipConfiguration"]); 4391 ipConfiguration = new IpConfiguration.fromJson(_json["ipConfiguration"]);
4313 } 4392 }
4314 if (_json.containsKey("kind")) { 4393 if (_json.containsKey("kind")) {
4315 kind = _json["kind"]; 4394 kind = _json["kind"];
4316 } 4395 }
4317 if (_json.containsKey("locationPreference")) { 4396 if (_json.containsKey("locationPreference")) {
4318 locationPreference = new LocationPreference.fromJson(_json["locationPrefer ence"]); 4397 locationPreference =
4398 new LocationPreference.fromJson(_json["locationPreference"]);
4319 } 4399 }
4320 if (_json.containsKey("maintenanceWindow")) { 4400 if (_json.containsKey("maintenanceWindow")) {
4321 maintenanceWindow = new MaintenanceWindow.fromJson(_json["maintenanceWindo w"]); 4401 maintenanceWindow =
4402 new MaintenanceWindow.fromJson(_json["maintenanceWindow"]);
4322 } 4403 }
4323 if (_json.containsKey("pricingPlan")) { 4404 if (_json.containsKey("pricingPlan")) {
4324 pricingPlan = _json["pricingPlan"]; 4405 pricingPlan = _json["pricingPlan"];
4325 } 4406 }
4326 if (_json.containsKey("replicationType")) { 4407 if (_json.containsKey("replicationType")) {
4327 replicationType = _json["replicationType"]; 4408 replicationType = _json["replicationType"];
4328 } 4409 }
4329 if (_json.containsKey("settingsVersion")) { 4410 if (_json.containsKey("settingsVersion")) {
4330 settingsVersion = _json["settingsVersion"]; 4411 settingsVersion = _json["settingsVersion"];
4331 } 4412 }
4332 if (_json.containsKey("storageAutoResize")) { 4413 if (_json.containsKey("storageAutoResize")) {
4333 storageAutoResize = _json["storageAutoResize"]; 4414 storageAutoResize = _json["storageAutoResize"];
4334 } 4415 }
4335 if (_json.containsKey("storageAutoResizeLimit")) { 4416 if (_json.containsKey("storageAutoResizeLimit")) {
4336 storageAutoResizeLimit = _json["storageAutoResizeLimit"]; 4417 storageAutoResizeLimit = _json["storageAutoResizeLimit"];
4337 } 4418 }
4338 if (_json.containsKey("tier")) { 4419 if (_json.containsKey("tier")) {
4339 tier = _json["tier"]; 4420 tier = _json["tier"];
4340 } 4421 }
4341 if (_json.containsKey("userLabels")) { 4422 if (_json.containsKey("userLabels")) {
4342 userLabels = _json["userLabels"]; 4423 userLabels = _json["userLabels"];
4343 } 4424 }
4344 } 4425 }
4345 4426
4346 core.Map<core.String, core.Object> toJson() { 4427 core.Map<core.String, core.Object> toJson() {
4347 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 4428 final core.Map<core.String, core.Object> _json =
4429 new core.Map<core.String, core.Object>();
4348 if (activationPolicy != null) { 4430 if (activationPolicy != null) {
4349 _json["activationPolicy"] = activationPolicy; 4431 _json["activationPolicy"] = activationPolicy;
4350 } 4432 }
4351 if (authorizedGaeApplications != null) { 4433 if (authorizedGaeApplications != null) {
4352 _json["authorizedGaeApplications"] = authorizedGaeApplications; 4434 _json["authorizedGaeApplications"] = authorizedGaeApplications;
4353 } 4435 }
4354 if (availabilityType != null) { 4436 if (availabilityType != null) {
4355 _json["availabilityType"] = availabilityType; 4437 _json["availabilityType"] = availabilityType;
4356 } 4438 }
4357 if (backupConfiguration != null) { 4439 if (backupConfiguration != null) {
4358 _json["backupConfiguration"] = (backupConfiguration).toJson(); 4440 _json["backupConfiguration"] = (backupConfiguration).toJson();
4359 } 4441 }
4360 if (crashSafeReplicationEnabled != null) { 4442 if (crashSafeReplicationEnabled != null) {
4361 _json["crashSafeReplicationEnabled"] = crashSafeReplicationEnabled; 4443 _json["crashSafeReplicationEnabled"] = crashSafeReplicationEnabled;
4362 } 4444 }
4363 if (dataDiskSizeGb != null) { 4445 if (dataDiskSizeGb != null) {
4364 _json["dataDiskSizeGb"] = dataDiskSizeGb; 4446 _json["dataDiskSizeGb"] = dataDiskSizeGb;
4365 } 4447 }
4366 if (dataDiskType != null) { 4448 if (dataDiskType != null) {
4367 _json["dataDiskType"] = dataDiskType; 4449 _json["dataDiskType"] = dataDiskType;
4368 } 4450 }
4369 if (databaseFlags != null) { 4451 if (databaseFlags != null) {
4370 _json["databaseFlags"] = databaseFlags.map((value) => (value).toJson()).to List(); 4452 _json["databaseFlags"] =
4453 databaseFlags.map((value) => (value).toJson()).toList();
4371 } 4454 }
4372 if (databaseReplicationEnabled != null) { 4455 if (databaseReplicationEnabled != null) {
4373 _json["databaseReplicationEnabled"] = databaseReplicationEnabled; 4456 _json["databaseReplicationEnabled"] = databaseReplicationEnabled;
4374 } 4457 }
4375 if (ipConfiguration != null) { 4458 if (ipConfiguration != null) {
4376 _json["ipConfiguration"] = (ipConfiguration).toJson(); 4459 _json["ipConfiguration"] = (ipConfiguration).toJson();
4377 } 4460 }
4378 if (kind != null) { 4461 if (kind != null) {
4379 _json["kind"] = kind; 4462 _json["kind"] = kind;
4380 } 4463 }
(...skipping 21 matching lines...) Expand all
4402 if (tier != null) { 4485 if (tier != null) {
4403 _json["tier"] = tier; 4486 _json["tier"] = tier;
4404 } 4487 }
4405 if (userLabels != null) { 4488 if (userLabels != null) {
4406 _json["userLabels"] = userLabels; 4489 _json["userLabels"] = userLabels;
4407 } 4490 }
4408 return _json; 4491 return _json;
4409 } 4492 }
4410 } 4493 }
4411 4494
4412 /** SslCerts Resource */ 4495 /// SslCerts Resource
4413 class SslCert { 4496 class SslCert {
4414 /** PEM representation. */ 4497 /// PEM representation.
4415 core.String cert; 4498 core.String cert;
4416 /** Serial number, as extracted from the certificate. */ 4499
4500 /// Serial number, as extracted from the certificate.
4417 core.String certSerialNumber; 4501 core.String certSerialNumber;
4418 /** User supplied name. Constrained to [a-zA-Z.-_ ]+. */ 4502
4503 /// User supplied name. Constrained to [a-zA-Z.-_ ]+.
4419 core.String commonName; 4504 core.String commonName;
4420 /** 4505
4421 * The time when the certificate was created in RFC 3339 format, for example 4506 /// The time when the certificate was created in RFC 3339 format, for example
4422 * 2012-11-15T16:19:00.094Z 4507 /// 2012-11-15T16:19:00.094Z
4423 */
4424 core.DateTime createTime; 4508 core.DateTime createTime;
4425 /** 4509
4426 * The time when the certificate expires in RFC 3339 format, for example 4510 /// The time when the certificate expires in RFC 3339 format, for example
4427 * 2012-11-15T16:19:00.094Z. 4511 /// 2012-11-15T16:19:00.094Z.
4428 */
4429 core.DateTime expirationTime; 4512 core.DateTime expirationTime;
4430 /** Name of the database instance. */ 4513
4514 /// Name of the database instance.
4431 core.String instance; 4515 core.String instance;
4432 /** This is always sql#sslCert. */ 4516
4517 /// This is always sql#sslCert.
4433 core.String kind; 4518 core.String kind;
4434 /** The URI of this resource. */ 4519
4520 /// The URI of this resource.
4435 core.String selfLink; 4521 core.String selfLink;
4436 /** Sha1 Fingerprint. */ 4522
4523 /// Sha1 Fingerprint.
4437 core.String sha1Fingerprint; 4524 core.String sha1Fingerprint;
4438 4525
4439 SslCert(); 4526 SslCert();
4440 4527
4441 SslCert.fromJson(core.Map _json) { 4528 SslCert.fromJson(core.Map _json) {
4442 if (_json.containsKey("cert")) { 4529 if (_json.containsKey("cert")) {
4443 cert = _json["cert"]; 4530 cert = _json["cert"];
4444 } 4531 }
4445 if (_json.containsKey("certSerialNumber")) { 4532 if (_json.containsKey("certSerialNumber")) {
4446 certSerialNumber = _json["certSerialNumber"]; 4533 certSerialNumber = _json["certSerialNumber"];
(...skipping 15 matching lines...) Expand all
4462 } 4549 }
4463 if (_json.containsKey("selfLink")) { 4550 if (_json.containsKey("selfLink")) {
4464 selfLink = _json["selfLink"]; 4551 selfLink = _json["selfLink"];
4465 } 4552 }
4466 if (_json.containsKey("sha1Fingerprint")) { 4553 if (_json.containsKey("sha1Fingerprint")) {
4467 sha1Fingerprint = _json["sha1Fingerprint"]; 4554 sha1Fingerprint = _json["sha1Fingerprint"];
4468 } 4555 }
4469 } 4556 }
4470 4557
4471 core.Map<core.String, core.Object> toJson() { 4558 core.Map<core.String, core.Object> toJson() {
4472 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 4559 final core.Map<core.String, core.Object> _json =
4560 new core.Map<core.String, core.Object>();
4473 if (cert != null) { 4561 if (cert != null) {
4474 _json["cert"] = cert; 4562 _json["cert"] = cert;
4475 } 4563 }
4476 if (certSerialNumber != null) { 4564 if (certSerialNumber != null) {
4477 _json["certSerialNumber"] = certSerialNumber; 4565 _json["certSerialNumber"] = certSerialNumber;
4478 } 4566 }
4479 if (commonName != null) { 4567 if (commonName != null) {
4480 _json["commonName"] = commonName; 4568 _json["commonName"] = commonName;
4481 } 4569 }
4482 if (createTime != null) { 4570 if (createTime != null) {
(...skipping 11 matching lines...) Expand all
4494 if (selfLink != null) { 4582 if (selfLink != null) {
4495 _json["selfLink"] = selfLink; 4583 _json["selfLink"] = selfLink;
4496 } 4584 }
4497 if (sha1Fingerprint != null) { 4585 if (sha1Fingerprint != null) {
4498 _json["sha1Fingerprint"] = sha1Fingerprint; 4586 _json["sha1Fingerprint"] = sha1Fingerprint;
4499 } 4587 }
4500 return _json; 4588 return _json;
4501 } 4589 }
4502 } 4590 }
4503 4591
4504 /** SslCertDetail. */ 4592 /// SslCertDetail.
4505 class SslCertDetail { 4593 class SslCertDetail {
4506 /** The public information about the cert. */ 4594 /// The public information about the cert.
4507 SslCert certInfo; 4595 SslCert certInfo;
4508 /** 4596
4509 * The private key for the client cert, in pem format. Keep private in order 4597 /// The private key for the client cert, in pem format. Keep private in order
4510 * to protect your security. 4598 /// to protect your security.
4511 */
4512 core.String certPrivateKey; 4599 core.String certPrivateKey;
4513 4600
4514 SslCertDetail(); 4601 SslCertDetail();
4515 4602
4516 SslCertDetail.fromJson(core.Map _json) { 4603 SslCertDetail.fromJson(core.Map _json) {
4517 if (_json.containsKey("certInfo")) { 4604 if (_json.containsKey("certInfo")) {
4518 certInfo = new SslCert.fromJson(_json["certInfo"]); 4605 certInfo = new SslCert.fromJson(_json["certInfo"]);
4519 } 4606 }
4520 if (_json.containsKey("certPrivateKey")) { 4607 if (_json.containsKey("certPrivateKey")) {
4521 certPrivateKey = _json["certPrivateKey"]; 4608 certPrivateKey = _json["certPrivateKey"];
4522 } 4609 }
4523 } 4610 }
4524 4611
4525 core.Map<core.String, core.Object> toJson() { 4612 core.Map<core.String, core.Object> toJson() {
4526 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 4613 final core.Map<core.String, core.Object> _json =
4614 new core.Map<core.String, core.Object>();
4527 if (certInfo != null) { 4615 if (certInfo != null) {
4528 _json["certInfo"] = (certInfo).toJson(); 4616 _json["certInfo"] = (certInfo).toJson();
4529 } 4617 }
4530 if (certPrivateKey != null) { 4618 if (certPrivateKey != null) {
4531 _json["certPrivateKey"] = certPrivateKey; 4619 _json["certPrivateKey"] = certPrivateKey;
4532 } 4620 }
4533 return _json; 4621 return _json;
4534 } 4622 }
4535 } 4623 }
4536 4624
4537 /** SslCerts create ephemeral certificate request. */ 4625 /// SslCerts create ephemeral certificate request.
4538 class SslCertsCreateEphemeralRequest { 4626 class SslCertsCreateEphemeralRequest {
4539 /** PEM encoded public key to include in the signed certificate. */ 4627 /// PEM encoded public key to include in the signed certificate.
4540 core.String publicKey; 4628 core.String publicKey;
4541 4629
4542 SslCertsCreateEphemeralRequest(); 4630 SslCertsCreateEphemeralRequest();
4543 4631
4544 SslCertsCreateEphemeralRequest.fromJson(core.Map _json) { 4632 SslCertsCreateEphemeralRequest.fromJson(core.Map _json) {
4545 if (_json.containsKey("public_key")) { 4633 if (_json.containsKey("public_key")) {
4546 publicKey = _json["public_key"]; 4634 publicKey = _json["public_key"];
4547 } 4635 }
4548 } 4636 }
4549 4637
4550 core.Map<core.String, core.Object> toJson() { 4638 core.Map<core.String, core.Object> toJson() {
4551 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 4639 final core.Map<core.String, core.Object> _json =
4640 new core.Map<core.String, core.Object>();
4552 if (publicKey != null) { 4641 if (publicKey != null) {
4553 _json["public_key"] = publicKey; 4642 _json["public_key"] = publicKey;
4554 } 4643 }
4555 return _json; 4644 return _json;
4556 } 4645 }
4557 } 4646 }
4558 4647
4559 /** SslCerts insert request. */ 4648 /// SslCerts insert request.
4560 class SslCertsInsertRequest { 4649 class SslCertsInsertRequest {
4561 /** 4650 /// User supplied name. Must be a distinct name from the other certificates
4562 * User supplied name. Must be a distinct name from the other certificates for 4651 /// for this instance. New certificates will not be usable until the instance
4563 * this instance. New certificates will not be usable until the instance is 4652 /// is restarted.
4564 * restarted.
4565 */
4566 core.String commonName; 4653 core.String commonName;
4567 4654
4568 SslCertsInsertRequest(); 4655 SslCertsInsertRequest();
4569 4656
4570 SslCertsInsertRequest.fromJson(core.Map _json) { 4657 SslCertsInsertRequest.fromJson(core.Map _json) {
4571 if (_json.containsKey("commonName")) { 4658 if (_json.containsKey("commonName")) {
4572 commonName = _json["commonName"]; 4659 commonName = _json["commonName"];
4573 } 4660 }
4574 } 4661 }
4575 4662
4576 core.Map<core.String, core.Object> toJson() { 4663 core.Map<core.String, core.Object> toJson() {
4577 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 4664 final core.Map<core.String, core.Object> _json =
4665 new core.Map<core.String, core.Object>();
4578 if (commonName != null) { 4666 if (commonName != null) {
4579 _json["commonName"] = commonName; 4667 _json["commonName"] = commonName;
4580 } 4668 }
4581 return _json; 4669 return _json;
4582 } 4670 }
4583 } 4671 }
4584 4672
4585 /** SslCert insert response. */ 4673 /// SslCert insert response.
4586 class SslCertsInsertResponse { 4674 class SslCertsInsertResponse {
4587 /** 4675 /// The new client certificate and private key. The new certificate will not
4588 * The new client certificate and private key. The new certificate will not 4676 /// work until the instance is restarted for First Generation instances.
4589 * work until the instance is restarted for First Generation instances.
4590 */
4591 SslCertDetail clientCert; 4677 SslCertDetail clientCert;
4592 /** This is always sql#sslCertsInsert. */ 4678
4679 /// This is always sql#sslCertsInsert.
4593 core.String kind; 4680 core.String kind;
4594 /** The operation to track the ssl certs insert request. */ 4681
4682 /// The operation to track the ssl certs insert request.
4595 Operation operation; 4683 Operation operation;
4596 /** 4684
4597 * The server Certificate Authority's certificate. If this is missing you can 4685 /// The server Certificate Authority's certificate. If this is missing you
4598 * force a new one to be generated by calling resetSslConfig method on 4686 /// can force a new one to be generated by calling resetSslConfig method on
4599 * instances resource. 4687 /// instances resource.
4600 */
4601 SslCert serverCaCert; 4688 SslCert serverCaCert;
4602 4689
4603 SslCertsInsertResponse(); 4690 SslCertsInsertResponse();
4604 4691
4605 SslCertsInsertResponse.fromJson(core.Map _json) { 4692 SslCertsInsertResponse.fromJson(core.Map _json) {
4606 if (_json.containsKey("clientCert")) { 4693 if (_json.containsKey("clientCert")) {
4607 clientCert = new SslCertDetail.fromJson(_json["clientCert"]); 4694 clientCert = new SslCertDetail.fromJson(_json["clientCert"]);
4608 } 4695 }
4609 if (_json.containsKey("kind")) { 4696 if (_json.containsKey("kind")) {
4610 kind = _json["kind"]; 4697 kind = _json["kind"];
4611 } 4698 }
4612 if (_json.containsKey("operation")) { 4699 if (_json.containsKey("operation")) {
4613 operation = new Operation.fromJson(_json["operation"]); 4700 operation = new Operation.fromJson(_json["operation"]);
4614 } 4701 }
4615 if (_json.containsKey("serverCaCert")) { 4702 if (_json.containsKey("serverCaCert")) {
4616 serverCaCert = new SslCert.fromJson(_json["serverCaCert"]); 4703 serverCaCert = new SslCert.fromJson(_json["serverCaCert"]);
4617 } 4704 }
4618 } 4705 }
4619 4706
4620 core.Map<core.String, core.Object> toJson() { 4707 core.Map<core.String, core.Object> toJson() {
4621 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 4708 final core.Map<core.String, core.Object> _json =
4709 new core.Map<core.String, core.Object>();
4622 if (clientCert != null) { 4710 if (clientCert != null) {
4623 _json["clientCert"] = (clientCert).toJson(); 4711 _json["clientCert"] = (clientCert).toJson();
4624 } 4712 }
4625 if (kind != null) { 4713 if (kind != null) {
4626 _json["kind"] = kind; 4714 _json["kind"] = kind;
4627 } 4715 }
4628 if (operation != null) { 4716 if (operation != null) {
4629 _json["operation"] = (operation).toJson(); 4717 _json["operation"] = (operation).toJson();
4630 } 4718 }
4631 if (serverCaCert != null) { 4719 if (serverCaCert != null) {
4632 _json["serverCaCert"] = (serverCaCert).toJson(); 4720 _json["serverCaCert"] = (serverCaCert).toJson();
4633 } 4721 }
4634 return _json; 4722 return _json;
4635 } 4723 }
4636 } 4724 }
4637 4725
4638 /** SslCerts list response. */ 4726 /// SslCerts list response.
4639 class SslCertsListResponse { 4727 class SslCertsListResponse {
4640 /** List of client certificates for the instance. */ 4728 /// List of client certificates for the instance.
4641 core.List<SslCert> items; 4729 core.List<SslCert> items;
4642 /** This is always sql#sslCertsList. */ 4730
4731 /// This is always sql#sslCertsList.
4643 core.String kind; 4732 core.String kind;
4644 4733
4645 SslCertsListResponse(); 4734 SslCertsListResponse();
4646 4735
4647 SslCertsListResponse.fromJson(core.Map _json) { 4736 SslCertsListResponse.fromJson(core.Map _json) {
4648 if (_json.containsKey("items")) { 4737 if (_json.containsKey("items")) {
4649 items = _json["items"].map((value) => new SslCert.fromJson(value)).toList( ); 4738 items =
4739 _json["items"].map((value) => new SslCert.fromJson(value)).toList();
4650 } 4740 }
4651 if (_json.containsKey("kind")) { 4741 if (_json.containsKey("kind")) {
4652 kind = _json["kind"]; 4742 kind = _json["kind"];
4653 } 4743 }
4654 } 4744 }
4655 4745
4656 core.Map<core.String, core.Object> toJson() { 4746 core.Map<core.String, core.Object> toJson() {
4657 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 4747 final core.Map<core.String, core.Object> _json =
4748 new core.Map<core.String, core.Object>();
4658 if (items != null) { 4749 if (items != null) {
4659 _json["items"] = items.map((value) => (value).toJson()).toList(); 4750 _json["items"] = items.map((value) => (value).toJson()).toList();
4660 } 4751 }
4661 if (kind != null) { 4752 if (kind != null) {
4662 _json["kind"] = kind; 4753 _json["kind"] = kind;
4663 } 4754 }
4664 return _json; 4755 return _json;
4665 } 4756 }
4666 } 4757 }
4667 4758
4668 /** A Google Cloud SQL service tier resource. */ 4759 /// A Google Cloud SQL service tier resource.
4669 class Tier { 4760 class Tier {
4670 /** The maximum disk size of this tier in bytes. */ 4761 /// The maximum disk size of this tier in bytes.
4671 core.String DiskQuota; 4762 core.String DiskQuota;
4672 /** The maximum RAM usage of this tier in bytes. */ 4763
4764 /// The maximum RAM usage of this tier in bytes.
4673 core.String RAM; 4765 core.String RAM;
4674 /** This is always sql#tier. */ 4766
4767 /// This is always sql#tier.
4675 core.String kind; 4768 core.String kind;
4676 /** The applicable regions for this tier. */ 4769
4770 /// The applicable regions for this tier.
4677 core.List<core.String> region; 4771 core.List<core.String> region;
4678 /** 4772
4679 * An identifier for the service tier, for example D1, D2 etc. For related 4773 /// An identifier for the service tier, for example D1, D2 etc. For related
4680 * information, see Pricing. 4774 /// information, see Pricing.
4681 */
4682 core.String tier; 4775 core.String tier;
4683 4776
4684 Tier(); 4777 Tier();
4685 4778
4686 Tier.fromJson(core.Map _json) { 4779 Tier.fromJson(core.Map _json) {
4687 if (_json.containsKey("DiskQuota")) { 4780 if (_json.containsKey("DiskQuota")) {
4688 DiskQuota = _json["DiskQuota"]; 4781 DiskQuota = _json["DiskQuota"];
4689 } 4782 }
4690 if (_json.containsKey("RAM")) { 4783 if (_json.containsKey("RAM")) {
4691 RAM = _json["RAM"]; 4784 RAM = _json["RAM"];
4692 } 4785 }
4693 if (_json.containsKey("kind")) { 4786 if (_json.containsKey("kind")) {
4694 kind = _json["kind"]; 4787 kind = _json["kind"];
4695 } 4788 }
4696 if (_json.containsKey("region")) { 4789 if (_json.containsKey("region")) {
4697 region = _json["region"]; 4790 region = _json["region"];
4698 } 4791 }
4699 if (_json.containsKey("tier")) { 4792 if (_json.containsKey("tier")) {
4700 tier = _json["tier"]; 4793 tier = _json["tier"];
4701 } 4794 }
4702 } 4795 }
4703 4796
4704 core.Map<core.String, core.Object> toJson() { 4797 core.Map<core.String, core.Object> toJson() {
4705 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 4798 final core.Map<core.String, core.Object> _json =
4799 new core.Map<core.String, core.Object>();
4706 if (DiskQuota != null) { 4800 if (DiskQuota != null) {
4707 _json["DiskQuota"] = DiskQuota; 4801 _json["DiskQuota"] = DiskQuota;
4708 } 4802 }
4709 if (RAM != null) { 4803 if (RAM != null) {
4710 _json["RAM"] = RAM; 4804 _json["RAM"] = RAM;
4711 } 4805 }
4712 if (kind != null) { 4806 if (kind != null) {
4713 _json["kind"] = kind; 4807 _json["kind"] = kind;
4714 } 4808 }
4715 if (region != null) { 4809 if (region != null) {
4716 _json["region"] = region; 4810 _json["region"] = region;
4717 } 4811 }
4718 if (tier != null) { 4812 if (tier != null) {
4719 _json["tier"] = tier; 4813 _json["tier"] = tier;
4720 } 4814 }
4721 return _json; 4815 return _json;
4722 } 4816 }
4723 } 4817 }
4724 4818
4725 /** Tiers list response. */ 4819 /// Tiers list response.
4726 class TiersListResponse { 4820 class TiersListResponse {
4727 /** List of tiers. */ 4821 /// List of tiers.
4728 core.List<Tier> items; 4822 core.List<Tier> items;
4729 /** This is always sql#tiersList. */ 4823
4824 /// This is always sql#tiersList.
4730 core.String kind; 4825 core.String kind;
4731 4826
4732 TiersListResponse(); 4827 TiersListResponse();
4733 4828
4734 TiersListResponse.fromJson(core.Map _json) { 4829 TiersListResponse.fromJson(core.Map _json) {
4735 if (_json.containsKey("items")) { 4830 if (_json.containsKey("items")) {
4736 items = _json["items"].map((value) => new Tier.fromJson(value)).toList(); 4831 items = _json["items"].map((value) => new Tier.fromJson(value)).toList();
4737 } 4832 }
4738 if (_json.containsKey("kind")) { 4833 if (_json.containsKey("kind")) {
4739 kind = _json["kind"]; 4834 kind = _json["kind"];
4740 } 4835 }
4741 } 4836 }
4742 4837
4743 core.Map<core.String, core.Object> toJson() { 4838 core.Map<core.String, core.Object> toJson() {
4744 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 4839 final core.Map<core.String, core.Object> _json =
4840 new core.Map<core.String, core.Object>();
4745 if (items != null) { 4841 if (items != null) {
4746 _json["items"] = items.map((value) => (value).toJson()).toList(); 4842 _json["items"] = items.map((value) => (value).toJson()).toList();
4747 } 4843 }
4748 if (kind != null) { 4844 if (kind != null) {
4749 _json["kind"] = kind; 4845 _json["kind"] = kind;
4750 } 4846 }
4751 return _json; 4847 return _json;
4752 } 4848 }
4753 } 4849 }
4754 4850
4755 /** Database Instance truncate log context. */ 4851 /// Database Instance truncate log context.
4756 class TruncateLogContext { 4852 class TruncateLogContext {
4757 /** This is always sql#truncateLogContext. */ 4853 /// This is always sql#truncateLogContext.
4758 core.String kind; 4854 core.String kind;
4759 /** 4855
4760 * The type of log to truncate. Valid values are MYSQL_GENERAL_TABLE and 4856 /// The type of log to truncate. Valid values are MYSQL_GENERAL_TABLE and
4761 * MYSQL_SLOW_TABLE. 4857 /// MYSQL_SLOW_TABLE.
4762 */
4763 core.String logType; 4858 core.String logType;
4764 4859
4765 TruncateLogContext(); 4860 TruncateLogContext();
4766 4861
4767 TruncateLogContext.fromJson(core.Map _json) { 4862 TruncateLogContext.fromJson(core.Map _json) {
4768 if (_json.containsKey("kind")) { 4863 if (_json.containsKey("kind")) {
4769 kind = _json["kind"]; 4864 kind = _json["kind"];
4770 } 4865 }
4771 if (_json.containsKey("logType")) { 4866 if (_json.containsKey("logType")) {
4772 logType = _json["logType"]; 4867 logType = _json["logType"];
4773 } 4868 }
4774 } 4869 }
4775 4870
4776 core.Map<core.String, core.Object> toJson() { 4871 core.Map<core.String, core.Object> toJson() {
4777 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 4872 final core.Map<core.String, core.Object> _json =
4873 new core.Map<core.String, core.Object>();
4778 if (kind != null) { 4874 if (kind != null) {
4779 _json["kind"] = kind; 4875 _json["kind"] = kind;
4780 } 4876 }
4781 if (logType != null) { 4877 if (logType != null) {
4782 _json["logType"] = logType; 4878 _json["logType"] = logType;
4783 } 4879 }
4784 return _json; 4880 return _json;
4785 } 4881 }
4786 } 4882 }
4787 4883
4788 /** A Cloud SQL user resource. */ 4884 /// A Cloud SQL user resource.
4789 class User { 4885 class User {
4790 /** HTTP 1.1 Entity tag for the resource. */ 4886 /// HTTP 1.1 Entity tag for the resource.
4791 core.String etag; 4887 core.String etag;
4792 /** 4888
4793 * The host name from which the user can connect. For insert operations, host 4889 /// The host name from which the user can connect. For insert operations,
4794 * defaults to an empty string. For update operations, host is specified as 4890 /// host defaults to an empty string. For update operations, host is
4795 * part of the request URL. The host name cannot be updated after insertion. 4891 /// specified as part of the request URL. The host name cannot be updated
4796 */ 4892 /// after insertion.
4797 core.String host; 4893 core.String host;
4798 /** 4894
4799 * The name of the Cloud SQL instance. This does not include the project ID. 4895 /// The name of the Cloud SQL instance. This does not include the project ID.
4800 * Can be omitted for update since it is already specified on the URL. 4896 /// Can be omitted for update since it is already specified on the URL.
4801 */
4802 core.String instance; 4897 core.String instance;
4803 /** This is always sql#user. */ 4898
4899 /// This is always sql#user.
4804 core.String kind; 4900 core.String kind;
4805 /** 4901
4806 * The name of the user in the Cloud SQL instance. Can be omitted for update 4902 /// The name of the user in the Cloud SQL instance. Can be omitted for update
4807 * since it is already specified on the URL. 4903 /// since it is already specified on the URL.
4808 */
4809 core.String name; 4904 core.String name;
4810 /** The password for the user. */ 4905
4906 /// The password for the user.
4811 core.String password; 4907 core.String password;
4812 /** 4908
4813 * The project ID of the project containing the Cloud SQL database. The Google 4909 /// The project ID of the project containing the Cloud SQL database. The
4814 * apps domain is prefixed if applicable. Can be omitted for update since it 4910 /// Google apps domain is prefixed if applicable. Can be omitted for update
4815 * is already specified on the URL. 4911 /// since it is already specified on the URL.
4816 */
4817 core.String project; 4912 core.String project;
4818 4913
4819 User(); 4914 User();
4820 4915
4821 User.fromJson(core.Map _json) { 4916 User.fromJson(core.Map _json) {
4822 if (_json.containsKey("etag")) { 4917 if (_json.containsKey("etag")) {
4823 etag = _json["etag"]; 4918 etag = _json["etag"];
4824 } 4919 }
4825 if (_json.containsKey("host")) { 4920 if (_json.containsKey("host")) {
4826 host = _json["host"]; 4921 host = _json["host"];
4827 } 4922 }
4828 if (_json.containsKey("instance")) { 4923 if (_json.containsKey("instance")) {
4829 instance = _json["instance"]; 4924 instance = _json["instance"];
4830 } 4925 }
4831 if (_json.containsKey("kind")) { 4926 if (_json.containsKey("kind")) {
4832 kind = _json["kind"]; 4927 kind = _json["kind"];
4833 } 4928 }
4834 if (_json.containsKey("name")) { 4929 if (_json.containsKey("name")) {
4835 name = _json["name"]; 4930 name = _json["name"];
4836 } 4931 }
4837 if (_json.containsKey("password")) { 4932 if (_json.containsKey("password")) {
4838 password = _json["password"]; 4933 password = _json["password"];
4839 } 4934 }
4840 if (_json.containsKey("project")) { 4935 if (_json.containsKey("project")) {
4841 project = _json["project"]; 4936 project = _json["project"];
4842 } 4937 }
4843 } 4938 }
4844 4939
4845 core.Map<core.String, core.Object> toJson() { 4940 core.Map<core.String, core.Object> toJson() {
4846 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 4941 final core.Map<core.String, core.Object> _json =
4942 new core.Map<core.String, core.Object>();
4847 if (etag != null) { 4943 if (etag != null) {
4848 _json["etag"] = etag; 4944 _json["etag"] = etag;
4849 } 4945 }
4850 if (host != null) { 4946 if (host != null) {
4851 _json["host"] = host; 4947 _json["host"] = host;
4852 } 4948 }
4853 if (instance != null) { 4949 if (instance != null) {
4854 _json["instance"] = instance; 4950 _json["instance"] = instance;
4855 } 4951 }
4856 if (kind != null) { 4952 if (kind != null) {
4857 _json["kind"] = kind; 4953 _json["kind"] = kind;
4858 } 4954 }
4859 if (name != null) { 4955 if (name != null) {
4860 _json["name"] = name; 4956 _json["name"] = name;
4861 } 4957 }
4862 if (password != null) { 4958 if (password != null) {
4863 _json["password"] = password; 4959 _json["password"] = password;
4864 } 4960 }
4865 if (project != null) { 4961 if (project != null) {
4866 _json["project"] = project; 4962 _json["project"] = project;
4867 } 4963 }
4868 return _json; 4964 return _json;
4869 } 4965 }
4870 } 4966 }
4871 4967
4872 /** User list response. */ 4968 /// User list response.
4873 class UsersListResponse { 4969 class UsersListResponse {
4874 /** List of user resources in the instance. */ 4970 /// List of user resources in the instance.
4875 core.List<User> items; 4971 core.List<User> items;
4876 /** This is always sql#usersList. */ 4972
4973 /// This is always sql#usersList.
4877 core.String kind; 4974 core.String kind;
4878 /** 4975
4879 * An identifier that uniquely identifies the operation. You can use this 4976 /// An identifier that uniquely identifies the operation. You can use this
4880 * identifier to retrieve the Operations resource that has information about 4977 /// identifier to retrieve the Operations resource that has information about
4881 * the operation. 4978 /// the operation.
4882 */
4883 core.String nextPageToken; 4979 core.String nextPageToken;
4884 4980
4885 UsersListResponse(); 4981 UsersListResponse();
4886 4982
4887 UsersListResponse.fromJson(core.Map _json) { 4983 UsersListResponse.fromJson(core.Map _json) {
4888 if (_json.containsKey("items")) { 4984 if (_json.containsKey("items")) {
4889 items = _json["items"].map((value) => new User.fromJson(value)).toList(); 4985 items = _json["items"].map((value) => new User.fromJson(value)).toList();
4890 } 4986 }
4891 if (_json.containsKey("kind")) { 4987 if (_json.containsKey("kind")) {
4892 kind = _json["kind"]; 4988 kind = _json["kind"];
4893 } 4989 }
4894 if (_json.containsKey("nextPageToken")) { 4990 if (_json.containsKey("nextPageToken")) {
4895 nextPageToken = _json["nextPageToken"]; 4991 nextPageToken = _json["nextPageToken"];
4896 } 4992 }
4897 } 4993 }
4898 4994
4899 core.Map<core.String, core.Object> toJson() { 4995 core.Map<core.String, core.Object> toJson() {
4900 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 4996 final core.Map<core.String, core.Object> _json =
4997 new core.Map<core.String, core.Object>();
4901 if (items != null) { 4998 if (items != null) {
4902 _json["items"] = items.map((value) => (value).toJson()).toList(); 4999 _json["items"] = items.map((value) => (value).toJson()).toList();
4903 } 5000 }
4904 if (kind != null) { 5001 if (kind != null) {
4905 _json["kind"] = kind; 5002 _json["kind"] = kind;
4906 } 5003 }
4907 if (nextPageToken != null) { 5004 if (nextPageToken != null) {
4908 _json["nextPageToken"] = nextPageToken; 5005 _json["nextPageToken"] = nextPageToken;
4909 } 5006 }
4910 return _json; 5007 return _json;
4911 } 5008 }
4912 } 5009 }
OLDNEW
« no previous file with comments | « generated/googleapis_beta/lib/sqladmin/v1beta3.dart ('k') | generated/googleapis_beta/lib/taskqueue/v1beta2.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698