| 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.iam.v1; | 3 library googleapis.iam.v1; |
| 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 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 201 * | 201 * |
| 202 * Request parameters: | 202 * Request parameters: |
| 203 * | 203 * |
| 204 * [parent] - The resource name of the parent resource in one of the following | 204 * [parent] - The resource name of the parent resource in one of the following |
| 205 * formats: | 205 * formats: |
| 206 * `` (empty string) -- this refers to curated roles. | 206 * `` (empty string) -- this refers to curated roles. |
| 207 * `organizations/{ORGANIZATION_ID}` | 207 * `organizations/{ORGANIZATION_ID}` |
| 208 * `projects/{PROJECT_ID}` | 208 * `projects/{PROJECT_ID}` |
| 209 * Value must have pattern "^organizations/[^/]+$". | 209 * Value must have pattern "^organizations/[^/]+$". |
| 210 * | 210 * |
| 211 * [showDeleted] - Include Roles that have been deleted. |
| 212 * |
| 211 * [pageToken] - Optional pagination token returned in an earlier | 213 * [pageToken] - Optional pagination token returned in an earlier |
| 212 * ListRolesResponse. | 214 * ListRolesResponse. |
| 213 * | 215 * |
| 214 * [pageSize] - Optional limit on the number of roles to include in the | 216 * [pageSize] - Optional limit on the number of roles to include in the |
| 215 * response. | 217 * response. |
| 216 * | 218 * |
| 217 * [view] - Optional view for the returned Role objects. | 219 * [view] - Optional view for the returned Role objects. |
| 218 * Possible string values are: | 220 * Possible string values are: |
| 219 * - "BASIC" : A BASIC. | 221 * - "BASIC" : A BASIC. |
| 220 * - "FULL" : A FULL. | 222 * - "FULL" : A FULL. |
| 221 * | 223 * |
| 222 * [showDeleted] - Include Roles that have been deleted. | |
| 223 * | |
| 224 * Completes with a [ListRolesResponse]. | 224 * Completes with a [ListRolesResponse]. |
| 225 * | 225 * |
| 226 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 226 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 227 * error. | 227 * error. |
| 228 * | 228 * |
| 229 * If the used [http.Client] completes with an error when making a REST call, | 229 * If the used [http.Client] completes with an error when making a REST call, |
| 230 * this method will complete with the same error. | 230 * this method will complete with the same error. |
| 231 */ | 231 */ |
| 232 async.Future<ListRolesResponse> list(core.String parent, {core.String pageToke
n, core.int pageSize, core.String view, core.bool showDeleted}) { | 232 async.Future<ListRolesResponse> list(core.String parent, {core.bool showDelete
d, core.String pageToken, core.int pageSize, core.String view}) { |
| 233 var _url = null; | 233 var _url = null; |
| 234 var _queryParams = new core.Map(); | 234 var _queryParams = new core.Map(); |
| 235 var _uploadMedia = null; | 235 var _uploadMedia = null; |
| 236 var _uploadOptions = null; | 236 var _uploadOptions = null; |
| 237 var _downloadOptions = commons.DownloadOptions.Metadata; | 237 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 238 var _body = null; | 238 var _body = null; |
| 239 | 239 |
| 240 if (parent == null) { | 240 if (parent == null) { |
| 241 throw new core.ArgumentError("Parameter parent is required."); | 241 throw new core.ArgumentError("Parameter parent is required."); |
| 242 } | 242 } |
| 243 if (showDeleted != null) { |
| 244 _queryParams["showDeleted"] = ["${showDeleted}"]; |
| 245 } |
| 243 if (pageToken != null) { | 246 if (pageToken != null) { |
| 244 _queryParams["pageToken"] = [pageToken]; | 247 _queryParams["pageToken"] = [pageToken]; |
| 245 } | 248 } |
| 246 if (pageSize != null) { | 249 if (pageSize != null) { |
| 247 _queryParams["pageSize"] = ["${pageSize}"]; | 250 _queryParams["pageSize"] = ["${pageSize}"]; |
| 248 } | 251 } |
| 249 if (view != null) { | 252 if (view != null) { |
| 250 _queryParams["view"] = [view]; | 253 _queryParams["view"] = [view]; |
| 251 } | 254 } |
| 252 if (showDeleted != null) { | |
| 253 _queryParams["showDeleted"] = ["${showDeleted}"]; | |
| 254 } | |
| 255 | 255 |
| 256 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$parent') + '/roles'; | 256 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$parent') + '/roles'; |
| 257 | 257 |
| 258 var _response = _requester.request(_url, | 258 var _response = _requester.request(_url, |
| 259 "GET", | 259 "GET", |
| 260 body: _body, | 260 body: _body, |
| 261 queryParams: _queryParams, | 261 queryParams: _queryParams, |
| 262 uploadOptions: _uploadOptions, | 262 uploadOptions: _uploadOptions, |
| 263 uploadMedia: _uploadMedia, | 263 uploadMedia: _uploadMedia, |
| 264 downloadOptions: _downloadOptions); | 264 downloadOptions: _downloadOptions); |
| (...skipping 1250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1515 uploadMedia: _uploadMedia, | 1515 uploadMedia: _uploadMedia, |
| 1516 downloadOptions: _downloadOptions); | 1516 downloadOptions: _downloadOptions); |
| 1517 return _response.then((data) => new Role.fromJson(data)); | 1517 return _response.then((data) => new Role.fromJson(data)); |
| 1518 } | 1518 } |
| 1519 | 1519 |
| 1520 /** | 1520 /** |
| 1521 * Lists the Roles defined on a resource. | 1521 * Lists the Roles defined on a resource. |
| 1522 * | 1522 * |
| 1523 * Request parameters: | 1523 * Request parameters: |
| 1524 * | 1524 * |
| 1525 * [pageToken] - Optional pagination token returned in an earlier | |
| 1526 * ListRolesResponse. | |
| 1527 * | |
| 1528 * [pageSize] - Optional limit on the number of roles to include in the | |
| 1529 * response. | |
| 1530 * | |
| 1531 * [view] - Optional view for the returned Role objects. | 1525 * [view] - Optional view for the returned Role objects. |
| 1532 * Possible string values are: | 1526 * Possible string values are: |
| 1533 * - "BASIC" : A BASIC. | 1527 * - "BASIC" : A BASIC. |
| 1534 * - "FULL" : A FULL. | 1528 * - "FULL" : A FULL. |
| 1535 * | 1529 * |
| 1536 * [parent] - The resource name of the parent resource in one of the following | 1530 * [parent] - The resource name of the parent resource in one of the following |
| 1537 * formats: | 1531 * formats: |
| 1538 * `` (empty string) -- this refers to curated roles. | 1532 * `` (empty string) -- this refers to curated roles. |
| 1539 * `organizations/{ORGANIZATION_ID}` | 1533 * `organizations/{ORGANIZATION_ID}` |
| 1540 * `projects/{PROJECT_ID}` | 1534 * `projects/{PROJECT_ID}` |
| 1541 * | 1535 * |
| 1542 * [showDeleted] - Include Roles that have been deleted. | 1536 * [showDeleted] - Include Roles that have been deleted. |
| 1543 * | 1537 * |
| 1538 * [pageToken] - Optional pagination token returned in an earlier |
| 1539 * ListRolesResponse. |
| 1540 * |
| 1541 * [pageSize] - Optional limit on the number of roles to include in the |
| 1542 * response. |
| 1543 * |
| 1544 * Completes with a [ListRolesResponse]. | 1544 * Completes with a [ListRolesResponse]. |
| 1545 * | 1545 * |
| 1546 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 1546 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 1547 * error. | 1547 * error. |
| 1548 * | 1548 * |
| 1549 * If the used [http.Client] completes with an error when making a REST call, | 1549 * If the used [http.Client] completes with an error when making a REST call, |
| 1550 * this method will complete with the same error. | 1550 * this method will complete with the same error. |
| 1551 */ | 1551 */ |
| 1552 async.Future<ListRolesResponse> list({core.String pageToken, core.int pageSize
, core.String view, core.String parent, core.bool showDeleted}) { | 1552 async.Future<ListRolesResponse> list({core.String view, core.String parent, co
re.bool showDeleted, core.String pageToken, core.int pageSize}) { |
| 1553 var _url = null; | 1553 var _url = null; |
| 1554 var _queryParams = new core.Map(); | 1554 var _queryParams = new core.Map(); |
| 1555 var _uploadMedia = null; | 1555 var _uploadMedia = null; |
| 1556 var _uploadOptions = null; | 1556 var _uploadOptions = null; |
| 1557 var _downloadOptions = commons.DownloadOptions.Metadata; | 1557 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 1558 var _body = null; | 1558 var _body = null; |
| 1559 | 1559 |
| 1560 if (pageToken != null) { | |
| 1561 _queryParams["pageToken"] = [pageToken]; | |
| 1562 } | |
| 1563 if (pageSize != null) { | |
| 1564 _queryParams["pageSize"] = ["${pageSize}"]; | |
| 1565 } | |
| 1566 if (view != null) { | 1560 if (view != null) { |
| 1567 _queryParams["view"] = [view]; | 1561 _queryParams["view"] = [view]; |
| 1568 } | 1562 } |
| 1569 if (parent != null) { | 1563 if (parent != null) { |
| 1570 _queryParams["parent"] = [parent]; | 1564 _queryParams["parent"] = [parent]; |
| 1571 } | 1565 } |
| 1572 if (showDeleted != null) { | 1566 if (showDeleted != null) { |
| 1573 _queryParams["showDeleted"] = ["${showDeleted}"]; | 1567 _queryParams["showDeleted"] = ["${showDeleted}"]; |
| 1574 } | 1568 } |
| 1569 if (pageToken != null) { |
| 1570 _queryParams["pageToken"] = [pageToken]; |
| 1571 } |
| 1572 if (pageSize != null) { |
| 1573 _queryParams["pageSize"] = ["${pageSize}"]; |
| 1574 } |
| 1575 | 1575 |
| 1576 _url = 'v1/roles'; | 1576 _url = 'v1/roles'; |
| 1577 | 1577 |
| 1578 var _response = _requester.request(_url, | 1578 var _response = _requester.request(_url, |
| 1579 "GET", | 1579 "GET", |
| 1580 body: _body, | 1580 body: _body, |
| 1581 queryParams: _queryParams, | 1581 queryParams: _queryParams, |
| 1582 uploadOptions: _uploadOptions, | 1582 uploadOptions: _uploadOptions, |
| 1583 uploadMedia: _uploadMedia, | 1583 uploadMedia: _uploadMedia, |
| 1584 downloadOptions: _downloadOptions); | 1584 downloadOptions: _downloadOptions); |
| (...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1807 } | 1807 } |
| 1808 if (roleId != null) { | 1808 if (roleId != null) { |
| 1809 _json["roleId"] = roleId; | 1809 _json["roleId"] = roleId; |
| 1810 } | 1810 } |
| 1811 return _json; | 1811 return _json; |
| 1812 } | 1812 } |
| 1813 } | 1813 } |
| 1814 | 1814 |
| 1815 /** The service account key create request. */ | 1815 /** The service account key create request. */ |
| 1816 class CreateServiceAccountKeyRequest { | 1816 class CreateServiceAccountKeyRequest { |
| 1817 core.bool includePublicKeyData; | |
| 1818 /** | 1817 /** |
| 1819 * Which type of key and algorithm to use for the key. | 1818 * Which type of key and algorithm to use for the key. |
| 1820 * The default is currently a 2K RSA key. However this may change in the | 1819 * The default is currently a 2K RSA key. However this may change in the |
| 1821 * future. | 1820 * future. |
| 1822 * Possible string values are: | 1821 * Possible string values are: |
| 1823 * - "KEY_ALG_UNSPECIFIED" : An unspecified key algorithm. | 1822 * - "KEY_ALG_UNSPECIFIED" : An unspecified key algorithm. |
| 1824 * - "KEY_ALG_RSA_1024" : 1k RSA Key. | 1823 * - "KEY_ALG_RSA_1024" : 1k RSA Key. |
| 1825 * - "KEY_ALG_RSA_2048" : 2k RSA Key. | 1824 * - "KEY_ALG_RSA_2048" : 2k RSA Key. |
| 1826 */ | 1825 */ |
| 1827 core.String keyAlgorithm; | 1826 core.String keyAlgorithm; |
| 1828 /** | 1827 /** |
| 1829 * The output format of the private key. `GOOGLE_CREDENTIALS_FILE` is the | 1828 * The output format of the private key. `GOOGLE_CREDENTIALS_FILE` is the |
| 1830 * default output format. | 1829 * default output format. |
| 1831 * Possible string values are: | 1830 * Possible string values are: |
| 1832 * - "TYPE_UNSPECIFIED" : Unspecified. Equivalent to | 1831 * - "TYPE_UNSPECIFIED" : Unspecified. Equivalent to |
| 1833 * `TYPE_GOOGLE_CREDENTIALS_FILE`. | 1832 * `TYPE_GOOGLE_CREDENTIALS_FILE`. |
| 1834 * - "TYPE_PKCS12_FILE" : PKCS12 format. | 1833 * - "TYPE_PKCS12_FILE" : PKCS12 format. |
| 1835 * The password for the PKCS12 file is `notasecret`. | 1834 * The password for the PKCS12 file is `notasecret`. |
| 1836 * For more information, see https://tools.ietf.org/html/rfc7292. | 1835 * For more information, see https://tools.ietf.org/html/rfc7292. |
| 1837 * - "TYPE_GOOGLE_CREDENTIALS_FILE" : Google Credentials File format. | 1836 * - "TYPE_GOOGLE_CREDENTIALS_FILE" : Google Credentials File format. |
| 1838 */ | 1837 */ |
| 1839 core.String privateKeyType; | 1838 core.String privateKeyType; |
| 1840 | 1839 |
| 1841 CreateServiceAccountKeyRequest(); | 1840 CreateServiceAccountKeyRequest(); |
| 1842 | 1841 |
| 1843 CreateServiceAccountKeyRequest.fromJson(core.Map _json) { | 1842 CreateServiceAccountKeyRequest.fromJson(core.Map _json) { |
| 1844 if (_json.containsKey("includePublicKeyData")) { | |
| 1845 includePublicKeyData = _json["includePublicKeyData"]; | |
| 1846 } | |
| 1847 if (_json.containsKey("keyAlgorithm")) { | 1843 if (_json.containsKey("keyAlgorithm")) { |
| 1848 keyAlgorithm = _json["keyAlgorithm"]; | 1844 keyAlgorithm = _json["keyAlgorithm"]; |
| 1849 } | 1845 } |
| 1850 if (_json.containsKey("privateKeyType")) { | 1846 if (_json.containsKey("privateKeyType")) { |
| 1851 privateKeyType = _json["privateKeyType"]; | 1847 privateKeyType = _json["privateKeyType"]; |
| 1852 } | 1848 } |
| 1853 } | 1849 } |
| 1854 | 1850 |
| 1855 core.Map<core.String, core.Object> toJson() { | 1851 core.Map<core.String, core.Object> toJson() { |
| 1856 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 1852 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); |
| 1857 if (includePublicKeyData != null) { | |
| 1858 _json["includePublicKeyData"] = includePublicKeyData; | |
| 1859 } | |
| 1860 if (keyAlgorithm != null) { | 1853 if (keyAlgorithm != null) { |
| 1861 _json["keyAlgorithm"] = keyAlgorithm; | 1854 _json["keyAlgorithm"] = keyAlgorithm; |
| 1862 } | 1855 } |
| 1863 if (privateKeyType != null) { | 1856 if (privateKeyType != null) { |
| 1864 _json["privateKeyType"] = privateKeyType; | 1857 _json["privateKeyType"] = privateKeyType; |
| 1865 } | 1858 } |
| 1866 return _json; | 1859 return _json; |
| 1867 } | 1860 } |
| 1868 } | 1861 } |
| 1869 | 1862 |
| (...skipping 1152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3022 } | 3015 } |
| 3023 | 3016 |
| 3024 core.Map<core.String, core.Object> toJson() { | 3017 core.Map<core.String, core.Object> toJson() { |
| 3025 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 3018 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); |
| 3026 if (etag != null) { | 3019 if (etag != null) { |
| 3027 _json["etag"] = etag; | 3020 _json["etag"] = etag; |
| 3028 } | 3021 } |
| 3029 return _json; | 3022 return _json; |
| 3030 } | 3023 } |
| 3031 } | 3024 } |
| OLD | NEW |