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

Side by Side Diff: generated/googleapis_beta/lib/sqladmin/v1beta4.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.v1beta4; 3 library googleapis_beta.sqladmin.v1beta4;
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/v1beta4';
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 DatabasesResourceApi get databases => new DatabasesResourceApi(_requester); 31 DatabasesResourceApi get databases => new DatabasesResourceApi(_requester);
29 FlagsResourceApi get flags => new FlagsResourceApi(_requester); 32 FlagsResourceApi get flags => new FlagsResourceApi(_requester);
30 InstancesResourceApi get instances => new InstancesResourceApi(_requester); 33 InstancesResourceApi get instances => new InstancesResourceApi(_requester);
31 OperationsResourceApi get operations => new OperationsResourceApi(_requester); 34 OperationsResourceApi get operations => new OperationsResourceApi(_requester);
32 SslCertsResourceApi get sslCerts => new SslCertsResourceApi(_requester); 35 SslCertsResourceApi get sslCerts => new SslCertsResourceApi(_requester);
33 TiersResourceApi get tiers => new TiersResourceApi(_requester); 36 TiersResourceApi get tiers => new TiersResourceApi(_requester);
34 UsersResourceApi get users => new UsersResourceApi(_requester); 37 UsersResourceApi get users => new UsersResourceApi(_requester);
35 38
36 SqladminApi(http.Client client, {core.String rootUrl: "https://www.googleapis. com/", core.String servicePath: "sql/v1beta4/"}) : 39 SqladminApi(http.Client client, {core.String rootUrl: "https://www.googleapis. com/", core.String servicePath: "sql/v1beta4/"}) :
37 _requester = new common_internal.ApiRequester(client, rootUrl, servicePath ); 40 _requester = new commons.ApiRequester(client, rootUrl, servicePath, USER_A GENT);
38 } 41 }
39 42
40 43
41 /** Not documented yet. */
42 class BackupRunsResourceApi { 44 class BackupRunsResourceApi {
43 final common_internal.ApiRequester _requester; 45 final commons.ApiRequester _requester;
44 46
45 BackupRunsResourceApi(common_internal.ApiRequester client) : 47 BackupRunsResourceApi(commons.ApiRequester client) :
46 _requester = client; 48 _requester = client;
47 49
48 /** 50 /**
49 * Retrieves a resource containing information about a backup run. 51 * Retrieves a resource containing information about a backup run.
50 * 52 *
51 * Request parameters: 53 * Request parameters:
52 * 54 *
53 * [project] - Project ID of the project that contains the instance. 55 * [project] - Project ID of the project that contains the instance.
54 * 56 *
55 * [instance] - Cloud SQL instance ID. This does not include the project ID. 57 * [instance] - Cloud SQL instance ID. This does not include the project ID.
56 * 58 *
57 * [id] - The ID of this Backup Run. 59 * [id] - The ID of this Backup Run.
58 * 60 *
59 * Completes with a [BackupRun]. 61 * Completes with a [BackupRun].
60 * 62 *
61 * Completes with a [common.ApiRequestError] if the API endpoint returned an 63 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
62 * error. 64 * error.
63 * 65 *
64 * If the used [http.Client] completes with an error when making a REST call, 66 * If the used [http.Client] completes with an error when making a REST call,
65 * this method will complete with the same error. 67 * this method will complete with the same error.
66 */ 68 */
67 async.Future<BackupRun> get(core.String project, core.String instance, core.St ring id) { 69 async.Future<BackupRun> get(core.String project, core.String instance, core.St ring id) {
68 var _url = null; 70 var _url = null;
69 var _queryParams = new core.Map(); 71 var _queryParams = new core.Map();
70 var _uploadMedia = null; 72 var _uploadMedia = null;
71 var _uploadOptions = null; 73 var _uploadOptions = null;
72 var _downloadOptions = common.DownloadOptions.Metadata; 74 var _downloadOptions = commons.DownloadOptions.Metadata;
73 var _body = null; 75 var _body = null;
74 76
75 if (project == null) { 77 if (project == null) {
76 throw new core.ArgumentError("Parameter project is required."); 78 throw new core.ArgumentError("Parameter project is required.");
77 } 79 }
78 if (instance == null) { 80 if (instance == null) {
79 throw new core.ArgumentError("Parameter instance is required."); 81 throw new core.ArgumentError("Parameter instance is required.");
80 } 82 }
81 if (id == null) { 83 if (id == null) {
82 throw new core.ArgumentError("Parameter id is required."); 84 throw new core.ArgumentError("Parameter id is required.");
83 } 85 }
84 86
85 87
86 _url = 'projects/' + common_internal.Escaper.ecapeVariable('$project') + '/i nstances/' + common_internal.Escaper.ecapeVariable('$instance') + '/backupRuns/' + common_internal.Escaper.ecapeVariable('$id'); 88 _url = 'projects/' + commons.Escaper.ecapeVariable('$project') + '/instances /' + commons.Escaper.ecapeVariable('$instance') + '/backupRuns/' + commons.Escap er.ecapeVariable('$id');
87 89
88 var _response = _requester.request(_url, 90 var _response = _requester.request(_url,
89 "GET", 91 "GET",
90 body: _body, 92 body: _body,
91 queryParams: _queryParams, 93 queryParams: _queryParams,
92 uploadOptions: _uploadOptions, 94 uploadOptions: _uploadOptions,
93 uploadMedia: _uploadMedia, 95 uploadMedia: _uploadMedia,
94 downloadOptions: _downloadOptions); 96 downloadOptions: _downloadOptions);
95 return _response.then((data) => new BackupRun.fromJson(data)); 97 return _response.then((data) => new BackupRun.fromJson(data));
96 } 98 }
97 99
98 /** 100 /**
99 * Lists all backup runs associated with a given instance and configuration in 101 * Lists all backup runs associated with a given instance and configuration in
100 * the reverse chronological order of the enqueued time. 102 * the reverse chronological order of the enqueued time.
101 * 103 *
102 * Request parameters: 104 * Request parameters:
103 * 105 *
104 * [project] - Project ID of the project that contains the instance. 106 * [project] - Project ID of the project that contains the instance.
105 * 107 *
106 * [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.
107 * 109 *
108 * [maxResults] - Maximum number of backup runs per response. 110 * [maxResults] - Maximum number of backup runs per response.
109 * 111 *
110 * [pageToken] - A previously-returned page token representing part of the 112 * [pageToken] - A previously-returned page token representing part of the
111 * larger set of results to view. 113 * larger set of results to view.
112 * 114 *
113 * Completes with a [BackupRunsListResponse]. 115 * Completes with a [BackupRunsListResponse].
114 * 116 *
115 * Completes with a [common.ApiRequestError] if the API endpoint returned an 117 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
116 * error. 118 * error.
117 * 119 *
118 * If the used [http.Client] completes with an error when making a REST call, 120 * If the used [http.Client] completes with an error when making a REST call,
119 * this method will complete with the same error. 121 * this method will complete with the same error.
120 */ 122 */
121 async.Future<BackupRunsListResponse> list(core.String project, core.String ins tance, {core.int maxResults, core.String pageToken}) { 123 async.Future<BackupRunsListResponse> list(core.String project, core.String ins tance, {core.int maxResults, core.String pageToken}) {
122 var _url = null; 124 var _url = null;
123 var _queryParams = new core.Map(); 125 var _queryParams = new core.Map();
124 var _uploadMedia = null; 126 var _uploadMedia = null;
125 var _uploadOptions = null; 127 var _uploadOptions = null;
126 var _downloadOptions = common.DownloadOptions.Metadata; 128 var _downloadOptions = commons.DownloadOptions.Metadata;
127 var _body = null; 129 var _body = null;
128 130
129 if (project == null) { 131 if (project == null) {
130 throw new core.ArgumentError("Parameter project is required."); 132 throw new core.ArgumentError("Parameter project is required.");
131 } 133 }
132 if (instance == null) { 134 if (instance == null) {
133 throw new core.ArgumentError("Parameter instance is required."); 135 throw new core.ArgumentError("Parameter instance is required.");
134 } 136 }
135 if (maxResults != null) { 137 if (maxResults != null) {
136 _queryParams["maxResults"] = ["${maxResults}"]; 138 _queryParams["maxResults"] = ["${maxResults}"];
137 } 139 }
138 if (pageToken != null) { 140 if (pageToken != null) {
139 _queryParams["pageToken"] = [pageToken]; 141 _queryParams["pageToken"] = [pageToken];
140 } 142 }
141 143
142 144
143 _url = 'projects/' + common_internal.Escaper.ecapeVariable('$project') + '/i nstances/' + common_internal.Escaper.ecapeVariable('$instance') + '/backupRuns'; 145 _url = 'projects/' + commons.Escaper.ecapeVariable('$project') + '/instances /' + commons.Escaper.ecapeVariable('$instance') + '/backupRuns';
144 146
145 var _response = _requester.request(_url, 147 var _response = _requester.request(_url,
146 "GET", 148 "GET",
147 body: _body, 149 body: _body,
148 queryParams: _queryParams, 150 queryParams: _queryParams,
149 uploadOptions: _uploadOptions, 151 uploadOptions: _uploadOptions,
150 uploadMedia: _uploadMedia, 152 uploadMedia: _uploadMedia,
151 downloadOptions: _downloadOptions); 153 downloadOptions: _downloadOptions);
152 return _response.then((data) => new BackupRunsListResponse.fromJson(data)); 154 return _response.then((data) => new BackupRunsListResponse.fromJson(data));
153 } 155 }
154 156
155 } 157 }
156 158
157 159
158 /** Not documented yet. */
159 class DatabasesResourceApi { 160 class DatabasesResourceApi {
160 final common_internal.ApiRequester _requester; 161 final commons.ApiRequester _requester;
161 162
162 DatabasesResourceApi(common_internal.ApiRequester client) : 163 DatabasesResourceApi(commons.ApiRequester client) :
163 _requester = client; 164 _requester = client;
164 165
165 /** 166 /**
166 * Deletes a resource containing information about a database inside a Cloud 167 * Deletes a resource containing information about a database inside a Cloud
167 * SQL instance. 168 * SQL instance.
168 * 169 *
169 * Request parameters: 170 * Request parameters:
170 * 171 *
171 * [project] - Project ID of the project that contains the instance. 172 * [project] - Project ID of the project that contains the instance.
172 * 173 *
173 * [instance] - Database instance ID. This does not include the project ID. 174 * [instance] - Database instance ID. This does not include the project ID.
174 * 175 *
175 * [database] - Name of the database to be deleted in the instance. 176 * [database] - Name of the database to be deleted in the instance.
176 * 177 *
177 * Completes with a [Operation]. 178 * Completes with a [Operation].
178 * 179 *
179 * Completes with a [common.ApiRequestError] if the API endpoint returned an 180 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
180 * error. 181 * error.
181 * 182 *
182 * If the used [http.Client] completes with an error when making a REST call, 183 * If the used [http.Client] completes with an error when making a REST call,
183 * this method will complete with the same error. 184 * this method will complete with the same error.
184 */ 185 */
185 async.Future<Operation> delete(core.String project, core.String instance, core .String database) { 186 async.Future<Operation> delete(core.String project, core.String instance, core .String database) {
186 var _url = null; 187 var _url = null;
187 var _queryParams = new core.Map(); 188 var _queryParams = new core.Map();
188 var _uploadMedia = null; 189 var _uploadMedia = null;
189 var _uploadOptions = null; 190 var _uploadOptions = null;
190 var _downloadOptions = common.DownloadOptions.Metadata; 191 var _downloadOptions = commons.DownloadOptions.Metadata;
191 var _body = null; 192 var _body = null;
192 193
193 if (project == null) { 194 if (project == null) {
194 throw new core.ArgumentError("Parameter project is required."); 195 throw new core.ArgumentError("Parameter project is required.");
195 } 196 }
196 if (instance == null) { 197 if (instance == null) {
197 throw new core.ArgumentError("Parameter instance is required."); 198 throw new core.ArgumentError("Parameter instance is required.");
198 } 199 }
199 if (database == null) { 200 if (database == null) {
200 throw new core.ArgumentError("Parameter database is required."); 201 throw new core.ArgumentError("Parameter database is required.");
201 } 202 }
202 203
203 204
204 _url = 'projects/' + common_internal.Escaper.ecapeVariable('$project') + '/i nstances/' + common_internal.Escaper.ecapeVariable('$instance') + '/databases/' + common_internal.Escaper.ecapeVariable('$database'); 205 _url = 'projects/' + commons.Escaper.ecapeVariable('$project') + '/instances /' + commons.Escaper.ecapeVariable('$instance') + '/databases/' + commons.Escape r.ecapeVariable('$database');
205 206
206 var _response = _requester.request(_url, 207 var _response = _requester.request(_url,
207 "DELETE", 208 "DELETE",
208 body: _body, 209 body: _body,
209 queryParams: _queryParams, 210 queryParams: _queryParams,
210 uploadOptions: _uploadOptions, 211 uploadOptions: _uploadOptions,
211 uploadMedia: _uploadMedia, 212 uploadMedia: _uploadMedia,
212 downloadOptions: _downloadOptions); 213 downloadOptions: _downloadOptions);
213 return _response.then((data) => new Operation.fromJson(data)); 214 return _response.then((data) => new Operation.fromJson(data));
214 } 215 }
215 216
216 /** 217 /**
217 * Retrieves a resource containing information about a database inside a Cloud 218 * Retrieves a resource containing information about a database inside a Cloud
218 * SQL instance. 219 * SQL instance.
219 * 220 *
220 * Request parameters: 221 * Request parameters:
221 * 222 *
222 * [project] - Project ID of the project that contains the instance. 223 * [project] - Project ID of the project that contains the instance.
223 * 224 *
224 * [instance] - Database instance ID. This does not include the project ID. 225 * [instance] - Database instance ID. This does not include the project ID.
225 * 226 *
226 * [database] - Name of the database in the instance. 227 * [database] - Name of the database in the instance.
227 * 228 *
228 * Completes with a [Database]. 229 * Completes with a [Database].
229 * 230 *
230 * Completes with a [common.ApiRequestError] if the API endpoint returned an 231 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
231 * error. 232 * error.
232 * 233 *
233 * If the used [http.Client] completes with an error when making a REST call, 234 * If the used [http.Client] completes with an error when making a REST call,
234 * this method will complete with the same error. 235 * this method will complete with the same error.
235 */ 236 */
236 async.Future<Database> get(core.String project, core.String instance, core.Str ing database) { 237 async.Future<Database> get(core.String project, core.String instance, core.Str ing database) {
237 var _url = null; 238 var _url = null;
238 var _queryParams = new core.Map(); 239 var _queryParams = new core.Map();
239 var _uploadMedia = null; 240 var _uploadMedia = null;
240 var _uploadOptions = null; 241 var _uploadOptions = null;
241 var _downloadOptions = common.DownloadOptions.Metadata; 242 var _downloadOptions = commons.DownloadOptions.Metadata;
242 var _body = null; 243 var _body = null;
243 244
244 if (project == null) { 245 if (project == null) {
245 throw new core.ArgumentError("Parameter project is required."); 246 throw new core.ArgumentError("Parameter project is required.");
246 } 247 }
247 if (instance == null) { 248 if (instance == null) {
248 throw new core.ArgumentError("Parameter instance is required."); 249 throw new core.ArgumentError("Parameter instance is required.");
249 } 250 }
250 if (database == null) { 251 if (database == null) {
251 throw new core.ArgumentError("Parameter database is required."); 252 throw new core.ArgumentError("Parameter database is required.");
252 } 253 }
253 254
254 255
255 _url = 'projects/' + common_internal.Escaper.ecapeVariable('$project') + '/i nstances/' + common_internal.Escaper.ecapeVariable('$instance') + '/databases/' + common_internal.Escaper.ecapeVariable('$database'); 256 _url = 'projects/' + commons.Escaper.ecapeVariable('$project') + '/instances /' + commons.Escaper.ecapeVariable('$instance') + '/databases/' + commons.Escape r.ecapeVariable('$database');
256 257
257 var _response = _requester.request(_url, 258 var _response = _requester.request(_url,
258 "GET", 259 "GET",
259 body: _body, 260 body: _body,
260 queryParams: _queryParams, 261 queryParams: _queryParams,
261 uploadOptions: _uploadOptions, 262 uploadOptions: _uploadOptions,
262 uploadMedia: _uploadMedia, 263 uploadMedia: _uploadMedia,
263 downloadOptions: _downloadOptions); 264 downloadOptions: _downloadOptions);
264 return _response.then((data) => new Database.fromJson(data)); 265 return _response.then((data) => new Database.fromJson(data));
265 } 266 }
266 267
267 /** 268 /**
268 * Inserts a resource containing information about a database inside a Cloud 269 * Inserts a resource containing information about a database inside a Cloud
269 * SQL instance. 270 * SQL instance.
270 * 271 *
271 * [request] - The metadata request object. 272 * [request] - The metadata request object.
272 * 273 *
273 * Request parameters: 274 * Request parameters:
274 * 275 *
275 * [project] - Project ID of the project that contains the instance. 276 * [project] - Project ID of the project that contains the instance.
276 * 277 *
277 * [instance] - Database instance ID. This does not include the project ID. 278 * [instance] - Database instance ID. This does not include the project ID.
278 * 279 *
279 * Completes with a [Operation]. 280 * Completes with a [Operation].
280 * 281 *
281 * Completes with a [common.ApiRequestError] if the API endpoint returned an 282 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
282 * error. 283 * error.
283 * 284 *
284 * 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,
285 * this method will complete with the same error. 286 * this method will complete with the same error.
286 */ 287 */
287 async.Future<Operation> insert(Database request, core.String project, core.Str ing instance) { 288 async.Future<Operation> insert(Database request, core.String project, core.Str ing instance) {
288 var _url = null; 289 var _url = null;
289 var _queryParams = new core.Map(); 290 var _queryParams = new core.Map();
290 var _uploadMedia = null; 291 var _uploadMedia = null;
291 var _uploadOptions = null; 292 var _uploadOptions = null;
292 var _downloadOptions = common.DownloadOptions.Metadata; 293 var _downloadOptions = commons.DownloadOptions.Metadata;
293 var _body = null; 294 var _body = null;
294 295
295 if (request != null) { 296 if (request != null) {
296 _body = convert.JSON.encode((request).toJson()); 297 _body = convert.JSON.encode((request).toJson());
297 } 298 }
298 if (project == null) { 299 if (project == null) {
299 throw new core.ArgumentError("Parameter project is required."); 300 throw new core.ArgumentError("Parameter project is required.");
300 } 301 }
301 if (instance == null) { 302 if (instance == null) {
302 throw new core.ArgumentError("Parameter instance is required."); 303 throw new core.ArgumentError("Parameter instance is required.");
303 } 304 }
304 305
305 306
306 _url = 'projects/' + common_internal.Escaper.ecapeVariable('$project') + '/i nstances/' + common_internal.Escaper.ecapeVariable('$instance') + '/databases'; 307 _url = 'projects/' + commons.Escaper.ecapeVariable('$project') + '/instances /' + commons.Escaper.ecapeVariable('$instance') + '/databases';
307 308
308 var _response = _requester.request(_url, 309 var _response = _requester.request(_url,
309 "POST", 310 "POST",
310 body: _body, 311 body: _body,
311 queryParams: _queryParams, 312 queryParams: _queryParams,
312 uploadOptions: _uploadOptions, 313 uploadOptions: _uploadOptions,
313 uploadMedia: _uploadMedia, 314 uploadMedia: _uploadMedia,
314 downloadOptions: _downloadOptions); 315 downloadOptions: _downloadOptions);
315 return _response.then((data) => new Operation.fromJson(data)); 316 return _response.then((data) => new Operation.fromJson(data));
316 } 317 }
317 318
318 /** 319 /**
319 * Lists databases in the specified Cloud SQL instance. 320 * Lists databases in the specified Cloud SQL instance.
320 * 321 *
321 * Request parameters: 322 * Request parameters:
322 * 323 *
323 * [project] - Project ID of the project for which to list Cloud SQL 324 * [project] - Project ID of the project for which to list Cloud SQL
324 * instances. 325 * instances.
325 * 326 *
326 * [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.
327 * 328 *
328 * Completes with a [DatabasesListResponse]. 329 * Completes with a [DatabasesListResponse].
329 * 330 *
330 * Completes with a [common.ApiRequestError] if the API endpoint returned an 331 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
331 * error. 332 * error.
332 * 333 *
333 * 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,
334 * this method will complete with the same error. 335 * this method will complete with the same error.
335 */ 336 */
336 async.Future<DatabasesListResponse> list(core.String project, core.String inst ance) { 337 async.Future<DatabasesListResponse> list(core.String project, core.String inst ance) {
337 var _url = null; 338 var _url = null;
338 var _queryParams = new core.Map(); 339 var _queryParams = new core.Map();
339 var _uploadMedia = null; 340 var _uploadMedia = null;
340 var _uploadOptions = null; 341 var _uploadOptions = null;
341 var _downloadOptions = common.DownloadOptions.Metadata; 342 var _downloadOptions = commons.DownloadOptions.Metadata;
342 var _body = null; 343 var _body = null;
343 344
344 if (project == null) { 345 if (project == null) {
345 throw new core.ArgumentError("Parameter project is required."); 346 throw new core.ArgumentError("Parameter project is required.");
346 } 347 }
347 if (instance == null) { 348 if (instance == null) {
348 throw new core.ArgumentError("Parameter instance is required."); 349 throw new core.ArgumentError("Parameter instance is required.");
349 } 350 }
350 351
351 352
352 _url = 'projects/' + common_internal.Escaper.ecapeVariable('$project') + '/i nstances/' + common_internal.Escaper.ecapeVariable('$instance') + '/databases'; 353 _url = 'projects/' + commons.Escaper.ecapeVariable('$project') + '/instances /' + commons.Escaper.ecapeVariable('$instance') + '/databases';
353 354
354 var _response = _requester.request(_url, 355 var _response = _requester.request(_url,
355 "GET", 356 "GET",
356 body: _body, 357 body: _body,
357 queryParams: _queryParams, 358 queryParams: _queryParams,
358 uploadOptions: _uploadOptions, 359 uploadOptions: _uploadOptions,
359 uploadMedia: _uploadMedia, 360 uploadMedia: _uploadMedia,
360 downloadOptions: _downloadOptions); 361 downloadOptions: _downloadOptions);
361 return _response.then((data) => new DatabasesListResponse.fromJson(data)); 362 return _response.then((data) => new DatabasesListResponse.fromJson(data));
362 } 363 }
363 364
364 /** 365 /**
365 * Updates a resource containing information about a database inside a Cloud 366 * Updates a resource containing information about a database inside a Cloud
366 * SQL instance. This method supports patch semantics. 367 * SQL instance. This method supports patch semantics.
367 * 368 *
368 * [request] - The metadata request object. 369 * [request] - The metadata request object.
369 * 370 *
370 * Request parameters: 371 * Request parameters:
371 * 372 *
372 * [project] - Project ID of the project that contains the instance. 373 * [project] - Project ID of the project that contains the instance.
373 * 374 *
374 * [instance] - Database instance ID. This does not include the project ID. 375 * [instance] - Database instance ID. This does not include the project ID.
375 * 376 *
376 * [database] - Name of the database to be updated in the instance. 377 * [database] - Name of the database to be updated in the instance.
377 * 378 *
378 * Completes with a [Operation]. 379 * Completes with a [Operation].
379 * 380 *
380 * Completes with a [common.ApiRequestError] if the API endpoint returned an 381 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
381 * error. 382 * error.
382 * 383 *
383 * If the used [http.Client] completes with an error when making a REST call, 384 * If the used [http.Client] completes with an error when making a REST call,
384 * this method will complete with the same error. 385 * this method will complete with the same error.
385 */ 386 */
386 async.Future<Operation> patch(Database request, core.String project, core.Stri ng instance, core.String database) { 387 async.Future<Operation> patch(Database request, core.String project, core.Stri ng instance, core.String database) {
387 var _url = null; 388 var _url = null;
388 var _queryParams = new core.Map(); 389 var _queryParams = new core.Map();
389 var _uploadMedia = null; 390 var _uploadMedia = null;
390 var _uploadOptions = null; 391 var _uploadOptions = null;
391 var _downloadOptions = common.DownloadOptions.Metadata; 392 var _downloadOptions = commons.DownloadOptions.Metadata;
392 var _body = null; 393 var _body = null;
393 394
394 if (request != null) { 395 if (request != null) {
395 _body = convert.JSON.encode((request).toJson()); 396 _body = convert.JSON.encode((request).toJson());
396 } 397 }
397 if (project == null) { 398 if (project == null) {
398 throw new core.ArgumentError("Parameter project is required."); 399 throw new core.ArgumentError("Parameter project is required.");
399 } 400 }
400 if (instance == null) { 401 if (instance == null) {
401 throw new core.ArgumentError("Parameter instance is required."); 402 throw new core.ArgumentError("Parameter instance is required.");
402 } 403 }
403 if (database == null) { 404 if (database == null) {
404 throw new core.ArgumentError("Parameter database is required."); 405 throw new core.ArgumentError("Parameter database is required.");
405 } 406 }
406 407
407 408
408 _url = 'projects/' + common_internal.Escaper.ecapeVariable('$project') + '/i nstances/' + common_internal.Escaper.ecapeVariable('$instance') + '/databases/' + common_internal.Escaper.ecapeVariable('$database'); 409 _url = 'projects/' + commons.Escaper.ecapeVariable('$project') + '/instances /' + commons.Escaper.ecapeVariable('$instance') + '/databases/' + commons.Escape r.ecapeVariable('$database');
409 410
410 var _response = _requester.request(_url, 411 var _response = _requester.request(_url,
411 "PATCH", 412 "PATCH",
412 body: _body, 413 body: _body,
413 queryParams: _queryParams, 414 queryParams: _queryParams,
414 uploadOptions: _uploadOptions, 415 uploadOptions: _uploadOptions,
415 uploadMedia: _uploadMedia, 416 uploadMedia: _uploadMedia,
416 downloadOptions: _downloadOptions); 417 downloadOptions: _downloadOptions);
417 return _response.then((data) => new Operation.fromJson(data)); 418 return _response.then((data) => new Operation.fromJson(data));
418 } 419 }
419 420
420 /** 421 /**
421 * Updates a resource containing information about a database inside a Cloud 422 * Updates a resource containing information about a database inside a Cloud
422 * SQL instance. 423 * SQL instance.
423 * 424 *
424 * [request] - The metadata request object. 425 * [request] - The metadata request object.
425 * 426 *
426 * Request parameters: 427 * Request parameters:
427 * 428 *
428 * [project] - Project ID of the project that contains the instance. 429 * [project] - Project ID of the project that contains the instance.
429 * 430 *
430 * [instance] - Database instance ID. This does not include the project ID. 431 * [instance] - Database instance ID. This does not include the project ID.
431 * 432 *
432 * [database] - Name of the database to be updated in the instance. 433 * [database] - Name of the database to be updated in the instance.
433 * 434 *
434 * Completes with a [Operation]. 435 * Completes with a [Operation].
435 * 436 *
436 * Completes with a [common.ApiRequestError] if the API endpoint returned an 437 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
437 * error. 438 * error.
438 * 439 *
439 * If the used [http.Client] completes with an error when making a REST call, 440 * If the used [http.Client] completes with an error when making a REST call,
440 * this method will complete with the same error. 441 * this method will complete with the same error.
441 */ 442 */
442 async.Future<Operation> update(Database request, core.String project, core.Str ing instance, core.String database) { 443 async.Future<Operation> update(Database request, core.String project, core.Str ing instance, core.String database) {
443 var _url = null; 444 var _url = null;
444 var _queryParams = new core.Map(); 445 var _queryParams = new core.Map();
445 var _uploadMedia = null; 446 var _uploadMedia = null;
446 var _uploadOptions = null; 447 var _uploadOptions = null;
447 var _downloadOptions = common.DownloadOptions.Metadata; 448 var _downloadOptions = commons.DownloadOptions.Metadata;
448 var _body = null; 449 var _body = null;
449 450
450 if (request != null) { 451 if (request != null) {
451 _body = convert.JSON.encode((request).toJson()); 452 _body = convert.JSON.encode((request).toJson());
452 } 453 }
453 if (project == null) { 454 if (project == null) {
454 throw new core.ArgumentError("Parameter project is required."); 455 throw new core.ArgumentError("Parameter project is required.");
455 } 456 }
456 if (instance == null) { 457 if (instance == null) {
457 throw new core.ArgumentError("Parameter instance is required."); 458 throw new core.ArgumentError("Parameter instance is required.");
458 } 459 }
459 if (database == null) { 460 if (database == null) {
460 throw new core.ArgumentError("Parameter database is required."); 461 throw new core.ArgumentError("Parameter database is required.");
461 } 462 }
462 463
463 464
464 _url = 'projects/' + common_internal.Escaper.ecapeVariable('$project') + '/i nstances/' + common_internal.Escaper.ecapeVariable('$instance') + '/databases/' + common_internal.Escaper.ecapeVariable('$database'); 465 _url = 'projects/' + commons.Escaper.ecapeVariable('$project') + '/instances /' + commons.Escaper.ecapeVariable('$instance') + '/databases/' + commons.Escape r.ecapeVariable('$database');
465 466
466 var _response = _requester.request(_url, 467 var _response = _requester.request(_url,
467 "PUT", 468 "PUT",
468 body: _body, 469 body: _body,
469 queryParams: _queryParams, 470 queryParams: _queryParams,
470 uploadOptions: _uploadOptions, 471 uploadOptions: _uploadOptions,
471 uploadMedia: _uploadMedia, 472 uploadMedia: _uploadMedia,
472 downloadOptions: _downloadOptions); 473 downloadOptions: _downloadOptions);
473 return _response.then((data) => new Operation.fromJson(data)); 474 return _response.then((data) => new Operation.fromJson(data));
474 } 475 }
475 476
476 } 477 }
477 478
478 479
479 /** Not documented yet. */
480 class FlagsResourceApi { 480 class FlagsResourceApi {
481 final common_internal.ApiRequester _requester; 481 final commons.ApiRequester _requester;
482 482
483 FlagsResourceApi(common_internal.ApiRequester client) : 483 FlagsResourceApi(commons.ApiRequester client) :
484 _requester = client; 484 _requester = client;
485 485
486 /** 486 /**
487 * List all available database flags for Google Cloud SQL instances. 487 * List all available database flags for Google Cloud SQL instances.
488 * 488 *
489 * Request parameters: 489 * Request parameters:
490 * 490 *
491 * Completes with a [FlagsListResponse]. 491 * Completes with a [FlagsListResponse].
492 * 492 *
493 * Completes with a [common.ApiRequestError] if the API endpoint returned an 493 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
494 * error. 494 * error.
495 * 495 *
496 * If the used [http.Client] completes with an error when making a REST call, 496 * If the used [http.Client] completes with an error when making a REST call,
497 * this method will complete with the same error. 497 * this method will complete with the same error.
498 */ 498 */
499 async.Future<FlagsListResponse> list() { 499 async.Future<FlagsListResponse> list() {
500 var _url = null; 500 var _url = null;
501 var _queryParams = new core.Map(); 501 var _queryParams = new core.Map();
502 var _uploadMedia = null; 502 var _uploadMedia = null;
503 var _uploadOptions = null; 503 var _uploadOptions = null;
504 var _downloadOptions = common.DownloadOptions.Metadata; 504 var _downloadOptions = commons.DownloadOptions.Metadata;
505 var _body = null; 505 var _body = null;
506 506
507 507
508 508
509 _url = 'flags'; 509 _url = 'flags';
510 510
511 var _response = _requester.request(_url, 511 var _response = _requester.request(_url,
512 "GET", 512 "GET",
513 body: _body, 513 body: _body,
514 queryParams: _queryParams, 514 queryParams: _queryParams,
515 uploadOptions: _uploadOptions, 515 uploadOptions: _uploadOptions,
516 uploadMedia: _uploadMedia, 516 uploadMedia: _uploadMedia,
517 downloadOptions: _downloadOptions); 517 downloadOptions: _downloadOptions);
518 return _response.then((data) => new FlagsListResponse.fromJson(data)); 518 return _response.then((data) => new FlagsListResponse.fromJson(data));
519 } 519 }
520 520
521 } 521 }
522 522
523 523
524 /** Not documented yet. */
525 class InstancesResourceApi { 524 class InstancesResourceApi {
526 final common_internal.ApiRequester _requester; 525 final commons.ApiRequester _requester;
527 526
528 InstancesResourceApi(common_internal.ApiRequester client) : 527 InstancesResourceApi(commons.ApiRequester client) :
529 _requester = client; 528 _requester = client;
530 529
531 /** 530 /**
532 * Creates a Cloud SQL instance as a clone of the source instance. 531 * Creates a Cloud SQL instance as a clone of the source instance.
533 * 532 *
534 * [request] - The metadata request object. 533 * [request] - The metadata request object.
535 * 534 *
536 * Request parameters: 535 * Request parameters:
537 * 536 *
538 * [project] - Project ID of the source as well as the clone Cloud SQL 537 * [project] - Project ID of the source as well as the clone Cloud SQL
539 * instance. 538 * instance.
540 * 539 *
541 * [instance] - The ID of the Cloud SQL instance to be cloned (source). This 540 * [instance] - The ID of the Cloud SQL instance to be cloned (source). This
542 * does not include the project ID. 541 * does not include the project ID.
543 * 542 *
544 * Completes with a [Operation]. 543 * Completes with a [Operation].
545 * 544 *
546 * Completes with a [common.ApiRequestError] if the API endpoint returned an 545 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
547 * error. 546 * error.
548 * 547 *
549 * If the used [http.Client] completes with an error when making a REST call, 548 * If the used [http.Client] completes with an error when making a REST call,
550 * this method will complete with the same error. 549 * this method will complete with the same error.
551 */ 550 */
552 async.Future<Operation> clone(InstancesCloneRequest request, core.String proje ct, core.String instance) { 551 async.Future<Operation> clone(InstancesCloneRequest request, core.String proje ct, core.String instance) {
553 var _url = null; 552 var _url = null;
554 var _queryParams = new core.Map(); 553 var _queryParams = new core.Map();
555 var _uploadMedia = null; 554 var _uploadMedia = null;
556 var _uploadOptions = null; 555 var _uploadOptions = null;
557 var _downloadOptions = common.DownloadOptions.Metadata; 556 var _downloadOptions = commons.DownloadOptions.Metadata;
558 var _body = null; 557 var _body = null;
559 558
560 if (request != null) { 559 if (request != null) {
561 _body = convert.JSON.encode((request).toJson()); 560 _body = convert.JSON.encode((request).toJson());
562 } 561 }
563 if (project == null) { 562 if (project == null) {
564 throw new core.ArgumentError("Parameter project is required."); 563 throw new core.ArgumentError("Parameter project is required.");
565 } 564 }
566 if (instance == null) { 565 if (instance == null) {
567 throw new core.ArgumentError("Parameter instance is required."); 566 throw new core.ArgumentError("Parameter instance is required.");
568 } 567 }
569 568
570 569
571 _url = 'projects/' + common_internal.Escaper.ecapeVariable('$project') + '/i nstances/' + common_internal.Escaper.ecapeVariable('$instance') + '/clone'; 570 _url = 'projects/' + commons.Escaper.ecapeVariable('$project') + '/instances /' + commons.Escaper.ecapeVariable('$instance') + '/clone';
572 571
573 var _response = _requester.request(_url, 572 var _response = _requester.request(_url,
574 "POST", 573 "POST",
575 body: _body, 574 body: _body,
576 queryParams: _queryParams, 575 queryParams: _queryParams,
577 uploadOptions: _uploadOptions, 576 uploadOptions: _uploadOptions,
578 uploadMedia: _uploadMedia, 577 uploadMedia: _uploadMedia,
579 downloadOptions: _downloadOptions); 578 downloadOptions: _downloadOptions);
580 return _response.then((data) => new Operation.fromJson(data)); 579 return _response.then((data) => new Operation.fromJson(data));
581 } 580 }
582 581
583 /** 582 /**
584 * Deletes a Cloud SQL instance. 583 * Deletes a Cloud SQL instance.
585 * 584 *
586 * Request parameters: 585 * Request parameters:
587 * 586 *
588 * [project] - Project ID of the project that contains the instance to be 587 * [project] - Project ID of the project that contains the instance to be
589 * deleted. 588 * deleted.
590 * 589 *
591 * [instance] - Cloud SQL instance ID. This does not include the project ID. 590 * [instance] - Cloud SQL instance ID. This does not include the project ID.
592 * 591 *
593 * Completes with a [Operation]. 592 * Completes with a [Operation].
594 * 593 *
595 * Completes with a [common.ApiRequestError] if the API endpoint returned an 594 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
596 * error. 595 * error.
597 * 596 *
598 * If the used [http.Client] completes with an error when making a REST call, 597 * If the used [http.Client] completes with an error when making a REST call,
599 * this method will complete with the same error. 598 * this method will complete with the same error.
600 */ 599 */
601 async.Future<Operation> delete(core.String project, core.String instance) { 600 async.Future<Operation> delete(core.String project, core.String instance) {
602 var _url = null; 601 var _url = null;
603 var _queryParams = new core.Map(); 602 var _queryParams = new core.Map();
604 var _uploadMedia = null; 603 var _uploadMedia = null;
605 var _uploadOptions = null; 604 var _uploadOptions = null;
606 var _downloadOptions = common.DownloadOptions.Metadata; 605 var _downloadOptions = commons.DownloadOptions.Metadata;
607 var _body = null; 606 var _body = null;
608 607
609 if (project == null) { 608 if (project == null) {
610 throw new core.ArgumentError("Parameter project is required."); 609 throw new core.ArgumentError("Parameter project is required.");
611 } 610 }
612 if (instance == null) { 611 if (instance == null) {
613 throw new core.ArgumentError("Parameter instance is required."); 612 throw new core.ArgumentError("Parameter instance is required.");
614 } 613 }
615 614
616 615
617 _url = 'projects/' + common_internal.Escaper.ecapeVariable('$project') + '/i nstances/' + common_internal.Escaper.ecapeVariable('$instance'); 616 _url = 'projects/' + commons.Escaper.ecapeVariable('$project') + '/instances /' + commons.Escaper.ecapeVariable('$instance');
618 617
619 var _response = _requester.request(_url, 618 var _response = _requester.request(_url,
620 "DELETE", 619 "DELETE",
621 body: _body, 620 body: _body,
622 queryParams: _queryParams, 621 queryParams: _queryParams,
623 uploadOptions: _uploadOptions, 622 uploadOptions: _uploadOptions,
624 uploadMedia: _uploadMedia, 623 uploadMedia: _uploadMedia,
625 downloadOptions: _downloadOptions); 624 downloadOptions: _downloadOptions);
626 return _response.then((data) => new Operation.fromJson(data)); 625 return _response.then((data) => new Operation.fromJson(data));
627 } 626 }
628 627
629 /** 628 /**
630 * Exports data from a Cloud SQL instance to a Google Cloud Storage bucket as 629 * Exports data from a Cloud SQL instance to a Google Cloud Storage bucket as
631 * a MySQL dump file. 630 * a MySQL dump file.
632 * 631 *
633 * [request] - The metadata request object. 632 * [request] - The metadata request object.
634 * 633 *
635 * Request parameters: 634 * Request parameters:
636 * 635 *
637 * [project] - Project ID of the project that contains the instance to be 636 * [project] - Project ID of the project that contains the instance to be
638 * exported. 637 * exported.
639 * 638 *
640 * [instance] - Cloud SQL instance ID. This does not include the project ID. 639 * [instance] - Cloud SQL instance ID. This does not include the project ID.
641 * 640 *
642 * Completes with a [Operation]. 641 * Completes with a [Operation].
643 * 642 *
644 * Completes with a [common.ApiRequestError] if the API endpoint returned an 643 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
645 * error. 644 * error.
646 * 645 *
647 * If the used [http.Client] completes with an error when making a REST call, 646 * If the used [http.Client] completes with an error when making a REST call,
648 * this method will complete with the same error. 647 * this method will complete with the same error.
649 */ 648 */
650 async.Future<Operation> export(InstancesExportRequest request, core.String pro ject, core.String instance) { 649 async.Future<Operation> export(InstancesExportRequest request, core.String pro ject, core.String instance) {
651 var _url = null; 650 var _url = null;
652 var _queryParams = new core.Map(); 651 var _queryParams = new core.Map();
653 var _uploadMedia = null; 652 var _uploadMedia = null;
654 var _uploadOptions = null; 653 var _uploadOptions = null;
655 var _downloadOptions = common.DownloadOptions.Metadata; 654 var _downloadOptions = commons.DownloadOptions.Metadata;
656 var _body = null; 655 var _body = null;
657 656
658 if (request != null) { 657 if (request != null) {
659 _body = convert.JSON.encode((request).toJson()); 658 _body = convert.JSON.encode((request).toJson());
660 } 659 }
661 if (project == null) { 660 if (project == null) {
662 throw new core.ArgumentError("Parameter project is required."); 661 throw new core.ArgumentError("Parameter project is required.");
663 } 662 }
664 if (instance == null) { 663 if (instance == null) {
665 throw new core.ArgumentError("Parameter instance is required."); 664 throw new core.ArgumentError("Parameter instance is required.");
666 } 665 }
667 666
668 667
669 _url = 'projects/' + common_internal.Escaper.ecapeVariable('$project') + '/i nstances/' + common_internal.Escaper.ecapeVariable('$instance') + '/export'; 668 _url = 'projects/' + commons.Escaper.ecapeVariable('$project') + '/instances /' + commons.Escaper.ecapeVariable('$instance') + '/export';
670 669
671 var _response = _requester.request(_url, 670 var _response = _requester.request(_url,
672 "POST", 671 "POST",
673 body: _body, 672 body: _body,
674 queryParams: _queryParams, 673 queryParams: _queryParams,
675 uploadOptions: _uploadOptions, 674 uploadOptions: _uploadOptions,
676 uploadMedia: _uploadMedia, 675 uploadMedia: _uploadMedia,
677 downloadOptions: _downloadOptions); 676 downloadOptions: _downloadOptions);
678 return _response.then((data) => new Operation.fromJson(data)); 677 return _response.then((data) => new Operation.fromJson(data));
679 } 678 }
680 679
681 /** 680 /**
682 * Retrieves a resource containing information about a Cloud SQL instance. 681 * Retrieves a resource containing information about a Cloud SQL instance.
683 * 682 *
684 * Request parameters: 683 * Request parameters:
685 * 684 *
686 * [project] - Project ID of the project that contains the instance. 685 * [project] - Project ID of the project that contains the instance.
687 * 686 *
688 * [instance] - Database instance ID. This does not include the project ID. 687 * [instance] - Database instance ID. This does not include the project ID.
689 * 688 *
690 * Completes with a [DatabaseInstance]. 689 * Completes with a [DatabaseInstance].
691 * 690 *
692 * Completes with a [common.ApiRequestError] if the API endpoint returned an 691 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
693 * error. 692 * error.
694 * 693 *
695 * If the used [http.Client] completes with an error when making a REST call, 694 * If the used [http.Client] completes with an error when making a REST call,
696 * this method will complete with the same error. 695 * this method will complete with the same error.
697 */ 696 */
698 async.Future<DatabaseInstance> get(core.String project, core.String instance) { 697 async.Future<DatabaseInstance> get(core.String project, core.String instance) {
699 var _url = null; 698 var _url = null;
700 var _queryParams = new core.Map(); 699 var _queryParams = new core.Map();
701 var _uploadMedia = null; 700 var _uploadMedia = null;
702 var _uploadOptions = null; 701 var _uploadOptions = null;
703 var _downloadOptions = common.DownloadOptions.Metadata; 702 var _downloadOptions = commons.DownloadOptions.Metadata;
704 var _body = null; 703 var _body = null;
705 704
706 if (project == null) { 705 if (project == null) {
707 throw new core.ArgumentError("Parameter project is required."); 706 throw new core.ArgumentError("Parameter project is required.");
708 } 707 }
709 if (instance == null) { 708 if (instance == null) {
710 throw new core.ArgumentError("Parameter instance is required."); 709 throw new core.ArgumentError("Parameter instance is required.");
711 } 710 }
712 711
713 712
714 _url = 'projects/' + common_internal.Escaper.ecapeVariable('$project') + '/i nstances/' + common_internal.Escaper.ecapeVariable('$instance'); 713 _url = 'projects/' + commons.Escaper.ecapeVariable('$project') + '/instances /' + commons.Escaper.ecapeVariable('$instance');
715 714
716 var _response = _requester.request(_url, 715 var _response = _requester.request(_url,
717 "GET", 716 "GET",
718 body: _body, 717 body: _body,
719 queryParams: _queryParams, 718 queryParams: _queryParams,
720 uploadOptions: _uploadOptions, 719 uploadOptions: _uploadOptions,
721 uploadMedia: _uploadMedia, 720 uploadMedia: _uploadMedia,
722 downloadOptions: _downloadOptions); 721 downloadOptions: _downloadOptions);
723 return _response.then((data) => new DatabaseInstance.fromJson(data)); 722 return _response.then((data) => new DatabaseInstance.fromJson(data));
724 } 723 }
725 724
726 /** 725 /**
727 * Imports data into a Cloud SQL instance from a MySQL dump file in Google 726 * Imports data into a Cloud SQL instance from a MySQL dump file in Google
728 * Cloud Storage. 727 * Cloud Storage.
729 * 728 *
730 * [request] - The metadata request object. 729 * [request] - The metadata request object.
731 * 730 *
732 * Request parameters: 731 * Request parameters:
733 * 732 *
734 * [project] - Project ID of the project that contains the instance. 733 * [project] - Project ID of the project that contains the instance.
735 * 734 *
736 * [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.
737 * 736 *
738 * Completes with a [Operation]. 737 * Completes with a [Operation].
739 * 738 *
740 * Completes with a [common.ApiRequestError] if the API endpoint returned an 739 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
741 * error. 740 * error.
742 * 741 *
743 * If the used [http.Client] completes with an error when making a REST call, 742 * If the used [http.Client] completes with an error when making a REST call,
744 * this method will complete with the same error. 743 * this method will complete with the same error.
745 */ 744 */
746 async.Future<Operation> import(InstancesImportRequest request, core.String pro ject, core.String instance) { 745 async.Future<Operation> import(InstancesImportRequest request, core.String pro ject, core.String instance) {
747 var _url = null; 746 var _url = null;
748 var _queryParams = new core.Map(); 747 var _queryParams = new core.Map();
749 var _uploadMedia = null; 748 var _uploadMedia = null;
750 var _uploadOptions = null; 749 var _uploadOptions = null;
751 var _downloadOptions = common.DownloadOptions.Metadata; 750 var _downloadOptions = commons.DownloadOptions.Metadata;
752 var _body = null; 751 var _body = null;
753 752
754 if (request != null) { 753 if (request != null) {
755 _body = convert.JSON.encode((request).toJson()); 754 _body = convert.JSON.encode((request).toJson());
756 } 755 }
757 if (project == null) { 756 if (project == null) {
758 throw new core.ArgumentError("Parameter project is required."); 757 throw new core.ArgumentError("Parameter project is required.");
759 } 758 }
760 if (instance == null) { 759 if (instance == null) {
761 throw new core.ArgumentError("Parameter instance is required."); 760 throw new core.ArgumentError("Parameter instance is required.");
762 } 761 }
763 762
764 763
765 _url = 'projects/' + common_internal.Escaper.ecapeVariable('$project') + '/i nstances/' + common_internal.Escaper.ecapeVariable('$instance') + '/import'; 764 _url = 'projects/' + commons.Escaper.ecapeVariable('$project') + '/instances /' + commons.Escaper.ecapeVariable('$instance') + '/import';
766 765
767 var _response = _requester.request(_url, 766 var _response = _requester.request(_url,
768 "POST", 767 "POST",
769 body: _body, 768 body: _body,
770 queryParams: _queryParams, 769 queryParams: _queryParams,
771 uploadOptions: _uploadOptions, 770 uploadOptions: _uploadOptions,
772 uploadMedia: _uploadMedia, 771 uploadMedia: _uploadMedia,
773 downloadOptions: _downloadOptions); 772 downloadOptions: _downloadOptions);
774 return _response.then((data) => new Operation.fromJson(data)); 773 return _response.then((data) => new Operation.fromJson(data));
775 } 774 }
776 775
777 /** 776 /**
778 * Creates a new Cloud SQL instance. 777 * Creates a new Cloud SQL instance.
779 * 778 *
780 * [request] - The metadata request object. 779 * [request] - The metadata request object.
781 * 780 *
782 * Request parameters: 781 * Request parameters:
783 * 782 *
784 * [project] - Project ID of the project to which the newly created Cloud SQL 783 * [project] - Project ID of the project to which the newly created Cloud SQL
785 * instances should belong. 784 * instances should belong.
786 * 785 *
787 * Completes with a [Operation]. 786 * Completes with a [Operation].
788 * 787 *
789 * Completes with a [common.ApiRequestError] if the API endpoint returned an 788 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
790 * error. 789 * error.
791 * 790 *
792 * If the used [http.Client] completes with an error when making a REST call, 791 * If the used [http.Client] completes with an error when making a REST call,
793 * this method will complete with the same error. 792 * this method will complete with the same error.
794 */ 793 */
795 async.Future<Operation> insert(DatabaseInstance request, core.String project) { 794 async.Future<Operation> insert(DatabaseInstance request, core.String project) {
796 var _url = null; 795 var _url = null;
797 var _queryParams = new core.Map(); 796 var _queryParams = new core.Map();
798 var _uploadMedia = null; 797 var _uploadMedia = null;
799 var _uploadOptions = null; 798 var _uploadOptions = null;
800 var _downloadOptions = common.DownloadOptions.Metadata; 799 var _downloadOptions = commons.DownloadOptions.Metadata;
801 var _body = null; 800 var _body = null;
802 801
803 if (request != null) { 802 if (request != null) {
804 _body = convert.JSON.encode((request).toJson()); 803 _body = convert.JSON.encode((request).toJson());
805 } 804 }
806 if (project == null) { 805 if (project == null) {
807 throw new core.ArgumentError("Parameter project is required."); 806 throw new core.ArgumentError("Parameter project is required.");
808 } 807 }
809 808
810 809
811 _url = 'projects/' + common_internal.Escaper.ecapeVariable('$project') + '/i nstances'; 810 _url = 'projects/' + commons.Escaper.ecapeVariable('$project') + '/instances ';
812 811
813 var _response = _requester.request(_url, 812 var _response = _requester.request(_url,
814 "POST", 813 "POST",
815 body: _body, 814 body: _body,
816 queryParams: _queryParams, 815 queryParams: _queryParams,
817 uploadOptions: _uploadOptions, 816 uploadOptions: _uploadOptions,
818 uploadMedia: _uploadMedia, 817 uploadMedia: _uploadMedia,
819 downloadOptions: _downloadOptions); 818 downloadOptions: _downloadOptions);
820 return _response.then((data) => new Operation.fromJson(data)); 819 return _response.then((data) => new Operation.fromJson(data));
821 } 820 }
822 821
823 /** 822 /**
824 * Lists instances under a given project in the alphabetical order of the 823 * Lists instances under a given project in the alphabetical order of the
825 * instance name. 824 * instance name.
826 * 825 *
827 * Request parameters: 826 * Request parameters:
828 * 827 *
829 * [project] - Project ID of the project for which to list Cloud SQL 828 * [project] - Project ID of the project for which to list Cloud SQL
830 * instances. 829 * instances.
831 * 830 *
832 * [maxResults] - The maximum number of results to return per response. 831 * [maxResults] - The maximum number of results to return per response.
833 * 832 *
834 * [pageToken] - A previously-returned page token representing part of the 833 * [pageToken] - A previously-returned page token representing part of the
835 * larger set of results to view. 834 * larger set of results to view.
836 * 835 *
837 * Completes with a [InstancesListResponse]. 836 * Completes with a [InstancesListResponse].
838 * 837 *
839 * Completes with a [common.ApiRequestError] if the API endpoint returned an 838 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
840 * error. 839 * error.
841 * 840 *
842 * If the used [http.Client] completes with an error when making a REST call, 841 * If the used [http.Client] completes with an error when making a REST call,
843 * this method will complete with the same error. 842 * this method will complete with the same error.
844 */ 843 */
845 async.Future<InstancesListResponse> list(core.String project, {core.int maxRes ults, core.String pageToken}) { 844 async.Future<InstancesListResponse> list(core.String project, {core.int maxRes ults, core.String pageToken}) {
846 var _url = null; 845 var _url = null;
847 var _queryParams = new core.Map(); 846 var _queryParams = new core.Map();
848 var _uploadMedia = null; 847 var _uploadMedia = null;
849 var _uploadOptions = null; 848 var _uploadOptions = null;
850 var _downloadOptions = common.DownloadOptions.Metadata; 849 var _downloadOptions = commons.DownloadOptions.Metadata;
851 var _body = null; 850 var _body = null;
852 851
853 if (project == null) { 852 if (project == null) {
854 throw new core.ArgumentError("Parameter project is required."); 853 throw new core.ArgumentError("Parameter project is required.");
855 } 854 }
856 if (maxResults != null) { 855 if (maxResults != null) {
857 _queryParams["maxResults"] = ["${maxResults}"]; 856 _queryParams["maxResults"] = ["${maxResults}"];
858 } 857 }
859 if (pageToken != null) { 858 if (pageToken != null) {
860 _queryParams["pageToken"] = [pageToken]; 859 _queryParams["pageToken"] = [pageToken];
861 } 860 }
862 861
863 862
864 _url = 'projects/' + common_internal.Escaper.ecapeVariable('$project') + '/i nstances'; 863 _url = 'projects/' + commons.Escaper.ecapeVariable('$project') + '/instances ';
865 864
866 var _response = _requester.request(_url, 865 var _response = _requester.request(_url,
867 "GET", 866 "GET",
868 body: _body, 867 body: _body,
869 queryParams: _queryParams, 868 queryParams: _queryParams,
870 uploadOptions: _uploadOptions, 869 uploadOptions: _uploadOptions,
871 uploadMedia: _uploadMedia, 870 uploadMedia: _uploadMedia,
872 downloadOptions: _downloadOptions); 871 downloadOptions: _downloadOptions);
873 return _response.then((data) => new InstancesListResponse.fromJson(data)); 872 return _response.then((data) => new InstancesListResponse.fromJson(data));
874 } 873 }
875 874
876 /** 875 /**
877 * Updates settings of a Cloud SQL instance. Caution: This is not a partial 876 * Updates settings of a Cloud SQL instance. Caution: This is not a partial
878 * update, so you must include values for all the settings that you want to 877 * update, so you must include values for all the settings that you want to
879 * retain. For partial updates, use patch.. This method supports patch 878 * retain. For partial updates, use patch.. This method supports patch
880 * semantics. 879 * semantics.
881 * 880 *
882 * [request] - The metadata request object. 881 * [request] - The metadata request object.
883 * 882 *
884 * Request parameters: 883 * Request parameters:
885 * 884 *
886 * [project] - Project ID of the project that contains the instance. 885 * [project] - Project ID of the project that contains the instance.
887 * 886 *
888 * [instance] - Cloud SQL instance ID. This does not include the project ID. 887 * [instance] - Cloud SQL instance ID. This does not include the project ID.
889 * 888 *
890 * Completes with a [Operation]. 889 * Completes with a [Operation].
891 * 890 *
892 * Completes with a [common.ApiRequestError] if the API endpoint returned an 891 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
893 * error. 892 * error.
894 * 893 *
895 * If the used [http.Client] completes with an error when making a REST call, 894 * If the used [http.Client] completes with an error when making a REST call,
896 * this method will complete with the same error. 895 * this method will complete with the same error.
897 */ 896 */
898 async.Future<Operation> patch(DatabaseInstance request, core.String project, c ore.String instance) { 897 async.Future<Operation> patch(DatabaseInstance request, core.String project, c ore.String instance) {
899 var _url = null; 898 var _url = null;
900 var _queryParams = new core.Map(); 899 var _queryParams = new core.Map();
901 var _uploadMedia = null; 900 var _uploadMedia = null;
902 var _uploadOptions = null; 901 var _uploadOptions = null;
903 var _downloadOptions = common.DownloadOptions.Metadata; 902 var _downloadOptions = commons.DownloadOptions.Metadata;
904 var _body = null; 903 var _body = null;
905 904
906 if (request != null) { 905 if (request != null) {
907 _body = convert.JSON.encode((request).toJson()); 906 _body = convert.JSON.encode((request).toJson());
908 } 907 }
909 if (project == null) { 908 if (project == null) {
910 throw new core.ArgumentError("Parameter project is required."); 909 throw new core.ArgumentError("Parameter project is required.");
911 } 910 }
912 if (instance == null) { 911 if (instance == null) {
913 throw new core.ArgumentError("Parameter instance is required."); 912 throw new core.ArgumentError("Parameter instance is required.");
914 } 913 }
915 914
916 915
917 _url = 'projects/' + common_internal.Escaper.ecapeVariable('$project') + '/i nstances/' + common_internal.Escaper.ecapeVariable('$instance'); 916 _url = 'projects/' + commons.Escaper.ecapeVariable('$project') + '/instances /' + commons.Escaper.ecapeVariable('$instance');
918 917
919 var _response = _requester.request(_url, 918 var _response = _requester.request(_url,
920 "PATCH", 919 "PATCH",
921 body: _body, 920 body: _body,
922 queryParams: _queryParams, 921 queryParams: _queryParams,
923 uploadOptions: _uploadOptions, 922 uploadOptions: _uploadOptions,
924 uploadMedia: _uploadMedia, 923 uploadMedia: _uploadMedia,
925 downloadOptions: _downloadOptions); 924 downloadOptions: _downloadOptions);
926 return _response.then((data) => new Operation.fromJson(data)); 925 return _response.then((data) => new Operation.fromJson(data));
927 } 926 }
928 927
929 /** 928 /**
930 * Promotes the read replica instance to be a stand-alone Cloud SQL instance. 929 * Promotes the read replica instance to be a stand-alone Cloud SQL instance.
931 * 930 *
932 * Request parameters: 931 * Request parameters:
933 * 932 *
934 * [project] - ID of the project that contains the read replica. 933 * [project] - ID of the project that contains the read replica.
935 * 934 *
936 * [instance] - Cloud SQL read replica instance name. 935 * [instance] - Cloud SQL read replica instance name.
937 * 936 *
938 * Completes with a [Operation]. 937 * Completes with a [Operation].
939 * 938 *
940 * Completes with a [common.ApiRequestError] if the API endpoint returned an 939 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
941 * error. 940 * error.
942 * 941 *
943 * If the used [http.Client] completes with an error when making a REST call, 942 * If the used [http.Client] completes with an error when making a REST call,
944 * this method will complete with the same error. 943 * this method will complete with the same error.
945 */ 944 */
946 async.Future<Operation> promoteReplica(core.String project, core.String instan ce) { 945 async.Future<Operation> promoteReplica(core.String project, core.String instan ce) {
947 var _url = null; 946 var _url = null;
948 var _queryParams = new core.Map(); 947 var _queryParams = new core.Map();
949 var _uploadMedia = null; 948 var _uploadMedia = null;
950 var _uploadOptions = null; 949 var _uploadOptions = null;
951 var _downloadOptions = common.DownloadOptions.Metadata; 950 var _downloadOptions = commons.DownloadOptions.Metadata;
952 var _body = null; 951 var _body = null;
953 952
954 if (project == null) { 953 if (project == null) {
955 throw new core.ArgumentError("Parameter project is required."); 954 throw new core.ArgumentError("Parameter project is required.");
956 } 955 }
957 if (instance == null) { 956 if (instance == null) {
958 throw new core.ArgumentError("Parameter instance is required."); 957 throw new core.ArgumentError("Parameter instance is required.");
959 } 958 }
960 959
961 960
962 _url = 'projects/' + common_internal.Escaper.ecapeVariable('$project') + '/i nstances/' + common_internal.Escaper.ecapeVariable('$instance') + '/promoteRepli ca'; 961 _url = 'projects/' + commons.Escaper.ecapeVariable('$project') + '/instances /' + commons.Escaper.ecapeVariable('$instance') + '/promoteReplica';
963 962
964 var _response = _requester.request(_url, 963 var _response = _requester.request(_url,
965 "POST", 964 "POST",
966 body: _body, 965 body: _body,
967 queryParams: _queryParams, 966 queryParams: _queryParams,
968 uploadOptions: _uploadOptions, 967 uploadOptions: _uploadOptions,
969 uploadMedia: _uploadMedia, 968 uploadMedia: _uploadMedia,
970 downloadOptions: _downloadOptions); 969 downloadOptions: _downloadOptions);
971 return _response.then((data) => new Operation.fromJson(data)); 970 return _response.then((data) => new Operation.fromJson(data));
972 } 971 }
973 972
974 /** 973 /**
975 * Deletes all client certificates and generates a new server SSL certificate 974 * Deletes all client certificates and generates a new server SSL certificate
976 * for the instance. The changes will not take effect until the instance is 975 * for the instance. The changes will not take effect until the instance is
977 * restarted. Existing instances without a server certificate will need to 976 * restarted. Existing instances without a server certificate will need to
978 * call this once to set a server certificate. 977 * call this once to set a server certificate.
979 * 978 *
980 * Request parameters: 979 * Request parameters:
981 * 980 *
982 * [project] - Project ID of the project that contains the instance. 981 * [project] - Project ID of the project that contains the instance.
983 * 982 *
984 * [instance] - Cloud SQL instance ID. This does not include the project ID. 983 * [instance] - Cloud SQL instance ID. This does not include the project ID.
985 * 984 *
986 * Completes with a [Operation]. 985 * Completes with a [Operation].
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<Operation> resetSslConfig(core.String project, core.String instan ce) { 993 async.Future<Operation> resetSslConfig(core.String project, core.String instan ce) {
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 1007
1009 1008
1010 _url = 'projects/' + common_internal.Escaper.ecapeVariable('$project') + '/i nstances/' + common_internal.Escaper.ecapeVariable('$instance') + '/resetSslConf ig'; 1009 _url = 'projects/' + commons.Escaper.ecapeVariable('$project') + '/instances /' + commons.Escaper.ecapeVariable('$instance') + '/resetSslConfig';
1011 1010
1012 var _response = _requester.request(_url, 1011 var _response = _requester.request(_url,
1013 "POST", 1012 "POST",
1014 body: _body, 1013 body: _body,
1015 queryParams: _queryParams, 1014 queryParams: _queryParams,
1016 uploadOptions: _uploadOptions, 1015 uploadOptions: _uploadOptions,
1017 uploadMedia: _uploadMedia, 1016 uploadMedia: _uploadMedia,
1018 downloadOptions: _downloadOptions); 1017 downloadOptions: _downloadOptions);
1019 return _response.then((data) => new Operation.fromJson(data)); 1018 return _response.then((data) => new Operation.fromJson(data));
1020 } 1019 }
1021 1020
1022 /** 1021 /**
1023 * Restarts a Cloud SQL instance. 1022 * Restarts a Cloud SQL instance.
1024 * 1023 *
1025 * Request parameters: 1024 * Request parameters:
1026 * 1025 *
1027 * [project] - Project ID of the project that contains the instance to be 1026 * [project] - Project ID of the project that contains the instance to be
1028 * restarted. 1027 * restarted.
1029 * 1028 *
1030 * [instance] - Cloud SQL instance ID. This does not include the project ID. 1029 * [instance] - Cloud SQL instance ID. This does not include the project ID.
1031 * 1030 *
1032 * Completes with a [Operation]. 1031 * Completes with a [Operation].
1033 * 1032 *
1034 * Completes with a [common.ApiRequestError] if the API endpoint returned an 1033 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
1035 * error. 1034 * error.
1036 * 1035 *
1037 * If the used [http.Client] completes with an error when making a REST call, 1036 * If the used [http.Client] completes with an error when making a REST call,
1038 * this method will complete with the same error. 1037 * this method will complete with the same error.
1039 */ 1038 */
1040 async.Future<Operation> restart(core.String project, core.String instance) { 1039 async.Future<Operation> restart(core.String project, core.String instance) {
1041 var _url = null; 1040 var _url = null;
1042 var _queryParams = new core.Map(); 1041 var _queryParams = new core.Map();
1043 var _uploadMedia = null; 1042 var _uploadMedia = null;
1044 var _uploadOptions = null; 1043 var _uploadOptions = null;
1045 var _downloadOptions = common.DownloadOptions.Metadata; 1044 var _downloadOptions = commons.DownloadOptions.Metadata;
1046 var _body = null; 1045 var _body = null;
1047 1046
1048 if (project == null) { 1047 if (project == null) {
1049 throw new core.ArgumentError("Parameter project is required."); 1048 throw new core.ArgumentError("Parameter project is required.");
1050 } 1049 }
1051 if (instance == null) { 1050 if (instance == null) {
1052 throw new core.ArgumentError("Parameter instance is required."); 1051 throw new core.ArgumentError("Parameter instance is required.");
1053 } 1052 }
1054 1053
1055 1054
1056 _url = 'projects/' + common_internal.Escaper.ecapeVariable('$project') + '/i nstances/' + common_internal.Escaper.ecapeVariable('$instance') + '/restart'; 1055 _url = 'projects/' + commons.Escaper.ecapeVariable('$project') + '/instances /' + commons.Escaper.ecapeVariable('$instance') + '/restart';
1057 1056
1058 var _response = _requester.request(_url, 1057 var _response = _requester.request(_url,
1059 "POST", 1058 "POST",
1060 body: _body, 1059 body: _body,
1061 queryParams: _queryParams, 1060 queryParams: _queryParams,
1062 uploadOptions: _uploadOptions, 1061 uploadOptions: _uploadOptions,
1063 uploadMedia: _uploadMedia, 1062 uploadMedia: _uploadMedia,
1064 downloadOptions: _downloadOptions); 1063 downloadOptions: _downloadOptions);
1065 return _response.then((data) => new Operation.fromJson(data)); 1064 return _response.then((data) => new Operation.fromJson(data));
1066 } 1065 }
1067 1066
1068 /** 1067 /**
1069 * Restores a backup of a Cloud SQL instance. 1068 * Restores a backup of a Cloud SQL instance.
1070 * 1069 *
1071 * [request] - The metadata request object. 1070 * [request] - The metadata request object.
1072 * 1071 *
1073 * Request parameters: 1072 * Request parameters:
1074 * 1073 *
1075 * [project] - Project ID of the project that contains the instance. 1074 * [project] - Project ID of the project that contains the instance.
1076 * 1075 *
1077 * [instance] - Cloud SQL instance ID. This does not include the project ID. 1076 * [instance] - Cloud SQL instance ID. This does not include the project ID.
1078 * 1077 *
1079 * Completes with a [Operation]. 1078 * Completes with a [Operation].
1080 * 1079 *
1081 * Completes with a [common.ApiRequestError] if the API endpoint returned an 1080 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
1082 * error. 1081 * error.
1083 * 1082 *
1084 * If the used [http.Client] completes with an error when making a REST call, 1083 * If the used [http.Client] completes with an error when making a REST call,
1085 * this method will complete with the same error. 1084 * this method will complete with the same error.
1086 */ 1085 */
1087 async.Future<Operation> restoreBackup(InstancesRestoreBackupRequest request, c ore.String project, core.String instance) { 1086 async.Future<Operation> restoreBackup(InstancesRestoreBackupRequest request, c ore.String project, core.String instance) {
1088 var _url = null; 1087 var _url = null;
1089 var _queryParams = new core.Map(); 1088 var _queryParams = new core.Map();
1090 var _uploadMedia = null; 1089 var _uploadMedia = null;
1091 var _uploadOptions = null; 1090 var _uploadOptions = null;
1092 var _downloadOptions = common.DownloadOptions.Metadata; 1091 var _downloadOptions = commons.DownloadOptions.Metadata;
1093 var _body = null; 1092 var _body = null;
1094 1093
1095 if (request != null) { 1094 if (request != null) {
1096 _body = convert.JSON.encode((request).toJson()); 1095 _body = convert.JSON.encode((request).toJson());
1097 } 1096 }
1098 if (project == null) { 1097 if (project == null) {
1099 throw new core.ArgumentError("Parameter project is required."); 1098 throw new core.ArgumentError("Parameter project is required.");
1100 } 1099 }
1101 if (instance == null) { 1100 if (instance == null) {
1102 throw new core.ArgumentError("Parameter instance is required."); 1101 throw new core.ArgumentError("Parameter instance is required.");
1103 } 1102 }
1104 1103
1105 1104
1106 _url = 'projects/' + common_internal.Escaper.ecapeVariable('$project') + '/i nstances/' + common_internal.Escaper.ecapeVariable('$instance') + '/restoreBacku p'; 1105 _url = 'projects/' + commons.Escaper.ecapeVariable('$project') + '/instances /' + commons.Escaper.ecapeVariable('$instance') + '/restoreBackup';
1107 1106
1108 var _response = _requester.request(_url, 1107 var _response = _requester.request(_url,
1109 "POST", 1108 "POST",
1110 body: _body, 1109 body: _body,
1111 queryParams: _queryParams, 1110 queryParams: _queryParams,
1112 uploadOptions: _uploadOptions, 1111 uploadOptions: _uploadOptions,
1113 uploadMedia: _uploadMedia, 1112 uploadMedia: _uploadMedia,
1114 downloadOptions: _downloadOptions); 1113 downloadOptions: _downloadOptions);
1115 return _response.then((data) => new Operation.fromJson(data)); 1114 return _response.then((data) => new Operation.fromJson(data));
1116 } 1115 }
1117 1116
1118 /** 1117 /**
1119 * Starts the replication in the read replica instance. 1118 * Starts the replication in the read replica instance.
1120 * 1119 *
1121 * Request parameters: 1120 * Request parameters:
1122 * 1121 *
1123 * [project] - ID of the project that contains the read replica. 1122 * [project] - ID of the project that contains the read replica.
1124 * 1123 *
1125 * [instance] - Cloud SQL read replica instance name. 1124 * [instance] - Cloud SQL read replica instance name.
1126 * 1125 *
1127 * Completes with a [Operation]. 1126 * Completes with a [Operation].
1128 * 1127 *
1129 * Completes with a [common.ApiRequestError] if the API endpoint returned an 1128 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
1130 * error. 1129 * error.
1131 * 1130 *
1132 * If the used [http.Client] completes with an error when making a REST call, 1131 * If the used [http.Client] completes with an error when making a REST call,
1133 * this method will complete with the same error. 1132 * this method will complete with the same error.
1134 */ 1133 */
1135 async.Future<Operation> startReplica(core.String project, core.String instance ) { 1134 async.Future<Operation> startReplica(core.String project, core.String instance ) {
1136 var _url = null; 1135 var _url = null;
1137 var _queryParams = new core.Map(); 1136 var _queryParams = new core.Map();
1138 var _uploadMedia = null; 1137 var _uploadMedia = null;
1139 var _uploadOptions = null; 1138 var _uploadOptions = null;
1140 var _downloadOptions = common.DownloadOptions.Metadata; 1139 var _downloadOptions = commons.DownloadOptions.Metadata;
1141 var _body = null; 1140 var _body = null;
1142 1141
1143 if (project == null) { 1142 if (project == null) {
1144 throw new core.ArgumentError("Parameter project is required."); 1143 throw new core.ArgumentError("Parameter project is required.");
1145 } 1144 }
1146 if (instance == null) { 1145 if (instance == null) {
1147 throw new core.ArgumentError("Parameter instance is required."); 1146 throw new core.ArgumentError("Parameter instance is required.");
1148 } 1147 }
1149 1148
1150 1149
1151 _url = 'projects/' + common_internal.Escaper.ecapeVariable('$project') + '/i nstances/' + common_internal.Escaper.ecapeVariable('$instance') + '/startReplica '; 1150 _url = 'projects/' + commons.Escaper.ecapeVariable('$project') + '/instances /' + commons.Escaper.ecapeVariable('$instance') + '/startReplica';
1152 1151
1153 var _response = _requester.request(_url, 1152 var _response = _requester.request(_url,
1154 "POST", 1153 "POST",
1155 body: _body, 1154 body: _body,
1156 queryParams: _queryParams, 1155 queryParams: _queryParams,
1157 uploadOptions: _uploadOptions, 1156 uploadOptions: _uploadOptions,
1158 uploadMedia: _uploadMedia, 1157 uploadMedia: _uploadMedia,
1159 downloadOptions: _downloadOptions); 1158 downloadOptions: _downloadOptions);
1160 return _response.then((data) => new Operation.fromJson(data)); 1159 return _response.then((data) => new Operation.fromJson(data));
1161 } 1160 }
1162 1161
1163 /** 1162 /**
1164 * Stops the replication in the read replica instance. 1163 * Stops the replication in the read replica instance.
1165 * 1164 *
1166 * Request parameters: 1165 * Request parameters:
1167 * 1166 *
1168 * [project] - ID of the project that contains the read replica. 1167 * [project] - ID of the project that contains the read replica.
1169 * 1168 *
1170 * [instance] - Cloud SQL read replica instance name. 1169 * [instance] - Cloud SQL read replica instance name.
1171 * 1170 *
1172 * Completes with a [Operation]. 1171 * Completes with a [Operation].
1173 * 1172 *
1174 * Completes with a [common.ApiRequestError] if the API endpoint returned an 1173 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
1175 * error. 1174 * error.
1176 * 1175 *
1177 * If the used [http.Client] completes with an error when making a REST call, 1176 * If the used [http.Client] completes with an error when making a REST call,
1178 * this method will complete with the same error. 1177 * this method will complete with the same error.
1179 */ 1178 */
1180 async.Future<Operation> stopReplica(core.String project, core.String instance) { 1179 async.Future<Operation> stopReplica(core.String project, core.String instance) {
1181 var _url = null; 1180 var _url = null;
1182 var _queryParams = new core.Map(); 1181 var _queryParams = new core.Map();
1183 var _uploadMedia = null; 1182 var _uploadMedia = null;
1184 var _uploadOptions = null; 1183 var _uploadOptions = null;
1185 var _downloadOptions = common.DownloadOptions.Metadata; 1184 var _downloadOptions = commons.DownloadOptions.Metadata;
1186 var _body = null; 1185 var _body = null;
1187 1186
1188 if (project == null) { 1187 if (project == null) {
1189 throw new core.ArgumentError("Parameter project is required."); 1188 throw new core.ArgumentError("Parameter project is required.");
1190 } 1189 }
1191 if (instance == null) { 1190 if (instance == null) {
1192 throw new core.ArgumentError("Parameter instance is required."); 1191 throw new core.ArgumentError("Parameter instance is required.");
1193 } 1192 }
1194 1193
1195 1194
1196 _url = 'projects/' + common_internal.Escaper.ecapeVariable('$project') + '/i nstances/' + common_internal.Escaper.ecapeVariable('$instance') + '/stopReplica' ; 1195 _url = 'projects/' + commons.Escaper.ecapeVariable('$project') + '/instances /' + commons.Escaper.ecapeVariable('$instance') + '/stopReplica';
1197 1196
1198 var _response = _requester.request(_url, 1197 var _response = _requester.request(_url,
1199 "POST", 1198 "POST",
1200 body: _body, 1199 body: _body,
1201 queryParams: _queryParams, 1200 queryParams: _queryParams,
1202 uploadOptions: _uploadOptions, 1201 uploadOptions: _uploadOptions,
1203 uploadMedia: _uploadMedia, 1202 uploadMedia: _uploadMedia,
1204 downloadOptions: _downloadOptions); 1203 downloadOptions: _downloadOptions);
1205 return _response.then((data) => new Operation.fromJson(data)); 1204 return _response.then((data) => new Operation.fromJson(data));
1206 } 1205 }
1207 1206
1208 /** 1207 /**
1209 * Updates settings of a Cloud SQL instance. Caution: This is not a partial 1208 * Updates settings of a Cloud SQL instance. Caution: This is not a partial
1210 * update, so you must include values for all the settings that you want to 1209 * update, so you must include values for all the settings that you want to
1211 * retain. For partial updates, use patch. 1210 * retain. For partial updates, use patch.
1212 * 1211 *
1213 * [request] - The metadata request object. 1212 * [request] - The metadata request object.
1214 * 1213 *
1215 * Request parameters: 1214 * Request parameters:
1216 * 1215 *
1217 * [project] - Project ID of the project that contains the instance. 1216 * [project] - Project ID of the project that contains the instance.
1218 * 1217 *
1219 * [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.
1220 * 1219 *
1221 * Completes with a [Operation]. 1220 * Completes with a [Operation].
1222 * 1221 *
1223 * Completes with a [common.ApiRequestError] if the API endpoint returned an 1222 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
1224 * error. 1223 * error.
1225 * 1224 *
1226 * If the used [http.Client] completes with an error when making a REST call, 1225 * If the used [http.Client] completes with an error when making a REST call,
1227 * this method will complete with the same error. 1226 * this method will complete with the same error.
1228 */ 1227 */
1229 async.Future<Operation> update(DatabaseInstance request, core.String project, core.String instance) { 1228 async.Future<Operation> update(DatabaseInstance request, core.String project, core.String instance) {
1230 var _url = null; 1229 var _url = null;
1231 var _queryParams = new core.Map(); 1230 var _queryParams = new core.Map();
1232 var _uploadMedia = null; 1231 var _uploadMedia = null;
1233 var _uploadOptions = null; 1232 var _uploadOptions = null;
1234 var _downloadOptions = common.DownloadOptions.Metadata; 1233 var _downloadOptions = commons.DownloadOptions.Metadata;
1235 var _body = null; 1234 var _body = null;
1236 1235
1237 if (request != null) { 1236 if (request != null) {
1238 _body = convert.JSON.encode((request).toJson()); 1237 _body = convert.JSON.encode((request).toJson());
1239 } 1238 }
1240 if (project == null) { 1239 if (project == null) {
1241 throw new core.ArgumentError("Parameter project is required."); 1240 throw new core.ArgumentError("Parameter project is required.");
1242 } 1241 }
1243 if (instance == null) { 1242 if (instance == null) {
1244 throw new core.ArgumentError("Parameter instance is required."); 1243 throw new core.ArgumentError("Parameter instance is required.");
1245 } 1244 }
1246 1245
1247 1246
1248 _url = 'projects/' + common_internal.Escaper.ecapeVariable('$project') + '/i nstances/' + common_internal.Escaper.ecapeVariable('$instance'); 1247 _url = 'projects/' + commons.Escaper.ecapeVariable('$project') + '/instances /' + commons.Escaper.ecapeVariable('$instance');
1249 1248
1250 var _response = _requester.request(_url, 1249 var _response = _requester.request(_url,
1251 "PUT", 1250 "PUT",
1252 body: _body, 1251 body: _body,
1253 queryParams: _queryParams, 1252 queryParams: _queryParams,
1254 uploadOptions: _uploadOptions, 1253 uploadOptions: _uploadOptions,
1255 uploadMedia: _uploadMedia, 1254 uploadMedia: _uploadMedia,
1256 downloadOptions: _downloadOptions); 1255 downloadOptions: _downloadOptions);
1257 return _response.then((data) => new Operation.fromJson(data)); 1256 return _response.then((data) => new Operation.fromJson(data));
1258 } 1257 }
1259 1258
1260 } 1259 }
1261 1260
1262 1261
1263 /** Not documented yet. */
1264 class OperationsResourceApi { 1262 class OperationsResourceApi {
1265 final common_internal.ApiRequester _requester; 1263 final commons.ApiRequester _requester;
1266 1264
1267 OperationsResourceApi(common_internal.ApiRequester client) : 1265 OperationsResourceApi(commons.ApiRequester client) :
1268 _requester = client; 1266 _requester = client;
1269 1267
1270 /** 1268 /**
1271 * Retrieves an instance operation that has been performed on an instance. 1269 * Retrieves an instance operation that has been performed on an instance.
1272 * 1270 *
1273 * Request parameters: 1271 * Request parameters:
1274 * 1272 *
1275 * [project] - Project ID of the project that contains the instance. 1273 * [project] - Project ID of the project that contains the instance.
1276 * 1274 *
1277 * [operation] - Instance operation ID. 1275 * [operation] - Instance operation ID.
1278 * 1276 *
1279 * Completes with a [Operation]. 1277 * Completes with a [Operation].
1280 * 1278 *
1281 * Completes with a [common.ApiRequestError] if the API endpoint returned an 1279 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
1282 * error. 1280 * error.
1283 * 1281 *
1284 * If the used [http.Client] completes with an error when making a REST call, 1282 * If the used [http.Client] completes with an error when making a REST call,
1285 * this method will complete with the same error. 1283 * this method will complete with the same error.
1286 */ 1284 */
1287 async.Future<Operation> get(core.String project, core.String operation) { 1285 async.Future<Operation> get(core.String project, core.String operation) {
1288 var _url = null; 1286 var _url = null;
1289 var _queryParams = new core.Map(); 1287 var _queryParams = new core.Map();
1290 var _uploadMedia = null; 1288 var _uploadMedia = null;
1291 var _uploadOptions = null; 1289 var _uploadOptions = null;
1292 var _downloadOptions = common.DownloadOptions.Metadata; 1290 var _downloadOptions = commons.DownloadOptions.Metadata;
1293 var _body = null; 1291 var _body = null;
1294 1292
1295 if (project == null) { 1293 if (project == null) {
1296 throw new core.ArgumentError("Parameter project is required."); 1294 throw new core.ArgumentError("Parameter project is required.");
1297 } 1295 }
1298 if (operation == null) { 1296 if (operation == null) {
1299 throw new core.ArgumentError("Parameter operation is required."); 1297 throw new core.ArgumentError("Parameter operation is required.");
1300 } 1298 }
1301 1299
1302 1300
1303 _url = 'projects/' + common_internal.Escaper.ecapeVariable('$project') + '/o perations/' + common_internal.Escaper.ecapeVariable('$operation'); 1301 _url = 'projects/' + commons.Escaper.ecapeVariable('$project') + '/operation s/' + commons.Escaper.ecapeVariable('$operation');
1304 1302
1305 var _response = _requester.request(_url, 1303 var _response = _requester.request(_url,
1306 "GET", 1304 "GET",
1307 body: _body, 1305 body: _body,
1308 queryParams: _queryParams, 1306 queryParams: _queryParams,
1309 uploadOptions: _uploadOptions, 1307 uploadOptions: _uploadOptions,
1310 uploadMedia: _uploadMedia, 1308 uploadMedia: _uploadMedia,
1311 downloadOptions: _downloadOptions); 1309 downloadOptions: _downloadOptions);
1312 return _response.then((data) => new Operation.fromJson(data)); 1310 return _response.then((data) => new Operation.fromJson(data));
1313 } 1311 }
1314 1312
1315 /** 1313 /**
1316 * Lists all instance operations that have been performed on the given Cloud 1314 * Lists all instance operations that have been performed on the given Cloud
1317 * SQL instance in the reverse chronological order of the start time. 1315 * SQL instance in the reverse chronological order of the start time.
1318 * 1316 *
1319 * Request parameters: 1317 * Request parameters:
1320 * 1318 *
1321 * [project] - Project ID of the project that contains the instance. 1319 * [project] - Project ID of the project that contains the instance.
1322 * 1320 *
1323 * [instance] - Cloud SQL instance ID. This does not include the project ID. 1321 * [instance] - Cloud SQL instance ID. This does not include the project ID.
1324 * 1322 *
1325 * [maxResults] - Maximum number of operations per response. 1323 * [maxResults] - Maximum number of operations per response.
1326 * 1324 *
1327 * [pageToken] - A previously-returned page token representing part of the 1325 * [pageToken] - A previously-returned page token representing part of the
1328 * larger set of results to view. 1326 * larger set of results to view.
1329 * 1327 *
1330 * Completes with a [OperationsListResponse]. 1328 * Completes with a [OperationsListResponse].
1331 * 1329 *
1332 * Completes with a [common.ApiRequestError] if the API endpoint returned an 1330 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
1333 * error. 1331 * error.
1334 * 1332 *
1335 * If the used [http.Client] completes with an error when making a REST call, 1333 * If the used [http.Client] completes with an error when making a REST call,
1336 * this method will complete with the same error. 1334 * this method will complete with the same error.
1337 */ 1335 */
1338 async.Future<OperationsListResponse> list(core.String project, core.String ins tance, {core.int maxResults, core.String pageToken}) { 1336 async.Future<OperationsListResponse> list(core.String project, core.String ins tance, {core.int maxResults, core.String pageToken}) {
1339 var _url = null; 1337 var _url = null;
1340 var _queryParams = new core.Map(); 1338 var _queryParams = new core.Map();
1341 var _uploadMedia = null; 1339 var _uploadMedia = null;
1342 var _uploadOptions = null; 1340 var _uploadOptions = null;
1343 var _downloadOptions = common.DownloadOptions.Metadata; 1341 var _downloadOptions = commons.DownloadOptions.Metadata;
1344 var _body = null; 1342 var _body = null;
1345 1343
1346 if (project == null) { 1344 if (project == null) {
1347 throw new core.ArgumentError("Parameter project is required."); 1345 throw new core.ArgumentError("Parameter project is required.");
1348 } 1346 }
1349 if (instance == null) { 1347 if (instance == null) {
1350 throw new core.ArgumentError("Parameter instance is required."); 1348 throw new core.ArgumentError("Parameter instance is required.");
1351 } 1349 }
1352 _queryParams["instance"] = [instance]; 1350 _queryParams["instance"] = [instance];
1353 if (maxResults != null) { 1351 if (maxResults != null) {
1354 _queryParams["maxResults"] = ["${maxResults}"]; 1352 _queryParams["maxResults"] = ["${maxResults}"];
1355 } 1353 }
1356 if (pageToken != null) { 1354 if (pageToken != null) {
1357 _queryParams["pageToken"] = [pageToken]; 1355 _queryParams["pageToken"] = [pageToken];
1358 } 1356 }
1359 1357
1360 1358
1361 _url = 'projects/' + common_internal.Escaper.ecapeVariable('$project') + '/o perations'; 1359 _url = 'projects/' + commons.Escaper.ecapeVariable('$project') + '/operation s';
1362 1360
1363 var _response = _requester.request(_url, 1361 var _response = _requester.request(_url,
1364 "GET", 1362 "GET",
1365 body: _body, 1363 body: _body,
1366 queryParams: _queryParams, 1364 queryParams: _queryParams,
1367 uploadOptions: _uploadOptions, 1365 uploadOptions: _uploadOptions,
1368 uploadMedia: _uploadMedia, 1366 uploadMedia: _uploadMedia,
1369 downloadOptions: _downloadOptions); 1367 downloadOptions: _downloadOptions);
1370 return _response.then((data) => new OperationsListResponse.fromJson(data)); 1368 return _response.then((data) => new OperationsListResponse.fromJson(data));
1371 } 1369 }
1372 1370
1373 } 1371 }
1374 1372
1375 1373
1376 /** Not documented yet. */
1377 class SslCertsResourceApi { 1374 class SslCertsResourceApi {
1378 final common_internal.ApiRequester _requester; 1375 final commons.ApiRequester _requester;
1379 1376
1380 SslCertsResourceApi(common_internal.ApiRequester client) : 1377 SslCertsResourceApi(commons.ApiRequester client) :
1381 _requester = client; 1378 _requester = client;
1382 1379
1383 /** 1380 /**
1384 * Deletes the SSL certificate. The change will not take effect until the 1381 * Deletes the SSL certificate. The change will not take effect until the
1385 * instance is restarted. 1382 * instance is restarted.
1386 * 1383 *
1387 * Request parameters: 1384 * Request parameters:
1388 * 1385 *
1389 * [project] - Project ID of the project that contains the instance to be 1386 * [project] - Project ID of the project that contains the instance to be
1390 * deleted. 1387 * deleted.
1391 * 1388 *
1392 * [instance] - Cloud SQL instance ID. This does not include the project ID. 1389 * [instance] - Cloud SQL instance ID. This does not include the project ID.
1393 * 1390 *
1394 * [sha1Fingerprint] - Sha1 FingerPrint. 1391 * [sha1Fingerprint] - Sha1 FingerPrint.
1395 * 1392 *
1396 * Completes with a [Operation]. 1393 * Completes with a [Operation].
1397 * 1394 *
1398 * Completes with a [common.ApiRequestError] if the API endpoint returned an 1395 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
1399 * error. 1396 * error.
1400 * 1397 *
1401 * If the used [http.Client] completes with an error when making a REST call, 1398 * If the used [http.Client] completes with an error when making a REST call,
1402 * this method will complete with the same error. 1399 * this method will complete with the same error.
1403 */ 1400 */
1404 async.Future<Operation> delete(core.String project, core.String instance, core .String sha1Fingerprint) { 1401 async.Future<Operation> delete(core.String project, core.String instance, core .String sha1Fingerprint) {
1405 var _url = null; 1402 var _url = null;
1406 var _queryParams = new core.Map(); 1403 var _queryParams = new core.Map();
1407 var _uploadMedia = null; 1404 var _uploadMedia = null;
1408 var _uploadOptions = null; 1405 var _uploadOptions = null;
1409 var _downloadOptions = common.DownloadOptions.Metadata; 1406 var _downloadOptions = commons.DownloadOptions.Metadata;
1410 var _body = null; 1407 var _body = null;
1411 1408
1412 if (project == null) { 1409 if (project == null) {
1413 throw new core.ArgumentError("Parameter project is required."); 1410 throw new core.ArgumentError("Parameter project is required.");
1414 } 1411 }
1415 if (instance == null) { 1412 if (instance == null) {
1416 throw new core.ArgumentError("Parameter instance is required."); 1413 throw new core.ArgumentError("Parameter instance is required.");
1417 } 1414 }
1418 if (sha1Fingerprint == null) { 1415 if (sha1Fingerprint == null) {
1419 throw new core.ArgumentError("Parameter sha1Fingerprint is required."); 1416 throw new core.ArgumentError("Parameter sha1Fingerprint is required.");
1420 } 1417 }
1421 1418
1422 1419
1423 _url = 'projects/' + common_internal.Escaper.ecapeVariable('$project') + '/i nstances/' + common_internal.Escaper.ecapeVariable('$instance') + '/sslCerts/' + common_internal.Escaper.ecapeVariable('$sha1Fingerprint'); 1420 _url = 'projects/' + commons.Escaper.ecapeVariable('$project') + '/instances /' + commons.Escaper.ecapeVariable('$instance') + '/sslCerts/' + commons.Escaper .ecapeVariable('$sha1Fingerprint');
1424 1421
1425 var _response = _requester.request(_url, 1422 var _response = _requester.request(_url,
1426 "DELETE", 1423 "DELETE",
1427 body: _body, 1424 body: _body,
1428 queryParams: _queryParams, 1425 queryParams: _queryParams,
1429 uploadOptions: _uploadOptions, 1426 uploadOptions: _uploadOptions,
1430 uploadMedia: _uploadMedia, 1427 uploadMedia: _uploadMedia,
1431 downloadOptions: _downloadOptions); 1428 downloadOptions: _downloadOptions);
1432 return _response.then((data) => new Operation.fromJson(data)); 1429 return _response.then((data) => new Operation.fromJson(data));
1433 } 1430 }
1434 1431
1435 /** 1432 /**
1436 * Retrieves a particular SSL certificate. Does not include the private key 1433 * Retrieves a particular SSL certificate. Does not include the private key
1437 * (required for usage). The private key must be saved from the response to 1434 * (required for usage). The private key must be saved from the response to
1438 * initial creation. 1435 * initial creation.
1439 * 1436 *
1440 * Request parameters: 1437 * Request parameters:
1441 * 1438 *
1442 * [project] - Project ID of the project that contains the instance. 1439 * [project] - Project ID of the project that contains the instance.
1443 * 1440 *
1444 * [instance] - Cloud SQL instance ID. This does not include the project ID. 1441 * [instance] - Cloud SQL instance ID. This does not include the project ID.
1445 * 1442 *
1446 * [sha1Fingerprint] - Sha1 FingerPrint. 1443 * [sha1Fingerprint] - Sha1 FingerPrint.
1447 * 1444 *
1448 * Completes with a [SslCert]. 1445 * Completes with a [SslCert].
1449 * 1446 *
1450 * Completes with a [common.ApiRequestError] if the API endpoint returned an 1447 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
1451 * error. 1448 * error.
1452 * 1449 *
1453 * If the used [http.Client] completes with an error when making a REST call, 1450 * If the used [http.Client] completes with an error when making a REST call,
1454 * this method will complete with the same error. 1451 * this method will complete with the same error.
1455 */ 1452 */
1456 async.Future<SslCert> get(core.String project, core.String instance, core.Stri ng sha1Fingerprint) { 1453 async.Future<SslCert> get(core.String project, core.String instance, core.Stri ng sha1Fingerprint) {
1457 var _url = null; 1454 var _url = null;
1458 var _queryParams = new core.Map(); 1455 var _queryParams = new core.Map();
1459 var _uploadMedia = null; 1456 var _uploadMedia = null;
1460 var _uploadOptions = null; 1457 var _uploadOptions = null;
1461 var _downloadOptions = common.DownloadOptions.Metadata; 1458 var _downloadOptions = commons.DownloadOptions.Metadata;
1462 var _body = null; 1459 var _body = null;
1463 1460
1464 if (project == null) { 1461 if (project == null) {
1465 throw new core.ArgumentError("Parameter project is required."); 1462 throw new core.ArgumentError("Parameter project is required.");
1466 } 1463 }
1467 if (instance == null) { 1464 if (instance == null) {
1468 throw new core.ArgumentError("Parameter instance is required."); 1465 throw new core.ArgumentError("Parameter instance is required.");
1469 } 1466 }
1470 if (sha1Fingerprint == null) { 1467 if (sha1Fingerprint == null) {
1471 throw new core.ArgumentError("Parameter sha1Fingerprint is required."); 1468 throw new core.ArgumentError("Parameter sha1Fingerprint is required.");
1472 } 1469 }
1473 1470
1474 1471
1475 _url = 'projects/' + common_internal.Escaper.ecapeVariable('$project') + '/i nstances/' + common_internal.Escaper.ecapeVariable('$instance') + '/sslCerts/' + common_internal.Escaper.ecapeVariable('$sha1Fingerprint'); 1472 _url = 'projects/' + commons.Escaper.ecapeVariable('$project') + '/instances /' + commons.Escaper.ecapeVariable('$instance') + '/sslCerts/' + commons.Escaper .ecapeVariable('$sha1Fingerprint');
1476 1473
1477 var _response = _requester.request(_url, 1474 var _response = _requester.request(_url,
1478 "GET", 1475 "GET",
1479 body: _body, 1476 body: _body,
1480 queryParams: _queryParams, 1477 queryParams: _queryParams,
1481 uploadOptions: _uploadOptions, 1478 uploadOptions: _uploadOptions,
1482 uploadMedia: _uploadMedia, 1479 uploadMedia: _uploadMedia,
1483 downloadOptions: _downloadOptions); 1480 downloadOptions: _downloadOptions);
1484 return _response.then((data) => new SslCert.fromJson(data)); 1481 return _response.then((data) => new SslCert.fromJson(data));
1485 } 1482 }
1486 1483
1487 /** 1484 /**
1488 * Creates an SSL certificate and returns it along with the private key and 1485 * Creates an SSL certificate and returns it along with the private key and
1489 * server certificate authority. The new certificate will not be usable until 1486 * server certificate authority. The new certificate will not be usable until
1490 * the instance is restarted. 1487 * the instance is restarted.
1491 * 1488 *
1492 * [request] - The metadata request object. 1489 * [request] - The metadata request object.
1493 * 1490 *
1494 * Request parameters: 1491 * Request parameters:
1495 * 1492 *
1496 * [project] - Project ID of the project to which the newly created Cloud SQL 1493 * [project] - Project ID of the project to which the newly created Cloud SQL
1497 * instances should belong. 1494 * instances should belong.
1498 * 1495 *
1499 * [instance] - Cloud SQL instance ID. This does not include the project ID. 1496 * [instance] - Cloud SQL instance ID. This does not include the project ID.
1500 * 1497 *
1501 * Completes with a [SslCertsInsertResponse]. 1498 * Completes with a [SslCertsInsertResponse].
1502 * 1499 *
1503 * Completes with a [common.ApiRequestError] if the API endpoint returned an 1500 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
1504 * error. 1501 * error.
1505 * 1502 *
1506 * If the used [http.Client] completes with an error when making a REST call, 1503 * If the used [http.Client] completes with an error when making a REST call,
1507 * this method will complete with the same error. 1504 * this method will complete with the same error.
1508 */ 1505 */
1509 async.Future<SslCertsInsertResponse> insert(SslCertsInsertRequest request, cor e.String project, core.String instance) { 1506 async.Future<SslCertsInsertResponse> insert(SslCertsInsertRequest request, cor e.String project, core.String instance) {
1510 var _url = null; 1507 var _url = null;
1511 var _queryParams = new core.Map(); 1508 var _queryParams = new core.Map();
1512 var _uploadMedia = null; 1509 var _uploadMedia = null;
1513 var _uploadOptions = null; 1510 var _uploadOptions = null;
1514 var _downloadOptions = common.DownloadOptions.Metadata; 1511 var _downloadOptions = commons.DownloadOptions.Metadata;
1515 var _body = null; 1512 var _body = null;
1516 1513
1517 if (request != null) { 1514 if (request != null) {
1518 _body = convert.JSON.encode((request).toJson()); 1515 _body = convert.JSON.encode((request).toJson());
1519 } 1516 }
1520 if (project == null) { 1517 if (project == null) {
1521 throw new core.ArgumentError("Parameter project is required."); 1518 throw new core.ArgumentError("Parameter project is required.");
1522 } 1519 }
1523 if (instance == null) { 1520 if (instance == null) {
1524 throw new core.ArgumentError("Parameter instance is required."); 1521 throw new core.ArgumentError("Parameter instance is required.");
1525 } 1522 }
1526 1523
1527 1524
1528 _url = 'projects/' + common_internal.Escaper.ecapeVariable('$project') + '/i nstances/' + common_internal.Escaper.ecapeVariable('$instance') + '/sslCerts'; 1525 _url = 'projects/' + commons.Escaper.ecapeVariable('$project') + '/instances /' + commons.Escaper.ecapeVariable('$instance') + '/sslCerts';
1529 1526
1530 var _response = _requester.request(_url, 1527 var _response = _requester.request(_url,
1531 "POST", 1528 "POST",
1532 body: _body, 1529 body: _body,
1533 queryParams: _queryParams, 1530 queryParams: _queryParams,
1534 uploadOptions: _uploadOptions, 1531 uploadOptions: _uploadOptions,
1535 uploadMedia: _uploadMedia, 1532 uploadMedia: _uploadMedia,
1536 downloadOptions: _downloadOptions); 1533 downloadOptions: _downloadOptions);
1537 return _response.then((data) => new SslCertsInsertResponse.fromJson(data)); 1534 return _response.then((data) => new SslCertsInsertResponse.fromJson(data));
1538 } 1535 }
1539 1536
1540 /** 1537 /**
1541 * Lists all of the current SSL certificates for the instance. 1538 * Lists all of the current SSL certificates for the instance.
1542 * 1539 *
1543 * Request parameters: 1540 * Request parameters:
1544 * 1541 *
1545 * [project] - Project ID of the project for which to list Cloud SQL 1542 * [project] - Project ID of the project for which to list Cloud SQL
1546 * instances. 1543 * instances.
1547 * 1544 *
1548 * [instance] - Cloud SQL instance ID. This does not include the project ID. 1545 * [instance] - Cloud SQL instance ID. This does not include the project ID.
1549 * 1546 *
1550 * Completes with a [SslCertsListResponse]. 1547 * Completes with a [SslCertsListResponse].
1551 * 1548 *
1552 * Completes with a [common.ApiRequestError] if the API endpoint returned an 1549 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
1553 * error. 1550 * error.
1554 * 1551 *
1555 * If the used [http.Client] completes with an error when making a REST call, 1552 * If the used [http.Client] completes with an error when making a REST call,
1556 * this method will complete with the same error. 1553 * this method will complete with the same error.
1557 */ 1554 */
1558 async.Future<SslCertsListResponse> list(core.String project, core.String insta nce) { 1555 async.Future<SslCertsListResponse> list(core.String project, core.String insta nce) {
1559 var _url = null; 1556 var _url = null;
1560 var _queryParams = new core.Map(); 1557 var _queryParams = new core.Map();
1561 var _uploadMedia = null; 1558 var _uploadMedia = null;
1562 var _uploadOptions = null; 1559 var _uploadOptions = null;
1563 var _downloadOptions = common.DownloadOptions.Metadata; 1560 var _downloadOptions = commons.DownloadOptions.Metadata;
1564 var _body = null; 1561 var _body = null;
1565 1562
1566 if (project == null) { 1563 if (project == null) {
1567 throw new core.ArgumentError("Parameter project is required."); 1564 throw new core.ArgumentError("Parameter project is required.");
1568 } 1565 }
1569 if (instance == null) { 1566 if (instance == null) {
1570 throw new core.ArgumentError("Parameter instance is required."); 1567 throw new core.ArgumentError("Parameter instance is required.");
1571 } 1568 }
1572 1569
1573 1570
1574 _url = 'projects/' + common_internal.Escaper.ecapeVariable('$project') + '/i nstances/' + common_internal.Escaper.ecapeVariable('$instance') + '/sslCerts'; 1571 _url = 'projects/' + commons.Escaper.ecapeVariable('$project') + '/instances /' + commons.Escaper.ecapeVariable('$instance') + '/sslCerts';
1575 1572
1576 var _response = _requester.request(_url, 1573 var _response = _requester.request(_url,
1577 "GET", 1574 "GET",
1578 body: _body, 1575 body: _body,
1579 queryParams: _queryParams, 1576 queryParams: _queryParams,
1580 uploadOptions: _uploadOptions, 1577 uploadOptions: _uploadOptions,
1581 uploadMedia: _uploadMedia, 1578 uploadMedia: _uploadMedia,
1582 downloadOptions: _downloadOptions); 1579 downloadOptions: _downloadOptions);
1583 return _response.then((data) => new SslCertsListResponse.fromJson(data)); 1580 return _response.then((data) => new SslCertsListResponse.fromJson(data));
1584 } 1581 }
1585 1582
1586 } 1583 }
1587 1584
1588 1585
1589 /** Not documented yet. */
1590 class TiersResourceApi { 1586 class TiersResourceApi {
1591 final common_internal.ApiRequester _requester; 1587 final commons.ApiRequester _requester;
1592 1588
1593 TiersResourceApi(common_internal.ApiRequester client) : 1589 TiersResourceApi(commons.ApiRequester client) :
1594 _requester = client; 1590 _requester = client;
1595 1591
1596 /** 1592 /**
1597 * Lists all available service tiers for Google Cloud SQL, for example D1, D2. 1593 * Lists all available service tiers for Google Cloud SQL, for example D1, D2.
1598 * For related information, see Pricing. 1594 * For related information, see Pricing.
1599 * 1595 *
1600 * Request parameters: 1596 * Request parameters:
1601 * 1597 *
1602 * [project] - Project ID of the project for which to list tiers. 1598 * [project] - Project ID of the project for which to list tiers.
1603 * 1599 *
1604 * Completes with a [TiersListResponse]. 1600 * Completes with a [TiersListResponse].
1605 * 1601 *
1606 * Completes with a [common.ApiRequestError] if the API endpoint returned an 1602 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
1607 * error. 1603 * error.
1608 * 1604 *
1609 * If the used [http.Client] completes with an error when making a REST call, 1605 * If the used [http.Client] completes with an error when making a REST call,
1610 * this method will complete with the same error. 1606 * this method will complete with the same error.
1611 */ 1607 */
1612 async.Future<TiersListResponse> list(core.String project) { 1608 async.Future<TiersListResponse> list(core.String project) {
1613 var _url = null; 1609 var _url = null;
1614 var _queryParams = new core.Map(); 1610 var _queryParams = new core.Map();
1615 var _uploadMedia = null; 1611 var _uploadMedia = null;
1616 var _uploadOptions = null; 1612 var _uploadOptions = null;
1617 var _downloadOptions = common.DownloadOptions.Metadata; 1613 var _downloadOptions = commons.DownloadOptions.Metadata;
1618 var _body = null; 1614 var _body = null;
1619 1615
1620 if (project == null) { 1616 if (project == null) {
1621 throw new core.ArgumentError("Parameter project is required."); 1617 throw new core.ArgumentError("Parameter project is required.");
1622 } 1618 }
1623 1619
1624 1620
1625 _url = 'projects/' + common_internal.Escaper.ecapeVariable('$project') + '/t iers'; 1621 _url = 'projects/' + commons.Escaper.ecapeVariable('$project') + '/tiers';
1626 1622
1627 var _response = _requester.request(_url, 1623 var _response = _requester.request(_url,
1628 "GET", 1624 "GET",
1629 body: _body, 1625 body: _body,
1630 queryParams: _queryParams, 1626 queryParams: _queryParams,
1631 uploadOptions: _uploadOptions, 1627 uploadOptions: _uploadOptions,
1632 uploadMedia: _uploadMedia, 1628 uploadMedia: _uploadMedia,
1633 downloadOptions: _downloadOptions); 1629 downloadOptions: _downloadOptions);
1634 return _response.then((data) => new TiersListResponse.fromJson(data)); 1630 return _response.then((data) => new TiersListResponse.fromJson(data));
1635 } 1631 }
1636 1632
1637 } 1633 }
1638 1634
1639 1635
1640 /** Not documented yet. */
1641 class UsersResourceApi { 1636 class UsersResourceApi {
1642 final common_internal.ApiRequester _requester; 1637 final commons.ApiRequester _requester;
1643 1638
1644 UsersResourceApi(common_internal.ApiRequester client) : 1639 UsersResourceApi(commons.ApiRequester client) :
1645 _requester = client; 1640 _requester = client;
1646 1641
1647 /** 1642 /**
1648 * Deletes a user from a Cloud SQL instance. 1643 * Deletes a user from a Cloud SQL instance.
1649 * 1644 *
1650 * Request parameters: 1645 * Request parameters:
1651 * 1646 *
1652 * [project] - Project ID of the project that contains the instance. 1647 * [project] - Project ID of the project that contains the instance.
1653 * 1648 *
1654 * [instance] - Database instance ID. This does not include the project ID. 1649 * [instance] - Database instance ID. This does not include the project ID.
1655 * 1650 *
1656 * [host] - Host of the user in the instance. 1651 * [host] - Host of the user in the instance.
1657 * 1652 *
1658 * [name] - Name of the user in the instance. 1653 * [name] - Name of the user in the instance.
1659 * 1654 *
1660 * Completes with a [Operation]. 1655 * Completes with a [Operation].
1661 * 1656 *
1662 * Completes with a [common.ApiRequestError] if the API endpoint returned an 1657 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
1663 * error. 1658 * error.
1664 * 1659 *
1665 * If the used [http.Client] completes with an error when making a REST call, 1660 * If the used [http.Client] completes with an error when making a REST call,
1666 * this method will complete with the same error. 1661 * this method will complete with the same error.
1667 */ 1662 */
1668 async.Future<Operation> delete(core.String project, core.String instance, core .String host, core.String name) { 1663 async.Future<Operation> delete(core.String project, core.String instance, core .String host, core.String name) {
1669 var _url = null; 1664 var _url = null;
1670 var _queryParams = new core.Map(); 1665 var _queryParams = new core.Map();
1671 var _uploadMedia = null; 1666 var _uploadMedia = null;
1672 var _uploadOptions = null; 1667 var _uploadOptions = null;
1673 var _downloadOptions = common.DownloadOptions.Metadata; 1668 var _downloadOptions = commons.DownloadOptions.Metadata;
1674 var _body = null; 1669 var _body = null;
1675 1670
1676 if (project == null) { 1671 if (project == null) {
1677 throw new core.ArgumentError("Parameter project is required."); 1672 throw new core.ArgumentError("Parameter project is required.");
1678 } 1673 }
1679 if (instance == null) { 1674 if (instance == null) {
1680 throw new core.ArgumentError("Parameter instance is required."); 1675 throw new core.ArgumentError("Parameter instance is required.");
1681 } 1676 }
1682 if (host == null) { 1677 if (host == null) {
1683 throw new core.ArgumentError("Parameter host is required."); 1678 throw new core.ArgumentError("Parameter host is required.");
1684 } 1679 }
1685 _queryParams["host"] = [host]; 1680 _queryParams["host"] = [host];
1686 if (name == null) { 1681 if (name == null) {
1687 throw new core.ArgumentError("Parameter name is required."); 1682 throw new core.ArgumentError("Parameter name is required.");
1688 } 1683 }
1689 _queryParams["name"] = [name]; 1684 _queryParams["name"] = [name];
1690 1685
1691 1686
1692 _url = 'projects/' + common_internal.Escaper.ecapeVariable('$project') + '/i nstances/' + common_internal.Escaper.ecapeVariable('$instance') + '/users'; 1687 _url = 'projects/' + commons.Escaper.ecapeVariable('$project') + '/instances /' + commons.Escaper.ecapeVariable('$instance') + '/users';
1693 1688
1694 var _response = _requester.request(_url, 1689 var _response = _requester.request(_url,
1695 "DELETE", 1690 "DELETE",
1696 body: _body, 1691 body: _body,
1697 queryParams: _queryParams, 1692 queryParams: _queryParams,
1698 uploadOptions: _uploadOptions, 1693 uploadOptions: _uploadOptions,
1699 uploadMedia: _uploadMedia, 1694 uploadMedia: _uploadMedia,
1700 downloadOptions: _downloadOptions); 1695 downloadOptions: _downloadOptions);
1701 return _response.then((data) => new Operation.fromJson(data)); 1696 return _response.then((data) => new Operation.fromJson(data));
1702 } 1697 }
1703 1698
1704 /** 1699 /**
1705 * Creates a new user in a Cloud SQL instance. 1700 * Creates a new user in a Cloud SQL instance.
1706 * 1701 *
1707 * [request] - The metadata request object. 1702 * [request] - The metadata request object.
1708 * 1703 *
1709 * Request parameters: 1704 * Request parameters:
1710 * 1705 *
1711 * [project] - Project ID of the project that contains the instance. 1706 * [project] - Project ID of the project that contains the instance.
1712 * 1707 *
1713 * [instance] - Database instance ID. This does not include the project ID. 1708 * [instance] - Database instance ID. This does not include the project ID.
1714 * 1709 *
1715 * Completes with a [Operation]. 1710 * Completes with a [Operation].
1716 * 1711 *
1717 * Completes with a [common.ApiRequestError] if the API endpoint returned an 1712 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
1718 * error. 1713 * error.
1719 * 1714 *
1720 * If the used [http.Client] completes with an error when making a REST call, 1715 * If the used [http.Client] completes with an error when making a REST call,
1721 * this method will complete with the same error. 1716 * this method will complete with the same error.
1722 */ 1717 */
1723 async.Future<Operation> insert(User request, core.String project, core.String instance) { 1718 async.Future<Operation> insert(User request, core.String project, core.String instance) {
1724 var _url = null; 1719 var _url = null;
1725 var _queryParams = new core.Map(); 1720 var _queryParams = new core.Map();
1726 var _uploadMedia = null; 1721 var _uploadMedia = null;
1727 var _uploadOptions = null; 1722 var _uploadOptions = null;
1728 var _downloadOptions = common.DownloadOptions.Metadata; 1723 var _downloadOptions = commons.DownloadOptions.Metadata;
1729 var _body = null; 1724 var _body = null;
1730 1725
1731 if (request != null) { 1726 if (request != null) {
1732 _body = convert.JSON.encode((request).toJson()); 1727 _body = convert.JSON.encode((request).toJson());
1733 } 1728 }
1734 if (project == null) { 1729 if (project == null) {
1735 throw new core.ArgumentError("Parameter project is required."); 1730 throw new core.ArgumentError("Parameter project is required.");
1736 } 1731 }
1737 if (instance == null) { 1732 if (instance == null) {
1738 throw new core.ArgumentError("Parameter instance is required."); 1733 throw new core.ArgumentError("Parameter instance is required.");
1739 } 1734 }
1740 1735
1741 1736
1742 _url = 'projects/' + common_internal.Escaper.ecapeVariable('$project') + '/i nstances/' + common_internal.Escaper.ecapeVariable('$instance') + '/users'; 1737 _url = 'projects/' + commons.Escaper.ecapeVariable('$project') + '/instances /' + commons.Escaper.ecapeVariable('$instance') + '/users';
1743 1738
1744 var _response = _requester.request(_url, 1739 var _response = _requester.request(_url,
1745 "POST", 1740 "POST",
1746 body: _body, 1741 body: _body,
1747 queryParams: _queryParams, 1742 queryParams: _queryParams,
1748 uploadOptions: _uploadOptions, 1743 uploadOptions: _uploadOptions,
1749 uploadMedia: _uploadMedia, 1744 uploadMedia: _uploadMedia,
1750 downloadOptions: _downloadOptions); 1745 downloadOptions: _downloadOptions);
1751 return _response.then((data) => new Operation.fromJson(data)); 1746 return _response.then((data) => new Operation.fromJson(data));
1752 } 1747 }
1753 1748
1754 /** 1749 /**
1755 * Lists users in the specified Cloud SQL instance. 1750 * Lists users in the specified Cloud SQL instance.
1756 * 1751 *
1757 * Request parameters: 1752 * Request parameters:
1758 * 1753 *
1759 * [project] - Project ID of the project that contains the instance. 1754 * [project] - Project ID of the project that contains the instance.
1760 * 1755 *
1761 * [instance] - Database instance ID. This does not include the project ID. 1756 * [instance] - Database instance ID. This does not include the project ID.
1762 * 1757 *
1763 * Completes with a [UsersListResponse]. 1758 * Completes with a [UsersListResponse].
1764 * 1759 *
1765 * Completes with a [common.ApiRequestError] if the API endpoint returned an 1760 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
1766 * error. 1761 * error.
1767 * 1762 *
1768 * If the used [http.Client] completes with an error when making a REST call, 1763 * If the used [http.Client] completes with an error when making a REST call,
1769 * this method will complete with the same error. 1764 * this method will complete with the same error.
1770 */ 1765 */
1771 async.Future<UsersListResponse> list(core.String project, core.String instance ) { 1766 async.Future<UsersListResponse> list(core.String project, core.String instance ) {
1772 var _url = null; 1767 var _url = null;
1773 var _queryParams = new core.Map(); 1768 var _queryParams = new core.Map();
1774 var _uploadMedia = null; 1769 var _uploadMedia = null;
1775 var _uploadOptions = null; 1770 var _uploadOptions = null;
1776 var _downloadOptions = common.DownloadOptions.Metadata; 1771 var _downloadOptions = commons.DownloadOptions.Metadata;
1777 var _body = null; 1772 var _body = null;
1778 1773
1779 if (project == null) { 1774 if (project == null) {
1780 throw new core.ArgumentError("Parameter project is required."); 1775 throw new core.ArgumentError("Parameter project is required.");
1781 } 1776 }
1782 if (instance == null) { 1777 if (instance == null) {
1783 throw new core.ArgumentError("Parameter instance is required."); 1778 throw new core.ArgumentError("Parameter instance is required.");
1784 } 1779 }
1785 1780
1786 1781
1787 _url = 'projects/' + common_internal.Escaper.ecapeVariable('$project') + '/i nstances/' + common_internal.Escaper.ecapeVariable('$instance') + '/users'; 1782 _url = 'projects/' + commons.Escaper.ecapeVariable('$project') + '/instances /' + commons.Escaper.ecapeVariable('$instance') + '/users';
1788 1783
1789 var _response = _requester.request(_url, 1784 var _response = _requester.request(_url,
1790 "GET", 1785 "GET",
1791 body: _body, 1786 body: _body,
1792 queryParams: _queryParams, 1787 queryParams: _queryParams,
1793 uploadOptions: _uploadOptions, 1788 uploadOptions: _uploadOptions,
1794 uploadMedia: _uploadMedia, 1789 uploadMedia: _uploadMedia,
1795 downloadOptions: _downloadOptions); 1790 downloadOptions: _downloadOptions);
1796 return _response.then((data) => new UsersListResponse.fromJson(data)); 1791 return _response.then((data) => new UsersListResponse.fromJson(data));
1797 } 1792 }
1798 1793
1799 /** 1794 /**
1800 * Updates an existing user in a Cloud SQL instance. 1795 * Updates an existing user in a Cloud SQL instance.
1801 * 1796 *
1802 * [request] - The metadata request object. 1797 * [request] - The metadata request object.
1803 * 1798 *
1804 * Request parameters: 1799 * Request parameters:
1805 * 1800 *
1806 * [project] - Project ID of the project that contains the instance. 1801 * [project] - Project ID of the project that contains the instance.
1807 * 1802 *
1808 * [instance] - Database instance ID. This does not include the project ID. 1803 * [instance] - Database instance ID. This does not include the project ID.
1809 * 1804 *
1810 * [host] - Host of the user in the instance. 1805 * [host] - Host of the user in the instance.
1811 * 1806 *
1812 * [name] - Name of the user in the instance. 1807 * [name] - Name of the user in the instance.
1813 * 1808 *
1814 * Completes with a [Operation]. 1809 * Completes with a [Operation].
1815 * 1810 *
1816 * Completes with a [common.ApiRequestError] if the API endpoint returned an 1811 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
1817 * error. 1812 * error.
1818 * 1813 *
1819 * If the used [http.Client] completes with an error when making a REST call, 1814 * If the used [http.Client] completes with an error when making a REST call,
1820 * this method will complete with the same error. 1815 * this method will complete with the same error.
1821 */ 1816 */
1822 async.Future<Operation> update(User request, core.String project, core.String instance, core.String host, core.String name) { 1817 async.Future<Operation> update(User request, core.String project, core.String instance, core.String host, core.String name) {
1823 var _url = null; 1818 var _url = null;
1824 var _queryParams = new core.Map(); 1819 var _queryParams = new core.Map();
1825 var _uploadMedia = null; 1820 var _uploadMedia = null;
1826 var _uploadOptions = null; 1821 var _uploadOptions = null;
1827 var _downloadOptions = common.DownloadOptions.Metadata; 1822 var _downloadOptions = commons.DownloadOptions.Metadata;
1828 var _body = null; 1823 var _body = null;
1829 1824
1830 if (request != null) { 1825 if (request != null) {
1831 _body = convert.JSON.encode((request).toJson()); 1826 _body = convert.JSON.encode((request).toJson());
1832 } 1827 }
1833 if (project == null) { 1828 if (project == null) {
1834 throw new core.ArgumentError("Parameter project is required."); 1829 throw new core.ArgumentError("Parameter project is required.");
1835 } 1830 }
1836 if (instance == null) { 1831 if (instance == null) {
1837 throw new core.ArgumentError("Parameter instance is required."); 1832 throw new core.ArgumentError("Parameter instance is required.");
1838 } 1833 }
1839 if (host == null) { 1834 if (host == null) {
1840 throw new core.ArgumentError("Parameter host is required."); 1835 throw new core.ArgumentError("Parameter host is required.");
1841 } 1836 }
1842 _queryParams["host"] = [host]; 1837 _queryParams["host"] = [host];
1843 if (name == null) { 1838 if (name == null) {
1844 throw new core.ArgumentError("Parameter name is required."); 1839 throw new core.ArgumentError("Parameter name is required.");
1845 } 1840 }
1846 _queryParams["name"] = [name]; 1841 _queryParams["name"] = [name];
1847 1842
1848 1843
1849 _url = 'projects/' + common_internal.Escaper.ecapeVariable('$project') + '/i nstances/' + common_internal.Escaper.ecapeVariable('$instance') + '/users'; 1844 _url = 'projects/' + commons.Escaper.ecapeVariable('$project') + '/instances /' + commons.Escaper.ecapeVariable('$instance') + '/users';
1850 1845
1851 var _response = _requester.request(_url, 1846 var _response = _requester.request(_url,
1852 "PUT", 1847 "PUT",
1853 body: _body, 1848 body: _body,
1854 queryParams: _queryParams, 1849 queryParams: _queryParams,
1855 uploadOptions: _uploadOptions, 1850 uploadOptions: _uploadOptions,
1856 uploadMedia: _uploadMedia, 1851 uploadMedia: _uploadMedia,
1857 downloadOptions: _downloadOptions); 1852 downloadOptions: _downloadOptions);
1858 return _response.then((data) => new Operation.fromJson(data)); 1853 return _response.then((data) => new Operation.fromJson(data));
1859 } 1854 }
(...skipping 464 matching lines...) Expand 10 before | Expand all | Expand 10 after
2324 return _json; 2319 return _json;
2325 } 2320 }
2326 } 2321 }
2327 2322
2328 2323
2329 /** MySQL flags for Cloud SQL instances. */ 2324 /** MySQL flags for Cloud SQL instances. */
2330 class DatabaseFlags { 2325 class DatabaseFlags {
2331 /** 2326 /**
2332 * The name of the flag. These flags are passed at instance startup, so 2327 * The name of the flag. These flags are passed at instance startup, so
2333 * include both MySQL server options and MySQL system variables. Flags should 2328 * include both MySQL server options and MySQL system variables. Flags should
2334 * be specified with underscores, not hyphens. Refer to the official MySQL 2329 * be specified with underscores, not hyphens. For more information, see
2335 * documentation on server options and system variables for descriptions of 2330 * Configuring MySQL Flags in the Google Cloud SQL documentation, as well as
2336 * what these flags do. Acceptable values are: character_set_server utf8 or 2331 * the official MySQL documentation for server options and system variables.
2337 * utf8mb4 event_scheduler on or off (Note: The event scheduler will only work
2338 * reliably if the instance activationPolicy is set to ALWAYS) general_log on
2339 * or off group_concat_max_len 4..17179869184 innodb_flush_log_at_trx_commit
2340 * 0..2 innodb_lock_wait_timeout 1..1073741824 log_bin_trust_function_creators
2341 * on or off log_output Can be either TABLE or NONE, FILE is not supported
2342 * log_queries_not_using_indexes on or off long_query_time 0..30000000
2343 * lower_case_table_names 0..2 max_allowed_packet 16384..1073741824 read_only
2344 * on or off skip_show_database on or off slow_query_log on or off. If set to
2345 * on, you must also set the log_output flag to TABLE to receive logs.
2346 * wait_timeout 1..31536000
2347 */ 2332 */
2348 core.String name; 2333 core.String name;
2349 2334
2350 /** 2335 /**
2351 * The value of the flag. Booleans should be set using 1 for true, and 0 for 2336 * The value of the flag. Booleans should be set to on for true and off for
2352 * false. This field must be omitted if the flag doesn't take a value. 2337 * false. This field must be omitted if the flag doesn't take a value.
2353 */ 2338 */
2354 core.String value; 2339 core.String value;
2355 2340
2356 2341
2357 DatabaseFlags(); 2342 DatabaseFlags();
2358 2343
2359 DatabaseFlags.fromJson(core.Map _json) { 2344 DatabaseFlags.fromJson(core.Map _json) {
2360 if (_json.containsKey("name")) { 2345 if (_json.containsKey("name")) {
2361 name = _json["name"]; 2346 name = _json["name"];
(...skipping 28 matching lines...) Expand all
2390 */ 2375 */
2391 core.String databaseVersion; 2376 core.String databaseVersion;
2392 2377
2393 /** HTTP 1.1 Entity tag for the resource. */ 2378 /** HTTP 1.1 Entity tag for the resource. */
2394 core.String etag; 2379 core.String etag;
2395 2380
2396 /** 2381 /**
2397 * The instance type. This can be one of the following. 2382 * The instance type. This can be one of the following.
2398 * CLOUD_SQL_INSTANCE: A Cloud SQL instance that is not replicating from a 2383 * CLOUD_SQL_INSTANCE: A Cloud SQL instance that is not replicating from a
2399 * master. 2384 * master.
2385 * ON_PREMISES_INSTANCE: An instance running on the customer's premises.
2400 * READ_REPLICA_INSTANCE: A Cloud SQL instance configured as a read-replica. 2386 * READ_REPLICA_INSTANCE: A Cloud SQL instance configured as a read-replica.
2401 */ 2387 */
2402 core.String instanceType; 2388 core.String instanceType;
2403 2389
2404 /** The assigned IP addresses for the instance. */ 2390 /** The assigned IP addresses for the instance. */
2405 core.List<IpMapping> ipAddresses; 2391 core.List<IpMapping> ipAddresses;
2406 2392
2407 /** The IPv6 address assigned to the instance. */ 2393 /** The IPv6 address assigned to the instance. */
2408 core.String ipv6Address; 2394 core.String ipv6Address;
2409 2395
2410 /** This is always sql#instance. */ 2396 /** This is always sql#instance. */
2411 core.String kind; 2397 core.String kind;
2412 2398
2413 /** 2399 /**
2414 * The name of the instance which will act as master in the replication setup. 2400 * The name of the instance which will act as master in the replication setup.
2415 */ 2401 */
2416 core.String masterInstanceName; 2402 core.String masterInstanceName;
2417 2403
2418 /** The maximum disk size of the instance in bytes. */ 2404 /** The maximum disk size of the instance in bytes. */
2419 core.String maxDiskSize; 2405 core.String maxDiskSize;
2420 2406
2421 /** Name of the Cloud SQL instance. This does not include the project ID. */ 2407 /** Name of the Cloud SQL instance. This does not include the project ID. */
2422 core.String name; 2408 core.String name;
2423 2409
2410 /** Configuration specific to on-premises instances. */
2411 OnPremisesConfiguration onPremisesConfiguration;
2412
2424 /** 2413 /**
2425 * The project ID of the project containing the Cloud SQL instance. The Google 2414 * The project ID of the project containing the Cloud SQL instance. The Google
2426 * apps domain is prefixed if applicable. 2415 * apps domain is prefixed if applicable.
2427 */ 2416 */
2428 core.String project; 2417 core.String project;
2429 2418
2430 /** 2419 /**
2431 * The geographical region. Can be us-central, asia-east1 or europe-west1. 2420 * The geographical region. Can be us-central, asia-east1 or europe-west1.
2432 * Defaults to us-central. The region can not be changed after instance 2421 * Defaults to us-central. The region can not be changed after instance
2433 * creation. 2422 * creation.
2434 */ 2423 */
2435 core.String region; 2424 core.String region;
2436 2425
2426 /**
2427 * Configuration specific to read-replicas replicating from on-premises
2428 * masters.
2429 */
2430 ReplicaConfiguration replicaConfiguration;
2431
2437 /** The replicas of the instance. */ 2432 /** The replicas of the instance. */
2438 core.List<core.String> replicaNames; 2433 core.List<core.String> replicaNames;
2439 2434
2440 /** The URI of this resource. */ 2435 /** The URI of this resource. */
2441 core.String selfLink; 2436 core.String selfLink;
2442 2437
2443 /** SSL configuration. */ 2438 /** SSL configuration. */
2444 SslCert serverCaCert; 2439 SslCert serverCaCert;
2445 2440
2446 /** The service account email address assigned to the instance. */ 2441 /** The service account email address assigned to the instance. */
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
2488 } 2483 }
2489 if (_json.containsKey("masterInstanceName")) { 2484 if (_json.containsKey("masterInstanceName")) {
2490 masterInstanceName = _json["masterInstanceName"]; 2485 masterInstanceName = _json["masterInstanceName"];
2491 } 2486 }
2492 if (_json.containsKey("maxDiskSize")) { 2487 if (_json.containsKey("maxDiskSize")) {
2493 maxDiskSize = _json["maxDiskSize"]; 2488 maxDiskSize = _json["maxDiskSize"];
2494 } 2489 }
2495 if (_json.containsKey("name")) { 2490 if (_json.containsKey("name")) {
2496 name = _json["name"]; 2491 name = _json["name"];
2497 } 2492 }
2493 if (_json.containsKey("onPremisesConfiguration")) {
2494 onPremisesConfiguration = new OnPremisesConfiguration.fromJson(_json["onPr emisesConfiguration"]);
2495 }
2498 if (_json.containsKey("project")) { 2496 if (_json.containsKey("project")) {
2499 project = _json["project"]; 2497 project = _json["project"];
2500 } 2498 }
2501 if (_json.containsKey("region")) { 2499 if (_json.containsKey("region")) {
2502 region = _json["region"]; 2500 region = _json["region"];
2503 } 2501 }
2502 if (_json.containsKey("replicaConfiguration")) {
2503 replicaConfiguration = new ReplicaConfiguration.fromJson(_json["replicaCon figuration"]);
2504 }
2504 if (_json.containsKey("replicaNames")) { 2505 if (_json.containsKey("replicaNames")) {
2505 replicaNames = _json["replicaNames"]; 2506 replicaNames = _json["replicaNames"];
2506 } 2507 }
2507 if (_json.containsKey("selfLink")) { 2508 if (_json.containsKey("selfLink")) {
2508 selfLink = _json["selfLink"]; 2509 selfLink = _json["selfLink"];
2509 } 2510 }
2510 if (_json.containsKey("serverCaCert")) { 2511 if (_json.containsKey("serverCaCert")) {
2511 serverCaCert = new SslCert.fromJson(_json["serverCaCert"]); 2512 serverCaCert = new SslCert.fromJson(_json["serverCaCert"]);
2512 } 2513 }
2513 if (_json.containsKey("serviceAccountEmailAddress")) { 2514 if (_json.containsKey("serviceAccountEmailAddress")) {
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
2546 } 2547 }
2547 if (masterInstanceName != null) { 2548 if (masterInstanceName != null) {
2548 _json["masterInstanceName"] = masterInstanceName; 2549 _json["masterInstanceName"] = masterInstanceName;
2549 } 2550 }
2550 if (maxDiskSize != null) { 2551 if (maxDiskSize != null) {
2551 _json["maxDiskSize"] = maxDiskSize; 2552 _json["maxDiskSize"] = maxDiskSize;
2552 } 2553 }
2553 if (name != null) { 2554 if (name != null) {
2554 _json["name"] = name; 2555 _json["name"] = name;
2555 } 2556 }
2557 if (onPremisesConfiguration != null) {
2558 _json["onPremisesConfiguration"] = (onPremisesConfiguration).toJson();
2559 }
2556 if (project != null) { 2560 if (project != null) {
2557 _json["project"] = project; 2561 _json["project"] = project;
2558 } 2562 }
2559 if (region != null) { 2563 if (region != null) {
2560 _json["region"] = region; 2564 _json["region"] = region;
2561 } 2565 }
2566 if (replicaConfiguration != null) {
2567 _json["replicaConfiguration"] = (replicaConfiguration).toJson();
2568 }
2562 if (replicaNames != null) { 2569 if (replicaNames != null) {
2563 _json["replicaNames"] = replicaNames; 2570 _json["replicaNames"] = replicaNames;
2564 } 2571 }
2565 if (selfLink != null) { 2572 if (selfLink != null) {
2566 _json["selfLink"] = selfLink; 2573 _json["selfLink"] = selfLink;
2567 } 2574 }
2568 if (serverCaCert != null) { 2575 if (serverCaCert != null) {
2569 _json["serverCaCert"] = (serverCaCert).toJson(); 2576 _json["serverCaCert"] = (serverCaCert).toJson();
2570 } 2577 }
2571 if (serviceAccountEmailAddress != null) { 2578 if (serviceAccountEmailAddress != null) {
(...skipping 681 matching lines...) Expand 10 before | Expand all | Expand 10 after
3253 _json["kind"] = kind; 3260 _json["kind"] = kind;
3254 } 3261 }
3255 if (zone != null) { 3262 if (zone != null) {
3256 _json["zone"] = zone; 3263 _json["zone"] = zone;
3257 } 3264 }
3258 return _json; 3265 return _json;
3259 } 3266 }
3260 } 3267 }
3261 3268
3262 3269
3270 /** Read-replica configuration specific to MySQL databases. */
3271 class MySqlReplicaConfiguration {
3272 /** PEM representation of the trusted CA's x509 certificate. */
3273 core.String caCertificate;
3274
3275 /** PEM representation of the slave's x509 certificate. */
3276 core.String clientCertificate;
3277
3278 /**
3279 * PEM representation of the slave's private key. The corresponsing public key
3280 * is encoded in the client's certificate.
3281 */
3282 core.String clientKey;
3283
3284 /**
3285 * Seconds to wait between connect retries. MySQL's default is 60 seconds.
3286 */
3287 core.int connectRetryInterval;
3288
3289 /**
3290 * Path to a SQL dump file in Google Cloud Storage from which the slave
3291 * instance is to be created. The URI is in the form gs://bucketName/fileName.
3292 * Compressed gzip files (.gz) are also supported. Dumps should have the
3293 * binlog co-ordinates from which replication should begin. This can be
3294 * accomplished by setting --master-data to 1 when using mysqldump.
3295 */
3296 core.String dumpFilePath;
3297
3298 /** This is always sql#mysqlReplicaConfiguration. */
3299 core.String kind;
3300
3301 /** Interval in milliseconds between replication heartbeats. */
3302 core.String masterHeartbeatPeriod;
3303
3304 /** The password for the replication connection. */
3305 core.String password;
3306
3307 /** A list of permissible ciphers to use for SSL encryption. */
3308 core.String sslCipher;
3309
3310 /** The username for the replication connection. */
3311 core.String username;
3312
3313 /**
3314 * Whether or not to check the master's Common Name value in the certificate
3315 * that it sends during the SSL handshake.
3316 */
3317 core.bool verifyServerCertificate;
3318
3319
3320 MySqlReplicaConfiguration();
3321
3322 MySqlReplicaConfiguration.fromJson(core.Map _json) {
3323 if (_json.containsKey("caCertificate")) {
3324 caCertificate = _json["caCertificate"];
3325 }
3326 if (_json.containsKey("clientCertificate")) {
3327 clientCertificate = _json["clientCertificate"];
3328 }
3329 if (_json.containsKey("clientKey")) {
3330 clientKey = _json["clientKey"];
3331 }
3332 if (_json.containsKey("connectRetryInterval")) {
3333 connectRetryInterval = _json["connectRetryInterval"];
3334 }
3335 if (_json.containsKey("dumpFilePath")) {
3336 dumpFilePath = _json["dumpFilePath"];
3337 }
3338 if (_json.containsKey("kind")) {
3339 kind = _json["kind"];
3340 }
3341 if (_json.containsKey("masterHeartbeatPeriod")) {
3342 masterHeartbeatPeriod = _json["masterHeartbeatPeriod"];
3343 }
3344 if (_json.containsKey("password")) {
3345 password = _json["password"];
3346 }
3347 if (_json.containsKey("sslCipher")) {
3348 sslCipher = _json["sslCipher"];
3349 }
3350 if (_json.containsKey("username")) {
3351 username = _json["username"];
3352 }
3353 if (_json.containsKey("verifyServerCertificate")) {
3354 verifyServerCertificate = _json["verifyServerCertificate"];
3355 }
3356 }
3357
3358 core.Map toJson() {
3359 var _json = new core.Map();
3360 if (caCertificate != null) {
3361 _json["caCertificate"] = caCertificate;
3362 }
3363 if (clientCertificate != null) {
3364 _json["clientCertificate"] = clientCertificate;
3365 }
3366 if (clientKey != null) {
3367 _json["clientKey"] = clientKey;
3368 }
3369 if (connectRetryInterval != null) {
3370 _json["connectRetryInterval"] = connectRetryInterval;
3371 }
3372 if (dumpFilePath != null) {
3373 _json["dumpFilePath"] = dumpFilePath;
3374 }
3375 if (kind != null) {
3376 _json["kind"] = kind;
3377 }
3378 if (masterHeartbeatPeriod != null) {
3379 _json["masterHeartbeatPeriod"] = masterHeartbeatPeriod;
3380 }
3381 if (password != null) {
3382 _json["password"] = password;
3383 }
3384 if (sslCipher != null) {
3385 _json["sslCipher"] = sslCipher;
3386 }
3387 if (username != null) {
3388 _json["username"] = username;
3389 }
3390 if (verifyServerCertificate != null) {
3391 _json["verifyServerCertificate"] = verifyServerCertificate;
3392 }
3393 return _json;
3394 }
3395 }
3396
3397
3398 /** On-premises instance configuration. */
3399 class OnPremisesConfiguration {
3400 /** The host and port of the on-premises instance in host:port format */
3401 core.String hostPort;
3402
3403 /** This is always sql#onPremisesConfiguration. */
3404 core.String kind;
3405
3406
3407 OnPremisesConfiguration();
3408
3409 OnPremisesConfiguration.fromJson(core.Map _json) {
3410 if (_json.containsKey("hostPort")) {
3411 hostPort = _json["hostPort"];
3412 }
3413 if (_json.containsKey("kind")) {
3414 kind = _json["kind"];
3415 }
3416 }
3417
3418 core.Map toJson() {
3419 var _json = new core.Map();
3420 if (hostPort != null) {
3421 _json["hostPort"] = hostPort;
3422 }
3423 if (kind != null) {
3424 _json["kind"] = kind;
3425 }
3426 return _json;
3427 }
3428 }
3429
3430
3263 /** 3431 /**
3264 * If errors occurred during processing of this operation, this field will be 3432 * If errors occurred during processing of this operation, this field will be
3265 * populated. 3433 * populated.
3266 */ 3434 */
3267 class OperationError { 3435 class OperationError {
3268 /** The list of errors encountered while processing this operation. */ 3436 /** The list of errors encountered while processing this operation. */
3269 core.List<OperationError_1> errors; 3437 core.List<OperationError_1> errors;
3270 3438
3271 3439
3272 OperationError(); 3440 OperationError();
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
3311 3479
3312 /** The context for import operation, if applicable. */ 3480 /** The context for import operation, if applicable. */
3313 ImportContext importContext; 3481 ImportContext importContext;
3314 3482
3315 /** 3483 /**
3316 * The time this operation was enqueued in UTC timezone in RFC 3339 format, 3484 * The time this operation was enqueued in UTC timezone in RFC 3339 format,
3317 * for example 2012-11-15T16:19:00.094Z. 3485 * for example 2012-11-15T16:19:00.094Z.
3318 */ 3486 */
3319 core.DateTime insertTime; 3487 core.DateTime insertTime;
3320 3488
3321 /** This is always sql#instanceOperation. */ 3489 /** This is always sql#operation. */
3322 core.String kind; 3490 core.String kind;
3323 3491
3324 /** 3492 /**
3325 * An identifier that uniquely identifies the operation. You can use this 3493 * An identifier that uniquely identifies the operation. You can use this
3326 * identifier to retrieve the Operations resource that has information about 3494 * identifier to retrieve the Operations resource that has information about
3327 * the operation. 3495 * the operation.
3328 */ 3496 */
3329 core.String name; 3497 core.String name;
3330 3498
3331 /** 3499 /**
3332 * TODO(b/18431310): update this list to reflect current values. The type of 3500 * The type of the operation. Valid values are CREATE, DELETE, UPDATE,
3333 * the operation. Valid values are CREATE, DELETE, UPDATE, RESTART, IMPORT, 3501 * RESTART, IMPORT, EXPORT, BACKUP_VOLUME, RESTORE_VOLUME, CREATE_USER,
3334 * EXPORT, BACKUP_VOLUME, RESTORE_VOLUME. 3502 * DELETE_USER, CREATE_DATABASE, DELETE_DATABASE .
3335 */ 3503 */
3336 core.String operationType; 3504 core.String operationType;
3337 3505
3338 /** The URI of this resource. */ 3506 /** The URI of this resource. */
3339 core.String selfLink; 3507 core.String selfLink;
3340 3508
3341 /** 3509 /**
3342 * The time this operation actually started in UTC timezone in RFC 3339 3510 * The time this operation actually started in UTC timezone in RFC 3339
3343 * format, for example 2012-11-15T16:19:00.094Z. 3511 * format, for example 2012-11-15T16:19:00.094Z.
3344 */ 3512 */
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after
3545 _json["kind"] = kind; 3713 _json["kind"] = kind;
3546 } 3714 }
3547 if (nextPageToken != null) { 3715 if (nextPageToken != null) {
3548 _json["nextPageToken"] = nextPageToken; 3716 _json["nextPageToken"] = nextPageToken;
3549 } 3717 }
3550 return _json; 3718 return _json;
3551 } 3719 }
3552 } 3720 }
3553 3721
3554 3722
3723 /** Read-replica configuration for connecting to the master. */
3724 class ReplicaConfiguration {
3725 /** This is always sql#replicaConfiguration. */
3726 core.String kind;
3727
3728 /**
3729 * MySQL specific configuration when replicating from a MySQL on-premises
3730 * master.
3731 */
3732 MySqlReplicaConfiguration mysqlReplicaConfiguration;
3733
3734
3735 ReplicaConfiguration();
3736
3737 ReplicaConfiguration.fromJson(core.Map _json) {
3738 if (_json.containsKey("kind")) {
3739 kind = _json["kind"];
3740 }
3741 if (_json.containsKey("mysqlReplicaConfiguration")) {
3742 mysqlReplicaConfiguration = new MySqlReplicaConfiguration.fromJson(_json[" mysqlReplicaConfiguration"]);
3743 }
3744 }
3745
3746 core.Map toJson() {
3747 var _json = new core.Map();
3748 if (kind != null) {
3749 _json["kind"] = kind;
3750 }
3751 if (mysqlReplicaConfiguration != null) {
3752 _json["mysqlReplicaConfiguration"] = (mysqlReplicaConfiguration).toJson();
3753 }
3754 return _json;
3755 }
3756 }
3757
3758
3555 /** Database instance restore from backup context. */ 3759 /** Database instance restore from backup context. */
3556 class RestoreBackupContext { 3760 class RestoreBackupContext {
3557 /** The ID of the backup run to restore from. */ 3761 /** The ID of the backup run to restore from. */
3558 core.String backupRunId; 3762 core.String backupRunId;
3559 3763
3560 /** This is always sql#restoreBackupContext. */ 3764 /** This is always sql#restoreBackupContext. */
3561 core.String kind; 3765 core.String kind;
3562 3766
3563 3767
3564 RestoreBackupContext(); 3768 RestoreBackupContext();
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
3596 * ON_DEMAND: The instance is activated upon receiving requests. 3800 * ON_DEMAND: The instance is activated upon receiving requests.
3597 */ 3801 */
3598 core.String activationPolicy; 3802 core.String activationPolicy;
3599 3803
3600 /** The App Engine app IDs that can access this instance. */ 3804 /** The App Engine app IDs that can access this instance. */
3601 core.List<core.String> authorizedGaeApplications; 3805 core.List<core.String> authorizedGaeApplications;
3602 3806
3603 /** The daily backup configuration for the instance. */ 3807 /** The daily backup configuration for the instance. */
3604 BackupConfiguration backupConfiguration; 3808 BackupConfiguration backupConfiguration;
3605 3809
3810 core.bool crashSafeReplicationEnabled;
3811
3606 /** The database flags passed to the instance at startup. */ 3812 /** The database flags passed to the instance at startup. */
3607 core.List<DatabaseFlags> databaseFlags; 3813 core.List<DatabaseFlags> databaseFlags;
3608 3814
3609 /** 3815 /**
3610 * Configuration specific to read replica instances. Indicates whether 3816 * Configuration specific to read replica instances. Indicates whether
3611 * replication is enabled or not. 3817 * replication is enabled or not.
3612 */ 3818 */
3613 core.bool databaseReplicationEnabled; 3819 core.bool databaseReplicationEnabled;
3614 3820
3615 /** 3821 /**
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
3659 Settings.fromJson(core.Map _json) { 3865 Settings.fromJson(core.Map _json) {
3660 if (_json.containsKey("activationPolicy")) { 3866 if (_json.containsKey("activationPolicy")) {
3661 activationPolicy = _json["activationPolicy"]; 3867 activationPolicy = _json["activationPolicy"];
3662 } 3868 }
3663 if (_json.containsKey("authorizedGaeApplications")) { 3869 if (_json.containsKey("authorizedGaeApplications")) {
3664 authorizedGaeApplications = _json["authorizedGaeApplications"]; 3870 authorizedGaeApplications = _json["authorizedGaeApplications"];
3665 } 3871 }
3666 if (_json.containsKey("backupConfiguration")) { 3872 if (_json.containsKey("backupConfiguration")) {
3667 backupConfiguration = new BackupConfiguration.fromJson(_json["backupConfig uration"]); 3873 backupConfiguration = new BackupConfiguration.fromJson(_json["backupConfig uration"]);
3668 } 3874 }
3875 if (_json.containsKey("crashSafeReplicationEnabled")) {
3876 crashSafeReplicationEnabled = _json["crashSafeReplicationEnabled"];
3877 }
3669 if (_json.containsKey("databaseFlags")) { 3878 if (_json.containsKey("databaseFlags")) {
3670 databaseFlags = _json["databaseFlags"].map((value) => new DatabaseFlags.fr omJson(value)).toList(); 3879 databaseFlags = _json["databaseFlags"].map((value) => new DatabaseFlags.fr omJson(value)).toList();
3671 } 3880 }
3672 if (_json.containsKey("databaseReplicationEnabled")) { 3881 if (_json.containsKey("databaseReplicationEnabled")) {
3673 databaseReplicationEnabled = _json["databaseReplicationEnabled"]; 3882 databaseReplicationEnabled = _json["databaseReplicationEnabled"];
3674 } 3883 }
3675 if (_json.containsKey("ipConfiguration")) { 3884 if (_json.containsKey("ipConfiguration")) {
3676 ipConfiguration = new IpConfiguration.fromJson(_json["ipConfiguration"]); 3885 ipConfiguration = new IpConfiguration.fromJson(_json["ipConfiguration"]);
3677 } 3886 }
3678 if (_json.containsKey("kind")) { 3887 if (_json.containsKey("kind")) {
(...skipping 20 matching lines...) Expand all
3699 var _json = new core.Map(); 3908 var _json = new core.Map();
3700 if (activationPolicy != null) { 3909 if (activationPolicy != null) {
3701 _json["activationPolicy"] = activationPolicy; 3910 _json["activationPolicy"] = activationPolicy;
3702 } 3911 }
3703 if (authorizedGaeApplications != null) { 3912 if (authorizedGaeApplications != null) {
3704 _json["authorizedGaeApplications"] = authorizedGaeApplications; 3913 _json["authorizedGaeApplications"] = authorizedGaeApplications;
3705 } 3914 }
3706 if (backupConfiguration != null) { 3915 if (backupConfiguration != null) {
3707 _json["backupConfiguration"] = (backupConfiguration).toJson(); 3916 _json["backupConfiguration"] = (backupConfiguration).toJson();
3708 } 3917 }
3918 if (crashSafeReplicationEnabled != null) {
3919 _json["crashSafeReplicationEnabled"] = crashSafeReplicationEnabled;
3920 }
3709 if (databaseFlags != null) { 3921 if (databaseFlags != null) {
3710 _json["databaseFlags"] = databaseFlags.map((value) => (value).toJson()).to List(); 3922 _json["databaseFlags"] = databaseFlags.map((value) => (value).toJson()).to List();
3711 } 3923 }
3712 if (databaseReplicationEnabled != null) { 3924 if (databaseReplicationEnabled != null) {
3713 _json["databaseReplicationEnabled"] = databaseReplicationEnabled; 3925 _json["databaseReplicationEnabled"] = databaseReplicationEnabled;
3714 } 3926 }
3715 if (ipConfiguration != null) { 3927 if (ipConfiguration != null) {
3716 _json["ipConfiguration"] = (ipConfiguration).toJson(); 3928 _json["ipConfiguration"] = (ipConfiguration).toJson();
3717 } 3929 }
3718 if (kind != null) { 3930 if (kind != null) {
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
3760 * 2012-11-15T16:19:00.094Z. 3972 * 2012-11-15T16:19:00.094Z.
3761 */ 3973 */
3762 core.DateTime expirationTime; 3974 core.DateTime expirationTime;
3763 3975
3764 /** Name of the database instance. */ 3976 /** Name of the database instance. */
3765 core.String instance; 3977 core.String instance;
3766 3978
3767 /** This is always sql#sslCert. */ 3979 /** This is always sql#sslCert. */
3768 core.String kind; 3980 core.String kind;
3769 3981
3770 /** Not documented yet. */
3771 core.String selfLink; 3982 core.String selfLink;
3772 3983
3773 /** Sha1 Fingerprint. */ 3984 /** Sha1 Fingerprint. */
3774 core.String sha1Fingerprint; 3985 core.String sha1Fingerprint;
3775 3986
3776 3987
3777 SslCert(); 3988 SslCert();
3778 3989
3779 SslCert.fromJson(core.Map _json) { 3990 SslCert.fromJson(core.Map _json) {
3780 if (_json.containsKey("cert")) { 3991 if (_json.containsKey("cert")) {
(...skipping 304 matching lines...) Expand 10 before | Expand all | Expand 10 after
4085 } 4296 }
4086 4297
4087 4298
4088 /** A Cloud SQL user resource. */ 4299 /** A Cloud SQL user resource. */
4089 class User { 4300 class User {
4090 /** HTTP 1.1 Entity tag for the resource. */ 4301 /** HTTP 1.1 Entity tag for the resource. */
4091 core.String etag; 4302 core.String etag;
4092 4303
4093 /** 4304 /**
4094 * The host name from which the user can connect. For insert operations, host 4305 * The host name from which the user can connect. For insert operations, host
4095 * is set to '%'. For update operations, host is specified as part of the 4306 * defaults to an empty string. For update operations, host is specified as
4096 * request URL. The host name is not mutable with this API. 4307 * part of the request URL. The host name is not mutable with this API.
4097 */ 4308 */
4098 core.String host; 4309 core.String host;
4099 4310
4100 /** 4311 /**
4101 * The name of the Cloud SQL instance. This does not include the project ID. 4312 * The name of the Cloud SQL instance. This does not include the project ID.
4102 * Can be omitted for update since it is already specified on the URL. 4313 * Can be omitted for update since it is already specified on the URL.
4103 */ 4314 */
4104 core.String instance; 4315 core.String instance;
4105 4316
4106 /** This is always sql#user. */ 4317 /** This is always sql#user. */
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
4214 } 4425 }
4215 if (kind != null) { 4426 if (kind != null) {
4216 _json["kind"] = kind; 4427 _json["kind"] = kind;
4217 } 4428 }
4218 if (nextPageToken != null) { 4429 if (nextPageToken != null) {
4219 _json["nextPageToken"] = nextPageToken; 4430 _json["nextPageToken"] = nextPageToken;
4220 } 4431 }
4221 return _json; 4432 return _json;
4222 } 4433 }
4223 } 4434 }
4224
4225
OLDNEW
« no previous file with comments | « generated/googleapis_beta/lib/sqladmin/v1beta3.dart ('k') | generated/googleapis_beta/lib/src/common_internal.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698