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.appengine.v1beta4; | 3 library googleapis_beta.appengine.v1beta4; |
4 | 4 |
5 import 'dart:core' as core; | 5 import 'dart:core' as core; |
6 import 'dart:async' as async; | 6 import 'dart:async' as async; |
7 import 'dart:convert' as convert; | 7 import 'dart:convert' as convert; |
8 | 8 |
9 import 'package:_discoveryapis_commons/_discoveryapis_commons.dart' as commons; | 9 import 'package:_discoveryapis_commons/_discoveryapis_commons.dart' as commons; |
10 import 'package:http/http.dart' as http; | 10 import 'package:http/http.dart' as http; |
11 | 11 |
12 export 'package:_discoveryapis_commons/_discoveryapis_commons.dart' show | 12 export 'package:_discoveryapis_commons/_discoveryapis_commons.dart' show |
13 ApiRequestError, DetailedApiRequestError; | 13 ApiRequestError, DetailedApiRequestError; |
14 | 14 |
15 const core.String USER_AGENT = 'dart-api-client appengine/v1beta4'; | 15 const core.String USER_AGENT = 'dart-api-client appengine/v1beta4'; |
16 | 16 |
17 /** Provisions and manages App Engine applications. */ | 17 /** Provisions and manages App Engine applications. */ |
18 class AppengineApi { | 18 class AppengineApi { |
| 19 /** View and manage your applications deployed on Google App Engine */ |
| 20 static const AppengineAdminScope = "https://www.googleapis.com/auth/appengine.
admin"; |
| 21 |
19 /** View and manage your data across Google Cloud Platform services */ | 22 /** View and manage your data across Google Cloud Platform services */ |
20 static const CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platf
orm"; | 23 static const CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platf
orm"; |
21 | 24 |
| 25 /** View your data across Google Cloud Platform services */ |
| 26 static const CloudPlatformReadOnlyScope = "https://www.googleapis.com/auth/clo
ud-platform.read-only"; |
| 27 |
22 | 28 |
23 final commons.ApiRequester _requester; | 29 final commons.ApiRequester _requester; |
24 | 30 |
25 AppsResourceApi get apps => new AppsResourceApi(_requester); | 31 AppsResourceApi get apps => new AppsResourceApi(_requester); |
26 | 32 |
27 AppengineApi(http.Client client, {core.String rootUrl: "https://appengine.goog
leapis.com/", core.String servicePath: ""}) : | 33 AppengineApi(http.Client client, {core.String rootUrl: "https://appengine.goog
leapis.com/", core.String servicePath: ""}) : |
28 _requester = new commons.ApiRequester(client, rootUrl, servicePath, USER_A
GENT); | 34 _requester = new commons.ApiRequester(client, rootUrl, servicePath, USER_A
GENT); |
29 } | 35 } |
30 | 36 |
31 | 37 |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
124 var _response = _requester.request(_url, | 130 var _response = _requester.request(_url, |
125 "GET", | 131 "GET", |
126 body: _body, | 132 body: _body, |
127 queryParams: _queryParams, | 133 queryParams: _queryParams, |
128 uploadOptions: _uploadOptions, | 134 uploadOptions: _uploadOptions, |
129 uploadMedia: _uploadMedia, | 135 uploadMedia: _uploadMedia, |
130 downloadOptions: _downloadOptions); | 136 downloadOptions: _downloadOptions); |
131 return _response.then((data) => new Application.fromJson(data)); | 137 return _response.then((data) => new Application.fromJson(data)); |
132 } | 138 } |
133 | 139 |
| 140 /** |
| 141 * Updates application fields. |
| 142 * |
| 143 * [request] - The metadata request object. |
| 144 * |
| 145 * Request parameters: |
| 146 * |
| 147 * [appsId] - Part of `name`. Name of the application to update. For example: |
| 148 * "apps/myapp". |
| 149 * |
| 150 * [mask] - Standard field mask for the set of fields to be updated. |
| 151 * |
| 152 * Completes with a [Operation]. |
| 153 * |
| 154 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 155 * error. |
| 156 * |
| 157 * If the used [http.Client] completes with an error when making a REST call, |
| 158 * this method will complete with the same error. |
| 159 */ |
| 160 async.Future<Operation> patch(Application request, core.String appsId, {core.S
tring mask}) { |
| 161 var _url = null; |
| 162 var _queryParams = new core.Map(); |
| 163 var _uploadMedia = null; |
| 164 var _uploadOptions = null; |
| 165 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 166 var _body = null; |
| 167 |
| 168 if (request != null) { |
| 169 _body = convert.JSON.encode((request).toJson()); |
| 170 } |
| 171 if (appsId == null) { |
| 172 throw new core.ArgumentError("Parameter appsId is required."); |
| 173 } |
| 174 if (mask != null) { |
| 175 _queryParams["mask"] = [mask]; |
| 176 } |
| 177 |
| 178 _url = 'v1beta4/apps/' + commons.Escaper.ecapeVariable('$appsId'); |
| 179 |
| 180 var _response = _requester.request(_url, |
| 181 "PATCH", |
| 182 body: _body, |
| 183 queryParams: _queryParams, |
| 184 uploadOptions: _uploadOptions, |
| 185 uploadMedia: _uploadMedia, |
| 186 downloadOptions: _downloadOptions); |
| 187 return _response.then((data) => new Operation.fromJson(data)); |
| 188 } |
| 189 |
134 } | 190 } |
135 | 191 |
136 | 192 |
137 class AppsLocationsResourceApi { | 193 class AppsLocationsResourceApi { |
138 final commons.ApiRequester _requester; | 194 final commons.ApiRequester _requester; |
139 | 195 |
140 AppsLocationsResourceApi(commons.ApiRequester client) : | 196 AppsLocationsResourceApi(commons.ApiRequester client) : |
141 _requester = client; | 197 _requester = client; |
142 | 198 |
143 /** | 199 /** |
(...skipping 1435 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1579 } | 1635 } |
1580 if (targetUtilization != null) { | 1636 if (targetUtilization != null) { |
1581 _json["targetUtilization"] = targetUtilization; | 1637 _json["targetUtilization"] = targetUtilization; |
1582 } | 1638 } |
1583 return _json; | 1639 return _json; |
1584 } | 1640 } |
1585 } | 1641 } |
1586 | 1642 |
1587 /** Request message for `Instances.DebugInstance`. */ | 1643 /** Request message for `Instances.DebugInstance`. */ |
1588 class DebugInstanceRequest { | 1644 class DebugInstanceRequest { |
| 1645 /** |
| 1646 * Public SSH key to add to the instance. Example: `[USERNAME]:ssh-rsa |
| 1647 * KEY_VALUE` or `[USERNAME]:ssh-rsa [KEY_VALUE] google-ssh |
| 1648 * {"userName":"[USERNAME]","expireOn":"[EXPIRE_TIME]"}` For more information, |
| 1649 * see [Adding and Removing SSH |
| 1650 * Keys](https://cloud.google.com/compute/docs/instances/adding-removing-ssh-k
eys) |
| 1651 */ |
| 1652 core.String sshKey; |
1589 | 1653 |
1590 DebugInstanceRequest(); | 1654 DebugInstanceRequest(); |
1591 | 1655 |
1592 DebugInstanceRequest.fromJson(core.Map _json) { | 1656 DebugInstanceRequest.fromJson(core.Map _json) { |
| 1657 if (_json.containsKey("sshKey")) { |
| 1658 sshKey = _json["sshKey"]; |
| 1659 } |
1593 } | 1660 } |
1594 | 1661 |
1595 core.Map toJson() { | 1662 core.Map toJson() { |
1596 var _json = new core.Map(); | 1663 var _json = new core.Map(); |
| 1664 if (sshKey != null) { |
| 1665 _json["sshKey"] = sshKey; |
| 1666 } |
1597 return _json; | 1667 return _json; |
1598 } | 1668 } |
1599 } | 1669 } |
1600 | 1670 |
1601 /** Code and application artifacts used to deploy a version to App Engine. */ | 1671 /** Code and application artifacts used to deploy a version to App Engine. */ |
1602 class Deployment { | 1672 class Deployment { |
1603 /** | 1673 /** |
1604 * A Docker image that App Engine uses the run the version. Only applicable | 1674 * A Docker image that App Engine uses the run the version. Only applicable |
1605 * for instances in App Engine flexible environment. | 1675 * for instances in App Engine flexible environment. |
1606 */ | 1676 */ |
(...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1907 /** Number of requests since this instance was started. @OutputOnly */ | 1977 /** Number of requests since this instance was started. @OutputOnly */ |
1908 core.int requests; | 1978 core.int requests; |
1909 /** Time that this instance was started. @OutputOnly */ | 1979 /** Time that this instance was started. @OutputOnly */ |
1910 core.String startTimestamp; | 1980 core.String startTimestamp; |
1911 /** | 1981 /** |
1912 * Virtual machine ID of this instance. Only applicable for instances in App | 1982 * Virtual machine ID of this instance. Only applicable for instances in App |
1913 * Engine flexible environment. @OutputOnly | 1983 * Engine flexible environment. @OutputOnly |
1914 */ | 1984 */ |
1915 core.String vmId; | 1985 core.String vmId; |
1916 /** | 1986 /** |
| 1987 * The IP address of this instance. Only applicable for instances in App |
| 1988 * Engine flexible environment. @OutputOnly |
| 1989 */ |
| 1990 core.String vmIp; |
| 1991 /** |
1917 * Name of the virtual machine where this instance lives. Only applicable for | 1992 * Name of the virtual machine where this instance lives. Only applicable for |
1918 * instances in App Engine flexible environment. @OutputOnly | 1993 * instances in App Engine flexible environment. @OutputOnly |
1919 */ | 1994 */ |
1920 core.String vmName; | 1995 core.String vmName; |
1921 /** | 1996 /** |
1922 * Status of the virtual machine where this instance lives. Only applicable | 1997 * Status of the virtual machine where this instance lives. Only applicable |
1923 * for instances in App Engine flexible environment. @OutputOnly | 1998 * for instances in App Engine flexible environment. @OutputOnly |
1924 */ | 1999 */ |
1925 core.String vmStatus; | 2000 core.String vmStatus; |
1926 /** | 2001 /** |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1963 } | 2038 } |
1964 if (_json.containsKey("requests")) { | 2039 if (_json.containsKey("requests")) { |
1965 requests = _json["requests"]; | 2040 requests = _json["requests"]; |
1966 } | 2041 } |
1967 if (_json.containsKey("startTimestamp")) { | 2042 if (_json.containsKey("startTimestamp")) { |
1968 startTimestamp = _json["startTimestamp"]; | 2043 startTimestamp = _json["startTimestamp"]; |
1969 } | 2044 } |
1970 if (_json.containsKey("vmId")) { | 2045 if (_json.containsKey("vmId")) { |
1971 vmId = _json["vmId"]; | 2046 vmId = _json["vmId"]; |
1972 } | 2047 } |
| 2048 if (_json.containsKey("vmIp")) { |
| 2049 vmIp = _json["vmIp"]; |
| 2050 } |
1973 if (_json.containsKey("vmName")) { | 2051 if (_json.containsKey("vmName")) { |
1974 vmName = _json["vmName"]; | 2052 vmName = _json["vmName"]; |
1975 } | 2053 } |
1976 if (_json.containsKey("vmStatus")) { | 2054 if (_json.containsKey("vmStatus")) { |
1977 vmStatus = _json["vmStatus"]; | 2055 vmStatus = _json["vmStatus"]; |
1978 } | 2056 } |
1979 if (_json.containsKey("vmUnlocked")) { | 2057 if (_json.containsKey("vmUnlocked")) { |
1980 vmUnlocked = _json["vmUnlocked"]; | 2058 vmUnlocked = _json["vmUnlocked"]; |
1981 } | 2059 } |
1982 if (_json.containsKey("vmZoneName")) { | 2060 if (_json.containsKey("vmZoneName")) { |
(...skipping 29 matching lines...) Expand all Loading... |
2012 } | 2090 } |
2013 if (requests != null) { | 2091 if (requests != null) { |
2014 _json["requests"] = requests; | 2092 _json["requests"] = requests; |
2015 } | 2093 } |
2016 if (startTimestamp != null) { | 2094 if (startTimestamp != null) { |
2017 _json["startTimestamp"] = startTimestamp; | 2095 _json["startTimestamp"] = startTimestamp; |
2018 } | 2096 } |
2019 if (vmId != null) { | 2097 if (vmId != null) { |
2020 _json["vmId"] = vmId; | 2098 _json["vmId"] = vmId; |
2021 } | 2099 } |
| 2100 if (vmIp != null) { |
| 2101 _json["vmIp"] = vmIp; |
| 2102 } |
2022 if (vmName != null) { | 2103 if (vmName != null) { |
2023 _json["vmName"] = vmName; | 2104 _json["vmName"] = vmName; |
2024 } | 2105 } |
2025 if (vmStatus != null) { | 2106 if (vmStatus != null) { |
2026 _json["vmStatus"] = vmStatus; | 2107 _json["vmStatus"] = vmStatus; |
2027 } | 2108 } |
2028 if (vmUnlocked != null) { | 2109 if (vmUnlocked != null) { |
2029 _json["vmUnlocked"] = vmUnlocked; | 2110 _json["vmUnlocked"] = vmUnlocked; |
2030 } | 2111 } |
2031 if (vmZoneName != null) { | 2112 if (vmZoneName != null) { |
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2215 } | 2296 } |
2216 } | 2297 } |
2217 | 2298 |
2218 /** A resource that represents Google Cloud Platform location. */ | 2299 /** A resource that represents Google Cloud Platform location. */ |
2219 class Location { | 2300 class Location { |
2220 /** | 2301 /** |
2221 * Cross-service attributes for the location. For example | 2302 * Cross-service attributes for the location. For example |
2222 * {"cloud.googleapis.com/region": "us-east1"} | 2303 * {"cloud.googleapis.com/region": "us-east1"} |
2223 */ | 2304 */ |
2224 core.Map<core.String, core.String> labels; | 2305 core.Map<core.String, core.String> labels; |
2225 /** The cononical id for this location. For example: `"us-east1"`. */ | 2306 /** The canonical id for this location. For example: `"us-east1"`. */ |
2226 core.String locationId; | 2307 core.String locationId; |
2227 /** | 2308 /** |
2228 * Service-specific metadata. For example the available capacity at the given | 2309 * Service-specific metadata. For example the available capacity at the given |
2229 * location. | 2310 * location. |
2230 * | 2311 * |
2231 * The values for Object must be JSON objects. It can consist of `num`, | 2312 * The values for Object must be JSON objects. It can consist of `num`, |
2232 * `String`, `bool` and `null` as well as `Map` and `List` values. | 2313 * `String`, `bool` and `null` as well as `Map` and `List` values. |
2233 */ | 2314 */ |
2234 core.Map<core.String, core.Object> metadata; | 2315 core.Map<core.String, core.Object> metadata; |
2235 /** | 2316 /** |
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2487 * This resource represents a long-running operation that is the result of a | 2568 * This resource represents a long-running operation that is the result of a |
2488 * network API call. | 2569 * network API call. |
2489 */ | 2570 */ |
2490 class Operation { | 2571 class Operation { |
2491 /** | 2572 /** |
2492 * If the value is `false`, it means the operation is still in progress. If | 2573 * If the value is `false`, it means the operation is still in progress. If |
2493 * true, the operation is completed, and either `error` or `response` is | 2574 * true, the operation is completed, and either `error` or `response` is |
2494 * available. | 2575 * available. |
2495 */ | 2576 */ |
2496 core.bool done; | 2577 core.bool done; |
2497 /** The error result of the operation in case of failure. */ | 2578 /** The error result of the operation in case of failure or cancellation. */ |
2498 Status error; | 2579 Status error; |
2499 /** | 2580 /** |
2500 * Service-specific metadata associated with the operation. It typically | 2581 * Service-specific metadata associated with the operation. It typically |
2501 * contains progress information and common metadata such as create time. Some | 2582 * contains progress information and common metadata such as create time. Some |
2502 * services might not provide such metadata. Any method that returns a | 2583 * services might not provide such metadata. Any method that returns a |
2503 * long-running operation should document the metadata type, if any. | 2584 * long-running operation should document the metadata type, if any. |
2504 * | 2585 * |
2505 * The values for Object must be JSON objects. It can consist of `num`, | 2586 * The values for Object must be JSON objects. It can consist of `num`, |
2506 * `String`, `bool` and `null` as well as `Map` and `List` values. | 2587 * `String`, `bool` and `null` as well as `Map` and `List` values. |
2507 */ | 2588 */ |
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2632 _json["target"] = target; | 2713 _json["target"] = target; |
2633 } | 2714 } |
2634 if (user != null) { | 2715 if (user != null) { |
2635 _json["user"] = user; | 2716 _json["user"] = user; |
2636 } | 2717 } |
2637 return _json; | 2718 return _json; |
2638 } | 2719 } |
2639 } | 2720 } |
2640 | 2721 |
2641 /** Metadata for the given google.longrunning.Operation. */ | 2722 /** Metadata for the given google.longrunning.Operation. */ |
| 2723 class OperationMetadataExperimental { |
| 2724 /** Time that this operation completed. @OutputOnly */ |
| 2725 core.String endTime; |
| 2726 /** Time that this operation was created. @OutputOnly */ |
| 2727 core.String insertTime; |
| 2728 /** |
| 2729 * API method that initiated this operation. Example: |
| 2730 * `google.appengine.experimental.CustomDomains.CreateCustomDomain`. |
| 2731 * @OutputOnly |
| 2732 */ |
| 2733 core.String method; |
| 2734 /** |
| 2735 * Name of the resource that this operation is acting on. Example: |
| 2736 * `apps/myapp/customDomains/example.com`. @OutputOnly |
| 2737 */ |
| 2738 core.String target; |
| 2739 /** User who requested this operation. @OutputOnly */ |
| 2740 core.String user; |
| 2741 |
| 2742 OperationMetadataExperimental(); |
| 2743 |
| 2744 OperationMetadataExperimental.fromJson(core.Map _json) { |
| 2745 if (_json.containsKey("endTime")) { |
| 2746 endTime = _json["endTime"]; |
| 2747 } |
| 2748 if (_json.containsKey("insertTime")) { |
| 2749 insertTime = _json["insertTime"]; |
| 2750 } |
| 2751 if (_json.containsKey("method")) { |
| 2752 method = _json["method"]; |
| 2753 } |
| 2754 if (_json.containsKey("target")) { |
| 2755 target = _json["target"]; |
| 2756 } |
| 2757 if (_json.containsKey("user")) { |
| 2758 user = _json["user"]; |
| 2759 } |
| 2760 } |
| 2761 |
| 2762 core.Map toJson() { |
| 2763 var _json = new core.Map(); |
| 2764 if (endTime != null) { |
| 2765 _json["endTime"] = endTime; |
| 2766 } |
| 2767 if (insertTime != null) { |
| 2768 _json["insertTime"] = insertTime; |
| 2769 } |
| 2770 if (method != null) { |
| 2771 _json["method"] = method; |
| 2772 } |
| 2773 if (target != null) { |
| 2774 _json["target"] = target; |
| 2775 } |
| 2776 if (user != null) { |
| 2777 _json["user"] = user; |
| 2778 } |
| 2779 return _json; |
| 2780 } |
| 2781 } |
| 2782 |
| 2783 /** Metadata for the given google.longrunning.Operation. */ |
2642 class OperationMetadataV1 { | 2784 class OperationMetadataV1 { |
2643 /** Time that this operation completed. @OutputOnly */ | 2785 /** Time that this operation completed. @OutputOnly */ |
2644 core.String endTime; | 2786 core.String endTime; |
2645 /** Time that this operation was created. @OutputOnly */ | 2787 /** Time that this operation was created. @OutputOnly */ |
2646 core.String insertTime; | 2788 core.String insertTime; |
2647 /** | 2789 /** |
2648 * API method that initiated this operation. Example: | 2790 * API method that initiated this operation. Example: |
2649 * `google.appengine.v1.Versions.CreateVersion`. @OutputOnly | 2791 * `google.appengine.v1.Versions.CreateVersion`. @OutputOnly |
2650 */ | 2792 */ |
2651 core.String method; | 2793 core.String method; |
(...skipping 1015 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3667 } | 3809 } |
3668 if (threadsafe != null) { | 3810 if (threadsafe != null) { |
3669 _json["threadsafe"] = threadsafe; | 3811 _json["threadsafe"] = threadsafe; |
3670 } | 3812 } |
3671 if (vm != null) { | 3813 if (vm != null) { |
3672 _json["vm"] = vm; | 3814 _json["vm"] = vm; |
3673 } | 3815 } |
3674 return _json; | 3816 return _json; |
3675 } | 3817 } |
3676 } | 3818 } |
OLD | NEW |