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

Side by Side Diff: generated/googleapis_beta/lib/sqladmin/v1beta3.dart

Issue 1078053002: Roll of googleapis as of 4/7/2015. (Closed) Base URL: https://github.com/dart-lang/googleapis.git@master
Patch Set: Created 5 years, 8 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).
2
1 library googleapis_beta.sqladmin.v1beta3; 3 library googleapis_beta.sqladmin.v1beta3;
2 4
3 import "dart:core" as core; 5 import 'dart:core' as core;
4 import "dart:collection" as collection; 6 import 'dart:collection' as collection;
5 import "dart:async" as async; 7 import 'dart:async' as async;
6 import "dart:convert" as convert; 8 import 'dart:convert' as convert;
7 9
8 import "package:crypto/crypto.dart" as crypto; 10 import 'package:_discoveryapis_commons/_discoveryapis_commons.dart' as commons;
11 import 'package:crypto/crypto.dart' as crypto;
9 import 'package:http/http.dart' as http; 12 import 'package:http/http.dart' as http;
10 import '../src/common_internal.dart' as common_internal;
11 import '../common/common.dart' as common;
12 13
13 export '../common/common.dart' show ApiRequestError; 14 export 'package:_discoveryapis_commons/_discoveryapis_commons.dart' show
14 export '../common/common.dart' show DetailedApiRequestError; 15 ApiRequestError, DetailedApiRequestError;
16
17 const core.String USER_AGENT = 'dart-api-client sqladmin/v1beta3';
15 18
16 /** API for Cloud SQL database instance management. */ 19 /** API for Cloud SQL database instance management. */
17 class SqladminApi { 20 class SqladminApi {
18 /** View and manage your data across Google Cloud Platform services */ 21 /** View and manage your data across Google Cloud Platform services */
19 static const CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platf orm"; 22 static const CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platf orm";
20 23
21 /** Manage your Google SQL Service instances */ 24 /** Manage your Google SQL Service instances */
22 static const SqlserviceAdminScope = "https://www.googleapis.com/auth/sqlservic e.admin"; 25 static const SqlserviceAdminScope = "https://www.googleapis.com/auth/sqlservic e.admin";
23 26
24 27
25 final common_internal.ApiRequester _requester; 28 final commons.ApiRequester _requester;
26 29
27 BackupRunsResourceApi get backupRuns => new BackupRunsResourceApi(_requester); 30 BackupRunsResourceApi get backupRuns => new BackupRunsResourceApi(_requester);
28 FlagsResourceApi get flags => new FlagsResourceApi(_requester); 31 FlagsResourceApi get flags => new FlagsResourceApi(_requester);
29 InstancesResourceApi get instances => new InstancesResourceApi(_requester); 32 InstancesResourceApi get instances => new InstancesResourceApi(_requester);
30 OperationsResourceApi get operations => new OperationsResourceApi(_requester); 33 OperationsResourceApi get operations => new OperationsResourceApi(_requester);
31 SslCertsResourceApi get sslCerts => new SslCertsResourceApi(_requester); 34 SslCertsResourceApi get sslCerts => new SslCertsResourceApi(_requester);
32 TiersResourceApi get tiers => new TiersResourceApi(_requester); 35 TiersResourceApi get tiers => new TiersResourceApi(_requester);
33 36
34 SqladminApi(http.Client client, {core.String rootUrl: "https://www.googleapis. com/", core.String servicePath: "sql/v1beta3/"}) : 37 SqladminApi(http.Client client, {core.String rootUrl: "https://www.googleapis. com/", core.String servicePath: "sql/v1beta3/"}) :
35 _requester = new common_internal.ApiRequester(client, rootUrl, servicePath ); 38 _requester = new commons.ApiRequester(client, rootUrl, servicePath, USER_A GENT);
36 } 39 }
37 40
38 41
39 /** Not documented yet. */
40 class BackupRunsResourceApi { 42 class BackupRunsResourceApi {
41 final common_internal.ApiRequester _requester; 43 final commons.ApiRequester _requester;
42 44
43 BackupRunsResourceApi(common_internal.ApiRequester client) : 45 BackupRunsResourceApi(commons.ApiRequester client) :
44 _requester = client; 46 _requester = client;
45 47
46 /** 48 /**
47 * Retrieves information about a specified backup run for a Cloud SQL 49 * Retrieves information about a specified backup run for a Cloud SQL
48 * instance. 50 * instance.
49 * 51 *
50 * Request parameters: 52 * Request parameters:
51 * 53 *
52 * [project] - Project ID of the project that contains the instance. 54 * [project] - Project ID of the project that contains the instance.
53 * 55 *
54 * [instance] - Cloud SQL instance ID. This does not include the project ID. 56 * [instance] - Cloud SQL instance ID. This does not include the project ID.
55 * 57 *
56 * [backupConfiguration] - Identifier for the backup configuration. This gets 58 * [backupConfiguration] - Identifier for the backup configuration. This gets
57 * generated automatically when a backup configuration is created. 59 * generated automatically when a backup configuration is created.
58 * 60 *
59 * [dueTime] - The start time of the four-hour backup window. The backup can 61 * [dueTime] - The start time of the four-hour backup window. The backup can
60 * occur any time in the window. The time is in RFC 3339 format, for example 62 * occur any time in the window. The time is in RFC 3339 format, for example
61 * 2012-11-15T16:19:00.094Z. 63 * 2012-11-15T16:19:00.094Z.
62 * 64 *
63 * Completes with a [BackupRun]. 65 * Completes with a [BackupRun].
64 * 66 *
65 * Completes with a [common.ApiRequestError] if the API endpoint returned an 67 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
66 * error. 68 * error.
67 * 69 *
68 * If the used [http.Client] completes with an error when making a REST call, 70 * If the used [http.Client] completes with an error when making a REST call,
69 * this method will complete with the same error. 71 * this method will complete with the same error.
70 */ 72 */
71 async.Future<BackupRun> get(core.String project, core.String instance, core.St ring backupConfiguration, core.String dueTime) { 73 async.Future<BackupRun> get(core.String project, core.String instance, core.St ring backupConfiguration, core.String dueTime) {
72 var _url = null; 74 var _url = null;
73 var _queryParams = new core.Map(); 75 var _queryParams = new core.Map();
74 var _uploadMedia = null; 76 var _uploadMedia = null;
75 var _uploadOptions = null; 77 var _uploadOptions = null;
76 var _downloadOptions = common.DownloadOptions.Metadata; 78 var _downloadOptions = commons.DownloadOptions.Metadata;
77 var _body = null; 79 var _body = null;
78 80
79 if (project == null) { 81 if (project == null) {
80 throw new core.ArgumentError("Parameter project is required."); 82 throw new core.ArgumentError("Parameter project is required.");
81 } 83 }
82 if (instance == null) { 84 if (instance == null) {
83 throw new core.ArgumentError("Parameter instance is required."); 85 throw new core.ArgumentError("Parameter instance is required.");
84 } 86 }
85 if (backupConfiguration == null) { 87 if (backupConfiguration == null) {
86 throw new core.ArgumentError("Parameter backupConfiguration is required.") ; 88 throw new core.ArgumentError("Parameter backupConfiguration is required.") ;
87 } 89 }
88 if (dueTime == null) { 90 if (dueTime == null) {
89 throw new core.ArgumentError("Parameter dueTime is required."); 91 throw new core.ArgumentError("Parameter dueTime is required.");
90 } 92 }
91 _queryParams["dueTime"] = [dueTime]; 93 _queryParams["dueTime"] = [dueTime];
92 94
93 95
94 _url = 'projects/' + common_internal.Escaper.ecapeVariable('$project') + '/i nstances/' + common_internal.Escaper.ecapeVariable('$instance') + '/backupRuns/' + common_internal.Escaper.ecapeVariable('$backupConfiguration'); 96 _url = 'projects/' + commons.Escaper.ecapeVariable('$project') + '/instances /' + commons.Escaper.ecapeVariable('$instance') + '/backupRuns/' + commons.Escap er.ecapeVariable('$backupConfiguration');
95 97
96 var _response = _requester.request(_url, 98 var _response = _requester.request(_url,
97 "GET", 99 "GET",
98 body: _body, 100 body: _body,
99 queryParams: _queryParams, 101 queryParams: _queryParams,
100 uploadOptions: _uploadOptions, 102 uploadOptions: _uploadOptions,
101 uploadMedia: _uploadMedia, 103 uploadMedia: _uploadMedia,
102 downloadOptions: _downloadOptions); 104 downloadOptions: _downloadOptions);
103 return _response.then((data) => new BackupRun.fromJson(data)); 105 return _response.then((data) => new BackupRun.fromJson(data));
104 } 106 }
(...skipping 10 matching lines...) Expand all
115 * [backupConfiguration] - Identifier for the backup configuration. This gets 117 * [backupConfiguration] - Identifier for the backup configuration. This gets
116 * generated automatically when a backup configuration is created. 118 * generated automatically when a backup configuration is created.
117 * 119 *
118 * [maxResults] - Maximum number of backup runs per response. 120 * [maxResults] - Maximum number of backup runs per response.
119 * 121 *
120 * [pageToken] - A previously-returned page token representing part of the 122 * [pageToken] - A previously-returned page token representing part of the
121 * larger set of results to view. 123 * larger set of results to view.
122 * 124 *
123 * Completes with a [BackupRunsListResponse]. 125 * Completes with a [BackupRunsListResponse].
124 * 126 *
125 * Completes with a [common.ApiRequestError] if the API endpoint returned an 127 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
126 * error. 128 * error.
127 * 129 *
128 * If the used [http.Client] completes with an error when making a REST call, 130 * If the used [http.Client] completes with an error when making a REST call,
129 * this method will complete with the same error. 131 * this method will complete with the same error.
130 */ 132 */
131 async.Future<BackupRunsListResponse> list(core.String project, core.String ins tance, core.String backupConfiguration, {core.int maxResults, core.String pageTo ken}) { 133 async.Future<BackupRunsListResponse> list(core.String project, core.String ins tance, core.String backupConfiguration, {core.int maxResults, core.String pageTo ken}) {
132 var _url = null; 134 var _url = null;
133 var _queryParams = new core.Map(); 135 var _queryParams = new core.Map();
134 var _uploadMedia = null; 136 var _uploadMedia = null;
135 var _uploadOptions = null; 137 var _uploadOptions = null;
136 var _downloadOptions = common.DownloadOptions.Metadata; 138 var _downloadOptions = commons.DownloadOptions.Metadata;
137 var _body = null; 139 var _body = null;
138 140
139 if (project == null) { 141 if (project == null) {
140 throw new core.ArgumentError("Parameter project is required."); 142 throw new core.ArgumentError("Parameter project is required.");
141 } 143 }
142 if (instance == null) { 144 if (instance == null) {
143 throw new core.ArgumentError("Parameter instance is required."); 145 throw new core.ArgumentError("Parameter instance is required.");
144 } 146 }
145 if (backupConfiguration == null) { 147 if (backupConfiguration == null) {
146 throw new core.ArgumentError("Parameter backupConfiguration is required.") ; 148 throw new core.ArgumentError("Parameter backupConfiguration is required.") ;
147 } 149 }
148 _queryParams["backupConfiguration"] = [backupConfiguration]; 150 _queryParams["backupConfiguration"] = [backupConfiguration];
149 if (maxResults != null) { 151 if (maxResults != null) {
150 _queryParams["maxResults"] = ["${maxResults}"]; 152 _queryParams["maxResults"] = ["${maxResults}"];
151 } 153 }
152 if (pageToken != null) { 154 if (pageToken != null) {
153 _queryParams["pageToken"] = [pageToken]; 155 _queryParams["pageToken"] = [pageToken];
154 } 156 }
155 157
156 158
157 _url = 'projects/' + common_internal.Escaper.ecapeVariable('$project') + '/i nstances/' + common_internal.Escaper.ecapeVariable('$instance') + '/backupRuns'; 159 _url = 'projects/' + commons.Escaper.ecapeVariable('$project') + '/instances /' + commons.Escaper.ecapeVariable('$instance') + '/backupRuns';
158 160
159 var _response = _requester.request(_url, 161 var _response = _requester.request(_url,
160 "GET", 162 "GET",
161 body: _body, 163 body: _body,
162 queryParams: _queryParams, 164 queryParams: _queryParams,
163 uploadOptions: _uploadOptions, 165 uploadOptions: _uploadOptions,
164 uploadMedia: _uploadMedia, 166 uploadMedia: _uploadMedia,
165 downloadOptions: _downloadOptions); 167 downloadOptions: _downloadOptions);
166 return _response.then((data) => new BackupRunsListResponse.fromJson(data)); 168 return _response.then((data) => new BackupRunsListResponse.fromJson(data));
167 } 169 }
168 170
169 } 171 }
170 172
171 173
172 /** Not documented yet. */
173 class FlagsResourceApi { 174 class FlagsResourceApi {
174 final common_internal.ApiRequester _requester; 175 final commons.ApiRequester _requester;
175 176
176 FlagsResourceApi(common_internal.ApiRequester client) : 177 FlagsResourceApi(commons.ApiRequester client) :
177 _requester = client; 178 _requester = client;
178 179
179 /** 180 /**
180 * Lists all database flags that can be set for Google Cloud SQL instances. 181 * Lists all database flags that can be set for Google Cloud SQL instances.
181 * 182 *
182 * Request parameters: 183 * Request parameters:
183 * 184 *
184 * Completes with a [FlagsListResponse]. 185 * Completes with a [FlagsListResponse].
185 * 186 *
186 * Completes with a [common.ApiRequestError] if the API endpoint returned an 187 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
187 * error. 188 * error.
188 * 189 *
189 * If the used [http.Client] completes with an error when making a REST call, 190 * If the used [http.Client] completes with an error when making a REST call,
190 * this method will complete with the same error. 191 * this method will complete with the same error.
191 */ 192 */
192 async.Future<FlagsListResponse> list() { 193 async.Future<FlagsListResponse> list() {
193 var _url = null; 194 var _url = null;
194 var _queryParams = new core.Map(); 195 var _queryParams = new core.Map();
195 var _uploadMedia = null; 196 var _uploadMedia = null;
196 var _uploadOptions = null; 197 var _uploadOptions = null;
197 var _downloadOptions = common.DownloadOptions.Metadata; 198 var _downloadOptions = commons.DownloadOptions.Metadata;
198 var _body = null; 199 var _body = null;
199 200
200 201
201 202
202 _url = 'flags'; 203 _url = 'flags';
203 204
204 var _response = _requester.request(_url, 205 var _response = _requester.request(_url,
205 "GET", 206 "GET",
206 body: _body, 207 body: _body,
207 queryParams: _queryParams, 208 queryParams: _queryParams,
208 uploadOptions: _uploadOptions, 209 uploadOptions: _uploadOptions,
209 uploadMedia: _uploadMedia, 210 uploadMedia: _uploadMedia,
210 downloadOptions: _downloadOptions); 211 downloadOptions: _downloadOptions);
211 return _response.then((data) => new FlagsListResponse.fromJson(data)); 212 return _response.then((data) => new FlagsListResponse.fromJson(data));
212 } 213 }
213 214
214 } 215 }
215 216
216 217
217 /** Not documented yet. */
218 class InstancesResourceApi { 218 class InstancesResourceApi {
219 final common_internal.ApiRequester _requester; 219 final commons.ApiRequester _requester;
220 220
221 InstancesResourceApi(common_internal.ApiRequester client) : 221 InstancesResourceApi(commons.ApiRequester client) :
222 _requester = client; 222 _requester = client;
223 223
224 /** 224 /**
225 * Creates a Cloud SQL instance as a clone of a source instance. 225 * Creates a Cloud SQL instance as a clone of a source instance.
226 * 226 *
227 * [request] - The metadata request object. 227 * [request] - The metadata request object.
228 * 228 *
229 * Request parameters: 229 * Request parameters:
230 * 230 *
231 * [project] - Project ID of the source as well as the clone Cloud SQL 231 * [project] - Project ID of the source as well as the clone Cloud SQL
232 * instance. 232 * instance.
233 * 233 *
234 * Completes with a [InstancesCloneResponse]. 234 * Completes with a [InstancesCloneResponse].
235 * 235 *
236 * Completes with a [common.ApiRequestError] if the API endpoint returned an 236 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
237 * error. 237 * error.
238 * 238 *
239 * If the used [http.Client] completes with an error when making a REST call, 239 * If the used [http.Client] completes with an error when making a REST call,
240 * this method will complete with the same error. 240 * this method will complete with the same error.
241 */ 241 */
242 async.Future<InstancesCloneResponse> clone(InstancesCloneRequest request, core .String project) { 242 async.Future<InstancesCloneResponse> clone(InstancesCloneRequest request, core .String project) {
243 var _url = null; 243 var _url = null;
244 var _queryParams = new core.Map(); 244 var _queryParams = new core.Map();
245 var _uploadMedia = null; 245 var _uploadMedia = null;
246 var _uploadOptions = null; 246 var _uploadOptions = null;
247 var _downloadOptions = common.DownloadOptions.Metadata; 247 var _downloadOptions = commons.DownloadOptions.Metadata;
248 var _body = null; 248 var _body = null;
249 249
250 if (request != null) { 250 if (request != null) {
251 _body = convert.JSON.encode((request).toJson()); 251 _body = convert.JSON.encode((request).toJson());
252 } 252 }
253 if (project == null) { 253 if (project == null) {
254 throw new core.ArgumentError("Parameter project is required."); 254 throw new core.ArgumentError("Parameter project is required.");
255 } 255 }
256 256
257 257
258 _url = 'projects/' + common_internal.Escaper.ecapeVariable('$project') + '/i nstances/clone'; 258 _url = 'projects/' + commons.Escaper.ecapeVariable('$project') + '/instances /clone';
259 259
260 var _response = _requester.request(_url, 260 var _response = _requester.request(_url,
261 "POST", 261 "POST",
262 body: _body, 262 body: _body,
263 queryParams: _queryParams, 263 queryParams: _queryParams,
264 uploadOptions: _uploadOptions, 264 uploadOptions: _uploadOptions,
265 uploadMedia: _uploadMedia, 265 uploadMedia: _uploadMedia,
266 downloadOptions: _downloadOptions); 266 downloadOptions: _downloadOptions);
267 return _response.then((data) => new InstancesCloneResponse.fromJson(data)); 267 return _response.then((data) => new InstancesCloneResponse.fromJson(data));
268 } 268 }
269 269
270 /** 270 /**
271 * Deletes a Cloud SQL instance. 271 * Deletes a Cloud SQL instance.
272 * 272 *
273 * Request parameters: 273 * Request parameters:
274 * 274 *
275 * [project] - Project ID of the project that contains the instance to be 275 * [project] - Project ID of the project that contains the instance to be
276 * deleted. 276 * deleted.
277 * 277 *
278 * [instance] - Cloud SQL instance ID. This does not include the project ID. 278 * [instance] - Cloud SQL instance ID. This does not include the project ID.
279 * 279 *
280 * Completes with a [InstancesDeleteResponse]. 280 * Completes with a [InstancesDeleteResponse].
281 * 281 *
282 * Completes with a [common.ApiRequestError] if the API endpoint returned an 282 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
283 * error. 283 * error.
284 * 284 *
285 * If the used [http.Client] completes with an error when making a REST call, 285 * If the used [http.Client] completes with an error when making a REST call,
286 * this method will complete with the same error. 286 * this method will complete with the same error.
287 */ 287 */
288 async.Future<InstancesDeleteResponse> delete(core.String project, core.String instance) { 288 async.Future<InstancesDeleteResponse> delete(core.String project, core.String instance) {
289 var _url = null; 289 var _url = null;
290 var _queryParams = new core.Map(); 290 var _queryParams = new core.Map();
291 var _uploadMedia = null; 291 var _uploadMedia = null;
292 var _uploadOptions = null; 292 var _uploadOptions = null;
293 var _downloadOptions = common.DownloadOptions.Metadata; 293 var _downloadOptions = commons.DownloadOptions.Metadata;
294 var _body = null; 294 var _body = null;
295 295
296 if (project == null) { 296 if (project == null) {
297 throw new core.ArgumentError("Parameter project is required."); 297 throw new core.ArgumentError("Parameter project is required.");
298 } 298 }
299 if (instance == null) { 299 if (instance == null) {
300 throw new core.ArgumentError("Parameter instance is required."); 300 throw new core.ArgumentError("Parameter instance is required.");
301 } 301 }
302 302
303 303
304 _url = 'projects/' + common_internal.Escaper.ecapeVariable('$project') + '/i nstances/' + common_internal.Escaper.ecapeVariable('$instance'); 304 _url = 'projects/' + commons.Escaper.ecapeVariable('$project') + '/instances /' + commons.Escaper.ecapeVariable('$instance');
305 305
306 var _response = _requester.request(_url, 306 var _response = _requester.request(_url,
307 "DELETE", 307 "DELETE",
308 body: _body, 308 body: _body,
309 queryParams: _queryParams, 309 queryParams: _queryParams,
310 uploadOptions: _uploadOptions, 310 uploadOptions: _uploadOptions,
311 uploadMedia: _uploadMedia, 311 uploadMedia: _uploadMedia,
312 downloadOptions: _downloadOptions); 312 downloadOptions: _downloadOptions);
313 return _response.then((data) => new InstancesDeleteResponse.fromJson(data)); 313 return _response.then((data) => new InstancesDeleteResponse.fromJson(data));
314 } 314 }
315 315
316 /** 316 /**
317 * Exports data from a Cloud SQL instance to a Google Cloud Storage bucket as 317 * Exports data from a Cloud SQL instance to a Google Cloud Storage bucket as
318 * a MySQL dump file. 318 * a MySQL dump file.
319 * 319 *
320 * [request] - The metadata request object. 320 * [request] - The metadata request object.
321 * 321 *
322 * Request parameters: 322 * Request parameters:
323 * 323 *
324 * [project] - Project ID of the project that contains the instance to be 324 * [project] - Project ID of the project that contains the instance to be
325 * exported. 325 * exported.
326 * 326 *
327 * [instance] - Cloud SQL instance ID. This does not include the project ID. 327 * [instance] - Cloud SQL instance ID. This does not include the project ID.
328 * 328 *
329 * Completes with a [InstancesExportResponse]. 329 * Completes with a [InstancesExportResponse].
330 * 330 *
331 * Completes with a [common.ApiRequestError] if the API endpoint returned an 331 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
332 * error. 332 * error.
333 * 333 *
334 * If the used [http.Client] completes with an error when making a REST call, 334 * If the used [http.Client] completes with an error when making a REST call,
335 * this method will complete with the same error. 335 * this method will complete with the same error.
336 */ 336 */
337 async.Future<InstancesExportResponse> export(InstancesExportRequest request, c ore.String project, core.String instance) { 337 async.Future<InstancesExportResponse> export(InstancesExportRequest request, c ore.String project, core.String instance) {
338 var _url = null; 338 var _url = null;
339 var _queryParams = new core.Map(); 339 var _queryParams = new core.Map();
340 var _uploadMedia = null; 340 var _uploadMedia = null;
341 var _uploadOptions = null; 341 var _uploadOptions = null;
342 var _downloadOptions = common.DownloadOptions.Metadata; 342 var _downloadOptions = commons.DownloadOptions.Metadata;
343 var _body = null; 343 var _body = null;
344 344
345 if (request != null) { 345 if (request != null) {
346 _body = convert.JSON.encode((request).toJson()); 346 _body = convert.JSON.encode((request).toJson());
347 } 347 }
348 if (project == null) { 348 if (project == null) {
349 throw new core.ArgumentError("Parameter project is required."); 349 throw new core.ArgumentError("Parameter project is required.");
350 } 350 }
351 if (instance == null) { 351 if (instance == null) {
352 throw new core.ArgumentError("Parameter instance is required."); 352 throw new core.ArgumentError("Parameter instance is required.");
353 } 353 }
354 354
355 355
356 _url = 'projects/' + common_internal.Escaper.ecapeVariable('$project') + '/i nstances/' + common_internal.Escaper.ecapeVariable('$instance') + '/export'; 356 _url = 'projects/' + commons.Escaper.ecapeVariable('$project') + '/instances /' + commons.Escaper.ecapeVariable('$instance') + '/export';
357 357
358 var _response = _requester.request(_url, 358 var _response = _requester.request(_url,
359 "POST", 359 "POST",
360 body: _body, 360 body: _body,
361 queryParams: _queryParams, 361 queryParams: _queryParams,
362 uploadOptions: _uploadOptions, 362 uploadOptions: _uploadOptions,
363 uploadMedia: _uploadMedia, 363 uploadMedia: _uploadMedia,
364 downloadOptions: _downloadOptions); 364 downloadOptions: _downloadOptions);
365 return _response.then((data) => new InstancesExportResponse.fromJson(data)); 365 return _response.then((data) => new InstancesExportResponse.fromJson(data));
366 } 366 }
367 367
368 /** 368 /**
369 * Retrieves information about a Cloud SQL instance. 369 * Retrieves information about a Cloud SQL instance.
370 * 370 *
371 * Request parameters: 371 * Request parameters:
372 * 372 *
373 * [project] - Project ID of the project that contains the instance. 373 * [project] - Project ID of the project that contains the instance.
374 * 374 *
375 * [instance] - Database instance ID. This does not include the project ID. 375 * [instance] - Database instance ID. This does not include the project ID.
376 * 376 *
377 * Completes with a [DatabaseInstance]. 377 * Completes with a [DatabaseInstance].
378 * 378 *
379 * Completes with a [common.ApiRequestError] if the API endpoint returned an 379 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
380 * error. 380 * error.
381 * 381 *
382 * If the used [http.Client] completes with an error when making a REST call, 382 * If the used [http.Client] completes with an error when making a REST call,
383 * this method will complete with the same error. 383 * this method will complete with the same error.
384 */ 384 */
385 async.Future<DatabaseInstance> get(core.String project, core.String instance) { 385 async.Future<DatabaseInstance> get(core.String project, core.String instance) {
386 var _url = null; 386 var _url = null;
387 var _queryParams = new core.Map(); 387 var _queryParams = new core.Map();
388 var _uploadMedia = null; 388 var _uploadMedia = null;
389 var _uploadOptions = null; 389 var _uploadOptions = null;
390 var _downloadOptions = common.DownloadOptions.Metadata; 390 var _downloadOptions = commons.DownloadOptions.Metadata;
391 var _body = null; 391 var _body = null;
392 392
393 if (project == null) { 393 if (project == null) {
394 throw new core.ArgumentError("Parameter project is required."); 394 throw new core.ArgumentError("Parameter project is required.");
395 } 395 }
396 if (instance == null) { 396 if (instance == null) {
397 throw new core.ArgumentError("Parameter instance is required."); 397 throw new core.ArgumentError("Parameter instance is required.");
398 } 398 }
399 399
400 400
401 _url = 'projects/' + common_internal.Escaper.ecapeVariable('$project') + '/i nstances/' + common_internal.Escaper.ecapeVariable('$instance'); 401 _url = 'projects/' + commons.Escaper.ecapeVariable('$project') + '/instances /' + commons.Escaper.ecapeVariable('$instance');
402 402
403 var _response = _requester.request(_url, 403 var _response = _requester.request(_url,
404 "GET", 404 "GET",
405 body: _body, 405 body: _body,
406 queryParams: _queryParams, 406 queryParams: _queryParams,
407 uploadOptions: _uploadOptions, 407 uploadOptions: _uploadOptions,
408 uploadMedia: _uploadMedia, 408 uploadMedia: _uploadMedia,
409 downloadOptions: _downloadOptions); 409 downloadOptions: _downloadOptions);
410 return _response.then((data) => new DatabaseInstance.fromJson(data)); 410 return _response.then((data) => new DatabaseInstance.fromJson(data));
411 } 411 }
412 412
413 /** 413 /**
414 * Imports data into a Cloud SQL instance from a MySQL dump file stored in a 414 * Imports data into a Cloud SQL instance from a MySQL dump file stored in a
415 * Google Cloud Storage bucket. 415 * Google Cloud Storage bucket.
416 * 416 *
417 * [request] - The metadata request object. 417 * [request] - The metadata request object.
418 * 418 *
419 * Request parameters: 419 * Request parameters:
420 * 420 *
421 * [project] - Project ID of the project that contains the instance. 421 * [project] - Project ID of the project that contains the instance.
422 * 422 *
423 * [instance] - Cloud SQL instance ID. This does not include the project ID. 423 * [instance] - Cloud SQL instance ID. This does not include the project ID.
424 * 424 *
425 * Completes with a [InstancesImportResponse]. 425 * Completes with a [InstancesImportResponse].
426 * 426 *
427 * Completes with a [common.ApiRequestError] if the API endpoint returned an 427 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
428 * error. 428 * error.
429 * 429 *
430 * If the used [http.Client] completes with an error when making a REST call, 430 * If the used [http.Client] completes with an error when making a REST call,
431 * this method will complete with the same error. 431 * this method will complete with the same error.
432 */ 432 */
433 async.Future<InstancesImportResponse> import(InstancesImportRequest request, c ore.String project, core.String instance) { 433 async.Future<InstancesImportResponse> import(InstancesImportRequest request, c ore.String project, core.String instance) {
434 var _url = null; 434 var _url = null;
435 var _queryParams = new core.Map(); 435 var _queryParams = new core.Map();
436 var _uploadMedia = null; 436 var _uploadMedia = null;
437 var _uploadOptions = null; 437 var _uploadOptions = null;
438 var _downloadOptions = common.DownloadOptions.Metadata; 438 var _downloadOptions = commons.DownloadOptions.Metadata;
439 var _body = null; 439 var _body = null;
440 440
441 if (request != null) { 441 if (request != null) {
442 _body = convert.JSON.encode((request).toJson()); 442 _body = convert.JSON.encode((request).toJson());
443 } 443 }
444 if (project == null) { 444 if (project == null) {
445 throw new core.ArgumentError("Parameter project is required."); 445 throw new core.ArgumentError("Parameter project is required.");
446 } 446 }
447 if (instance == null) { 447 if (instance == null) {
448 throw new core.ArgumentError("Parameter instance is required."); 448 throw new core.ArgumentError("Parameter instance is required.");
449 } 449 }
450 450
451 451
452 _url = 'projects/' + common_internal.Escaper.ecapeVariable('$project') + '/i nstances/' + common_internal.Escaper.ecapeVariable('$instance') + '/import'; 452 _url = 'projects/' + commons.Escaper.ecapeVariable('$project') + '/instances /' + commons.Escaper.ecapeVariable('$instance') + '/import';
453 453
454 var _response = _requester.request(_url, 454 var _response = _requester.request(_url,
455 "POST", 455 "POST",
456 body: _body, 456 body: _body,
457 queryParams: _queryParams, 457 queryParams: _queryParams,
458 uploadOptions: _uploadOptions, 458 uploadOptions: _uploadOptions,
459 uploadMedia: _uploadMedia, 459 uploadMedia: _uploadMedia,
460 downloadOptions: _downloadOptions); 460 downloadOptions: _downloadOptions);
461 return _response.then((data) => new InstancesImportResponse.fromJson(data)); 461 return _response.then((data) => new InstancesImportResponse.fromJson(data));
462 } 462 }
463 463
464 /** 464 /**
465 * Creates a new Cloud SQL instance. 465 * Creates a new Cloud SQL instance.
466 * 466 *
467 * [request] - The metadata request object. 467 * [request] - The metadata request object.
468 * 468 *
469 * Request parameters: 469 * Request parameters:
470 * 470 *
471 * [project] - Project ID of the project to which the newly created Cloud SQL 471 * [project] - Project ID of the project to which the newly created Cloud SQL
472 * instances should belong. 472 * instances should belong.
473 * 473 *
474 * Completes with a [InstancesInsertResponse]. 474 * Completes with a [InstancesInsertResponse].
475 * 475 *
476 * Completes with a [common.ApiRequestError] if the API endpoint returned an 476 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
477 * error. 477 * error.
478 * 478 *
479 * If the used [http.Client] completes with an error when making a REST call, 479 * If the used [http.Client] completes with an error when making a REST call,
480 * this method will complete with the same error. 480 * this method will complete with the same error.
481 */ 481 */
482 async.Future<InstancesInsertResponse> insert(DatabaseInstance request, core.St ring project) { 482 async.Future<InstancesInsertResponse> insert(DatabaseInstance request, core.St ring project) {
483 var _url = null; 483 var _url = null;
484 var _queryParams = new core.Map(); 484 var _queryParams = new core.Map();
485 var _uploadMedia = null; 485 var _uploadMedia = null;
486 var _uploadOptions = null; 486 var _uploadOptions = null;
487 var _downloadOptions = common.DownloadOptions.Metadata; 487 var _downloadOptions = commons.DownloadOptions.Metadata;
488 var _body = null; 488 var _body = null;
489 489
490 if (request != null) { 490 if (request != null) {
491 _body = convert.JSON.encode((request).toJson()); 491 _body = convert.JSON.encode((request).toJson());
492 } 492 }
493 if (project == null) { 493 if (project == null) {
494 throw new core.ArgumentError("Parameter project is required."); 494 throw new core.ArgumentError("Parameter project is required.");
495 } 495 }
496 496
497 497
498 _url = 'projects/' + common_internal.Escaper.ecapeVariable('$project') + '/i nstances'; 498 _url = 'projects/' + commons.Escaper.ecapeVariable('$project') + '/instances ';
499 499
500 var _response = _requester.request(_url, 500 var _response = _requester.request(_url,
501 "POST", 501 "POST",
502 body: _body, 502 body: _body,
503 queryParams: _queryParams, 503 queryParams: _queryParams,
504 uploadOptions: _uploadOptions, 504 uploadOptions: _uploadOptions,
505 uploadMedia: _uploadMedia, 505 uploadMedia: _uploadMedia,
506 downloadOptions: _downloadOptions); 506 downloadOptions: _downloadOptions);
507 return _response.then((data) => new InstancesInsertResponse.fromJson(data)); 507 return _response.then((data) => new InstancesInsertResponse.fromJson(data));
508 } 508 }
509 509
510 /** 510 /**
511 * Lists instances for a given project, in alphabetical order by instance 511 * Lists instances for a given project, in alphabetical order by instance
512 * name. 512 * name.
513 * 513 *
514 * Request parameters: 514 * Request parameters:
515 * 515 *
516 * [project] - Project ID of the project for which to list Cloud SQL 516 * [project] - Project ID of the project for which to list Cloud SQL
517 * instances. 517 * instances.
518 * 518 *
519 * [maxResults] - The maximum number of results to return per response. 519 * [maxResults] - The maximum number of results to return per response.
520 * 520 *
521 * [pageToken] - A previously-returned page token representing part of the 521 * [pageToken] - A previously-returned page token representing part of the
522 * larger set of results to view. 522 * larger set of results to view.
523 * 523 *
524 * Completes with a [InstancesListResponse]. 524 * Completes with a [InstancesListResponse].
525 * 525 *
526 * Completes with a [common.ApiRequestError] if the API endpoint returned an 526 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
527 * error. 527 * error.
528 * 528 *
529 * If the used [http.Client] completes with an error when making a REST call, 529 * If the used [http.Client] completes with an error when making a REST call,
530 * this method will complete with the same error. 530 * this method will complete with the same error.
531 */ 531 */
532 async.Future<InstancesListResponse> list(core.String project, {core.int maxRes ults, core.String pageToken}) { 532 async.Future<InstancesListResponse> list(core.String project, {core.int maxRes ults, core.String pageToken}) {
533 var _url = null; 533 var _url = null;
534 var _queryParams = new core.Map(); 534 var _queryParams = new core.Map();
535 var _uploadMedia = null; 535 var _uploadMedia = null;
536 var _uploadOptions = null; 536 var _uploadOptions = null;
537 var _downloadOptions = common.DownloadOptions.Metadata; 537 var _downloadOptions = commons.DownloadOptions.Metadata;
538 var _body = null; 538 var _body = null;
539 539
540 if (project == null) { 540 if (project == null) {
541 throw new core.ArgumentError("Parameter project is required."); 541 throw new core.ArgumentError("Parameter project is required.");
542 } 542 }
543 if (maxResults != null) { 543 if (maxResults != null) {
544 _queryParams["maxResults"] = ["${maxResults}"]; 544 _queryParams["maxResults"] = ["${maxResults}"];
545 } 545 }
546 if (pageToken != null) { 546 if (pageToken != null) {
547 _queryParams["pageToken"] = [pageToken]; 547 _queryParams["pageToken"] = [pageToken];
548 } 548 }
549 549
550 550
551 _url = 'projects/' + common_internal.Escaper.ecapeVariable('$project') + '/i nstances'; 551 _url = 'projects/' + commons.Escaper.ecapeVariable('$project') + '/instances ';
552 552
553 var _response = _requester.request(_url, 553 var _response = _requester.request(_url,
554 "GET", 554 "GET",
555 body: _body, 555 body: _body,
556 queryParams: _queryParams, 556 queryParams: _queryParams,
557 uploadOptions: _uploadOptions, 557 uploadOptions: _uploadOptions,
558 uploadMedia: _uploadMedia, 558 uploadMedia: _uploadMedia,
559 downloadOptions: _downloadOptions); 559 downloadOptions: _downloadOptions);
560 return _response.then((data) => new InstancesListResponse.fromJson(data)); 560 return _response.then((data) => new InstancesListResponse.fromJson(data));
561 } 561 }
562 562
563 /** 563 /**
564 * Updates the settings of a Cloud SQL instance. This method supports patch 564 * Updates the settings of a Cloud SQL instance. This method supports patch
565 * semantics. 565 * semantics.
566 * 566 *
567 * [request] - The metadata request object. 567 * [request] - The metadata request object.
568 * 568 *
569 * Request parameters: 569 * Request parameters:
570 * 570 *
571 * [project] - Project ID of the project that contains the instance. 571 * [project] - Project ID of the project that contains the instance.
572 * 572 *
573 * [instance] - Cloud SQL instance ID. This does not include the project ID. 573 * [instance] - Cloud SQL instance ID. This does not include the project ID.
574 * 574 *
575 * Completes with a [InstancesUpdateResponse]. 575 * Completes with a [InstancesUpdateResponse].
576 * 576 *
577 * Completes with a [common.ApiRequestError] if the API endpoint returned an 577 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
578 * error. 578 * error.
579 * 579 *
580 * If the used [http.Client] completes with an error when making a REST call, 580 * If the used [http.Client] completes with an error when making a REST call,
581 * this method will complete with the same error. 581 * this method will complete with the same error.
582 */ 582 */
583 async.Future<InstancesUpdateResponse> patch(DatabaseInstance request, core.Str ing project, core.String instance) { 583 async.Future<InstancesUpdateResponse> patch(DatabaseInstance request, core.Str ing project, core.String instance) {
584 var _url = null; 584 var _url = null;
585 var _queryParams = new core.Map(); 585 var _queryParams = new core.Map();
586 var _uploadMedia = null; 586 var _uploadMedia = null;
587 var _uploadOptions = null; 587 var _uploadOptions = null;
588 var _downloadOptions = common.DownloadOptions.Metadata; 588 var _downloadOptions = commons.DownloadOptions.Metadata;
589 var _body = null; 589 var _body = null;
590 590
591 if (request != null) { 591 if (request != null) {
592 _body = convert.JSON.encode((request).toJson()); 592 _body = convert.JSON.encode((request).toJson());
593 } 593 }
594 if (project == null) { 594 if (project == null) {
595 throw new core.ArgumentError("Parameter project is required."); 595 throw new core.ArgumentError("Parameter project is required.");
596 } 596 }
597 if (instance == null) { 597 if (instance == null) {
598 throw new core.ArgumentError("Parameter instance is required."); 598 throw new core.ArgumentError("Parameter instance is required.");
599 } 599 }
600 600
601 601
602 _url = 'projects/' + common_internal.Escaper.ecapeVariable('$project') + '/i nstances/' + common_internal.Escaper.ecapeVariable('$instance'); 602 _url = 'projects/' + commons.Escaper.ecapeVariable('$project') + '/instances /' + commons.Escaper.ecapeVariable('$instance');
603 603
604 var _response = _requester.request(_url, 604 var _response = _requester.request(_url,
605 "PATCH", 605 "PATCH",
606 body: _body, 606 body: _body,
607 queryParams: _queryParams, 607 queryParams: _queryParams,
608 uploadOptions: _uploadOptions, 608 uploadOptions: _uploadOptions,
609 uploadMedia: _uploadMedia, 609 uploadMedia: _uploadMedia,
610 downloadOptions: _downloadOptions); 610 downloadOptions: _downloadOptions);
611 return _response.then((data) => new InstancesUpdateResponse.fromJson(data)); 611 return _response.then((data) => new InstancesUpdateResponse.fromJson(data));
612 } 612 }
613 613
614 /** 614 /**
615 * Promotes the read replica instance to be a stand-alone Cloud SQL instance. 615 * Promotes the read replica instance to be a stand-alone Cloud SQL instance.
616 * 616 *
617 * Request parameters: 617 * Request parameters:
618 * 618 *
619 * [project] - ID of the project that contains the read replica. 619 * [project] - ID of the project that contains the read replica.
620 * 620 *
621 * [instance] - Cloud SQL read replica instance name. 621 * [instance] - Cloud SQL read replica instance name.
622 * 622 *
623 * Completes with a [InstancesPromoteReplicaResponse]. 623 * Completes with a [InstancesPromoteReplicaResponse].
624 * 624 *
625 * Completes with a [common.ApiRequestError] if the API endpoint returned an 625 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
626 * error. 626 * error.
627 * 627 *
628 * If the used [http.Client] completes with an error when making a REST call, 628 * If the used [http.Client] completes with an error when making a REST call,
629 * this method will complete with the same error. 629 * this method will complete with the same error.
630 */ 630 */
631 async.Future<InstancesPromoteReplicaResponse> promoteReplica(core.String proje ct, core.String instance) { 631 async.Future<InstancesPromoteReplicaResponse> promoteReplica(core.String proje ct, core.String instance) {
632 var _url = null; 632 var _url = null;
633 var _queryParams = new core.Map(); 633 var _queryParams = new core.Map();
634 var _uploadMedia = null; 634 var _uploadMedia = null;
635 var _uploadOptions = null; 635 var _uploadOptions = null;
636 var _downloadOptions = common.DownloadOptions.Metadata; 636 var _downloadOptions = commons.DownloadOptions.Metadata;
637 var _body = null; 637 var _body = null;
638 638
639 if (project == null) { 639 if (project == null) {
640 throw new core.ArgumentError("Parameter project is required."); 640 throw new core.ArgumentError("Parameter project is required.");
641 } 641 }
642 if (instance == null) { 642 if (instance == null) {
643 throw new core.ArgumentError("Parameter instance is required."); 643 throw new core.ArgumentError("Parameter instance is required.");
644 } 644 }
645 645
646 646
647 _url = 'projects/' + common_internal.Escaper.ecapeVariable('$project') + '/i nstances/' + common_internal.Escaper.ecapeVariable('$instance') + '/promoteRepli ca'; 647 _url = 'projects/' + commons.Escaper.ecapeVariable('$project') + '/instances /' + commons.Escaper.ecapeVariable('$instance') + '/promoteReplica';
648 648
649 var _response = _requester.request(_url, 649 var _response = _requester.request(_url,
650 "POST", 650 "POST",
651 body: _body, 651 body: _body,
652 queryParams: _queryParams, 652 queryParams: _queryParams,
653 uploadOptions: _uploadOptions, 653 uploadOptions: _uploadOptions,
654 uploadMedia: _uploadMedia, 654 uploadMedia: _uploadMedia,
655 downloadOptions: _downloadOptions); 655 downloadOptions: _downloadOptions);
656 return _response.then((data) => new InstancesPromoteReplicaResponse.fromJson (data)); 656 return _response.then((data) => new InstancesPromoteReplicaResponse.fromJson (data));
657 } 657 }
658 658
659 /** 659 /**
660 * Deletes all client certificates and generates a new server SSL certificate 660 * Deletes all client certificates and generates a new server SSL certificate
661 * for a Cloud SQL instance. 661 * for a Cloud SQL instance.
662 * 662 *
663 * Request parameters: 663 * Request parameters:
664 * 664 *
665 * [project] - Project ID of the project that contains the instance. 665 * [project] - Project ID of the project that contains the instance.
666 * 666 *
667 * [instance] - Cloud SQL instance ID. This does not include the project ID. 667 * [instance] - Cloud SQL instance ID. This does not include the project ID.
668 * 668 *
669 * Completes with a [InstancesResetSslConfigResponse]. 669 * Completes with a [InstancesResetSslConfigResponse].
670 * 670 *
671 * Completes with a [common.ApiRequestError] if the API endpoint returned an 671 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
672 * error. 672 * error.
673 * 673 *
674 * If the used [http.Client] completes with an error when making a REST call, 674 * If the used [http.Client] completes with an error when making a REST call,
675 * this method will complete with the same error. 675 * this method will complete with the same error.
676 */ 676 */
677 async.Future<InstancesResetSslConfigResponse> resetSslConfig(core.String proje ct, core.String instance) { 677 async.Future<InstancesResetSslConfigResponse> resetSslConfig(core.String proje ct, core.String instance) {
678 var _url = null; 678 var _url = null;
679 var _queryParams = new core.Map(); 679 var _queryParams = new core.Map();
680 var _uploadMedia = null; 680 var _uploadMedia = null;
681 var _uploadOptions = null; 681 var _uploadOptions = null;
682 var _downloadOptions = common.DownloadOptions.Metadata; 682 var _downloadOptions = commons.DownloadOptions.Metadata;
683 var _body = null; 683 var _body = null;
684 684
685 if (project == null) { 685 if (project == null) {
686 throw new core.ArgumentError("Parameter project is required."); 686 throw new core.ArgumentError("Parameter project is required.");
687 } 687 }
688 if (instance == null) { 688 if (instance == null) {
689 throw new core.ArgumentError("Parameter instance is required."); 689 throw new core.ArgumentError("Parameter instance is required.");
690 } 690 }
691 691
692 692
693 _url = 'projects/' + common_internal.Escaper.ecapeVariable('$project') + '/i nstances/' + common_internal.Escaper.ecapeVariable('$instance') + '/resetSslConf ig'; 693 _url = 'projects/' + commons.Escaper.ecapeVariable('$project') + '/instances /' + commons.Escaper.ecapeVariable('$instance') + '/resetSslConfig';
694 694
695 var _response = _requester.request(_url, 695 var _response = _requester.request(_url,
696 "POST", 696 "POST",
697 body: _body, 697 body: _body,
698 queryParams: _queryParams, 698 queryParams: _queryParams,
699 uploadOptions: _uploadOptions, 699 uploadOptions: _uploadOptions,
700 uploadMedia: _uploadMedia, 700 uploadMedia: _uploadMedia,
701 downloadOptions: _downloadOptions); 701 downloadOptions: _downloadOptions);
702 return _response.then((data) => new InstancesResetSslConfigResponse.fromJson (data)); 702 return _response.then((data) => new InstancesResetSslConfigResponse.fromJson (data));
703 } 703 }
704 704
705 /** 705 /**
706 * Restarts a Cloud SQL instance. 706 * Restarts a Cloud SQL instance.
707 * 707 *
708 * Request parameters: 708 * Request parameters:
709 * 709 *
710 * [project] - Project ID of the project that contains the instance to be 710 * [project] - Project ID of the project that contains the instance to be
711 * restarted. 711 * restarted.
712 * 712 *
713 * [instance] - Cloud SQL instance ID. This does not include the project ID. 713 * [instance] - Cloud SQL instance ID. This does not include the project ID.
714 * 714 *
715 * Completes with a [InstancesRestartResponse]. 715 * Completes with a [InstancesRestartResponse].
716 * 716 *
717 * Completes with a [common.ApiRequestError] if the API endpoint returned an 717 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
718 * error. 718 * error.
719 * 719 *
720 * If the used [http.Client] completes with an error when making a REST call, 720 * If the used [http.Client] completes with an error when making a REST call,
721 * this method will complete with the same error. 721 * this method will complete with the same error.
722 */ 722 */
723 async.Future<InstancesRestartResponse> restart(core.String project, core.Strin g instance) { 723 async.Future<InstancesRestartResponse> restart(core.String project, core.Strin g instance) {
724 var _url = null; 724 var _url = null;
725 var _queryParams = new core.Map(); 725 var _queryParams = new core.Map();
726 var _uploadMedia = null; 726 var _uploadMedia = null;
727 var _uploadOptions = null; 727 var _uploadOptions = null;
728 var _downloadOptions = common.DownloadOptions.Metadata; 728 var _downloadOptions = commons.DownloadOptions.Metadata;
729 var _body = null; 729 var _body = null;
730 730
731 if (project == null) { 731 if (project == null) {
732 throw new core.ArgumentError("Parameter project is required."); 732 throw new core.ArgumentError("Parameter project is required.");
733 } 733 }
734 if (instance == null) { 734 if (instance == null) {
735 throw new core.ArgumentError("Parameter instance is required."); 735 throw new core.ArgumentError("Parameter instance is required.");
736 } 736 }
737 737
738 738
739 _url = 'projects/' + common_internal.Escaper.ecapeVariable('$project') + '/i nstances/' + common_internal.Escaper.ecapeVariable('$instance') + '/restart'; 739 _url = 'projects/' + commons.Escaper.ecapeVariable('$project') + '/instances /' + commons.Escaper.ecapeVariable('$instance') + '/restart';
740 740
741 var _response = _requester.request(_url, 741 var _response = _requester.request(_url,
742 "POST", 742 "POST",
743 body: _body, 743 body: _body,
744 queryParams: _queryParams, 744 queryParams: _queryParams,
745 uploadOptions: _uploadOptions, 745 uploadOptions: _uploadOptions,
746 uploadMedia: _uploadMedia, 746 uploadMedia: _uploadMedia,
747 downloadOptions: _downloadOptions); 747 downloadOptions: _downloadOptions);
748 return _response.then((data) => new InstancesRestartResponse.fromJson(data)) ; 748 return _response.then((data) => new InstancesRestartResponse.fromJson(data)) ;
749 } 749 }
750 750
751 /** 751 /**
752 * Restores a backup of a Cloud SQL instance. 752 * Restores a backup of a Cloud SQL instance.
753 * 753 *
754 * Request parameters: 754 * Request parameters:
755 * 755 *
756 * [project] - Project ID of the project that contains the instance. 756 * [project] - Project ID of the project that contains the instance.
757 * 757 *
758 * [instance] - Cloud SQL instance ID. This does not include the project ID. 758 * [instance] - Cloud SQL instance ID. This does not include the project ID.
759 * 759 *
760 * [backupConfiguration] - The identifier of the backup configuration. This 760 * [backupConfiguration] - The identifier of the backup configuration. This
761 * gets generated automatically when a backup configuration is created. 761 * gets generated automatically when a backup configuration is created.
762 * 762 *
763 * [dueTime] - The start time of the four-hour backup window. The backup can 763 * [dueTime] - The start time of the four-hour backup window. The backup can
764 * occur any time in the window. The time is in RFC 3339 format, for example 764 * occur any time in the window. The time is in RFC 3339 format, for example
765 * 2012-11-15T16:19:00.094Z. 765 * 2012-11-15T16:19:00.094Z.
766 * 766 *
767 * Completes with a [InstancesRestoreBackupResponse]. 767 * Completes with a [InstancesRestoreBackupResponse].
768 * 768 *
769 * Completes with a [common.ApiRequestError] if the API endpoint returned an 769 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
770 * error. 770 * error.
771 * 771 *
772 * If the used [http.Client] completes with an error when making a REST call, 772 * If the used [http.Client] completes with an error when making a REST call,
773 * this method will complete with the same error. 773 * this method will complete with the same error.
774 */ 774 */
775 async.Future<InstancesRestoreBackupResponse> restoreBackup(core.String project , core.String instance, core.String backupConfiguration, core.String dueTime) { 775 async.Future<InstancesRestoreBackupResponse> restoreBackup(core.String project , core.String instance, core.String backupConfiguration, core.String dueTime) {
776 var _url = null; 776 var _url = null;
777 var _queryParams = new core.Map(); 777 var _queryParams = new core.Map();
778 var _uploadMedia = null; 778 var _uploadMedia = null;
779 var _uploadOptions = null; 779 var _uploadOptions = null;
780 var _downloadOptions = common.DownloadOptions.Metadata; 780 var _downloadOptions = commons.DownloadOptions.Metadata;
781 var _body = null; 781 var _body = null;
782 782
783 if (project == null) { 783 if (project == null) {
784 throw new core.ArgumentError("Parameter project is required."); 784 throw new core.ArgumentError("Parameter project is required.");
785 } 785 }
786 if (instance == null) { 786 if (instance == null) {
787 throw new core.ArgumentError("Parameter instance is required."); 787 throw new core.ArgumentError("Parameter instance is required.");
788 } 788 }
789 if (backupConfiguration == null) { 789 if (backupConfiguration == null) {
790 throw new core.ArgumentError("Parameter backupConfiguration is required.") ; 790 throw new core.ArgumentError("Parameter backupConfiguration is required.") ;
791 } 791 }
792 _queryParams["backupConfiguration"] = [backupConfiguration]; 792 _queryParams["backupConfiguration"] = [backupConfiguration];
793 if (dueTime == null) { 793 if (dueTime == null) {
794 throw new core.ArgumentError("Parameter dueTime is required."); 794 throw new core.ArgumentError("Parameter dueTime is required.");
795 } 795 }
796 _queryParams["dueTime"] = [dueTime]; 796 _queryParams["dueTime"] = [dueTime];
797 797
798 798
799 _url = 'projects/' + common_internal.Escaper.ecapeVariable('$project') + '/i nstances/' + common_internal.Escaper.ecapeVariable('$instance') + '/restoreBacku p'; 799 _url = 'projects/' + commons.Escaper.ecapeVariable('$project') + '/instances /' + commons.Escaper.ecapeVariable('$instance') + '/restoreBackup';
800 800
801 var _response = _requester.request(_url, 801 var _response = _requester.request(_url,
802 "POST", 802 "POST",
803 body: _body, 803 body: _body,
804 queryParams: _queryParams, 804 queryParams: _queryParams,
805 uploadOptions: _uploadOptions, 805 uploadOptions: _uploadOptions,
806 uploadMedia: _uploadMedia, 806 uploadMedia: _uploadMedia,
807 downloadOptions: _downloadOptions); 807 downloadOptions: _downloadOptions);
808 return _response.then((data) => new InstancesRestoreBackupResponse.fromJson( data)); 808 return _response.then((data) => new InstancesRestoreBackupResponse.fromJson( data));
809 } 809 }
810 810
811 /** 811 /**
812 * Sets the password for the root user of the specified Cloud SQL instance. 812 * Sets the password for the root user of the specified Cloud SQL instance.
813 * 813 *
814 * [request] - The metadata request object. 814 * [request] - The metadata request object.
815 * 815 *
816 * Request parameters: 816 * Request parameters:
817 * 817 *
818 * [project] - Project ID of the project that contains the instance. 818 * [project] - Project ID of the project that contains the instance.
819 * 819 *
820 * [instance] - Cloud SQL instance ID. This does not include the project ID. 820 * [instance] - Cloud SQL instance ID. This does not include the project ID.
821 * 821 *
822 * Completes with a [InstancesSetRootPasswordResponse]. 822 * Completes with a [InstancesSetRootPasswordResponse].
823 * 823 *
824 * Completes with a [common.ApiRequestError] if the API endpoint returned an 824 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
825 * error. 825 * error.
826 * 826 *
827 * If the used [http.Client] completes with an error when making a REST call, 827 * If the used [http.Client] completes with an error when making a REST call,
828 * this method will complete with the same error. 828 * this method will complete with the same error.
829 */ 829 */
830 async.Future<InstancesSetRootPasswordResponse> setRootPassword(InstanceSetRoot PasswordRequest request, core.String project, core.String instance) { 830 async.Future<InstancesSetRootPasswordResponse> setRootPassword(InstanceSetRoot PasswordRequest request, core.String project, core.String instance) {
831 var _url = null; 831 var _url = null;
832 var _queryParams = new core.Map(); 832 var _queryParams = new core.Map();
833 var _uploadMedia = null; 833 var _uploadMedia = null;
834 var _uploadOptions = null; 834 var _uploadOptions = null;
835 var _downloadOptions = common.DownloadOptions.Metadata; 835 var _downloadOptions = commons.DownloadOptions.Metadata;
836 var _body = null; 836 var _body = null;
837 837
838 if (request != null) { 838 if (request != null) {
839 _body = convert.JSON.encode((request).toJson()); 839 _body = convert.JSON.encode((request).toJson());
840 } 840 }
841 if (project == null) { 841 if (project == null) {
842 throw new core.ArgumentError("Parameter project is required."); 842 throw new core.ArgumentError("Parameter project is required.");
843 } 843 }
844 if (instance == null) { 844 if (instance == null) {
845 throw new core.ArgumentError("Parameter instance is required."); 845 throw new core.ArgumentError("Parameter instance is required.");
846 } 846 }
847 847
848 848
849 _url = 'projects/' + common_internal.Escaper.ecapeVariable('$project') + '/i nstances/' + common_internal.Escaper.ecapeVariable('$instance') + '/setRootPassw ord'; 849 _url = 'projects/' + commons.Escaper.ecapeVariable('$project') + '/instances /' + commons.Escaper.ecapeVariable('$instance') + '/setRootPassword';
850 850
851 var _response = _requester.request(_url, 851 var _response = _requester.request(_url,
852 "POST", 852 "POST",
853 body: _body, 853 body: _body,
854 queryParams: _queryParams, 854 queryParams: _queryParams,
855 uploadOptions: _uploadOptions, 855 uploadOptions: _uploadOptions,
856 uploadMedia: _uploadMedia, 856 uploadMedia: _uploadMedia,
857 downloadOptions: _downloadOptions); 857 downloadOptions: _downloadOptions);
858 return _response.then((data) => new InstancesSetRootPasswordResponse.fromJso n(data)); 858 return _response.then((data) => new InstancesSetRootPasswordResponse.fromJso n(data));
859 } 859 }
860 860
861 /** 861 /**
862 * Updates the settings of a Cloud SQL instance. 862 * Updates the settings of a Cloud SQL instance.
863 * 863 *
864 * [request] - The metadata request object. 864 * [request] - The metadata request object.
865 * 865 *
866 * Request parameters: 866 * Request parameters:
867 * 867 *
868 * [project] - Project ID of the project that contains the instance. 868 * [project] - Project ID of the project that contains the instance.
869 * 869 *
870 * [instance] - Cloud SQL instance ID. This does not include the project ID. 870 * [instance] - Cloud SQL instance ID. This does not include the project ID.
871 * 871 *
872 * Completes with a [InstancesUpdateResponse]. 872 * Completes with a [InstancesUpdateResponse].
873 * 873 *
874 * Completes with a [common.ApiRequestError] if the API endpoint returned an 874 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
875 * error. 875 * error.
876 * 876 *
877 * If the used [http.Client] completes with an error when making a REST call, 877 * If the used [http.Client] completes with an error when making a REST call,
878 * this method will complete with the same error. 878 * this method will complete with the same error.
879 */ 879 */
880 async.Future<InstancesUpdateResponse> update(DatabaseInstance request, core.St ring project, core.String instance) { 880 async.Future<InstancesUpdateResponse> update(DatabaseInstance request, core.St ring project, core.String instance) {
881 var _url = null; 881 var _url = null;
882 var _queryParams = new core.Map(); 882 var _queryParams = new core.Map();
883 var _uploadMedia = null; 883 var _uploadMedia = null;
884 var _uploadOptions = null; 884 var _uploadOptions = null;
885 var _downloadOptions = common.DownloadOptions.Metadata; 885 var _downloadOptions = commons.DownloadOptions.Metadata;
886 var _body = null; 886 var _body = null;
887 887
888 if (request != null) { 888 if (request != null) {
889 _body = convert.JSON.encode((request).toJson()); 889 _body = convert.JSON.encode((request).toJson());
890 } 890 }
891 if (project == null) { 891 if (project == null) {
892 throw new core.ArgumentError("Parameter project is required."); 892 throw new core.ArgumentError("Parameter project is required.");
893 } 893 }
894 if (instance == null) { 894 if (instance == null) {
895 throw new core.ArgumentError("Parameter instance is required."); 895 throw new core.ArgumentError("Parameter instance is required.");
896 } 896 }
897 897
898 898
899 _url = 'projects/' + common_internal.Escaper.ecapeVariable('$project') + '/i nstances/' + common_internal.Escaper.ecapeVariable('$instance'); 899 _url = 'projects/' + commons.Escaper.ecapeVariable('$project') + '/instances /' + commons.Escaper.ecapeVariable('$instance');
900 900
901 var _response = _requester.request(_url, 901 var _response = _requester.request(_url,
902 "PUT", 902 "PUT",
903 body: _body, 903 body: _body,
904 queryParams: _queryParams, 904 queryParams: _queryParams,
905 uploadOptions: _uploadOptions, 905 uploadOptions: _uploadOptions,
906 uploadMedia: _uploadMedia, 906 uploadMedia: _uploadMedia,
907 downloadOptions: _downloadOptions); 907 downloadOptions: _downloadOptions);
908 return _response.then((data) => new InstancesUpdateResponse.fromJson(data)); 908 return _response.then((data) => new InstancesUpdateResponse.fromJson(data));
909 } 909 }
910 910
911 } 911 }
912 912
913 913
914 /** Not documented yet. */
915 class OperationsResourceApi { 914 class OperationsResourceApi {
916 final common_internal.ApiRequester _requester; 915 final commons.ApiRequester _requester;
917 916
918 OperationsResourceApi(common_internal.ApiRequester client) : 917 OperationsResourceApi(commons.ApiRequester client) :
919 _requester = client; 918 _requester = client;
920 919
921 /** 920 /**
922 * Retrieves information about a specific operation that was performed on a 921 * Retrieves information about a specific operation that was performed on a
923 * Cloud SQL instance. 922 * Cloud SQL instance.
924 * 923 *
925 * Request parameters: 924 * Request parameters:
926 * 925 *
927 * [project] - Project ID of the project that contains the instance. 926 * [project] - Project ID of the project that contains the instance.
928 * 927 *
929 * [instance] - Cloud SQL instance ID. This does not include the project ID. 928 * [instance] - Cloud SQL instance ID. This does not include the project ID.
930 * 929 *
931 * [operation] - Instance operation ID. 930 * [operation] - Instance operation ID.
932 * 931 *
933 * Completes with a [InstanceOperation]. 932 * Completes with a [InstanceOperation].
934 * 933 *
935 * Completes with a [common.ApiRequestError] if the API endpoint returned an 934 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
936 * error. 935 * error.
937 * 936 *
938 * If the used [http.Client] completes with an error when making a REST call, 937 * If the used [http.Client] completes with an error when making a REST call,
939 * this method will complete with the same error. 938 * this method will complete with the same error.
940 */ 939 */
941 async.Future<InstanceOperation> get(core.String project, core.String instance, core.String operation) { 940 async.Future<InstanceOperation> get(core.String project, core.String instance, core.String operation) {
942 var _url = null; 941 var _url = null;
943 var _queryParams = new core.Map(); 942 var _queryParams = new core.Map();
944 var _uploadMedia = null; 943 var _uploadMedia = null;
945 var _uploadOptions = null; 944 var _uploadOptions = null;
946 var _downloadOptions = common.DownloadOptions.Metadata; 945 var _downloadOptions = commons.DownloadOptions.Metadata;
947 var _body = null; 946 var _body = null;
948 947
949 if (project == null) { 948 if (project == null) {
950 throw new core.ArgumentError("Parameter project is required."); 949 throw new core.ArgumentError("Parameter project is required.");
951 } 950 }
952 if (instance == null) { 951 if (instance == null) {
953 throw new core.ArgumentError("Parameter instance is required."); 952 throw new core.ArgumentError("Parameter instance is required.");
954 } 953 }
955 if (operation == null) { 954 if (operation == null) {
956 throw new core.ArgumentError("Parameter operation is required."); 955 throw new core.ArgumentError("Parameter operation is required.");
957 } 956 }
958 957
959 958
960 _url = 'projects/' + common_internal.Escaper.ecapeVariable('$project') + '/i nstances/' + common_internal.Escaper.ecapeVariable('$instance') + '/operations/' + common_internal.Escaper.ecapeVariable('$operation'); 959 _url = 'projects/' + commons.Escaper.ecapeVariable('$project') + '/instances /' + commons.Escaper.ecapeVariable('$instance') + '/operations/' + commons.Escap er.ecapeVariable('$operation');
961 960
962 var _response = _requester.request(_url, 961 var _response = _requester.request(_url,
963 "GET", 962 "GET",
964 body: _body, 963 body: _body,
965 queryParams: _queryParams, 964 queryParams: _queryParams,
966 uploadOptions: _uploadOptions, 965 uploadOptions: _uploadOptions,
967 uploadMedia: _uploadMedia, 966 uploadMedia: _uploadMedia,
968 downloadOptions: _downloadOptions); 967 downloadOptions: _downloadOptions);
969 return _response.then((data) => new InstanceOperation.fromJson(data)); 968 return _response.then((data) => new InstanceOperation.fromJson(data));
970 } 969 }
971 970
972 /** 971 /**
973 * Lists all operations that have been performed on a Cloud SQL instance. 972 * Lists all operations that have been performed on a Cloud SQL instance.
974 * 973 *
975 * Request parameters: 974 * Request parameters:
976 * 975 *
977 * [project] - Project ID of the project that contains the instance. 976 * [project] - Project ID of the project that contains the instance.
978 * 977 *
979 * [instance] - Cloud SQL instance ID. This does not include the project ID. 978 * [instance] - Cloud SQL instance ID. This does not include the project ID.
980 * 979 *
981 * [maxResults] - Maximum number of operations per response. 980 * [maxResults] - Maximum number of operations per response.
982 * 981 *
983 * [pageToken] - A previously-returned page token representing part of the 982 * [pageToken] - A previously-returned page token representing part of the
984 * larger set of results to view. 983 * larger set of results to view.
985 * 984 *
986 * Completes with a [OperationsListResponse]. 985 * Completes with a [OperationsListResponse].
987 * 986 *
988 * Completes with a [common.ApiRequestError] if the API endpoint returned an 987 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
989 * error. 988 * error.
990 * 989 *
991 * If the used [http.Client] completes with an error when making a REST call, 990 * If the used [http.Client] completes with an error when making a REST call,
992 * this method will complete with the same error. 991 * this method will complete with the same error.
993 */ 992 */
994 async.Future<OperationsListResponse> list(core.String project, core.String ins tance, {core.int maxResults, core.String pageToken}) { 993 async.Future<OperationsListResponse> list(core.String project, core.String ins tance, {core.int maxResults, core.String pageToken}) {
995 var _url = null; 994 var _url = null;
996 var _queryParams = new core.Map(); 995 var _queryParams = new core.Map();
997 var _uploadMedia = null; 996 var _uploadMedia = null;
998 var _uploadOptions = null; 997 var _uploadOptions = null;
999 var _downloadOptions = common.DownloadOptions.Metadata; 998 var _downloadOptions = commons.DownloadOptions.Metadata;
1000 var _body = null; 999 var _body = null;
1001 1000
1002 if (project == null) { 1001 if (project == null) {
1003 throw new core.ArgumentError("Parameter project is required."); 1002 throw new core.ArgumentError("Parameter project is required.");
1004 } 1003 }
1005 if (instance == null) { 1004 if (instance == null) {
1006 throw new core.ArgumentError("Parameter instance is required."); 1005 throw new core.ArgumentError("Parameter instance is required.");
1007 } 1006 }
1008 if (maxResults != null) { 1007 if (maxResults != null) {
1009 _queryParams["maxResults"] = ["${maxResults}"]; 1008 _queryParams["maxResults"] = ["${maxResults}"];
1010 } 1009 }
1011 if (pageToken != null) { 1010 if (pageToken != null) {
1012 _queryParams["pageToken"] = [pageToken]; 1011 _queryParams["pageToken"] = [pageToken];
1013 } 1012 }
1014 1013
1015 1014
1016 _url = 'projects/' + common_internal.Escaper.ecapeVariable('$project') + '/i nstances/' + common_internal.Escaper.ecapeVariable('$instance') + '/operations'; 1015 _url = 'projects/' + commons.Escaper.ecapeVariable('$project') + '/instances /' + commons.Escaper.ecapeVariable('$instance') + '/operations';
1017 1016
1018 var _response = _requester.request(_url, 1017 var _response = _requester.request(_url,
1019 "GET", 1018 "GET",
1020 body: _body, 1019 body: _body,
1021 queryParams: _queryParams, 1020 queryParams: _queryParams,
1022 uploadOptions: _uploadOptions, 1021 uploadOptions: _uploadOptions,
1023 uploadMedia: _uploadMedia, 1022 uploadMedia: _uploadMedia,
1024 downloadOptions: _downloadOptions); 1023 downloadOptions: _downloadOptions);
1025 return _response.then((data) => new OperationsListResponse.fromJson(data)); 1024 return _response.then((data) => new OperationsListResponse.fromJson(data));
1026 } 1025 }
1027 1026
1028 } 1027 }
1029 1028
1030 1029
1031 /** Not documented yet. */
1032 class SslCertsResourceApi { 1030 class SslCertsResourceApi {
1033 final common_internal.ApiRequester _requester; 1031 final commons.ApiRequester _requester;
1034 1032
1035 SslCertsResourceApi(common_internal.ApiRequester client) : 1033 SslCertsResourceApi(commons.ApiRequester client) :
1036 _requester = client; 1034 _requester = client;
1037 1035
1038 /** 1036 /**
1039 * Deletes an SSL certificate from a Cloud SQL instance. 1037 * Deletes an SSL certificate from a Cloud SQL instance.
1040 * 1038 *
1041 * Request parameters: 1039 * Request parameters:
1042 * 1040 *
1043 * [project] - Project ID of the project that contains the instance to be 1041 * [project] - Project ID of the project that contains the instance to be
1044 * deleted. 1042 * deleted.
1045 * 1043 *
1046 * [instance] - Cloud SQL instance ID. This does not include the project ID. 1044 * [instance] - Cloud SQL instance ID. This does not include the project ID.
1047 * 1045 *
1048 * [sha1Fingerprint] - Sha1 FingerPrint. 1046 * [sha1Fingerprint] - Sha1 FingerPrint.
1049 * 1047 *
1050 * Completes with a [SslCertsDeleteResponse]. 1048 * Completes with a [SslCertsDeleteResponse].
1051 * 1049 *
1052 * Completes with a [common.ApiRequestError] if the API endpoint returned an 1050 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
1053 * error. 1051 * error.
1054 * 1052 *
1055 * If the used [http.Client] completes with an error when making a REST call, 1053 * If the used [http.Client] completes with an error when making a REST call,
1056 * this method will complete with the same error. 1054 * this method will complete with the same error.
1057 */ 1055 */
1058 async.Future<SslCertsDeleteResponse> delete(core.String project, core.String i nstance, core.String sha1Fingerprint) { 1056 async.Future<SslCertsDeleteResponse> delete(core.String project, core.String i nstance, core.String sha1Fingerprint) {
1059 var _url = null; 1057 var _url = null;
1060 var _queryParams = new core.Map(); 1058 var _queryParams = new core.Map();
1061 var _uploadMedia = null; 1059 var _uploadMedia = null;
1062 var _uploadOptions = null; 1060 var _uploadOptions = null;
1063 var _downloadOptions = common.DownloadOptions.Metadata; 1061 var _downloadOptions = commons.DownloadOptions.Metadata;
1064 var _body = null; 1062 var _body = null;
1065 1063
1066 if (project == null) { 1064 if (project == null) {
1067 throw new core.ArgumentError("Parameter project is required."); 1065 throw new core.ArgumentError("Parameter project is required.");
1068 } 1066 }
1069 if (instance == null) { 1067 if (instance == null) {
1070 throw new core.ArgumentError("Parameter instance is required."); 1068 throw new core.ArgumentError("Parameter instance is required.");
1071 } 1069 }
1072 if (sha1Fingerprint == null) { 1070 if (sha1Fingerprint == null) {
1073 throw new core.ArgumentError("Parameter sha1Fingerprint is required."); 1071 throw new core.ArgumentError("Parameter sha1Fingerprint is required.");
1074 } 1072 }
1075 1073
1076 1074
1077 _url = 'projects/' + common_internal.Escaper.ecapeVariable('$project') + '/i nstances/' + common_internal.Escaper.ecapeVariable('$instance') + '/sslCerts/' + common_internal.Escaper.ecapeVariable('$sha1Fingerprint'); 1075 _url = 'projects/' + commons.Escaper.ecapeVariable('$project') + '/instances /' + commons.Escaper.ecapeVariable('$instance') + '/sslCerts/' + commons.Escaper .ecapeVariable('$sha1Fingerprint');
1078 1076
1079 var _response = _requester.request(_url, 1077 var _response = _requester.request(_url,
1080 "DELETE", 1078 "DELETE",
1081 body: _body, 1079 body: _body,
1082 queryParams: _queryParams, 1080 queryParams: _queryParams,
1083 uploadOptions: _uploadOptions, 1081 uploadOptions: _uploadOptions,
1084 uploadMedia: _uploadMedia, 1082 uploadMedia: _uploadMedia,
1085 downloadOptions: _downloadOptions); 1083 downloadOptions: _downloadOptions);
1086 return _response.then((data) => new SslCertsDeleteResponse.fromJson(data)); 1084 return _response.then((data) => new SslCertsDeleteResponse.fromJson(data));
1087 } 1085 }
1088 1086
1089 /** 1087 /**
1090 * Retrieves an SSL certificate as specified by its SHA-1 fingerprint. 1088 * Retrieves an SSL certificate as specified by its SHA-1 fingerprint.
1091 * 1089 *
1092 * Request parameters: 1090 * Request parameters:
1093 * 1091 *
1094 * [project] - Project ID of the project that contains the instance. 1092 * [project] - Project ID of the project that contains the instance.
1095 * 1093 *
1096 * [instance] - Cloud SQL instance ID. This does not include the project ID. 1094 * [instance] - Cloud SQL instance ID. This does not include the project ID.
1097 * 1095 *
1098 * [sha1Fingerprint] - Sha1 FingerPrint. 1096 * [sha1Fingerprint] - Sha1 FingerPrint.
1099 * 1097 *
1100 * Completes with a [SslCert]. 1098 * Completes with a [SslCert].
1101 * 1099 *
1102 * Completes with a [common.ApiRequestError] if the API endpoint returned an 1100 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
1103 * error. 1101 * error.
1104 * 1102 *
1105 * If the used [http.Client] completes with an error when making a REST call, 1103 * If the used [http.Client] completes with an error when making a REST call,
1106 * this method will complete with the same error. 1104 * this method will complete with the same error.
1107 */ 1105 */
1108 async.Future<SslCert> get(core.String project, core.String instance, core.Stri ng sha1Fingerprint) { 1106 async.Future<SslCert> get(core.String project, core.String instance, core.Stri ng sha1Fingerprint) {
1109 var _url = null; 1107 var _url = null;
1110 var _queryParams = new core.Map(); 1108 var _queryParams = new core.Map();
1111 var _uploadMedia = null; 1109 var _uploadMedia = null;
1112 var _uploadOptions = null; 1110 var _uploadOptions = null;
1113 var _downloadOptions = common.DownloadOptions.Metadata; 1111 var _downloadOptions = commons.DownloadOptions.Metadata;
1114 var _body = null; 1112 var _body = null;
1115 1113
1116 if (project == null) { 1114 if (project == null) {
1117 throw new core.ArgumentError("Parameter project is required."); 1115 throw new core.ArgumentError("Parameter project is required.");
1118 } 1116 }
1119 if (instance == null) { 1117 if (instance == null) {
1120 throw new core.ArgumentError("Parameter instance is required."); 1118 throw new core.ArgumentError("Parameter instance is required.");
1121 } 1119 }
1122 if (sha1Fingerprint == null) { 1120 if (sha1Fingerprint == null) {
1123 throw new core.ArgumentError("Parameter sha1Fingerprint is required."); 1121 throw new core.ArgumentError("Parameter sha1Fingerprint is required.");
1124 } 1122 }
1125 1123
1126 1124
1127 _url = 'projects/' + common_internal.Escaper.ecapeVariable('$project') + '/i nstances/' + common_internal.Escaper.ecapeVariable('$instance') + '/sslCerts/' + common_internal.Escaper.ecapeVariable('$sha1Fingerprint'); 1125 _url = 'projects/' + commons.Escaper.ecapeVariable('$project') + '/instances /' + commons.Escaper.ecapeVariable('$instance') + '/sslCerts/' + commons.Escaper .ecapeVariable('$sha1Fingerprint');
1128 1126
1129 var _response = _requester.request(_url, 1127 var _response = _requester.request(_url,
1130 "GET", 1128 "GET",
1131 body: _body, 1129 body: _body,
1132 queryParams: _queryParams, 1130 queryParams: _queryParams,
1133 uploadOptions: _uploadOptions, 1131 uploadOptions: _uploadOptions,
1134 uploadMedia: _uploadMedia, 1132 uploadMedia: _uploadMedia,
1135 downloadOptions: _downloadOptions); 1133 downloadOptions: _downloadOptions);
1136 return _response.then((data) => new SslCert.fromJson(data)); 1134 return _response.then((data) => new SslCert.fromJson(data));
1137 } 1135 }
1138 1136
1139 /** 1137 /**
1140 * Creates an SSL certificate and returns the certificate, the associated 1138 * Creates an SSL certificate and returns the certificate, the associated
1141 * private key, and the server certificate authority. 1139 * private key, and the server certificate authority.
1142 * 1140 *
1143 * [request] - The metadata request object. 1141 * [request] - The metadata request object.
1144 * 1142 *
1145 * Request parameters: 1143 * Request parameters:
1146 * 1144 *
1147 * [project] - Project ID of the project to which the newly created Cloud SQL 1145 * [project] - Project ID of the project to which the newly created Cloud SQL
1148 * instances should belong. 1146 * instances should belong.
1149 * 1147 *
1150 * [instance] - Cloud SQL instance ID. This does not include the project ID. 1148 * [instance] - Cloud SQL instance ID. This does not include the project ID.
1151 * 1149 *
1152 * Completes with a [SslCertsInsertResponse]. 1150 * Completes with a [SslCertsInsertResponse].
1153 * 1151 *
1154 * Completes with a [common.ApiRequestError] if the API endpoint returned an 1152 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
1155 * error. 1153 * error.
1156 * 1154 *
1157 * If the used [http.Client] completes with an error when making a REST call, 1155 * If the used [http.Client] completes with an error when making a REST call,
1158 * this method will complete with the same error. 1156 * this method will complete with the same error.
1159 */ 1157 */
1160 async.Future<SslCertsInsertResponse> insert(SslCertsInsertRequest request, cor e.String project, core.String instance) { 1158 async.Future<SslCertsInsertResponse> insert(SslCertsInsertRequest request, cor e.String project, core.String instance) {
1161 var _url = null; 1159 var _url = null;
1162 var _queryParams = new core.Map(); 1160 var _queryParams = new core.Map();
1163 var _uploadMedia = null; 1161 var _uploadMedia = null;
1164 var _uploadOptions = null; 1162 var _uploadOptions = null;
1165 var _downloadOptions = common.DownloadOptions.Metadata; 1163 var _downloadOptions = commons.DownloadOptions.Metadata;
1166 var _body = null; 1164 var _body = null;
1167 1165
1168 if (request != null) { 1166 if (request != null) {
1169 _body = convert.JSON.encode((request).toJson()); 1167 _body = convert.JSON.encode((request).toJson());
1170 } 1168 }
1171 if (project == null) { 1169 if (project == null) {
1172 throw new core.ArgumentError("Parameter project is required."); 1170 throw new core.ArgumentError("Parameter project is required.");
1173 } 1171 }
1174 if (instance == null) { 1172 if (instance == null) {
1175 throw new core.ArgumentError("Parameter instance is required."); 1173 throw new core.ArgumentError("Parameter instance is required.");
1176 } 1174 }
1177 1175
1178 1176
1179 _url = 'projects/' + common_internal.Escaper.ecapeVariable('$project') + '/i nstances/' + common_internal.Escaper.ecapeVariable('$instance') + '/sslCerts'; 1177 _url = 'projects/' + commons.Escaper.ecapeVariable('$project') + '/instances /' + commons.Escaper.ecapeVariable('$instance') + '/sslCerts';
1180 1178
1181 var _response = _requester.request(_url, 1179 var _response = _requester.request(_url,
1182 "POST", 1180 "POST",
1183 body: _body, 1181 body: _body,
1184 queryParams: _queryParams, 1182 queryParams: _queryParams,
1185 uploadOptions: _uploadOptions, 1183 uploadOptions: _uploadOptions,
1186 uploadMedia: _uploadMedia, 1184 uploadMedia: _uploadMedia,
1187 downloadOptions: _downloadOptions); 1185 downloadOptions: _downloadOptions);
1188 return _response.then((data) => new SslCertsInsertResponse.fromJson(data)); 1186 return _response.then((data) => new SslCertsInsertResponse.fromJson(data));
1189 } 1187 }
1190 1188
1191 /** 1189 /**
1192 * Lists all of the current SSL certificates defined for a Cloud SQL instance. 1190 * Lists all of the current SSL certificates defined for a Cloud SQL instance.
1193 * 1191 *
1194 * Request parameters: 1192 * Request parameters:
1195 * 1193 *
1196 * [project] - Project ID of the project for which to list Cloud SQL 1194 * [project] - Project ID of the project for which to list Cloud SQL
1197 * instances. 1195 * instances.
1198 * 1196 *
1199 * [instance] - Cloud SQL instance ID. This does not include the project ID. 1197 * [instance] - Cloud SQL instance ID. This does not include the project ID.
1200 * 1198 *
1201 * Completes with a [SslCertsListResponse]. 1199 * Completes with a [SslCertsListResponse].
1202 * 1200 *
1203 * Completes with a [common.ApiRequestError] if the API endpoint returned an 1201 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
1204 * error. 1202 * error.
1205 * 1203 *
1206 * If the used [http.Client] completes with an error when making a REST call, 1204 * If the used [http.Client] completes with an error when making a REST call,
1207 * this method will complete with the same error. 1205 * this method will complete with the same error.
1208 */ 1206 */
1209 async.Future<SslCertsListResponse> list(core.String project, core.String insta nce) { 1207 async.Future<SslCertsListResponse> list(core.String project, core.String insta nce) {
1210 var _url = null; 1208 var _url = null;
1211 var _queryParams = new core.Map(); 1209 var _queryParams = new core.Map();
1212 var _uploadMedia = null; 1210 var _uploadMedia = null;
1213 var _uploadOptions = null; 1211 var _uploadOptions = null;
1214 var _downloadOptions = common.DownloadOptions.Metadata; 1212 var _downloadOptions = commons.DownloadOptions.Metadata;
1215 var _body = null; 1213 var _body = null;
1216 1214
1217 if (project == null) { 1215 if (project == null) {
1218 throw new core.ArgumentError("Parameter project is required."); 1216 throw new core.ArgumentError("Parameter project is required.");
1219 } 1217 }
1220 if (instance == null) { 1218 if (instance == null) {
1221 throw new core.ArgumentError("Parameter instance is required."); 1219 throw new core.ArgumentError("Parameter instance is required.");
1222 } 1220 }
1223 1221
1224 1222
1225 _url = 'projects/' + common_internal.Escaper.ecapeVariable('$project') + '/i nstances/' + common_internal.Escaper.ecapeVariable('$instance') + '/sslCerts'; 1223 _url = 'projects/' + commons.Escaper.ecapeVariable('$project') + '/instances /' + commons.Escaper.ecapeVariable('$instance') + '/sslCerts';
1226 1224
1227 var _response = _requester.request(_url, 1225 var _response = _requester.request(_url,
1228 "GET", 1226 "GET",
1229 body: _body, 1227 body: _body,
1230 queryParams: _queryParams, 1228 queryParams: _queryParams,
1231 uploadOptions: _uploadOptions, 1229 uploadOptions: _uploadOptions,
1232 uploadMedia: _uploadMedia, 1230 uploadMedia: _uploadMedia,
1233 downloadOptions: _downloadOptions); 1231 downloadOptions: _downloadOptions);
1234 return _response.then((data) => new SslCertsListResponse.fromJson(data)); 1232 return _response.then((data) => new SslCertsListResponse.fromJson(data));
1235 } 1233 }
1236 1234
1237 } 1235 }
1238 1236
1239 1237
1240 /** Not documented yet. */
1241 class TiersResourceApi { 1238 class TiersResourceApi {
1242 final common_internal.ApiRequester _requester; 1239 final commons.ApiRequester _requester;
1243 1240
1244 TiersResourceApi(common_internal.ApiRequester client) : 1241 TiersResourceApi(commons.ApiRequester client) :
1245 _requester = client; 1242 _requester = client;
1246 1243
1247 /** 1244 /**
1248 * Lists service tiers that can be used to create Google Cloud SQL instances. 1245 * Lists service tiers that can be used to create Google Cloud SQL instances.
1249 * 1246 *
1250 * Request parameters: 1247 * Request parameters:
1251 * 1248 *
1252 * [project] - Project ID of the project for which to list tiers. 1249 * [project] - Project ID of the project for which to list tiers.
1253 * 1250 *
1254 * Completes with a [TiersListResponse]. 1251 * Completes with a [TiersListResponse].
1255 * 1252 *
1256 * Completes with a [common.ApiRequestError] if the API endpoint returned an 1253 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
1257 * error. 1254 * error.
1258 * 1255 *
1259 * If the used [http.Client] completes with an error when making a REST call, 1256 * If the used [http.Client] completes with an error when making a REST call,
1260 * this method will complete with the same error. 1257 * this method will complete with the same error.
1261 */ 1258 */
1262 async.Future<TiersListResponse> list(core.String project) { 1259 async.Future<TiersListResponse> list(core.String project) {
1263 var _url = null; 1260 var _url = null;
1264 var _queryParams = new core.Map(); 1261 var _queryParams = new core.Map();
1265 var _uploadMedia = null; 1262 var _uploadMedia = null;
1266 var _uploadOptions = null; 1263 var _uploadOptions = null;
1267 var _downloadOptions = common.DownloadOptions.Metadata; 1264 var _downloadOptions = commons.DownloadOptions.Metadata;
1268 var _body = null; 1265 var _body = null;
1269 1266
1270 if (project == null) { 1267 if (project == null) {
1271 throw new core.ArgumentError("Parameter project is required."); 1268 throw new core.ArgumentError("Parameter project is required.");
1272 } 1269 }
1273 1270
1274 1271
1275 _url = 'projects/' + common_internal.Escaper.ecapeVariable('$project') + '/t iers'; 1272 _url = 'projects/' + commons.Escaper.ecapeVariable('$project') + '/tiers';
1276 1273
1277 var _response = _requester.request(_url, 1274 var _response = _requester.request(_url,
1278 "GET", 1275 "GET",
1279 body: _body, 1276 body: _body,
1280 queryParams: _queryParams, 1277 queryParams: _queryParams,
1281 uploadOptions: _uploadOptions, 1278 uploadOptions: _uploadOptions,
1282 uploadMedia: _uploadMedia, 1279 uploadMedia: _uploadMedia,
1283 downloadOptions: _downloadOptions); 1280 downloadOptions: _downloadOptions);
1284 return _response.then((data) => new TiersListResponse.fromJson(data)); 1281 return _response.then((data) => new TiersListResponse.fromJson(data));
1285 } 1282 }
(...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after
1610 return _json; 1607 return _json;
1611 } 1608 }
1612 } 1609 }
1613 1610
1614 1611
1615 /** MySQL flags for Cloud SQL instances. */ 1612 /** MySQL flags for Cloud SQL instances. */
1616 class DatabaseFlags { 1613 class DatabaseFlags {
1617 /** 1614 /**
1618 * The name of the flag. These flags are passed at instance startup, so 1615 * The name of the flag. These flags are passed at instance startup, so
1619 * include both MySQL server options and MySQL system variables. Flags should 1616 * include both MySQL server options and MySQL system variables. Flags should
1620 * be specified with underscores, not hyphens. Refer to the official MySQL 1617 * be specified with underscores, not hyphens. For more information, see
1621 * documentation on server options and system variables for descriptions of 1618 * Configuring MySQL Flags in the Google Cloud SQL documentation, as well as
1622 * what these flags do. Acceptable values are: character_set_server utf8 or 1619 * the official MySQL documentation for server options and system variables.
1623 * utf8mb4 event_scheduler on or off (Note: The event scheduler will only work
1624 * reliably if the instance activationPolicy is set to ALWAYS) general_log on
1625 * or off group_concat_max_len 4..17179869184 innodb_flush_log_at_trx_commit
1626 * 0..2 innodb_lock_wait_timeout 1..1073741824 log_bin_trust_function_creators
1627 * on or off log_output Can be either TABLE or NONE, FILE is not supported
1628 * log_queries_not_using_indexes on or off long_query_time 0..30000000
1629 * lower_case_table_names 0..2 max_allowed_packet 16384..1073741824 read_only
1630 * on or off skip_show_database on or off slow_query_log on or off. If set to
1631 * on, you must also set the log_output flag to TABLE to receive logs.
1632 * wait_timeout 1..31536000
1633 */ 1620 */
1634 core.String name; 1621 core.String name;
1635 1622
1636 /** 1623 /**
1637 * The value of the flag. Booleans should be set using 1 for true, and 0 for 1624 * The value of the flag. Booleans should be set to on for true and off for
1638 * false. This field must be omitted if the flag doesn't take a value. 1625 * false. This field must be omitted if the flag doesn't take a value.
1639 */ 1626 */
1640 core.String value; 1627 core.String value;
1641 1628
1642 1629
1643 DatabaseFlags(); 1630 DatabaseFlags();
1644 1631
1645 DatabaseFlags.fromJson(core.Map _json) { 1632 DatabaseFlags.fromJson(core.Map _json) {
1646 if (_json.containsKey("name")) { 1633 if (_json.containsKey("name")) {
1647 name = _json["name"]; 1634 name = _json["name"];
(...skipping 1914 matching lines...) Expand 10 before | Expand all | Expand 10 after
3562 var _json = new core.Map(); 3549 var _json = new core.Map();
3563 if (items != null) { 3550 if (items != null) {
3564 _json["items"] = items.map((value) => (value).toJson()).toList(); 3551 _json["items"] = items.map((value) => (value).toJson()).toList();
3565 } 3552 }
3566 if (kind != null) { 3553 if (kind != null) {
3567 _json["kind"] = kind; 3554 _json["kind"] = kind;
3568 } 3555 }
3569 return _json; 3556 return _json;
3570 } 3557 }
3571 } 3558 }
3572
3573
OLDNEW
« no previous file with comments | « generated/googleapis_beta/lib/resourceviews/v1beta2.dart ('k') | generated/googleapis_beta/lib/sqladmin/v1beta4.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698