| OLD | NEW |
| 1 // This is a generated file (see the discoveryapis_generator project). |
| 2 |
| 1 library googleapis_beta.resourceviews.v1beta2; | 3 library googleapis_beta.resourceviews.v1beta2; |
| 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 resourceviews/v1beta2'; |
| 15 | 18 |
| 16 /** | 19 /** |
| 17 * The Resource View API allows users to create and manage logical sets of | 20 * The Resource View API allows users to create and manage logical sets of |
| 18 * Google Compute Engine instances. | 21 * Google Compute Engine instances. |
| 19 */ | 22 */ |
| 20 class ResourceviewsApi { | 23 class ResourceviewsApi { |
| 21 /** View and manage your data across Google Cloud Platform services */ | 24 /** View and manage your data across Google Cloud Platform services */ |
| 22 static const CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platf
orm"; | 25 static const CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platf
orm"; |
| 23 | 26 |
| 24 /** View and manage your Google Compute Engine resources */ | 27 /** View and manage your Google Compute Engine resources */ |
| 25 static const ComputeScope = "https://www.googleapis.com/auth/compute"; | 28 static const ComputeScope = "https://www.googleapis.com/auth/compute"; |
| 26 | 29 |
| 27 /** View your Google Compute Engine resources */ | 30 /** View your Google Compute Engine resources */ |
| 28 static const ComputeReadonlyScope = "https://www.googleapis.com/auth/compute.r
eadonly"; | 31 static const ComputeReadonlyScope = "https://www.googleapis.com/auth/compute.r
eadonly"; |
| 29 | 32 |
| 30 /** | 33 /** |
| 31 * View and manage your Google Cloud Platform management resources and | 34 * View and manage your Google Cloud Platform management resources and |
| 32 * deployment status information | 35 * deployment status information |
| 33 */ | 36 */ |
| 34 static const NdevCloudmanScope = "https://www.googleapis.com/auth/ndev.cloudma
n"; | 37 static const NdevCloudmanScope = "https://www.googleapis.com/auth/ndev.cloudma
n"; |
| 35 | 38 |
| 36 /** | 39 /** |
| 37 * View your Google Cloud Platform management resources and deployment status | 40 * View your Google Cloud Platform management resources and deployment status |
| 38 * information | 41 * information |
| 39 */ | 42 */ |
| 40 static const NdevCloudmanReadonlyScope = "https://www.googleapis.com/auth/ndev
.cloudman.readonly"; | 43 static const NdevCloudmanReadonlyScope = "https://www.googleapis.com/auth/ndev
.cloudman.readonly"; |
| 41 | 44 |
| 42 | 45 |
| 43 final common_internal.ApiRequester _requester; | 46 final commons.ApiRequester _requester; |
| 44 | 47 |
| 45 ZoneOperationsResourceApi get zoneOperations => new ZoneOperationsResourceApi(
_requester); | 48 ZoneOperationsResourceApi get zoneOperations => new ZoneOperationsResourceApi(
_requester); |
| 46 ZoneViewsResourceApi get zoneViews => new ZoneViewsResourceApi(_requester); | 49 ZoneViewsResourceApi get zoneViews => new ZoneViewsResourceApi(_requester); |
| 47 | 50 |
| 48 ResourceviewsApi(http.Client client, {core.String rootUrl: "https://www.google
apis.com/", core.String servicePath: "resourceviews/v1beta2/projects/"}) : | 51 ResourceviewsApi(http.Client client, {core.String rootUrl: "https://www.google
apis.com/", core.String servicePath: "resourceviews/v1beta2/projects/"}) : |
| 49 _requester = new common_internal.ApiRequester(client, rootUrl, servicePath
); | 52 _requester = new commons.ApiRequester(client, rootUrl, servicePath, USER_A
GENT); |
| 50 } | 53 } |
| 51 | 54 |
| 52 | 55 |
| 53 /** Not documented yet. */ | |
| 54 class ZoneOperationsResourceApi { | 56 class ZoneOperationsResourceApi { |
| 55 final common_internal.ApiRequester _requester; | 57 final commons.ApiRequester _requester; |
| 56 | 58 |
| 57 ZoneOperationsResourceApi(common_internal.ApiRequester client) : | 59 ZoneOperationsResourceApi(commons.ApiRequester client) : |
| 58 _requester = client; | 60 _requester = client; |
| 59 | 61 |
| 60 /** | 62 /** |
| 61 * Retrieves the specified zone-specific operation resource. | 63 * Retrieves the specified zone-specific operation resource. |
| 62 * | 64 * |
| 63 * Request parameters: | 65 * Request parameters: |
| 64 * | 66 * |
| 65 * [project] - Name of the project scoping this request. | 67 * [project] - Name of the project scoping this request. |
| 66 * Value must have pattern | 68 * Value must have pattern |
| 67 * "(?:(?:[-a-z0-9]{1,63}\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{
1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))". | 69 * "(?:(?:[-a-z0-9]{1,63}\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{
1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))". |
| 68 * | 70 * |
| 69 * [zone] - Name of the zone scoping this request. | 71 * [zone] - Name of the zone scoping this request. |
| 70 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". | 72 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
| 71 * | 73 * |
| 72 * [operation] - Name of the operation resource to return. | 74 * [operation] - Name of the operation resource to return. |
| 73 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". | 75 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
| 74 * | 76 * |
| 75 * Completes with a [Operation]. | 77 * Completes with a [Operation]. |
| 76 * | 78 * |
| 77 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 79 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 78 * error. | 80 * error. |
| 79 * | 81 * |
| 80 * If the used [http.Client] completes with an error when making a REST call, | 82 * If the used [http.Client] completes with an error when making a REST call, |
| 81 * this method will complete with the same error. | 83 * this method will complete with the same error. |
| 82 */ | 84 */ |
| 83 async.Future<Operation> get(core.String project, core.String zone, core.String
operation) { | 85 async.Future<Operation> get(core.String project, core.String zone, core.String
operation) { |
| 84 var _url = null; | 86 var _url = null; |
| 85 var _queryParams = new core.Map(); | 87 var _queryParams = new core.Map(); |
| 86 var _uploadMedia = null; | 88 var _uploadMedia = null; |
| 87 var _uploadOptions = null; | 89 var _uploadOptions = null; |
| 88 var _downloadOptions = common.DownloadOptions.Metadata; | 90 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 89 var _body = null; | 91 var _body = null; |
| 90 | 92 |
| 91 if (project == null) { | 93 if (project == null) { |
| 92 throw new core.ArgumentError("Parameter project is required."); | 94 throw new core.ArgumentError("Parameter project is required."); |
| 93 } | 95 } |
| 94 if (zone == null) { | 96 if (zone == null) { |
| 95 throw new core.ArgumentError("Parameter zone is required."); | 97 throw new core.ArgumentError("Parameter zone is required."); |
| 96 } | 98 } |
| 97 if (operation == null) { | 99 if (operation == null) { |
| 98 throw new core.ArgumentError("Parameter operation is required."); | 100 throw new core.ArgumentError("Parameter operation is required."); |
| 99 } | 101 } |
| 100 | 102 |
| 101 | 103 |
| 102 _url = common_internal.Escaper.ecapeVariable('$project') + '/zones/' + commo
n_internal.Escaper.ecapeVariable('$zone') + '/operations/' + common_internal.Esc
aper.ecapeVariable('$operation'); | 104 _url = commons.Escaper.ecapeVariable('$project') + '/zones/' + commons.Escap
er.ecapeVariable('$zone') + '/operations/' + commons.Escaper.ecapeVariable('$ope
ration'); |
| 103 | 105 |
| 104 var _response = _requester.request(_url, | 106 var _response = _requester.request(_url, |
| 105 "GET", | 107 "GET", |
| 106 body: _body, | 108 body: _body, |
| 107 queryParams: _queryParams, | 109 queryParams: _queryParams, |
| 108 uploadOptions: _uploadOptions, | 110 uploadOptions: _uploadOptions, |
| 109 uploadMedia: _uploadMedia, | 111 uploadMedia: _uploadMedia, |
| 110 downloadOptions: _downloadOptions); | 112 downloadOptions: _downloadOptions); |
| 111 return _response.then((data) => new Operation.fromJson(data)); | 113 return _response.then((data) => new Operation.fromJson(data)); |
| 112 } | 114 } |
| (...skipping 15 matching lines...) Expand all Loading... |
| 128 * | 130 * |
| 129 * [maxResults] - Optional. Maximum count of results to be returned. Maximum | 131 * [maxResults] - Optional. Maximum count of results to be returned. Maximum |
| 130 * value is 500 and default value is 500. | 132 * value is 500 and default value is 500. |
| 131 * Value must be between "0" and "500". | 133 * Value must be between "0" and "500". |
| 132 * | 134 * |
| 133 * [pageToken] - Optional. Tag returned by a previous list request truncated | 135 * [pageToken] - Optional. Tag returned by a previous list request truncated |
| 134 * by maxResults. Used to continue a previous list request. | 136 * by maxResults. Used to continue a previous list request. |
| 135 * | 137 * |
| 136 * Completes with a [OperationList]. | 138 * Completes with a [OperationList]. |
| 137 * | 139 * |
| 138 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 140 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 139 * error. | 141 * error. |
| 140 * | 142 * |
| 141 * If the used [http.Client] completes with an error when making a REST call, | 143 * If the used [http.Client] completes with an error when making a REST call, |
| 142 * this method will complete with the same error. | 144 * this method will complete with the same error. |
| 143 */ | 145 */ |
| 144 async.Future<OperationList> list(core.String project, core.String zone, {core.
String filter, core.int maxResults, core.String pageToken}) { | 146 async.Future<OperationList> list(core.String project, core.String zone, {core.
String filter, core.int maxResults, core.String pageToken}) { |
| 145 var _url = null; | 147 var _url = null; |
| 146 var _queryParams = new core.Map(); | 148 var _queryParams = new core.Map(); |
| 147 var _uploadMedia = null; | 149 var _uploadMedia = null; |
| 148 var _uploadOptions = null; | 150 var _uploadOptions = null; |
| 149 var _downloadOptions = common.DownloadOptions.Metadata; | 151 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 150 var _body = null; | 152 var _body = null; |
| 151 | 153 |
| 152 if (project == null) { | 154 if (project == null) { |
| 153 throw new core.ArgumentError("Parameter project is required."); | 155 throw new core.ArgumentError("Parameter project is required."); |
| 154 } | 156 } |
| 155 if (zone == null) { | 157 if (zone == null) { |
| 156 throw new core.ArgumentError("Parameter zone is required."); | 158 throw new core.ArgumentError("Parameter zone is required."); |
| 157 } | 159 } |
| 158 if (filter != null) { | 160 if (filter != null) { |
| 159 _queryParams["filter"] = [filter]; | 161 _queryParams["filter"] = [filter]; |
| 160 } | 162 } |
| 161 if (maxResults != null) { | 163 if (maxResults != null) { |
| 162 _queryParams["maxResults"] = ["${maxResults}"]; | 164 _queryParams["maxResults"] = ["${maxResults}"]; |
| 163 } | 165 } |
| 164 if (pageToken != null) { | 166 if (pageToken != null) { |
| 165 _queryParams["pageToken"] = [pageToken]; | 167 _queryParams["pageToken"] = [pageToken]; |
| 166 } | 168 } |
| 167 | 169 |
| 168 | 170 |
| 169 _url = common_internal.Escaper.ecapeVariable('$project') + '/zones/' + commo
n_internal.Escaper.ecapeVariable('$zone') + '/operations'; | 171 _url = commons.Escaper.ecapeVariable('$project') + '/zones/' + commons.Escap
er.ecapeVariable('$zone') + '/operations'; |
| 170 | 172 |
| 171 var _response = _requester.request(_url, | 173 var _response = _requester.request(_url, |
| 172 "GET", | 174 "GET", |
| 173 body: _body, | 175 body: _body, |
| 174 queryParams: _queryParams, | 176 queryParams: _queryParams, |
| 175 uploadOptions: _uploadOptions, | 177 uploadOptions: _uploadOptions, |
| 176 uploadMedia: _uploadMedia, | 178 uploadMedia: _uploadMedia, |
| 177 downloadOptions: _downloadOptions); | 179 downloadOptions: _downloadOptions); |
| 178 return _response.then((data) => new OperationList.fromJson(data)); | 180 return _response.then((data) => new OperationList.fromJson(data)); |
| 179 } | 181 } |
| 180 | 182 |
| 181 } | 183 } |
| 182 | 184 |
| 183 | 185 |
| 184 /** Not documented yet. */ | |
| 185 class ZoneViewsResourceApi { | 186 class ZoneViewsResourceApi { |
| 186 final common_internal.ApiRequester _requester; | 187 final commons.ApiRequester _requester; |
| 187 | 188 |
| 188 ZoneViewsResourceApi(common_internal.ApiRequester client) : | 189 ZoneViewsResourceApi(commons.ApiRequester client) : |
| 189 _requester = client; | 190 _requester = client; |
| 190 | 191 |
| 191 /** | 192 /** |
| 192 * Add resources to the view. | 193 * Add resources to the view. |
| 193 * | 194 * |
| 194 * [request] - The metadata request object. | 195 * [request] - The metadata request object. |
| 195 * | 196 * |
| 196 * Request parameters: | 197 * Request parameters: |
| 197 * | 198 * |
| 198 * [project] - The project name of the resource view. | 199 * [project] - The project name of the resource view. |
| 199 * | 200 * |
| 200 * [zone] - The zone name of the resource view. | 201 * [zone] - The zone name of the resource view. |
| 201 * | 202 * |
| 202 * [resourceView] - The name of the resource view. | 203 * [resourceView] - The name of the resource view. |
| 203 * | 204 * |
| 204 * Completes with a [Operation]. | 205 * Completes with a [Operation]. |
| 205 * | 206 * |
| 206 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 207 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 207 * error. | 208 * error. |
| 208 * | 209 * |
| 209 * If the used [http.Client] completes with an error when making a REST call, | 210 * If the used [http.Client] completes with an error when making a REST call, |
| 210 * this method will complete with the same error. | 211 * this method will complete with the same error. |
| 211 */ | 212 */ |
| 212 async.Future<Operation> addResources(ZoneViewsAddResourcesRequest request, cor
e.String project, core.String zone, core.String resourceView) { | 213 async.Future<Operation> addResources(ZoneViewsAddResourcesRequest request, cor
e.String project, core.String zone, core.String resourceView) { |
| 213 var _url = null; | 214 var _url = null; |
| 214 var _queryParams = new core.Map(); | 215 var _queryParams = new core.Map(); |
| 215 var _uploadMedia = null; | 216 var _uploadMedia = null; |
| 216 var _uploadOptions = null; | 217 var _uploadOptions = null; |
| 217 var _downloadOptions = common.DownloadOptions.Metadata; | 218 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 218 var _body = null; | 219 var _body = null; |
| 219 | 220 |
| 220 if (request != null) { | 221 if (request != null) { |
| 221 _body = convert.JSON.encode((request).toJson()); | 222 _body = convert.JSON.encode((request).toJson()); |
| 222 } | 223 } |
| 223 if (project == null) { | 224 if (project == null) { |
| 224 throw new core.ArgumentError("Parameter project is required."); | 225 throw new core.ArgumentError("Parameter project is required."); |
| 225 } | 226 } |
| 226 if (zone == null) { | 227 if (zone == null) { |
| 227 throw new core.ArgumentError("Parameter zone is required."); | 228 throw new core.ArgumentError("Parameter zone is required."); |
| 228 } | 229 } |
| 229 if (resourceView == null) { | 230 if (resourceView == null) { |
| 230 throw new core.ArgumentError("Parameter resourceView is required."); | 231 throw new core.ArgumentError("Parameter resourceView is required."); |
| 231 } | 232 } |
| 232 | 233 |
| 233 | 234 |
| 234 _url = common_internal.Escaper.ecapeVariable('$project') + '/zones/' + commo
n_internal.Escaper.ecapeVariable('$zone') + '/resourceViews/' + common_internal.
Escaper.ecapeVariable('$resourceView') + '/addResources'; | 235 _url = commons.Escaper.ecapeVariable('$project') + '/zones/' + commons.Escap
er.ecapeVariable('$zone') + '/resourceViews/' + commons.Escaper.ecapeVariable('$
resourceView') + '/addResources'; |
| 235 | 236 |
| 236 var _response = _requester.request(_url, | 237 var _response = _requester.request(_url, |
| 237 "POST", | 238 "POST", |
| 238 body: _body, | 239 body: _body, |
| 239 queryParams: _queryParams, | 240 queryParams: _queryParams, |
| 240 uploadOptions: _uploadOptions, | 241 uploadOptions: _uploadOptions, |
| 241 uploadMedia: _uploadMedia, | 242 uploadMedia: _uploadMedia, |
| 242 downloadOptions: _downloadOptions); | 243 downloadOptions: _downloadOptions); |
| 243 return _response.then((data) => new Operation.fromJson(data)); | 244 return _response.then((data) => new Operation.fromJson(data)); |
| 244 } | 245 } |
| 245 | 246 |
| 246 /** | 247 /** |
| 247 * Delete a resource view. | 248 * Delete a resource view. |
| 248 * | 249 * |
| 249 * Request parameters: | 250 * Request parameters: |
| 250 * | 251 * |
| 251 * [project] - The project name of the resource view. | 252 * [project] - The project name of the resource view. |
| 252 * | 253 * |
| 253 * [zone] - The zone name of the resource view. | 254 * [zone] - The zone name of the resource view. |
| 254 * | 255 * |
| 255 * [resourceView] - The name of the resource view. | 256 * [resourceView] - The name of the resource view. |
| 256 * | 257 * |
| 257 * Completes with a [Operation]. | 258 * Completes with a [Operation]. |
| 258 * | 259 * |
| 259 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 260 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 260 * error. | 261 * error. |
| 261 * | 262 * |
| 262 * If the used [http.Client] completes with an error when making a REST call, | 263 * If the used [http.Client] completes with an error when making a REST call, |
| 263 * this method will complete with the same error. | 264 * this method will complete with the same error. |
| 264 */ | 265 */ |
| 265 async.Future<Operation> delete(core.String project, core.String zone, core.Str
ing resourceView) { | 266 async.Future<Operation> delete(core.String project, core.String zone, core.Str
ing resourceView) { |
| 266 var _url = null; | 267 var _url = null; |
| 267 var _queryParams = new core.Map(); | 268 var _queryParams = new core.Map(); |
| 268 var _uploadMedia = null; | 269 var _uploadMedia = null; |
| 269 var _uploadOptions = null; | 270 var _uploadOptions = null; |
| 270 var _downloadOptions = common.DownloadOptions.Metadata; | 271 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 271 var _body = null; | 272 var _body = null; |
| 272 | 273 |
| 273 if (project == null) { | 274 if (project == null) { |
| 274 throw new core.ArgumentError("Parameter project is required."); | 275 throw new core.ArgumentError("Parameter project is required."); |
| 275 } | 276 } |
| 276 if (zone == null) { | 277 if (zone == null) { |
| 277 throw new core.ArgumentError("Parameter zone is required."); | 278 throw new core.ArgumentError("Parameter zone is required."); |
| 278 } | 279 } |
| 279 if (resourceView == null) { | 280 if (resourceView == null) { |
| 280 throw new core.ArgumentError("Parameter resourceView is required."); | 281 throw new core.ArgumentError("Parameter resourceView is required."); |
| 281 } | 282 } |
| 282 | 283 |
| 283 | 284 |
| 284 _url = common_internal.Escaper.ecapeVariable('$project') + '/zones/' + commo
n_internal.Escaper.ecapeVariable('$zone') + '/resourceViews/' + common_internal.
Escaper.ecapeVariable('$resourceView'); | 285 _url = commons.Escaper.ecapeVariable('$project') + '/zones/' + commons.Escap
er.ecapeVariable('$zone') + '/resourceViews/' + commons.Escaper.ecapeVariable('$
resourceView'); |
| 285 | 286 |
| 286 var _response = _requester.request(_url, | 287 var _response = _requester.request(_url, |
| 287 "DELETE", | 288 "DELETE", |
| 288 body: _body, | 289 body: _body, |
| 289 queryParams: _queryParams, | 290 queryParams: _queryParams, |
| 290 uploadOptions: _uploadOptions, | 291 uploadOptions: _uploadOptions, |
| 291 uploadMedia: _uploadMedia, | 292 uploadMedia: _uploadMedia, |
| 292 downloadOptions: _downloadOptions); | 293 downloadOptions: _downloadOptions); |
| 293 return _response.then((data) => new Operation.fromJson(data)); | 294 return _response.then((data) => new Operation.fromJson(data)); |
| 294 } | 295 } |
| 295 | 296 |
| 296 /** | 297 /** |
| 297 * Get the information of a zonal resource view. | 298 * Get the information of a zonal resource view. |
| 298 * | 299 * |
| 299 * Request parameters: | 300 * Request parameters: |
| 300 * | 301 * |
| 301 * [project] - The project name of the resource view. | 302 * [project] - The project name of the resource view. |
| 302 * | 303 * |
| 303 * [zone] - The zone name of the resource view. | 304 * [zone] - The zone name of the resource view. |
| 304 * | 305 * |
| 305 * [resourceView] - The name of the resource view. | 306 * [resourceView] - The name of the resource view. |
| 306 * | 307 * |
| 307 * Completes with a [ResourceView]. | 308 * Completes with a [ResourceView]. |
| 308 * | 309 * |
| 309 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 310 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 310 * error. | 311 * error. |
| 311 * | 312 * |
| 312 * If the used [http.Client] completes with an error when making a REST call, | 313 * If the used [http.Client] completes with an error when making a REST call, |
| 313 * this method will complete with the same error. | 314 * this method will complete with the same error. |
| 314 */ | 315 */ |
| 315 async.Future<ResourceView> get(core.String project, core.String zone, core.Str
ing resourceView) { | 316 async.Future<ResourceView> get(core.String project, core.String zone, core.Str
ing resourceView) { |
| 316 var _url = null; | 317 var _url = null; |
| 317 var _queryParams = new core.Map(); | 318 var _queryParams = new core.Map(); |
| 318 var _uploadMedia = null; | 319 var _uploadMedia = null; |
| 319 var _uploadOptions = null; | 320 var _uploadOptions = null; |
| 320 var _downloadOptions = common.DownloadOptions.Metadata; | 321 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 321 var _body = null; | 322 var _body = null; |
| 322 | 323 |
| 323 if (project == null) { | 324 if (project == null) { |
| 324 throw new core.ArgumentError("Parameter project is required."); | 325 throw new core.ArgumentError("Parameter project is required."); |
| 325 } | 326 } |
| 326 if (zone == null) { | 327 if (zone == null) { |
| 327 throw new core.ArgumentError("Parameter zone is required."); | 328 throw new core.ArgumentError("Parameter zone is required."); |
| 328 } | 329 } |
| 329 if (resourceView == null) { | 330 if (resourceView == null) { |
| 330 throw new core.ArgumentError("Parameter resourceView is required."); | 331 throw new core.ArgumentError("Parameter resourceView is required."); |
| 331 } | 332 } |
| 332 | 333 |
| 333 | 334 |
| 334 _url = common_internal.Escaper.ecapeVariable('$project') + '/zones/' + commo
n_internal.Escaper.ecapeVariable('$zone') + '/resourceViews/' + common_internal.
Escaper.ecapeVariable('$resourceView'); | 335 _url = commons.Escaper.ecapeVariable('$project') + '/zones/' + commons.Escap
er.ecapeVariable('$zone') + '/resourceViews/' + commons.Escaper.ecapeVariable('$
resourceView'); |
| 335 | 336 |
| 336 var _response = _requester.request(_url, | 337 var _response = _requester.request(_url, |
| 337 "GET", | 338 "GET", |
| 338 body: _body, | 339 body: _body, |
| 339 queryParams: _queryParams, | 340 queryParams: _queryParams, |
| 340 uploadOptions: _uploadOptions, | 341 uploadOptions: _uploadOptions, |
| 341 uploadMedia: _uploadMedia, | 342 uploadMedia: _uploadMedia, |
| 342 downloadOptions: _downloadOptions); | 343 downloadOptions: _downloadOptions); |
| 343 return _response.then((data) => new ResourceView.fromJson(data)); | 344 return _response.then((data) => new ResourceView.fromJson(data)); |
| 344 } | 345 } |
| 345 | 346 |
| 346 /** | 347 /** |
| 347 * Get the service information of a resource view or a resource. | 348 * Get the service information of a resource view or a resource. |
| 348 * | 349 * |
| 349 * Request parameters: | 350 * Request parameters: |
| 350 * | 351 * |
| 351 * [project] - The project name of the resource view. | 352 * [project] - The project name of the resource view. |
| 352 * | 353 * |
| 353 * [zone] - The zone name of the resource view. | 354 * [zone] - The zone name of the resource view. |
| 354 * | 355 * |
| 355 * [resourceView] - The name of the resource view. | 356 * [resourceView] - The name of the resource view. |
| 356 * | 357 * |
| 357 * [resourceName] - The name of the resource if user wants to get the service | 358 * [resourceName] - The name of the resource if user wants to get the service |
| 358 * information of the resource. | 359 * information of the resource. |
| 359 * | 360 * |
| 360 * Completes with a [ZoneViewsGetServiceResponse]. | 361 * Completes with a [ZoneViewsGetServiceResponse]. |
| 361 * | 362 * |
| 362 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 363 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 363 * error. | 364 * error. |
| 364 * | 365 * |
| 365 * If the used [http.Client] completes with an error when making a REST call, | 366 * If the used [http.Client] completes with an error when making a REST call, |
| 366 * this method will complete with the same error. | 367 * this method will complete with the same error. |
| 367 */ | 368 */ |
| 368 async.Future<ZoneViewsGetServiceResponse> getService(core.String project, core
.String zone, core.String resourceView, {core.String resourceName}) { | 369 async.Future<ZoneViewsGetServiceResponse> getService(core.String project, core
.String zone, core.String resourceView, {core.String resourceName}) { |
| 369 var _url = null; | 370 var _url = null; |
| 370 var _queryParams = new core.Map(); | 371 var _queryParams = new core.Map(); |
| 371 var _uploadMedia = null; | 372 var _uploadMedia = null; |
| 372 var _uploadOptions = null; | 373 var _uploadOptions = null; |
| 373 var _downloadOptions = common.DownloadOptions.Metadata; | 374 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 374 var _body = null; | 375 var _body = null; |
| 375 | 376 |
| 376 if (project == null) { | 377 if (project == null) { |
| 377 throw new core.ArgumentError("Parameter project is required."); | 378 throw new core.ArgumentError("Parameter project is required."); |
| 378 } | 379 } |
| 379 if (zone == null) { | 380 if (zone == null) { |
| 380 throw new core.ArgumentError("Parameter zone is required."); | 381 throw new core.ArgumentError("Parameter zone is required."); |
| 381 } | 382 } |
| 382 if (resourceView == null) { | 383 if (resourceView == null) { |
| 383 throw new core.ArgumentError("Parameter resourceView is required."); | 384 throw new core.ArgumentError("Parameter resourceView is required."); |
| 384 } | 385 } |
| 385 if (resourceName != null) { | 386 if (resourceName != null) { |
| 386 _queryParams["resourceName"] = [resourceName]; | 387 _queryParams["resourceName"] = [resourceName]; |
| 387 } | 388 } |
| 388 | 389 |
| 389 | 390 |
| 390 _url = common_internal.Escaper.ecapeVariable('$project') + '/zones/' + commo
n_internal.Escaper.ecapeVariable('$zone') + '/resourceViews/' + common_internal.
Escaper.ecapeVariable('$resourceView') + '/getService'; | 391 _url = commons.Escaper.ecapeVariable('$project') + '/zones/' + commons.Escap
er.ecapeVariable('$zone') + '/resourceViews/' + commons.Escaper.ecapeVariable('$
resourceView') + '/getService'; |
| 391 | 392 |
| 392 var _response = _requester.request(_url, | 393 var _response = _requester.request(_url, |
| 393 "POST", | 394 "POST", |
| 394 body: _body, | 395 body: _body, |
| 395 queryParams: _queryParams, | 396 queryParams: _queryParams, |
| 396 uploadOptions: _uploadOptions, | 397 uploadOptions: _uploadOptions, |
| 397 uploadMedia: _uploadMedia, | 398 uploadMedia: _uploadMedia, |
| 398 downloadOptions: _downloadOptions); | 399 downloadOptions: _downloadOptions); |
| 399 return _response.then((data) => new ZoneViewsGetServiceResponse.fromJson(dat
a)); | 400 return _response.then((data) => new ZoneViewsGetServiceResponse.fromJson(dat
a)); |
| 400 } | 401 } |
| 401 | 402 |
| 402 /** | 403 /** |
| 403 * Create a resource view. | 404 * Create a resource view. |
| 404 * | 405 * |
| 405 * [request] - The metadata request object. | 406 * [request] - The metadata request object. |
| 406 * | 407 * |
| 407 * Request parameters: | 408 * Request parameters: |
| 408 * | 409 * |
| 409 * [project] - The project name of the resource view. | 410 * [project] - The project name of the resource view. |
| 410 * | 411 * |
| 411 * [zone] - The zone name of the resource view. | 412 * [zone] - The zone name of the resource view. |
| 412 * | 413 * |
| 413 * Completes with a [Operation]. | 414 * Completes with a [Operation]. |
| 414 * | 415 * |
| 415 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 416 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 416 * error. | 417 * error. |
| 417 * | 418 * |
| 418 * If the used [http.Client] completes with an error when making a REST call, | 419 * If the used [http.Client] completes with an error when making a REST call, |
| 419 * this method will complete with the same error. | 420 * this method will complete with the same error. |
| 420 */ | 421 */ |
| 421 async.Future<Operation> insert(ResourceView request, core.String project, core
.String zone) { | 422 async.Future<Operation> insert(ResourceView request, core.String project, core
.String zone) { |
| 422 var _url = null; | 423 var _url = null; |
| 423 var _queryParams = new core.Map(); | 424 var _queryParams = new core.Map(); |
| 424 var _uploadMedia = null; | 425 var _uploadMedia = null; |
| 425 var _uploadOptions = null; | 426 var _uploadOptions = null; |
| 426 var _downloadOptions = common.DownloadOptions.Metadata; | 427 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 427 var _body = null; | 428 var _body = null; |
| 428 | 429 |
| 429 if (request != null) { | 430 if (request != null) { |
| 430 _body = convert.JSON.encode((request).toJson()); | 431 _body = convert.JSON.encode((request).toJson()); |
| 431 } | 432 } |
| 432 if (project == null) { | 433 if (project == null) { |
| 433 throw new core.ArgumentError("Parameter project is required."); | 434 throw new core.ArgumentError("Parameter project is required."); |
| 434 } | 435 } |
| 435 if (zone == null) { | 436 if (zone == null) { |
| 436 throw new core.ArgumentError("Parameter zone is required."); | 437 throw new core.ArgumentError("Parameter zone is required."); |
| 437 } | 438 } |
| 438 | 439 |
| 439 | 440 |
| 440 _url = common_internal.Escaper.ecapeVariable('$project') + '/zones/' + commo
n_internal.Escaper.ecapeVariable('$zone') + '/resourceViews'; | 441 _url = commons.Escaper.ecapeVariable('$project') + '/zones/' + commons.Escap
er.ecapeVariable('$zone') + '/resourceViews'; |
| 441 | 442 |
| 442 var _response = _requester.request(_url, | 443 var _response = _requester.request(_url, |
| 443 "POST", | 444 "POST", |
| 444 body: _body, | 445 body: _body, |
| 445 queryParams: _queryParams, | 446 queryParams: _queryParams, |
| 446 uploadOptions: _uploadOptions, | 447 uploadOptions: _uploadOptions, |
| 447 uploadMedia: _uploadMedia, | 448 uploadMedia: _uploadMedia, |
| 448 downloadOptions: _downloadOptions); | 449 downloadOptions: _downloadOptions); |
| 449 return _response.then((data) => new Operation.fromJson(data)); | 450 return _response.then((data) => new Operation.fromJson(data)); |
| 450 } | 451 } |
| (...skipping 10 matching lines...) Expand all Loading... |
| 461 * [maxResults] - Maximum count of results to be returned. Acceptable values | 462 * [maxResults] - Maximum count of results to be returned. Acceptable values |
| 462 * are 0 to 5000, inclusive. (Default: 5000) | 463 * are 0 to 5000, inclusive. (Default: 5000) |
| 463 * Value must be between "0" and "5000". | 464 * Value must be between "0" and "5000". |
| 464 * | 465 * |
| 465 * [pageToken] - Specifies a nextPageToken returned by a previous list | 466 * [pageToken] - Specifies a nextPageToken returned by a previous list |
| 466 * request. This token can be used to request the next page of results from a | 467 * request. This token can be used to request the next page of results from a |
| 467 * previous list request. | 468 * previous list request. |
| 468 * | 469 * |
| 469 * Completes with a [ZoneViewsList]. | 470 * Completes with a [ZoneViewsList]. |
| 470 * | 471 * |
| 471 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 472 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 472 * error. | 473 * error. |
| 473 * | 474 * |
| 474 * If the used [http.Client] completes with an error when making a REST call, | 475 * If the used [http.Client] completes with an error when making a REST call, |
| 475 * this method will complete with the same error. | 476 * this method will complete with the same error. |
| 476 */ | 477 */ |
| 477 async.Future<ZoneViewsList> list(core.String project, core.String zone, {core.
int maxResults, core.String pageToken}) { | 478 async.Future<ZoneViewsList> list(core.String project, core.String zone, {core.
int maxResults, core.String pageToken}) { |
| 478 var _url = null; | 479 var _url = null; |
| 479 var _queryParams = new core.Map(); | 480 var _queryParams = new core.Map(); |
| 480 var _uploadMedia = null; | 481 var _uploadMedia = null; |
| 481 var _uploadOptions = null; | 482 var _uploadOptions = null; |
| 482 var _downloadOptions = common.DownloadOptions.Metadata; | 483 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 483 var _body = null; | 484 var _body = null; |
| 484 | 485 |
| 485 if (project == null) { | 486 if (project == null) { |
| 486 throw new core.ArgumentError("Parameter project is required."); | 487 throw new core.ArgumentError("Parameter project is required."); |
| 487 } | 488 } |
| 488 if (zone == null) { | 489 if (zone == null) { |
| 489 throw new core.ArgumentError("Parameter zone is required."); | 490 throw new core.ArgumentError("Parameter zone is required."); |
| 490 } | 491 } |
| 491 if (maxResults != null) { | 492 if (maxResults != null) { |
| 492 _queryParams["maxResults"] = ["${maxResults}"]; | 493 _queryParams["maxResults"] = ["${maxResults}"]; |
| 493 } | 494 } |
| 494 if (pageToken != null) { | 495 if (pageToken != null) { |
| 495 _queryParams["pageToken"] = [pageToken]; | 496 _queryParams["pageToken"] = [pageToken]; |
| 496 } | 497 } |
| 497 | 498 |
| 498 | 499 |
| 499 _url = common_internal.Escaper.ecapeVariable('$project') + '/zones/' + commo
n_internal.Escaper.ecapeVariable('$zone') + '/resourceViews'; | 500 _url = commons.Escaper.ecapeVariable('$project') + '/zones/' + commons.Escap
er.ecapeVariable('$zone') + '/resourceViews'; |
| 500 | 501 |
| 501 var _response = _requester.request(_url, | 502 var _response = _requester.request(_url, |
| 502 "GET", | 503 "GET", |
| 503 body: _body, | 504 body: _body, |
| 504 queryParams: _queryParams, | 505 queryParams: _queryParams, |
| 505 uploadOptions: _uploadOptions, | 506 uploadOptions: _uploadOptions, |
| 506 uploadMedia: _uploadMedia, | 507 uploadMedia: _uploadMedia, |
| 507 downloadOptions: _downloadOptions); | 508 downloadOptions: _downloadOptions); |
| 508 return _response.then((data) => new ZoneViewsList.fromJson(data)); | 509 return _response.then((data) => new ZoneViewsList.fromJson(data)); |
| 509 } | 510 } |
| (...skipping 30 matching lines...) Expand all Loading... |
| 540 * | 541 * |
| 541 * [pageToken] - Specifies a nextPageToken returned by a previous list | 542 * [pageToken] - Specifies a nextPageToken returned by a previous list |
| 542 * request. This token can be used to request the next page of results from a | 543 * request. This token can be used to request the next page of results from a |
| 543 * previous list request. | 544 * previous list request. |
| 544 * | 545 * |
| 545 * [serviceName] - The service name to return in the response. It is optional | 546 * [serviceName] - The service name to return in the response. It is optional |
| 546 * and if it is not set, all the service end points will be returned. | 547 * and if it is not set, all the service end points will be returned. |
| 547 * | 548 * |
| 548 * Completes with a [ZoneViewsListResourcesResponse]. | 549 * Completes with a [ZoneViewsListResourcesResponse]. |
| 549 * | 550 * |
| 550 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 551 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 551 * error. | 552 * error. |
| 552 * | 553 * |
| 553 * If the used [http.Client] completes with an error when making a REST call, | 554 * If the used [http.Client] completes with an error when making a REST call, |
| 554 * this method will complete with the same error. | 555 * this method will complete with the same error. |
| 555 */ | 556 */ |
| 556 async.Future<ZoneViewsListResourcesResponse> listResources(core.String project
, core.String zone, core.String resourceView, {core.String format, core.String l
istState, core.int maxResults, core.String pageToken, core.String serviceName})
{ | 557 async.Future<ZoneViewsListResourcesResponse> listResources(core.String project
, core.String zone, core.String resourceView, {core.String format, core.String l
istState, core.int maxResults, core.String pageToken, core.String serviceName})
{ |
| 557 var _url = null; | 558 var _url = null; |
| 558 var _queryParams = new core.Map(); | 559 var _queryParams = new core.Map(); |
| 559 var _uploadMedia = null; | 560 var _uploadMedia = null; |
| 560 var _uploadOptions = null; | 561 var _uploadOptions = null; |
| 561 var _downloadOptions = common.DownloadOptions.Metadata; | 562 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 562 var _body = null; | 563 var _body = null; |
| 563 | 564 |
| 564 if (project == null) { | 565 if (project == null) { |
| 565 throw new core.ArgumentError("Parameter project is required."); | 566 throw new core.ArgumentError("Parameter project is required."); |
| 566 } | 567 } |
| 567 if (zone == null) { | 568 if (zone == null) { |
| 568 throw new core.ArgumentError("Parameter zone is required."); | 569 throw new core.ArgumentError("Parameter zone is required."); |
| 569 } | 570 } |
| 570 if (resourceView == null) { | 571 if (resourceView == null) { |
| 571 throw new core.ArgumentError("Parameter resourceView is required."); | 572 throw new core.ArgumentError("Parameter resourceView is required."); |
| 572 } | 573 } |
| 573 if (format != null) { | 574 if (format != null) { |
| 574 _queryParams["format"] = [format]; | 575 _queryParams["format"] = [format]; |
| 575 } | 576 } |
| 576 if (listState != null) { | 577 if (listState != null) { |
| 577 _queryParams["listState"] = [listState]; | 578 _queryParams["listState"] = [listState]; |
| 578 } | 579 } |
| 579 if (maxResults != null) { | 580 if (maxResults != null) { |
| 580 _queryParams["maxResults"] = ["${maxResults}"]; | 581 _queryParams["maxResults"] = ["${maxResults}"]; |
| 581 } | 582 } |
| 582 if (pageToken != null) { | 583 if (pageToken != null) { |
| 583 _queryParams["pageToken"] = [pageToken]; | 584 _queryParams["pageToken"] = [pageToken]; |
| 584 } | 585 } |
| 585 if (serviceName != null) { | 586 if (serviceName != null) { |
| 586 _queryParams["serviceName"] = [serviceName]; | 587 _queryParams["serviceName"] = [serviceName]; |
| 587 } | 588 } |
| 588 | 589 |
| 589 | 590 |
| 590 _url = common_internal.Escaper.ecapeVariable('$project') + '/zones/' + commo
n_internal.Escaper.ecapeVariable('$zone') + '/resourceViews/' + common_internal.
Escaper.ecapeVariable('$resourceView') + '/resources'; | 591 _url = commons.Escaper.ecapeVariable('$project') + '/zones/' + commons.Escap
er.ecapeVariable('$zone') + '/resourceViews/' + commons.Escaper.ecapeVariable('$
resourceView') + '/resources'; |
| 591 | 592 |
| 592 var _response = _requester.request(_url, | 593 var _response = _requester.request(_url, |
| 593 "GET", | 594 "GET", |
| 594 body: _body, | 595 body: _body, |
| 595 queryParams: _queryParams, | 596 queryParams: _queryParams, |
| 596 uploadOptions: _uploadOptions, | 597 uploadOptions: _uploadOptions, |
| 597 uploadMedia: _uploadMedia, | 598 uploadMedia: _uploadMedia, |
| 598 downloadOptions: _downloadOptions); | 599 downloadOptions: _downloadOptions); |
| 599 return _response.then((data) => new ZoneViewsListResourcesResponse.fromJson(
data)); | 600 return _response.then((data) => new ZoneViewsListResourcesResponse.fromJson(
data)); |
| 600 } | 601 } |
| 601 | 602 |
| 602 /** | 603 /** |
| 603 * Remove resources from the view. | 604 * Remove resources from the view. |
| 604 * | 605 * |
| 605 * [request] - The metadata request object. | 606 * [request] - The metadata request object. |
| 606 * | 607 * |
| 607 * Request parameters: | 608 * Request parameters: |
| 608 * | 609 * |
| 609 * [project] - The project name of the resource view. | 610 * [project] - The project name of the resource view. |
| 610 * | 611 * |
| 611 * [zone] - The zone name of the resource view. | 612 * [zone] - The zone name of the resource view. |
| 612 * | 613 * |
| 613 * [resourceView] - The name of the resource view. | 614 * [resourceView] - The name of the resource view. |
| 614 * | 615 * |
| 615 * Completes with a [Operation]. | 616 * Completes with a [Operation]. |
| 616 * | 617 * |
| 617 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 618 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 618 * error. | 619 * error. |
| 619 * | 620 * |
| 620 * If the used [http.Client] completes with an error when making a REST call, | 621 * If the used [http.Client] completes with an error when making a REST call, |
| 621 * this method will complete with the same error. | 622 * this method will complete with the same error. |
| 622 */ | 623 */ |
| 623 async.Future<Operation> removeResources(ZoneViewsRemoveResourcesRequest reques
t, core.String project, core.String zone, core.String resourceView) { | 624 async.Future<Operation> removeResources(ZoneViewsRemoveResourcesRequest reques
t, core.String project, core.String zone, core.String resourceView) { |
| 624 var _url = null; | 625 var _url = null; |
| 625 var _queryParams = new core.Map(); | 626 var _queryParams = new core.Map(); |
| 626 var _uploadMedia = null; | 627 var _uploadMedia = null; |
| 627 var _uploadOptions = null; | 628 var _uploadOptions = null; |
| 628 var _downloadOptions = common.DownloadOptions.Metadata; | 629 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 629 var _body = null; | 630 var _body = null; |
| 630 | 631 |
| 631 if (request != null) { | 632 if (request != null) { |
| 632 _body = convert.JSON.encode((request).toJson()); | 633 _body = convert.JSON.encode((request).toJson()); |
| 633 } | 634 } |
| 634 if (project == null) { | 635 if (project == null) { |
| 635 throw new core.ArgumentError("Parameter project is required."); | 636 throw new core.ArgumentError("Parameter project is required."); |
| 636 } | 637 } |
| 637 if (zone == null) { | 638 if (zone == null) { |
| 638 throw new core.ArgumentError("Parameter zone is required."); | 639 throw new core.ArgumentError("Parameter zone is required."); |
| 639 } | 640 } |
| 640 if (resourceView == null) { | 641 if (resourceView == null) { |
| 641 throw new core.ArgumentError("Parameter resourceView is required."); | 642 throw new core.ArgumentError("Parameter resourceView is required."); |
| 642 } | 643 } |
| 643 | 644 |
| 644 | 645 |
| 645 _url = common_internal.Escaper.ecapeVariable('$project') + '/zones/' + commo
n_internal.Escaper.ecapeVariable('$zone') + '/resourceViews/' + common_internal.
Escaper.ecapeVariable('$resourceView') + '/removeResources'; | 646 _url = commons.Escaper.ecapeVariable('$project') + '/zones/' + commons.Escap
er.ecapeVariable('$zone') + '/resourceViews/' + commons.Escaper.ecapeVariable('$
resourceView') + '/removeResources'; |
| 646 | 647 |
| 647 var _response = _requester.request(_url, | 648 var _response = _requester.request(_url, |
| 648 "POST", | 649 "POST", |
| 649 body: _body, | 650 body: _body, |
| 650 queryParams: _queryParams, | 651 queryParams: _queryParams, |
| 651 uploadOptions: _uploadOptions, | 652 uploadOptions: _uploadOptions, |
| 652 uploadMedia: _uploadMedia, | 653 uploadMedia: _uploadMedia, |
| 653 downloadOptions: _downloadOptions); | 654 downloadOptions: _downloadOptions); |
| 654 return _response.then((data) => new Operation.fromJson(data)); | 655 return _response.then((data) => new Operation.fromJson(data)); |
| 655 } | 656 } |
| 656 | 657 |
| 657 /** | 658 /** |
| 658 * Update the service information of a resource view or a resource. | 659 * Update the service information of a resource view or a resource. |
| 659 * | 660 * |
| 660 * [request] - The metadata request object. | 661 * [request] - The metadata request object. |
| 661 * | 662 * |
| 662 * Request parameters: | 663 * Request parameters: |
| 663 * | 664 * |
| 664 * [project] - The project name of the resource view. | 665 * [project] - The project name of the resource view. |
| 665 * | 666 * |
| 666 * [zone] - The zone name of the resource view. | 667 * [zone] - The zone name of the resource view. |
| 667 * | 668 * |
| 668 * [resourceView] - The name of the resource view. | 669 * [resourceView] - The name of the resource view. |
| 669 * | 670 * |
| 670 * Completes with a [Operation]. | 671 * Completes with a [Operation]. |
| 671 * | 672 * |
| 672 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 673 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 673 * error. | 674 * error. |
| 674 * | 675 * |
| 675 * If the used [http.Client] completes with an error when making a REST call, | 676 * If the used [http.Client] completes with an error when making a REST call, |
| 676 * this method will complete with the same error. | 677 * this method will complete with the same error. |
| 677 */ | 678 */ |
| 678 async.Future<Operation> setService(ZoneViewsSetServiceRequest request, core.St
ring project, core.String zone, core.String resourceView) { | 679 async.Future<Operation> setService(ZoneViewsSetServiceRequest request, core.St
ring project, core.String zone, core.String resourceView) { |
| 679 var _url = null; | 680 var _url = null; |
| 680 var _queryParams = new core.Map(); | 681 var _queryParams = new core.Map(); |
| 681 var _uploadMedia = null; | 682 var _uploadMedia = null; |
| 682 var _uploadOptions = null; | 683 var _uploadOptions = null; |
| 683 var _downloadOptions = common.DownloadOptions.Metadata; | 684 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 684 var _body = null; | 685 var _body = null; |
| 685 | 686 |
| 686 if (request != null) { | 687 if (request != null) { |
| 687 _body = convert.JSON.encode((request).toJson()); | 688 _body = convert.JSON.encode((request).toJson()); |
| 688 } | 689 } |
| 689 if (project == null) { | 690 if (project == null) { |
| 690 throw new core.ArgumentError("Parameter project is required."); | 691 throw new core.ArgumentError("Parameter project is required."); |
| 691 } | 692 } |
| 692 if (zone == null) { | 693 if (zone == null) { |
| 693 throw new core.ArgumentError("Parameter zone is required."); | 694 throw new core.ArgumentError("Parameter zone is required."); |
| 694 } | 695 } |
| 695 if (resourceView == null) { | 696 if (resourceView == null) { |
| 696 throw new core.ArgumentError("Parameter resourceView is required."); | 697 throw new core.ArgumentError("Parameter resourceView is required."); |
| 697 } | 698 } |
| 698 | 699 |
| 699 | 700 |
| 700 _url = common_internal.Escaper.ecapeVariable('$project') + '/zones/' + commo
n_internal.Escaper.ecapeVariable('$zone') + '/resourceViews/' + common_internal.
Escaper.ecapeVariable('$resourceView') + '/setService'; | 701 _url = commons.Escaper.ecapeVariable('$project') + '/zones/' + commons.Escap
er.ecapeVariable('$zone') + '/resourceViews/' + commons.Escaper.ecapeVariable('$
resourceView') + '/setService'; |
| 701 | 702 |
| 702 var _response = _requester.request(_url, | 703 var _response = _requester.request(_url, |
| 703 "POST", | 704 "POST", |
| 704 body: _body, | 705 body: _body, |
| 705 queryParams: _queryParams, | 706 queryParams: _queryParams, |
| 706 uploadOptions: _uploadOptions, | 707 uploadOptions: _uploadOptions, |
| 707 uploadMedia: _uploadMedia, | 708 uploadMedia: _uploadMedia, |
| 708 downloadOptions: _downloadOptions); | 709 downloadOptions: _downloadOptions); |
| 709 return _response.then((data) => new Operation.fromJson(data)); | 710 return _response.then((data) => new Operation.fromJson(data)); |
| 710 } | 711 } |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 774 _json["endpoints"] = endpoints; | 775 _json["endpoints"] = endpoints; |
| 775 } | 776 } |
| 776 if (resource != null) { | 777 if (resource != null) { |
| 777 _json["resource"] = resource; | 778 _json["resource"] = resource; |
| 778 } | 779 } |
| 779 return _json; | 780 return _json; |
| 780 } | 781 } |
| 781 } | 782 } |
| 782 | 783 |
| 783 | 784 |
| 784 /** Not documented yet. */ | |
| 785 class OperationErrorErrors { | 785 class OperationErrorErrors { |
| 786 /** [Output Only] The error type identifier for this error. */ | 786 /** [Output Only] The error type identifier for this error. */ |
| 787 core.String code; | 787 core.String code; |
| 788 | 788 |
| 789 /** | 789 /** |
| 790 * [Output Only] Indicates the field in the request which caused the error. | 790 * [Output Only] Indicates the field in the request which caused the error. |
| 791 * This property is optional. | 791 * This property is optional. |
| 792 */ | 792 */ |
| 793 core.String location; | 793 core.String location; |
| 794 | 794 |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 849 core.Map toJson() { | 849 core.Map toJson() { |
| 850 var _json = new core.Map(); | 850 var _json = new core.Map(); |
| 851 if (errors != null) { | 851 if (errors != null) { |
| 852 _json["errors"] = errors.map((value) => (value).toJson()).toList(); | 852 _json["errors"] = errors.map((value) => (value).toJson()).toList(); |
| 853 } | 853 } |
| 854 return _json; | 854 return _json; |
| 855 } | 855 } |
| 856 } | 856 } |
| 857 | 857 |
| 858 | 858 |
| 859 /** Not documented yet. */ | |
| 860 class OperationWarningsData { | 859 class OperationWarningsData { |
| 861 /** [Output Only] Metadata key for this warning. */ | 860 /** [Output Only] Metadata key for this warning. */ |
| 862 core.String key; | 861 core.String key; |
| 863 | 862 |
| 864 /** [Output Only] Metadata value for this warning. */ | 863 /** [Output Only] Metadata value for this warning. */ |
| 865 core.String value; | 864 core.String value; |
| 866 | 865 |
| 867 | 866 |
| 868 OperationWarningsData(); | 867 OperationWarningsData(); |
| 869 | 868 |
| (...skipping 12 matching lines...) Expand all Loading... |
| 882 _json["key"] = key; | 881 _json["key"] = key; |
| 883 } | 882 } |
| 884 if (value != null) { | 883 if (value != null) { |
| 885 _json["value"] = value; | 884 _json["value"] = value; |
| 886 } | 885 } |
| 887 return _json; | 886 return _json; |
| 888 } | 887 } |
| 889 } | 888 } |
| 890 | 889 |
| 891 | 890 |
| 892 /** Not documented yet. */ | |
| 893 class OperationWarnings { | 891 class OperationWarnings { |
| 894 /** [Output only] The warning type identifier for this warning. */ | 892 /** [Output only] The warning type identifier for this warning. */ |
| 895 core.String code; | 893 core.String code; |
| 896 | 894 |
| 897 /** [Output only] Metadata for this warning in key:value format. */ | 895 /** [Output only] Metadata for this warning in key:value format. */ |
| 898 core.List<OperationWarningsData> data; | 896 core.List<OperationWarningsData> data; |
| 899 | 897 |
| 900 /** [Output only] Optional human-readable details for this warning. */ | 898 /** [Output only] Optional human-readable details for this warning. */ |
| 901 core.String message; | 899 core.String message; |
| 902 | 900 |
| (...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1185 _json["warnings"] = warnings.map((value) => (value).toJson()).toList(); | 1183 _json["warnings"] = warnings.map((value) => (value).toJson()).toList(); |
| 1186 } | 1184 } |
| 1187 if (zone != null) { | 1185 if (zone != null) { |
| 1188 _json["zone"] = zone; | 1186 _json["zone"] = zone; |
| 1189 } | 1187 } |
| 1190 return _json; | 1188 return _json; |
| 1191 } | 1189 } |
| 1192 } | 1190 } |
| 1193 | 1191 |
| 1194 | 1192 |
| 1195 /** Not documented yet. */ | |
| 1196 class OperationList { | 1193 class OperationList { |
| 1197 /** | 1194 /** |
| 1198 * Unique identifier for the resource; defined by the server (output only). | 1195 * Unique identifier for the resource; defined by the server (output only). |
| 1199 */ | 1196 */ |
| 1200 core.String id; | 1197 core.String id; |
| 1201 | 1198 |
| 1202 /** The operation resources. */ | 1199 /** The operation resources. */ |
| 1203 core.List<Operation> items; | 1200 core.List<Operation> items; |
| 1204 | 1201 |
| 1205 /** Type of resource. */ | 1202 /** Type of resource. */ |
| (...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1430 core.Map toJson() { | 1427 core.Map toJson() { |
| 1431 var _json = new core.Map(); | 1428 var _json = new core.Map(); |
| 1432 if (resources != null) { | 1429 if (resources != null) { |
| 1433 _json["resources"] = resources; | 1430 _json["resources"] = resources; |
| 1434 } | 1431 } |
| 1435 return _json; | 1432 return _json; |
| 1436 } | 1433 } |
| 1437 } | 1434 } |
| 1438 | 1435 |
| 1439 | 1436 |
| 1440 /** Not documented yet. */ | |
| 1441 class ZoneViewsGetServiceResponse { | 1437 class ZoneViewsGetServiceResponse { |
| 1442 /** The service information. */ | 1438 /** The service information. */ |
| 1443 core.List<ServiceEndpoint> endpoints; | 1439 core.List<ServiceEndpoint> endpoints; |
| 1444 | 1440 |
| 1445 /** The fingerprint of the service information. */ | 1441 /** The fingerprint of the service information. */ |
| 1446 core.String fingerprint; | 1442 core.String fingerprint; |
| 1447 | 1443 |
| 1448 | 1444 |
| 1449 ZoneViewsGetServiceResponse(); | 1445 ZoneViewsGetServiceResponse(); |
| 1450 | 1446 |
| (...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1583 core.Map toJson() { | 1579 core.Map toJson() { |
| 1584 var _json = new core.Map(); | 1580 var _json = new core.Map(); |
| 1585 if (resources != null) { | 1581 if (resources != null) { |
| 1586 _json["resources"] = resources; | 1582 _json["resources"] = resources; |
| 1587 } | 1583 } |
| 1588 return _json; | 1584 return _json; |
| 1589 } | 1585 } |
| 1590 } | 1586 } |
| 1591 | 1587 |
| 1592 | 1588 |
| 1593 /** Not documented yet. */ | |
| 1594 class ZoneViewsSetServiceRequest { | 1589 class ZoneViewsSetServiceRequest { |
| 1595 /** The service information to be updated. */ | 1590 /** The service information to be updated. */ |
| 1596 core.List<ServiceEndpoint> endpoints; | 1591 core.List<ServiceEndpoint> endpoints; |
| 1597 | 1592 |
| 1598 /** | 1593 /** |
| 1599 * Fingerprint of the service information; a hash of the contents. This field | 1594 * Fingerprint of the service information; a hash of the contents. This field |
| 1600 * is used for optimistic locking when updating the service entries. | 1595 * is used for optimistic locking when updating the service entries. |
| 1601 */ | 1596 */ |
| 1602 core.String fingerprint; | 1597 core.String fingerprint; |
| 1603 | 1598 |
| (...skipping 25 matching lines...) Expand all Loading... |
| 1629 } | 1624 } |
| 1630 if (fingerprint != null) { | 1625 if (fingerprint != null) { |
| 1631 _json["fingerprint"] = fingerprint; | 1626 _json["fingerprint"] = fingerprint; |
| 1632 } | 1627 } |
| 1633 if (resourceName != null) { | 1628 if (resourceName != null) { |
| 1634 _json["resourceName"] = resourceName; | 1629 _json["resourceName"] = resourceName; |
| 1635 } | 1630 } |
| 1636 return _json; | 1631 return _json; |
| 1637 } | 1632 } |
| 1638 } | 1633 } |
| 1639 | |
| 1640 | |
| OLD | NEW |