OLD | NEW |
1 // This is a generated file (see the discoveryapis_generator project). | 1 // This is a generated file (see the discoveryapis_generator project). |
2 | 2 |
3 library googleapis_beta.sqladmin.v1beta4; | 3 library googleapis_beta.sqladmin.v1beta4; |
4 | 4 |
5 import 'dart:core' as core; | 5 import 'dart:core' as core; |
6 import 'dart:async' as async; | 6 import 'dart:async' as async; |
7 import 'dart:convert' as convert; | 7 import 'dart:convert' as convert; |
8 | 8 |
9 import 'package:_discoveryapis_commons/_discoveryapis_commons.dart' as commons; | 9 import 'package:_discoveryapis_commons/_discoveryapis_commons.dart' as commons; |
10 import 'package:http/http.dart' as http; | 10 import 'package:http/http.dart' as http; |
(...skipping 1530 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1541 var _response = _requester.request(_url, | 1541 var _response = _requester.request(_url, |
1542 "GET", | 1542 "GET", |
1543 body: _body, | 1543 body: _body, |
1544 queryParams: _queryParams, | 1544 queryParams: _queryParams, |
1545 uploadOptions: _uploadOptions, | 1545 uploadOptions: _uploadOptions, |
1546 uploadMedia: _uploadMedia, | 1546 uploadMedia: _uploadMedia, |
1547 downloadOptions: _downloadOptions); | 1547 downloadOptions: _downloadOptions); |
1548 return _response.then((data) => new SslCertsListResponse.fromJson(data)); | 1548 return _response.then((data) => new SslCertsListResponse.fromJson(data)); |
1549 } | 1549 } |
1550 | 1550 |
| 1551 /** |
| 1552 * Generates a short-lived X509 certificate containing the provided public key |
| 1553 * and signed by a private key specific to the target instance. Users may use |
| 1554 * the certificate to authenticate as themselves when connecting to the |
| 1555 * database. |
| 1556 * |
| 1557 * [request] - The metadata request object. |
| 1558 * |
| 1559 * Request parameters: |
| 1560 * |
| 1561 * [project] - Project ID of the Cloud SQL project. |
| 1562 * |
| 1563 * [instance] - Cloud SQL instance ID. This does not include the project ID. |
| 1564 * |
| 1565 * Completes with a [SslCert]. |
| 1566 * |
| 1567 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 1568 * error. |
| 1569 * |
| 1570 * If the used [http.Client] completes with an error when making a REST call, |
| 1571 * this method will complete with the same error. |
| 1572 */ |
| 1573 async.Future<SslCert> sign(SslCertsSignRequest request, core.String project, c
ore.String instance) { |
| 1574 var _url = null; |
| 1575 var _queryParams = new core.Map(); |
| 1576 var _uploadMedia = null; |
| 1577 var _uploadOptions = null; |
| 1578 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 1579 var _body = null; |
| 1580 |
| 1581 if (request != null) { |
| 1582 _body = convert.JSON.encode((request).toJson()); |
| 1583 } |
| 1584 if (project == null) { |
| 1585 throw new core.ArgumentError("Parameter project is required."); |
| 1586 } |
| 1587 if (instance == null) { |
| 1588 throw new core.ArgumentError("Parameter instance is required."); |
| 1589 } |
| 1590 |
| 1591 _url = 'projects/' + commons.Escaper.ecapeVariable('$project') + '/instances
/' + commons.Escaper.ecapeVariable('$instance') + '/certSign'; |
| 1592 |
| 1593 var _response = _requester.request(_url, |
| 1594 "POST", |
| 1595 body: _body, |
| 1596 queryParams: _queryParams, |
| 1597 uploadOptions: _uploadOptions, |
| 1598 uploadMedia: _uploadMedia, |
| 1599 downloadOptions: _downloadOptions); |
| 1600 return _response.then((data) => new SslCert.fromJson(data)); |
| 1601 } |
| 1602 |
1551 } | 1603 } |
1552 | 1604 |
1553 | 1605 |
1554 class TiersResourceApi { | 1606 class TiersResourceApi { |
1555 final commons.ApiRequester _requester; | 1607 final commons.ApiRequester _requester; |
1556 | 1608 |
1557 TiersResourceApi(commons.ApiRequester client) : | 1609 TiersResourceApi(commons.ApiRequester client) : |
1558 _requester = client; | 1610 _requester = client; |
1559 | 1611 |
1560 /** | 1612 /** |
(...skipping 2409 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3970 if (items != null) { | 4022 if (items != null) { |
3971 _json["items"] = items.map((value) => (value).toJson()).toList(); | 4023 _json["items"] = items.map((value) => (value).toJson()).toList(); |
3972 } | 4024 } |
3973 if (kind != null) { | 4025 if (kind != null) { |
3974 _json["kind"] = kind; | 4026 _json["kind"] = kind; |
3975 } | 4027 } |
3976 return _json; | 4028 return _json; |
3977 } | 4029 } |
3978 } | 4030 } |
3979 | 4031 |
| 4032 /** SslCerts sign request. */ |
| 4033 class SslCertsSignRequest { |
| 4034 /** PEM encoded public key to include in the signed certificate. */ |
| 4035 core.String publicKey; |
| 4036 |
| 4037 SslCertsSignRequest(); |
| 4038 |
| 4039 SslCertsSignRequest.fromJson(core.Map _json) { |
| 4040 if (_json.containsKey("public_key")) { |
| 4041 publicKey = _json["public_key"]; |
| 4042 } |
| 4043 } |
| 4044 |
| 4045 core.Map toJson() { |
| 4046 var _json = new core.Map(); |
| 4047 if (publicKey != null) { |
| 4048 _json["public_key"] = publicKey; |
| 4049 } |
| 4050 return _json; |
| 4051 } |
| 4052 } |
| 4053 |
3980 /** A Google Cloud SQL service tier resource. */ | 4054 /** A Google Cloud SQL service tier resource. */ |
3981 class Tier { | 4055 class Tier { |
3982 /** The maximum disk size of this tier in bytes. */ | 4056 /** The maximum disk size of this tier in bytes. */ |
3983 core.String DiskQuota; | 4057 core.String DiskQuota; |
3984 /** The maximum RAM usage of this tier in bytes. */ | 4058 /** The maximum RAM usage of this tier in bytes. */ |
3985 core.String RAM; | 4059 core.String RAM; |
3986 /** This is always sql#tier. */ | 4060 /** This is always sql#tier. */ |
3987 core.String kind; | 4061 core.String kind; |
3988 /** | 4062 /** |
3989 * The applicable regions for this tier. Can be us-east1, europe-west1 or | 4063 * The applicable regions for this tier. Can be us-east1, europe-west1 or |
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4185 } | 4259 } |
4186 if (kind != null) { | 4260 if (kind != null) { |
4187 _json["kind"] = kind; | 4261 _json["kind"] = kind; |
4188 } | 4262 } |
4189 if (nextPageToken != null) { | 4263 if (nextPageToken != null) { |
4190 _json["nextPageToken"] = nextPageToken; | 4264 _json["nextPageToken"] = nextPageToken; |
4191 } | 4265 } |
4192 return _json; | 4266 return _json; |
4193 } | 4267 } |
4194 } | 4268 } |
OLD | NEW |