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

Side by Side Diff: generated/googleapis_beta/lib/replicapool/v1beta2.dart

Issue 698403003: Api roll 5: 2014-11-05 (Closed) Base URL: git@github.com:dart-lang/googleapis.git@master
Patch Set: Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 library googleapis_beta.resourceviews.v1beta2; 1 library googleapis_beta.replicapool.v1beta2;
2 2
3 import "dart:core" as core; 3 import "dart:core" as core;
4 import "dart:collection" as collection; 4 import "dart:collection" as collection;
5 import "dart:async" as async; 5 import "dart:async" as async;
6 import "dart:convert" as convert; 6 import "dart:convert" as convert;
7 7
8 import "package:crypto/crypto.dart" as crypto; 8 import "package:crypto/crypto.dart" as crypto;
9 import 'package:http/http.dart' as http; 9 import 'package:http/http.dart' as http;
10 import '../src/common_internal.dart' as common_internal; 10 import '../src/common_internal.dart' as common_internal;
11 import '../common/common.dart' as common; 11 import '../common/common.dart' as common;
12 12
13 export '../common/common.dart' show ApiRequestError; 13 export '../common/common.dart' show ApiRequestError;
14 export '../common/common.dart' show DetailedApiRequestError; 14 export '../common/common.dart' show DetailedApiRequestError;
15 15
16 /** 16 /**
17 * The Resource View API allows users to create and manage logical sets of 17 * The Google Compute Engine Instance Group Manager API provides groups of
18 * Google Compute Engine instances. 18 * homogenous Compute Engine Instances.
19 */ 19 */
20 class ResourceviewsApi { 20 class ReplicapoolApi {
21 /** View and manage your data across Google Cloud Platform services */ 21 /** View and manage your data across Google Cloud Platform services */
22 static const CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platf orm"; 22 static const CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platf orm";
23 23
24 /** View and manage your Google Compute Engine resources */ 24 /** View and manage your Google Compute Engine resources */
25 static const ComputeScope = "https://www.googleapis.com/auth/compute"; 25 static const ComputeScope = "https://www.googleapis.com/auth/compute";
26 26
27 /** View your Google Compute Engine resources */ 27 /** View your Google Compute Engine resources */
28 static const ComputeReadonlyScope = "https://www.googleapis.com/auth/compute.r eadonly"; 28 static const ComputeReadonlyScope = "https://www.googleapis.com/auth/compute.r eadonly";
29 29
30 /**
31 * View and manage your Google Cloud Platform management resources and
32 * deployment status information
33 */
34 static const NdevCloudmanScope = "https://www.googleapis.com/auth/ndev.cloudma n";
35
36 /**
37 * View your Google Cloud Platform management resources and deployment status
38 * information
39 */
40 static const NdevCloudmanReadonlyScope = "https://www.googleapis.com/auth/ndev .cloudman.readonly";
41
42 30
43 final common_internal.ApiRequester _requester; 31 final common_internal.ApiRequester _requester;
44 32
33 InstanceGroupManagersResourceApi get instanceGroupManagers => new InstanceGrou pManagersResourceApi(_requester);
45 ZoneOperationsResourceApi get zoneOperations => new ZoneOperationsResourceApi( _requester); 34 ZoneOperationsResourceApi get zoneOperations => new ZoneOperationsResourceApi( _requester);
46 ZoneViewsResourceApi get zoneViews => new ZoneViewsResourceApi(_requester);
47 35
48 ResourceviewsApi(http.Client client) : 36 ReplicapoolApi(http.Client client) :
49 _requester = new common_internal.ApiRequester(client, "https://www.googlea pis.com/", "resourceviews/v1beta2/projects/"); 37 _requester = new common_internal.ApiRequester(client, "https://www.googlea pis.com/", "replicapool/v1beta2/projects/");
50 } 38 }
51 39
52 40
53 /** Not documented yet. */ 41 /** Not documented yet. */
54 class ZoneOperationsResourceApi { 42 class InstanceGroupManagersResourceApi {
55 final common_internal.ApiRequester _requester; 43 final common_internal.ApiRequester _requester;
56 44
57 ZoneOperationsResourceApi(common_internal.ApiRequester client) : 45 InstanceGroupManagersResourceApi(common_internal.ApiRequester client) :
58 _requester = client; 46 _requester = client;
59 47
60 /** 48 /**
61 * Retrieves the specified zone-specific operation resource. 49 * Removes the specified instances from the managed instance group, and from
50 * any target pools of which they were members, without deleting the
51 * instances.
52 *
53 * [request] - The metadata request object.
62 * 54 *
63 * Request parameters: 55 * Request parameters:
64 * 56 *
65 * [project] - Name of the project scoping this request. 57 * [project] - The Google Developers Console project name.
66 * Value must have pattern 58 * 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])?))". 59 * "(?:(?:[-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 * 60 *
69 * [zone] - Name of the zone scoping this request. 61 * [zone] - The name of the zone in which the instance group manager resides.
70 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". 62 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?".
71 * 63 *
72 * [operation] - Name of the operation resource to return. 64 * [instanceGroupManager] - The name of the instance group manager.
73 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". 65 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?".
74 * 66 *
75 * Completes with a [Operation]. 67 * Completes with a [Operation].
76 * 68 *
77 * Completes with a [common.ApiRequestError] if the API endpoint returned an 69 * Completes with a [common.ApiRequestError] if the API endpoint returned an
78 * error. 70 * error.
79 * 71 *
80 * If the used [http.Client] completes with an error when making a REST call, 72 * If the used [http.Client] completes with an error when making a REST call,
81 * this method will complete with the same error. 73 * this method will complete with the same error.
82 */ 74 */
83 async.Future<Operation> get(core.String project, core.String zone, core.String operation) { 75 async.Future<Operation> abandonInstances(InstanceGroupManagersAbandonInstances Request request, core.String project, core.String zone, core.String instanceGrou pManager) {
84 var _url = null; 76 var _url = null;
85 var _queryParams = new core.Map(); 77 var _queryParams = new core.Map();
86 var _uploadMedia = null; 78 var _uploadMedia = null;
87 var _uploadOptions = null; 79 var _uploadOptions = null;
88 var _downloadOptions = common.DownloadOptions.Metadata; 80 var _downloadOptions = common.DownloadOptions.Metadata;
89 var _body = null; 81 var _body = null;
90 82
83 if (request != null) {
84 _body = convert.JSON.encode((request).toJson());
85 }
91 if (project == null) { 86 if (project == null) {
92 throw new core.ArgumentError("Parameter project is required."); 87 throw new core.ArgumentError("Parameter project is required.");
93 } 88 }
94 if (zone == null) { 89 if (zone == null) {
95 throw new core.ArgumentError("Parameter zone is required."); 90 throw new core.ArgumentError("Parameter zone is required.");
96 } 91 }
97 if (operation == null) { 92 if (instanceGroupManager == null) {
98 throw new core.ArgumentError("Parameter operation is required."); 93 throw new core.ArgumentError("Parameter instanceGroupManager is required." );
99 } 94 }
100 95
101 96
102 _url = common_internal.Escaper.ecapeVariable('$project') + '/zones/' + commo n_internal.Escaper.ecapeVariable('$zone') + '/operations/' + common_internal.Esc aper.ecapeVariable('$operation'); 97 _url = common_internal.Escaper.ecapeVariable('$project') + '/zones/' + commo n_internal.Escaper.ecapeVariable('$zone') + '/instanceGroupManagers/' + common_i nternal.Escaper.ecapeVariable('$instanceGroupManager') + '/abandonInstances';
103 98
104 var _response = _requester.request(_url, 99 var _response = _requester.request(_url,
105 "GET", 100 "POST",
106 body: _body, 101 body: _body,
107 queryParams: _queryParams, 102 queryParams: _queryParams,
108 uploadOptions: _uploadOptions, 103 uploadOptions: _uploadOptions,
109 uploadMedia: _uploadMedia, 104 uploadMedia: _uploadMedia,
110 downloadOptions: _downloadOptions); 105 downloadOptions: _downloadOptions);
111 return _response.then((data) => new Operation.fromJson(data)); 106 return _response.then((data) => new Operation.fromJson(data));
112 } 107 }
113 108
114 /** 109 /**
115 * Retrieves the list of operation resources contained within the specified 110 * Deletes the instance group manager and all instances contained within. If
116 * zone. 111 * you'd like to delete the manager without deleting the instances, you must
112 * first abandon the instances to remove them from the group.
117 * 113 *
118 * Request parameters: 114 * Request parameters:
119 * 115 *
120 * [project] - Name of the project scoping this request. 116 * [project] - The Google Developers Console project name.
121 * Value must have pattern 117 * Value must have pattern
122 * "(?:(?:[-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])?))". 118 * "(?:(?:[-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])?))".
123 * 119 *
124 * [zone] - Name of the zone scoping this request. 120 * [zone] - The name of the zone in which the instance group manager resides.
125 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". 121 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?".
126 * 122 *
127 * [filter] - Optional. Filter expression for filtering listed resources. 123 * [instanceGroupManager] - Name of the Instance Group Manager resource to
124 * delete.
125 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?".
128 * 126 *
129 * [maxResults] - Optional. Maximum count of results to be returned. Maximum 127 * Completes with a [Operation].
130 * value is 500 and default value is 500.
131 * Value must be between "0" and "500".
132 *
133 * [pageToken] - Optional. Tag returned by a previous list request truncated
134 * by maxResults. Used to continue a previous list request.
135 *
136 * Completes with a [OperationList].
137 * 128 *
138 * Completes with a [common.ApiRequestError] if the API endpoint returned an 129 * Completes with a [common.ApiRequestError] if the API endpoint returned an
139 * error. 130 * error.
140 * 131 *
141 * If the used [http.Client] completes with an error when making a REST call, 132 * If the used [http.Client] completes with an error when making a REST call,
142 * this method will complete with the same error. 133 * this method will complete with the same error.
143 */ 134 */
144 async.Future<OperationList> list(core.String project, core.String zone, {core. String filter, core.int maxResults, core.String pageToken}) { 135 async.Future<Operation> delete(core.String project, core.String zone, core.Str ing instanceGroupManager) {
145 var _url = null; 136 var _url = null;
146 var _queryParams = new core.Map(); 137 var _queryParams = new core.Map();
147 var _uploadMedia = null; 138 var _uploadMedia = null;
148 var _uploadOptions = null; 139 var _uploadOptions = null;
149 var _downloadOptions = common.DownloadOptions.Metadata; 140 var _downloadOptions = common.DownloadOptions.Metadata;
150 var _body = null; 141 var _body = null;
151 142
152 if (project == null) { 143 if (project == null) {
153 throw new core.ArgumentError("Parameter project is required."); 144 throw new core.ArgumentError("Parameter project is required.");
154 } 145 }
155 if (zone == null) { 146 if (zone == null) {
156 throw new core.ArgumentError("Parameter zone is required."); 147 throw new core.ArgumentError("Parameter zone is required.");
157 } 148 }
158 if (filter != null) { 149 if (instanceGroupManager == null) {
159 _queryParams["filter"] = [filter]; 150 throw new core.ArgumentError("Parameter instanceGroupManager is required." );
160 }
161 if (maxResults != null) {
162 _queryParams["maxResults"] = ["${maxResults}"];
163 }
164 if (pageToken != null) {
165 _queryParams["pageToken"] = [pageToken];
166 } 151 }
167 152
168 153
169 _url = common_internal.Escaper.ecapeVariable('$project') + '/zones/' + commo n_internal.Escaper.ecapeVariable('$zone') + '/operations'; 154 _url = common_internal.Escaper.ecapeVariable('$project') + '/zones/' + commo n_internal.Escaper.ecapeVariable('$zone') + '/instanceGroupManagers/' + common_i nternal.Escaper.ecapeVariable('$instanceGroupManager');
170 155
171 var _response = _requester.request(_url, 156 var _response = _requester.request(_url,
172 "GET", 157 "DELETE",
173 body: _body, 158 body: _body,
174 queryParams: _queryParams, 159 queryParams: _queryParams,
175 uploadOptions: _uploadOptions, 160 uploadOptions: _uploadOptions,
176 uploadMedia: _uploadMedia, 161 uploadMedia: _uploadMedia,
177 downloadOptions: _downloadOptions); 162 downloadOptions: _downloadOptions);
178 return _response.then((data) => new OperationList.fromJson(data)); 163 return _response.then((data) => new Operation.fromJson(data));
179 } 164 }
180 165
181 }
182
183
184 /** Not documented yet. */
185 class ZoneViewsResourceApi {
186 final common_internal.ApiRequester _requester;
187
188 ZoneViewsResourceApi(common_internal.ApiRequester client) :
189 _requester = client;
190
191 /** 166 /**
192 * Add resources to the view. 167 * Deletes the specified instances. The instances are removed from the
168 * instance group and any target pools of which they are a member, then
169 * deleted. The targetSize of the instance group manager is reduced by the
170 * number of instances deleted.
193 * 171 *
194 * [request] - The metadata request object. 172 * [request] - The metadata request object.
195 * 173 *
196 * Request parameters: 174 * Request parameters:
197 * 175 *
198 * [project] - The project name of the resource view. 176 * [project] - The Google Developers Console project name.
177 * Value must have pattern
178 * "(?:(?:[-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])?))".
199 * 179 *
200 * [zone] - The zone name of the resource view. 180 * [zone] - The name of the zone in which the instance group manager resides.
181 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?".
201 * 182 *
202 * [resourceView] - The name of the resource view. 183 * [instanceGroupManager] - The name of the instance group manager.
184 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?".
203 * 185 *
204 * Completes with a [Operation]. 186 * Completes with a [Operation].
205 * 187 *
206 * Completes with a [common.ApiRequestError] if the API endpoint returned an 188 * Completes with a [common.ApiRequestError] if the API endpoint returned an
207 * error. 189 * error.
208 * 190 *
209 * If the used [http.Client] completes with an error when making a REST call, 191 * If the used [http.Client] completes with an error when making a REST call,
210 * this method will complete with the same error. 192 * this method will complete with the same error.
211 */ 193 */
212 async.Future<Operation> addResources(ZoneViewsAddResourcesRequest request, cor e.String project, core.String zone, core.String resourceView) { 194 async.Future<Operation> deleteInstances(InstanceGroupManagersDeleteInstancesRe quest request, core.String project, core.String zone, core.String instanceGroupM anager) {
213 var _url = null; 195 var _url = null;
214 var _queryParams = new core.Map(); 196 var _queryParams = new core.Map();
215 var _uploadMedia = null; 197 var _uploadMedia = null;
216 var _uploadOptions = null; 198 var _uploadOptions = null;
217 var _downloadOptions = common.DownloadOptions.Metadata; 199 var _downloadOptions = common.DownloadOptions.Metadata;
218 var _body = null; 200 var _body = null;
219 201
220 if (request != null) { 202 if (request != null) {
221 _body = convert.JSON.encode((request).toJson()); 203 _body = convert.JSON.encode((request).toJson());
222 } 204 }
223 if (project == null) { 205 if (project == null) {
224 throw new core.ArgumentError("Parameter project is required."); 206 throw new core.ArgumentError("Parameter project is required.");
225 } 207 }
226 if (zone == null) { 208 if (zone == null) {
227 throw new core.ArgumentError("Parameter zone is required."); 209 throw new core.ArgumentError("Parameter zone is required.");
228 } 210 }
229 if (resourceView == null) { 211 if (instanceGroupManager == null) {
230 throw new core.ArgumentError("Parameter resourceView is required."); 212 throw new core.ArgumentError("Parameter instanceGroupManager is required." );
231 } 213 }
232 214
233 215
234 _url = common_internal.Escaper.ecapeVariable('$project') + '/zones/' + commo n_internal.Escaper.ecapeVariable('$zone') + '/resourceViews/' + common_internal. Escaper.ecapeVariable('$resourceView') + '/addResources'; 216 _url = common_internal.Escaper.ecapeVariable('$project') + '/zones/' + commo n_internal.Escaper.ecapeVariable('$zone') + '/instanceGroupManagers/' + common_i nternal.Escaper.ecapeVariable('$instanceGroupManager') + '/deleteInstances';
235 217
236 var _response = _requester.request(_url, 218 var _response = _requester.request(_url,
237 "POST", 219 "POST",
238 body: _body, 220 body: _body,
239 queryParams: _queryParams, 221 queryParams: _queryParams,
240 uploadOptions: _uploadOptions, 222 uploadOptions: _uploadOptions,
241 uploadMedia: _uploadMedia, 223 uploadMedia: _uploadMedia,
242 downloadOptions: _downloadOptions); 224 downloadOptions: _downloadOptions);
243 return _response.then((data) => new Operation.fromJson(data)); 225 return _response.then((data) => new Operation.fromJson(data));
244 } 226 }
245 227
246 /** 228 /**
247 * Delete a resource view. 229 * Returns the specified Instance Group Manager resource.
248 * 230 *
249 * Request parameters: 231 * Request parameters:
250 * 232 *
251 * [project] - The project name of the resource view. 233 * [project] - The Google Developers Console project name.
234 * Value must have pattern
235 * "(?:(?:[-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])?))".
252 * 236 *
253 * [zone] - The zone name of the resource view. 237 * [zone] - The name of the zone in which the instance group manager resides.
238 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?".
254 * 239 *
255 * [resourceView] - The name of the resource view. 240 * [instanceGroupManager] - Name of the instance resource to return.
241 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?".
256 * 242 *
257 * Completes with a [Operation]. 243 * Completes with a [InstanceGroupManager].
258 * 244 *
259 * Completes with a [common.ApiRequestError] if the API endpoint returned an 245 * Completes with a [common.ApiRequestError] if the API endpoint returned an
260 * error. 246 * error.
261 * 247 *
262 * If the used [http.Client] completes with an error when making a REST call, 248 * If the used [http.Client] completes with an error when making a REST call,
263 * this method will complete with the same error. 249 * this method will complete with the same error.
264 */ 250 */
265 async.Future<Operation> delete(core.String project, core.String zone, core.Str ing resourceView) { 251 async.Future<InstanceGroupManager> get(core.String project, core.String zone, core.String instanceGroupManager) {
266 var _url = null; 252 var _url = null;
267 var _queryParams = new core.Map(); 253 var _queryParams = new core.Map();
268 var _uploadMedia = null; 254 var _uploadMedia = null;
269 var _uploadOptions = null; 255 var _uploadOptions = null;
270 var _downloadOptions = common.DownloadOptions.Metadata; 256 var _downloadOptions = common.DownloadOptions.Metadata;
271 var _body = null; 257 var _body = null;
272 258
273 if (project == null) { 259 if (project == null) {
274 throw new core.ArgumentError("Parameter project is required."); 260 throw new core.ArgumentError("Parameter project is required.");
275 } 261 }
276 if (zone == null) { 262 if (zone == null) {
277 throw new core.ArgumentError("Parameter zone is required."); 263 throw new core.ArgumentError("Parameter zone is required.");
278 } 264 }
279 if (resourceView == null) { 265 if (instanceGroupManager == null) {
280 throw new core.ArgumentError("Parameter resourceView is required."); 266 throw new core.ArgumentError("Parameter instanceGroupManager is required." );
281 } 267 }
282 268
283 269
284 _url = common_internal.Escaper.ecapeVariable('$project') + '/zones/' + commo n_internal.Escaper.ecapeVariable('$zone') + '/resourceViews/' + common_internal. Escaper.ecapeVariable('$resourceView'); 270 _url = common_internal.Escaper.ecapeVariable('$project') + '/zones/' + commo n_internal.Escaper.ecapeVariable('$zone') + '/instanceGroupManagers/' + common_i nternal.Escaper.ecapeVariable('$instanceGroupManager');
285 271
286 var _response = _requester.request(_url, 272 var _response = _requester.request(_url,
287 "DELETE", 273 "GET",
288 body: _body, 274 body: _body,
289 queryParams: _queryParams, 275 queryParams: _queryParams,
290 uploadOptions: _uploadOptions, 276 uploadOptions: _uploadOptions,
291 uploadMedia: _uploadMedia, 277 uploadMedia: _uploadMedia,
292 downloadOptions: _downloadOptions); 278 downloadOptions: _downloadOptions);
293 return _response.then((data) => new Operation.fromJson(data)); 279 return _response.then((data) => new InstanceGroupManager.fromJson(data));
294 } 280 }
295 281
296 /** 282 /**
297 * Get the information of a zonal resource view. 283 * Creates an instance group manager, as well as the instance group and the
284 * specified number of instances.
285 *
286 * [request] - The metadata request object.
298 * 287 *
299 * Request parameters: 288 * Request parameters:
300 * 289 *
301 * [project] - The project name of the resource view. 290 * [project] - The Google Developers Console project name.
291 * Value must have pattern
292 * "(?:(?:[-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])?))".
302 * 293 *
303 * [zone] - The zone name of the resource view. 294 * [zone] - The name of the zone in which the instance group manager resides.
295 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?".
304 * 296 *
305 * [resourceView] - The name of the resource view. 297 * [size] - Number of instances that should exist.
306 * 298 *
307 * Completes with a [ResourceView]. 299 * Completes with a [Operation].
308 * 300 *
309 * Completes with a [common.ApiRequestError] if the API endpoint returned an 301 * Completes with a [common.ApiRequestError] if the API endpoint returned an
310 * error. 302 * error.
311 * 303 *
312 * If the used [http.Client] completes with an error when making a REST call, 304 * If the used [http.Client] completes with an error when making a REST call,
313 * this method will complete with the same error. 305 * this method will complete with the same error.
314 */ 306 */
315 async.Future<ResourceView> get(core.String project, core.String zone, core.Str ing resourceView) { 307 async.Future<Operation> insert(InstanceGroupManager request, core.String proje ct, core.String zone, core.int size) {
316 var _url = null; 308 var _url = null;
317 var _queryParams = new core.Map(); 309 var _queryParams = new core.Map();
318 var _uploadMedia = null; 310 var _uploadMedia = null;
319 var _uploadOptions = null; 311 var _uploadOptions = null;
320 var _downloadOptions = common.DownloadOptions.Metadata; 312 var _downloadOptions = common.DownloadOptions.Metadata;
321 var _body = null; 313 var _body = null;
322 314
315 if (request != null) {
316 _body = convert.JSON.encode((request).toJson());
317 }
323 if (project == null) { 318 if (project == null) {
324 throw new core.ArgumentError("Parameter project is required."); 319 throw new core.ArgumentError("Parameter project is required.");
325 } 320 }
326 if (zone == null) { 321 if (zone == null) {
327 throw new core.ArgumentError("Parameter zone is required."); 322 throw new core.ArgumentError("Parameter zone is required.");
328 } 323 }
329 if (resourceView == null) { 324 if (size == null) {
330 throw new core.ArgumentError("Parameter resourceView is required."); 325 throw new core.ArgumentError("Parameter size is required.");
331 } 326 }
327 _queryParams["size"] = ["${size}"];
332 328
333 329
334 _url = common_internal.Escaper.ecapeVariable('$project') + '/zones/' + commo n_internal.Escaper.ecapeVariable('$zone') + '/resourceViews/' + common_internal. Escaper.ecapeVariable('$resourceView'); 330 _url = common_internal.Escaper.ecapeVariable('$project') + '/zones/' + commo n_internal.Escaper.ecapeVariable('$zone') + '/instanceGroupManagers';
335 331
336 var _response = _requester.request(_url, 332 var _response = _requester.request(_url,
337 "GET", 333 "POST",
338 body: _body, 334 body: _body,
339 queryParams: _queryParams, 335 queryParams: _queryParams,
340 uploadOptions: _uploadOptions, 336 uploadOptions: _uploadOptions,
341 uploadMedia: _uploadMedia, 337 uploadMedia: _uploadMedia,
342 downloadOptions: _downloadOptions); 338 downloadOptions: _downloadOptions);
343 return _response.then((data) => new ResourceView.fromJson(data)); 339 return _response.then((data) => new Operation.fromJson(data));
344 } 340 }
345 341
346 /** 342 /**
347 * Get the service information of a resource view or a resource. 343 * Retrieves the list of Instance Group Manager resources contained within the
344 * specified zone.
348 * 345 *
349 * Request parameters: 346 * Request parameters:
350 * 347 *
351 * [project] - The project name of the resource view. 348 * [project] - The Google Developers Console project name.
349 * Value must have pattern
350 * "(?:(?:[-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])?))".
352 * 351 *
353 * [zone] - The zone name of the resource view. 352 * [zone] - The name of the zone in which the instance group manager resides.
353 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?".
354 * 354 *
355 * [resourceView] - The name of the resource view. 355 * [filter] - Optional. Filter expression for filtering listed resources.
356 * 356 *
357 * [resourceName] - The name of the resource if user wants to get the service 357 * [maxResults] - Optional. Maximum count of results to be returned. Maximum
358 * information of the resource. 358 * value is 500 and default value is 500.
359 * Value must be between "0" and "500".
359 * 360 *
360 * Completes with a [ZoneViewsGetServiceResponse]. 361 * [pageToken] - Optional. Tag returned by a previous list request truncated
362 * by maxResults. Used to continue a previous list request.
363 *
364 * Completes with a [InstanceGroupManagerList].
361 * 365 *
362 * Completes with a [common.ApiRequestError] if the API endpoint returned an 366 * Completes with a [common.ApiRequestError] if the API endpoint returned an
363 * error. 367 * error.
364 * 368 *
365 * If the used [http.Client] completes with an error when making a REST call, 369 * If the used [http.Client] completes with an error when making a REST call,
366 * this method will complete with the same error. 370 * this method will complete with the same error.
367 */ 371 */
368 async.Future<ZoneViewsGetServiceResponse> getService(core.String project, core .String zone, core.String resourceView, {core.String resourceName}) { 372 async.Future<InstanceGroupManagerList> list(core.String project, core.String z one, {core.String filter, core.int maxResults, core.String pageToken}) {
369 var _url = null; 373 var _url = null;
370 var _queryParams = new core.Map(); 374 var _queryParams = new core.Map();
371 var _uploadMedia = null; 375 var _uploadMedia = null;
372 var _uploadOptions = null; 376 var _uploadOptions = null;
373 var _downloadOptions = common.DownloadOptions.Metadata; 377 var _downloadOptions = common.DownloadOptions.Metadata;
374 var _body = null; 378 var _body = null;
375 379
376 if (project == null) { 380 if (project == null) {
377 throw new core.ArgumentError("Parameter project is required."); 381 throw new core.ArgumentError("Parameter project is required.");
378 } 382 }
379 if (zone == null) { 383 if (zone == null) {
380 throw new core.ArgumentError("Parameter zone is required."); 384 throw new core.ArgumentError("Parameter zone is required.");
381 } 385 }
382 if (resourceView == null) { 386 if (filter != null) {
383 throw new core.ArgumentError("Parameter resourceView is required."); 387 _queryParams["filter"] = [filter];
384 } 388 }
385 if (resourceName != null) { 389 if (maxResults != null) {
386 _queryParams["resourceName"] = [resourceName]; 390 _queryParams["maxResults"] = ["${maxResults}"];
391 }
392 if (pageToken != null) {
393 _queryParams["pageToken"] = [pageToken];
387 } 394 }
388 395
389 396
390 _url = common_internal.Escaper.ecapeVariable('$project') + '/zones/' + commo n_internal.Escaper.ecapeVariable('$zone') + '/resourceViews/' + common_internal. Escaper.ecapeVariable('$resourceView') + '/getService'; 397 _url = common_internal.Escaper.ecapeVariable('$project') + '/zones/' + commo n_internal.Escaper.ecapeVariable('$zone') + '/instanceGroupManagers';
391 398
392 var _response = _requester.request(_url, 399 var _response = _requester.request(_url,
393 "POST", 400 "GET",
394 body: _body, 401 body: _body,
395 queryParams: _queryParams, 402 queryParams: _queryParams,
396 uploadOptions: _uploadOptions, 403 uploadOptions: _uploadOptions,
397 uploadMedia: _uploadMedia, 404 uploadMedia: _uploadMedia,
398 downloadOptions: _downloadOptions); 405 downloadOptions: _downloadOptions);
399 return _response.then((data) => new ZoneViewsGetServiceResponse.fromJson(dat a)); 406 return _response.then((data) => new InstanceGroupManagerList.fromJson(data)) ;
400 } 407 }
401 408
402 /** 409 /**
403 * Create a resource view. 410 * Recreates the specified instances. The instances are deleted, then
411 * recreated using the instance group manager's current instance template.
404 * 412 *
405 * [request] - The metadata request object. 413 * [request] - The metadata request object.
406 * 414 *
407 * Request parameters: 415 * Request parameters:
408 * 416 *
409 * [project] - The project name of the resource view. 417 * [project] - The Google Developers Console project name.
418 * Value must have pattern
419 * "(?:(?:[-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])?))".
410 * 420 *
411 * [zone] - The zone name of the resource view. 421 * [zone] - The name of the zone in which the instance group manager resides.
422 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?".
423 *
424 * [instanceGroupManager] - The name of the instance group manager.
425 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?".
412 * 426 *
413 * Completes with a [Operation]. 427 * Completes with a [Operation].
414 * 428 *
415 * Completes with a [common.ApiRequestError] if the API endpoint returned an 429 * Completes with a [common.ApiRequestError] if the API endpoint returned an
416 * error. 430 * error.
417 * 431 *
418 * If the used [http.Client] completes with an error when making a REST call, 432 * If the used [http.Client] completes with an error when making a REST call,
419 * this method will complete with the same error. 433 * this method will complete with the same error.
420 */ 434 */
421 async.Future<Operation> insert(ResourceView request, core.String project, core .String zone) { 435 async.Future<Operation> recreateInstances(InstanceGroupManagersRecreateInstanc esRequest request, core.String project, core.String zone, core.String instanceGr oupManager) {
422 var _url = null; 436 var _url = null;
423 var _queryParams = new core.Map(); 437 var _queryParams = new core.Map();
424 var _uploadMedia = null; 438 var _uploadMedia = null;
425 var _uploadOptions = null; 439 var _uploadOptions = null;
426 var _downloadOptions = common.DownloadOptions.Metadata; 440 var _downloadOptions = common.DownloadOptions.Metadata;
427 var _body = null; 441 var _body = null;
428 442
429 if (request != null) { 443 if (request != null) {
430 _body = convert.JSON.encode((request).toJson()); 444 _body = convert.JSON.encode((request).toJson());
431 } 445 }
432 if (project == null) { 446 if (project == null) {
433 throw new core.ArgumentError("Parameter project is required."); 447 throw new core.ArgumentError("Parameter project is required.");
434 } 448 }
435 if (zone == null) { 449 if (zone == null) {
436 throw new core.ArgumentError("Parameter zone is required."); 450 throw new core.ArgumentError("Parameter zone is required.");
437 } 451 }
452 if (instanceGroupManager == null) {
453 throw new core.ArgumentError("Parameter instanceGroupManager is required." );
454 }
438 455
439 456
440 _url = common_internal.Escaper.ecapeVariable('$project') + '/zones/' + commo n_internal.Escaper.ecapeVariable('$zone') + '/resourceViews'; 457 _url = common_internal.Escaper.ecapeVariable('$project') + '/zones/' + commo n_internal.Escaper.ecapeVariable('$zone') + '/instanceGroupManagers/' + common_i nternal.Escaper.ecapeVariable('$instanceGroupManager') + '/recreateInstances';
441 458
442 var _response = _requester.request(_url, 459 var _response = _requester.request(_url,
443 "POST", 460 "POST",
444 body: _body, 461 body: _body,
445 queryParams: _queryParams, 462 queryParams: _queryParams,
446 uploadOptions: _uploadOptions, 463 uploadOptions: _uploadOptions,
447 uploadMedia: _uploadMedia, 464 uploadMedia: _uploadMedia,
448 downloadOptions: _downloadOptions); 465 downloadOptions: _downloadOptions);
449 return _response.then((data) => new Operation.fromJson(data)); 466 return _response.then((data) => new Operation.fromJson(data));
450 } 467 }
451 468
452 /** 469 /**
453 * List resource views. 470 * Resizes the managed instance group up or down. If resized up, new instances
471 * are created using the current instance template. If resized down, instances
472 * are removed in the order outlined in Resizing a managed instance group.
454 * 473 *
455 * Request parameters: 474 * Request parameters:
456 * 475 *
457 * [project] - The project name of the resource view. 476 * [project] - The Google Developers Console project name.
477 * Value must have pattern
478 * "(?:(?:[-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])?))".
458 * 479 *
459 * [zone] - The zone name of the resource view. 480 * [zone] - The name of the zone in which the instance group manager resides.
481 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?".
460 * 482 *
461 * [maxResults] - Maximum count of results to be returned. Acceptable values 483 * [instanceGroupManager] - The name of the instance group manager.
462 * are 0 to 5000, inclusive. (Default: 5000) 484 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?".
463 * Value must be between "0" and "5000".
464 * 485 *
465 * [pageToken] - Specifies a nextPageToken returned by a previous list 486 * [size] - Number of instances that should exist in this Instance Group
466 * request. This token can be used to request the next page of results from a 487 * Manager.
467 * previous list request.
468 * 488 *
469 * Completes with a [ZoneViewsList]. 489 * Completes with a [Operation].
470 * 490 *
471 * Completes with a [common.ApiRequestError] if the API endpoint returned an 491 * Completes with a [common.ApiRequestError] if the API endpoint returned an
472 * error. 492 * error.
473 * 493 *
474 * If the used [http.Client] completes with an error when making a REST call, 494 * If the used [http.Client] completes with an error when making a REST call,
475 * this method will complete with the same error. 495 * this method will complete with the same error.
476 */ 496 */
477 async.Future<ZoneViewsList> list(core.String project, core.String zone, {core. int maxResults, core.String pageToken}) { 497 async.Future<Operation> resize(core.String project, core.String zone, core.Str ing instanceGroupManager, core.int size) {
478 var _url = null; 498 var _url = null;
479 var _queryParams = new core.Map(); 499 var _queryParams = new core.Map();
480 var _uploadMedia = null; 500 var _uploadMedia = null;
481 var _uploadOptions = null; 501 var _uploadOptions = null;
482 var _downloadOptions = common.DownloadOptions.Metadata; 502 var _downloadOptions = common.DownloadOptions.Metadata;
483 var _body = null; 503 var _body = null;
484 504
485 if (project == null) { 505 if (project == null) {
486 throw new core.ArgumentError("Parameter project is required."); 506 throw new core.ArgumentError("Parameter project is required.");
487 } 507 }
488 if (zone == null) { 508 if (zone == null) {
489 throw new core.ArgumentError("Parameter zone is required."); 509 throw new core.ArgumentError("Parameter zone is required.");
490 } 510 }
491 if (maxResults != null) { 511 if (instanceGroupManager == null) {
492 _queryParams["maxResults"] = ["${maxResults}"]; 512 throw new core.ArgumentError("Parameter instanceGroupManager is required." );
493 } 513 }
494 if (pageToken != null) { 514 if (size == null) {
495 _queryParams["pageToken"] = [pageToken]; 515 throw new core.ArgumentError("Parameter size is required.");
496 } 516 }
517 _queryParams["size"] = ["${size}"];
497 518
498 519
499 _url = common_internal.Escaper.ecapeVariable('$project') + '/zones/' + commo n_internal.Escaper.ecapeVariable('$zone') + '/resourceViews'; 520 _url = common_internal.Escaper.ecapeVariable('$project') + '/zones/' + commo n_internal.Escaper.ecapeVariable('$zone') + '/instanceGroupManagers/' + common_i nternal.Escaper.ecapeVariable('$instanceGroupManager') + '/resize';
500 521
501 var _response = _requester.request(_url, 522 var _response = _requester.request(_url,
502 "GET", 523 "POST",
503 body: _body, 524 body: _body,
504 queryParams: _queryParams, 525 queryParams: _queryParams,
505 uploadOptions: _uploadOptions, 526 uploadOptions: _uploadOptions,
506 uploadMedia: _uploadMedia, 527 uploadMedia: _uploadMedia,
507 downloadOptions: _downloadOptions); 528 downloadOptions: _downloadOptions);
508 return _response.then((data) => new ZoneViewsList.fromJson(data)); 529 return _response.then((data) => new Operation.fromJson(data));
509 } 530 }
510 531
511 /** 532 /**
512 * List the resources of the resource view. 533 * Sets the instance template to use when creating new instances in this
534 * group. Existing instances are not affected.
535 *
536 * [request] - The metadata request object.
513 * 537 *
514 * Request parameters: 538 * Request parameters:
515 * 539 *
516 * [project] - The project name of the resource view. 540 * [project] - The Google Developers Console project name.
541 * Value must have pattern
542 * "(?:(?:[-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])?))".
517 * 543 *
518 * [zone] - The zone name of the resource view. 544 * [zone] - The name of the zone in which the instance group manager resides.
545 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?".
519 * 546 *
520 * [resourceView] - The name of the resource view. 547 * [instanceGroupManager] - The name of the instance group manager.
548 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?".
521 * 549 *
522 * [format] - The requested format of the return value. It can be URL or 550 * Completes with a [Operation].
523 * URL_PORT. A JSON object will be included in the response based on the
524 * format. The default format is NONE, which results in no JSON in the
525 * response.
526 * Possible string values are:
527 * - "NONE"
528 * - "URL"
529 * - "URL_PORT"
530 *
531 * [listState] - The state of the instance to list. By default, it lists all
532 * instances.
533 * Possible string values are:
534 * - "ALL"
535 * - "RUNNING"
536 *
537 * [maxResults] - Maximum count of results to be returned. Acceptable values
538 * are 0 to 5000, inclusive. (Default: 5000)
539 * Value must be between "0" and "5000".
540 *
541 * [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 * previous list request.
544 *
545 * [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 *
548 * Completes with a [ZoneViewsListResourcesResponse].
549 * 551 *
550 * Completes with a [common.ApiRequestError] if the API endpoint returned an 552 * Completes with a [common.ApiRequestError] if the API endpoint returned an
551 * error. 553 * error.
552 * 554 *
553 * If the used [http.Client] completes with an error when making a REST call, 555 * If the used [http.Client] completes with an error when making a REST call,
554 * this method will complete with the same error. 556 * this method will complete with the same error.
555 */ 557 */
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}) { 558 async.Future<Operation> setInstanceTemplate(InstanceGroupManagersSetInstanceTe mplateRequest request, core.String project, core.String zone, core.String instan ceGroupManager) {
557 var _url = null; 559 var _url = null;
558 var _queryParams = new core.Map(); 560 var _queryParams = new core.Map();
559 var _uploadMedia = null; 561 var _uploadMedia = null;
560 var _uploadOptions = null; 562 var _uploadOptions = null;
561 var _downloadOptions = common.DownloadOptions.Metadata; 563 var _downloadOptions = common.DownloadOptions.Metadata;
562 var _body = null; 564 var _body = null;
563 565
566 if (request != null) {
567 _body = convert.JSON.encode((request).toJson());
568 }
564 if (project == null) { 569 if (project == null) {
565 throw new core.ArgumentError("Parameter project is required."); 570 throw new core.ArgumentError("Parameter project is required.");
566 } 571 }
567 if (zone == null) { 572 if (zone == null) {
568 throw new core.ArgumentError("Parameter zone is required."); 573 throw new core.ArgumentError("Parameter zone is required.");
569 } 574 }
570 if (resourceView == null) { 575 if (instanceGroupManager == null) {
571 throw new core.ArgumentError("Parameter resourceView is required."); 576 throw new core.ArgumentError("Parameter instanceGroupManager is required." );
572 }
573 if (format != null) {
574 _queryParams["format"] = [format];
575 }
576 if (listState != null) {
577 _queryParams["listState"] = [listState];
578 }
579 if (maxResults != null) {
580 _queryParams["maxResults"] = ["${maxResults}"];
581 }
582 if (pageToken != null) {
583 _queryParams["pageToken"] = [pageToken];
584 }
585 if (serviceName != null) {
586 _queryParams["serviceName"] = [serviceName];
587 } 577 }
588 578
589 579
590 _url = common_internal.Escaper.ecapeVariable('$project') + '/zones/' + commo n_internal.Escaper.ecapeVariable('$zone') + '/resourceViews/' + common_internal. Escaper.ecapeVariable('$resourceView') + '/resources'; 580 _url = common_internal.Escaper.ecapeVariable('$project') + '/zones/' + commo n_internal.Escaper.ecapeVariable('$zone') + '/instanceGroupManagers/' + common_i nternal.Escaper.ecapeVariable('$instanceGroupManager') + '/setInstanceTemplate';
591 581
592 var _response = _requester.request(_url, 582 var _response = _requester.request(_url,
593 "GET", 583 "POST",
594 body: _body, 584 body: _body,
595 queryParams: _queryParams, 585 queryParams: _queryParams,
596 uploadOptions: _uploadOptions, 586 uploadOptions: _uploadOptions,
597 uploadMedia: _uploadMedia, 587 uploadMedia: _uploadMedia,
598 downloadOptions: _downloadOptions); 588 downloadOptions: _downloadOptions);
599 return _response.then((data) => new ZoneViewsListResourcesResponse.fromJson( data)); 589 return _response.then((data) => new Operation.fromJson(data));
600 } 590 }
601 591
602 /** 592 /**
603 * Remove resources from the view. 593 * Modifies the target pools to which all new instances in this group are
594 * assigned. Existing instances in the group are not affected.
604 * 595 *
605 * [request] - The metadata request object. 596 * [request] - The metadata request object.
606 * 597 *
607 * Request parameters: 598 * Request parameters:
608 * 599 *
609 * [project] - The project name of the resource view. 600 * [project] - The Google Developers Console project name.
601 * Value must have pattern
602 * "(?:(?:[-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])?))".
610 * 603 *
611 * [zone] - The zone name of the resource view. 604 * [zone] - The name of the zone in which the instance group manager resides.
605 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?".
612 * 606 *
613 * [resourceView] - The name of the resource view. 607 * [instanceGroupManager] - The name of the instance group manager.
608 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?".
614 * 609 *
615 * Completes with a [Operation]. 610 * Completes with a [Operation].
616 * 611 *
617 * Completes with a [common.ApiRequestError] if the API endpoint returned an 612 * Completes with a [common.ApiRequestError] if the API endpoint returned an
618 * error. 613 * error.
619 * 614 *
620 * If the used [http.Client] completes with an error when making a REST call, 615 * If the used [http.Client] completes with an error when making a REST call,
621 * this method will complete with the same error. 616 * this method will complete with the same error.
622 */ 617 */
623 async.Future<Operation> removeResources(ZoneViewsRemoveResourcesRequest reques t, core.String project, core.String zone, core.String resourceView) { 618 async.Future<Operation> setTargetPools(InstanceGroupManagersSetTargetPoolsRequ est request, core.String project, core.String zone, core.String instanceGroupMan ager) {
624 var _url = null; 619 var _url = null;
625 var _queryParams = new core.Map(); 620 var _queryParams = new core.Map();
626 var _uploadMedia = null; 621 var _uploadMedia = null;
627 var _uploadOptions = null; 622 var _uploadOptions = null;
628 var _downloadOptions = common.DownloadOptions.Metadata; 623 var _downloadOptions = common.DownloadOptions.Metadata;
629 var _body = null; 624 var _body = null;
630 625
631 if (request != null) { 626 if (request != null) {
632 _body = convert.JSON.encode((request).toJson()); 627 _body = convert.JSON.encode((request).toJson());
633 } 628 }
634 if (project == null) { 629 if (project == null) {
635 throw new core.ArgumentError("Parameter project is required."); 630 throw new core.ArgumentError("Parameter project is required.");
636 } 631 }
637 if (zone == null) { 632 if (zone == null) {
638 throw new core.ArgumentError("Parameter zone is required."); 633 throw new core.ArgumentError("Parameter zone is required.");
639 } 634 }
640 if (resourceView == null) { 635 if (instanceGroupManager == null) {
641 throw new core.ArgumentError("Parameter resourceView is required."); 636 throw new core.ArgumentError("Parameter instanceGroupManager is required." );
642 } 637 }
643 638
644 639
645 _url = common_internal.Escaper.ecapeVariable('$project') + '/zones/' + commo n_internal.Escaper.ecapeVariable('$zone') + '/resourceViews/' + common_internal. Escaper.ecapeVariable('$resourceView') + '/removeResources'; 640 _url = common_internal.Escaper.ecapeVariable('$project') + '/zones/' + commo n_internal.Escaper.ecapeVariable('$zone') + '/instanceGroupManagers/' + common_i nternal.Escaper.ecapeVariable('$instanceGroupManager') + '/setTargetPools';
646 641
647 var _response = _requester.request(_url, 642 var _response = _requester.request(_url,
648 "POST", 643 "POST",
649 body: _body, 644 body: _body,
650 queryParams: _queryParams, 645 queryParams: _queryParams,
651 uploadOptions: _uploadOptions, 646 uploadOptions: _uploadOptions,
652 uploadMedia: _uploadMedia, 647 uploadMedia: _uploadMedia,
653 downloadOptions: _downloadOptions); 648 downloadOptions: _downloadOptions);
654 return _response.then((data) => new Operation.fromJson(data)); 649 return _response.then((data) => new Operation.fromJson(data));
655 } 650 }
656 651
652 }
653
654
655 /** Not documented yet. */
656 class ZoneOperationsResourceApi {
657 final common_internal.ApiRequester _requester;
658
659 ZoneOperationsResourceApi(common_internal.ApiRequester client) :
660 _requester = client;
661
657 /** 662 /**
658 * Update the service information of a resource view or a resource. 663 * Retrieves the specified zone-specific operation resource.
659 *
660 * [request] - The metadata request object.
661 * 664 *
662 * Request parameters: 665 * Request parameters:
663 * 666 *
664 * [project] - The project name of the resource view. 667 * [project] - Name of the project scoping this request.
668 * Value must have pattern
669 * "(?:(?:[-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])?))".
665 * 670 *
666 * [zone] - The zone name of the resource view. 671 * [zone] - Name of the zone scoping this request.
672 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?".
667 * 673 *
668 * [resourceView] - The name of the resource view. 674 * [operation] - Name of the operation resource to return.
675 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?".
669 * 676 *
670 * Completes with a [Operation]. 677 * Completes with a [Operation].
671 * 678 *
672 * Completes with a [common.ApiRequestError] if the API endpoint returned an 679 * Completes with a [common.ApiRequestError] if the API endpoint returned an
673 * error. 680 * error.
674 * 681 *
675 * If the used [http.Client] completes with an error when making a REST call, 682 * If the used [http.Client] completes with an error when making a REST call,
676 * this method will complete with the same error. 683 * this method will complete with the same error.
677 */ 684 */
678 async.Future<Operation> setService(ZoneViewsSetServiceRequest request, core.St ring project, core.String zone, core.String resourceView) { 685 async.Future<Operation> get(core.String project, core.String zone, core.String operation) {
679 var _url = null; 686 var _url = null;
680 var _queryParams = new core.Map(); 687 var _queryParams = new core.Map();
681 var _uploadMedia = null; 688 var _uploadMedia = null;
682 var _uploadOptions = null; 689 var _uploadOptions = null;
683 var _downloadOptions = common.DownloadOptions.Metadata; 690 var _downloadOptions = common.DownloadOptions.Metadata;
684 var _body = null; 691 var _body = null;
685 692
686 if (request != null) {
687 _body = convert.JSON.encode((request).toJson());
688 }
689 if (project == null) { 693 if (project == null) {
690 throw new core.ArgumentError("Parameter project is required."); 694 throw new core.ArgumentError("Parameter project is required.");
691 } 695 }
692 if (zone == null) { 696 if (zone == null) {
693 throw new core.ArgumentError("Parameter zone is required."); 697 throw new core.ArgumentError("Parameter zone is required.");
694 } 698 }
695 if (resourceView == null) { 699 if (operation == null) {
696 throw new core.ArgumentError("Parameter resourceView is required."); 700 throw new core.ArgumentError("Parameter operation is required.");
697 } 701 }
698 702
699 703
700 _url = common_internal.Escaper.ecapeVariable('$project') + '/zones/' + commo n_internal.Escaper.ecapeVariable('$zone') + '/resourceViews/' + common_internal. Escaper.ecapeVariable('$resourceView') + '/setService'; 704 _url = common_internal.Escaper.ecapeVariable('$project') + '/zones/' + commo n_internal.Escaper.ecapeVariable('$zone') + '/operations/' + common_internal.Esc aper.ecapeVariable('$operation');
701 705
702 var _response = _requester.request(_url, 706 var _response = _requester.request(_url,
703 "POST", 707 "GET",
704 body: _body, 708 body: _body,
705 queryParams: _queryParams, 709 queryParams: _queryParams,
706 uploadOptions: _uploadOptions, 710 uploadOptions: _uploadOptions,
707 uploadMedia: _uploadMedia, 711 uploadMedia: _uploadMedia,
708 downloadOptions: _downloadOptions); 712 downloadOptions: _downloadOptions);
709 return _response.then((data) => new Operation.fromJson(data)); 713 return _response.then((data) => new Operation.fromJson(data));
710 } 714 }
711 715
712 } 716 /**
713 717 * Retrieves the list of operation resources contained within the specified
714 718 * zone.
715 719 *
716 /** The Label to be applied to the resource views. */ 720 * Request parameters:
717 class Label { 721 *
718 /** Key of the label. */ 722 * [project] - Name of the project scoping this request.
719 core.String key; 723 * Value must have pattern
720 724 * "(?:(?:[-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])?))".
721 /** Value of the label. */ 725 *
722 core.String value; 726 * [zone] - Name of the zone scoping this request.
723 727 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?".
724 728 *
725 Label(); 729 * [filter] - Optional. Filter expression for filtering listed resources.
726 730 *
727 Label.fromJson(core.Map _json) { 731 * [maxResults] - Optional. Maximum count of results to be returned. Maximum
728 if (_json.containsKey("key")) { 732 * value is 500 and default value is 500.
729 key = _json["key"]; 733 * Value must be between "0" and "500".
730 } 734 *
731 if (_json.containsKey("value")) { 735 * [pageToken] - Optional. Tag returned by a previous list request truncated
732 value = _json["value"]; 736 * by maxResults. Used to continue a previous list request.
733 } 737 *
734 } 738 * Completes with a [OperationList].
735 739 *
736 core.Map toJson() { 740 * Completes with a [common.ApiRequestError] if the API endpoint returned an
737 var _json = new core.Map(); 741 * error.
738 if (key != null) { 742 *
739 _json["key"] = key; 743 * If the used [http.Client] completes with an error when making a REST call,
740 } 744 * this method will complete with the same error.
741 if (value != null) { 745 */
742 _json["value"] = value; 746 async.Future<OperationList> list(core.String project, core.String zone, {core. String filter, core.int maxResults, core.String pageToken}) {
743 } 747 var _url = null;
744 return _json; 748 var _queryParams = new core.Map();
745 } 749 var _uploadMedia = null;
746 } 750 var _uploadOptions = null;
747 751 var _downloadOptions = common.DownloadOptions.Metadata;
748 752 var _body = null;
749 /** 753
750 * The list response item that contains the resource and end points information. 754 if (project == null) {
751 */ 755 throw new core.ArgumentError("Parameter project is required.");
752 class ListResourceResponseItem { 756 }
753 /** The list of service end points on the resource. */ 757 if (zone == null) {
754 core.Map<core.String, core.List<core.int>> endpoints; 758 throw new core.ArgumentError("Parameter zone is required.");
755 759 }
756 /** The full URL of the resource. */ 760 if (filter != null) {
757 core.String resource; 761 _queryParams["filter"] = [filter];
758 762 }
759 763 if (maxResults != null) {
760 ListResourceResponseItem(); 764 _queryParams["maxResults"] = ["${maxResults}"];
761 765 }
762 ListResourceResponseItem.fromJson(core.Map _json) { 766 if (pageToken != null) {
763 if (_json.containsKey("endpoints")) { 767 _queryParams["pageToken"] = [pageToken];
764 endpoints = _json["endpoints"]; 768 }
765 } 769
766 if (_json.containsKey("resource")) { 770
767 resource = _json["resource"]; 771 _url = common_internal.Escaper.ecapeVariable('$project') + '/zones/' + commo n_internal.Escaper.ecapeVariable('$zone') + '/operations';
768 } 772
769 } 773 var _response = _requester.request(_url,
770 774 "GET",
771 core.Map toJson() { 775 body: _body,
772 var _json = new core.Map(); 776 queryParams: _queryParams,
773 if (endpoints != null) { 777 uploadOptions: _uploadOptions,
774 _json["endpoints"] = endpoints; 778 uploadMedia: _uploadMedia,
775 } 779 downloadOptions: _downloadOptions);
776 if (resource != null) { 780 return _response.then((data) => new OperationList.fromJson(data));
777 _json["resource"] = resource; 781 }
778 } 782
779 return _json; 783 }
780 } 784
785
786
787 /** An Instance Group Manager resource. */
788 class InstanceGroupManager {
789 /**
790 * The base instance name to use for instances in this group. The value must
791 * be a valid RFC1035 name. Supported characters are lowercase letters,
792 * numbers, and hyphens (-). Instances are named by appending a hyphen and a
793 * random four-character string to the base instance name.
794 */
795 core.String baseInstanceName;
796
797 /**
798 * [Output only] The time the instance group manager was created, in RFC3339
799 * text format.
800 */
801 core.String creationTimestamp;
802
803 /**
804 * [Output only] The number of instances that currently exist and are a part
805 * of this group. This includes instances that are starting but are not yet
806 * RUNNING, and instances that are in the process of being deleted or
807 * abandoned.
808 */
809 core.int currentSize;
810
811 /** An optional textual description of the instance group manager. */
812 core.String description;
813
814 /**
815 * [Output only] Fingerprint of the instance group manager. This field is used
816 * for optimistic locking. An up-to-date fingerprint must be provided in order
817 * to modify the Instance Group Manager resource.
818 */
819 core.String fingerprint;
820
821 core.List<core.int> get fingerprintAsBytes {
822 return crypto.CryptoUtils.base64StringToBytes(fingerprint);
823 }
824
825 void set fingerprintAsBytes(core.List<core.int> _bytes) {
826 fingerprint = crypto.CryptoUtils.bytesToBase64(_bytes, urlSafe: true);
827 }
828
829 /**
830 * [Output only] The full URL of the instance group created by the manager.
831 * This group contains all of the instances being managed, and cannot contain
832 * non-managed instances.
833 */
834 core.String group;
835
836 /** [Output only] A server-assigned unique identifier for the resource. */
837 core.String id;
838
839 /**
840 * The full URL to an instance template from which all new instances will be
841 * created.
842 */
843 core.String instanceTemplate;
844
845 /**
846 * [Output only] The resource type. Always replicapool#instanceGroupManager.
847 */
848 core.String kind;
849
850 /**
851 * The name of the instance group manager. Must be 1-63 characters long and
852 * comply with RFC1035. Supported characters include lowercase letters,
853 * numbers, and hyphens.
854 */
855 core.String name;
856
857 /** [Output only] The fully qualified URL for this resource. */
858 core.String selfLink;
859
860 /**
861 * The full URL of all target pools to which new instances in the group are
862 * added. Updating the target pool values does not affect existing instances.
863 */
864 core.List<core.String> targetPools;
865
866 /**
867 * [Output only] The number of instances that the manager is attempting to
868 * maintain. Deleting or abandoning instances affects this number, as does
869 * resizing the group.
870 */
871 core.int targetSize;
872
873
874 InstanceGroupManager();
875
876 InstanceGroupManager.fromJson(core.Map _json) {
877 if (_json.containsKey("baseInstanceName")) {
878 baseInstanceName = _json["baseInstanceName"];
879 }
880 if (_json.containsKey("creationTimestamp")) {
881 creationTimestamp = _json["creationTimestamp"];
882 }
883 if (_json.containsKey("currentSize")) {
884 currentSize = _json["currentSize"];
885 }
886 if (_json.containsKey("description")) {
887 description = _json["description"];
888 }
889 if (_json.containsKey("fingerprint")) {
890 fingerprint = _json["fingerprint"];
891 }
892 if (_json.containsKey("group")) {
893 group = _json["group"];
894 }
895 if (_json.containsKey("id")) {
896 id = _json["id"];
897 }
898 if (_json.containsKey("instanceTemplate")) {
899 instanceTemplate = _json["instanceTemplate"];
900 }
901 if (_json.containsKey("kind")) {
902 kind = _json["kind"];
903 }
904 if (_json.containsKey("name")) {
905 name = _json["name"];
906 }
907 if (_json.containsKey("selfLink")) {
908 selfLink = _json["selfLink"];
909 }
910 if (_json.containsKey("targetPools")) {
911 targetPools = _json["targetPools"];
912 }
913 if (_json.containsKey("targetSize")) {
914 targetSize = _json["targetSize"];
915 }
916 }
917
918 core.Map toJson() {
919 var _json = new core.Map();
920 if (baseInstanceName != null) {
921 _json["baseInstanceName"] = baseInstanceName;
922 }
923 if (creationTimestamp != null) {
924 _json["creationTimestamp"] = creationTimestamp;
925 }
926 if (currentSize != null) {
927 _json["currentSize"] = currentSize;
928 }
929 if (description != null) {
930 _json["description"] = description;
931 }
932 if (fingerprint != null) {
933 _json["fingerprint"] = fingerprint;
934 }
935 if (group != null) {
936 _json["group"] = group;
937 }
938 if (id != null) {
939 _json["id"] = id;
940 }
941 if (instanceTemplate != null) {
942 _json["instanceTemplate"] = instanceTemplate;
943 }
944 if (kind != null) {
945 _json["kind"] = kind;
946 }
947 if (name != null) {
948 _json["name"] = name;
949 }
950 if (selfLink != null) {
951 _json["selfLink"] = selfLink;
952 }
953 if (targetPools != null) {
954 _json["targetPools"] = targetPools;
955 }
956 if (targetSize != null) {
957 _json["targetSize"] = targetSize;
958 }
959 return _json;
960 }
961 }
962
963
964 /** Not documented yet. */
965 class InstanceGroupManagerList {
966 /**
967 * Unique identifier for the resource; defined by the server (output only).
968 */
969 core.String id;
970
971 /** A list of instance resources. */
972 core.List<InstanceGroupManager> items;
973
974 /** Type of resource. */
975 core.String kind;
976
977 /** A token used to continue a truncated list request (output only). */
978 core.String nextPageToken;
979
980 /** Server defined URL for this resource (output only). */
981 core.String selfLink;
982
983
984 InstanceGroupManagerList();
985
986 InstanceGroupManagerList.fromJson(core.Map _json) {
987 if (_json.containsKey("id")) {
988 id = _json["id"];
989 }
990 if (_json.containsKey("items")) {
991 items = _json["items"].map((value) => new InstanceGroupManager.fromJson(va lue)).toList();
992 }
993 if (_json.containsKey("kind")) {
994 kind = _json["kind"];
995 }
996 if (_json.containsKey("nextPageToken")) {
997 nextPageToken = _json["nextPageToken"];
998 }
999 if (_json.containsKey("selfLink")) {
1000 selfLink = _json["selfLink"];
1001 }
1002 }
1003
1004 core.Map toJson() {
1005 var _json = new core.Map();
1006 if (id != null) {
1007 _json["id"] = id;
1008 }
1009 if (items != null) {
1010 _json["items"] = items.map((value) => (value).toJson()).toList();
1011 }
1012 if (kind != null) {
1013 _json["kind"] = kind;
1014 }
1015 if (nextPageToken != null) {
1016 _json["nextPageToken"] = nextPageToken;
1017 }
1018 if (selfLink != null) {
1019 _json["selfLink"] = selfLink;
1020 }
1021 return _json;
1022 }
1023 }
1024
1025
1026 /** Not documented yet. */
1027 class InstanceGroupManagersAbandonInstancesRequest {
1028 /**
1029 * The names of one or more instances to abandon. For example:
1030 * { 'instances': [ 'instance-c3po', 'instance-r2d2' ] }
1031 */
1032 core.List<core.String> instances;
1033
1034
1035 InstanceGroupManagersAbandonInstancesRequest();
1036
1037 InstanceGroupManagersAbandonInstancesRequest.fromJson(core.Map _json) {
1038 if (_json.containsKey("instances")) {
1039 instances = _json["instances"];
1040 }
1041 }
1042
1043 core.Map toJson() {
1044 var _json = new core.Map();
1045 if (instances != null) {
1046 _json["instances"] = instances;
1047 }
1048 return _json;
1049 }
1050 }
1051
1052
1053 /** Not documented yet. */
1054 class InstanceGroupManagersDeleteInstancesRequest {
1055 /**
1056 * Names of instances to delete.
1057 *
1058 * Example: 'instance-foo', 'instance-bar'
1059 */
1060 core.List<core.String> instances;
1061
1062
1063 InstanceGroupManagersDeleteInstancesRequest();
1064
1065 InstanceGroupManagersDeleteInstancesRequest.fromJson(core.Map _json) {
1066 if (_json.containsKey("instances")) {
1067 instances = _json["instances"];
1068 }
1069 }
1070
1071 core.Map toJson() {
1072 var _json = new core.Map();
1073 if (instances != null) {
1074 _json["instances"] = instances;
1075 }
1076 return _json;
1077 }
1078 }
1079
1080
1081 /** Not documented yet. */
1082 class InstanceGroupManagersRecreateInstancesRequest {
1083 /**
1084 * The names of one or more instances to recreate. For example:
1085 * { 'instances': [ 'instance-c3po', 'instance-r2d2' ] }
1086 */
1087 core.List<core.String> instances;
1088
1089
1090 InstanceGroupManagersRecreateInstancesRequest();
1091
1092 InstanceGroupManagersRecreateInstancesRequest.fromJson(core.Map _json) {
1093 if (_json.containsKey("instances")) {
1094 instances = _json["instances"];
1095 }
1096 }
1097
1098 core.Map toJson() {
1099 var _json = new core.Map();
1100 if (instances != null) {
1101 _json["instances"] = instances;
1102 }
1103 return _json;
1104 }
1105 }
1106
1107
1108 /** Not documented yet. */
1109 class InstanceGroupManagersSetInstanceTemplateRequest {
1110 /**
1111 * The full URL to an Instance Template from which all new instances will be
1112 * created.
1113 */
1114 core.String instanceTemplate;
1115
1116
1117 InstanceGroupManagersSetInstanceTemplateRequest();
1118
1119 InstanceGroupManagersSetInstanceTemplateRequest.fromJson(core.Map _json) {
1120 if (_json.containsKey("instanceTemplate")) {
1121 instanceTemplate = _json["instanceTemplate"];
1122 }
1123 }
1124
1125 core.Map toJson() {
1126 var _json = new core.Map();
1127 if (instanceTemplate != null) {
1128 _json["instanceTemplate"] = instanceTemplate;
1129 }
1130 return _json;
1131 }
1132 }
1133
1134
1135 /** Not documented yet. */
1136 class InstanceGroupManagersSetTargetPoolsRequest {
1137 /**
1138 * The current fingerprint of the Instance Group Manager resource. If this
1139 * does not match the server-side fingerprint of the resource, then the
1140 * request will be rejected.
1141 */
1142 core.String fingerprint;
1143
1144 core.List<core.int> get fingerprintAsBytes {
1145 return crypto.CryptoUtils.base64StringToBytes(fingerprint);
1146 }
1147
1148 void set fingerprintAsBytes(core.List<core.int> _bytes) {
1149 fingerprint = crypto.CryptoUtils.bytesToBase64(_bytes, urlSafe: true);
1150 }
1151
1152 /**
1153 * A list of fully-qualified URLs to existing Target Pool resources. New
1154 * instances in the Instance Group Manager will be added to the specified
1155 * target pools; existing instances are not affected.
1156 */
1157 core.List<core.String> targetPools;
1158
1159
1160 InstanceGroupManagersSetTargetPoolsRequest();
1161
1162 InstanceGroupManagersSetTargetPoolsRequest.fromJson(core.Map _json) {
1163 if (_json.containsKey("fingerprint")) {
1164 fingerprint = _json["fingerprint"];
1165 }
1166 if (_json.containsKey("targetPools")) {
1167 targetPools = _json["targetPools"];
1168 }
1169 }
1170
1171 core.Map toJson() {
1172 var _json = new core.Map();
1173 if (fingerprint != null) {
1174 _json["fingerprint"] = fingerprint;
1175 }
1176 if (targetPools != null) {
1177 _json["targetPools"] = targetPools;
1178 }
1179 return _json;
1180 }
781 } 1181 }
782 1182
783 1183
784 /** Not documented yet. */ 1184 /** Not documented yet. */
785 class OperationErrorErrors { 1185 class OperationErrorErrors {
786 /** [Output Only] The error type identifier for this error. */ 1186 /** [Output Only] The error type identifier for this error. */
787 core.String code; 1187 core.String code;
788 1188
789 /** 1189 /**
790 * [Output Only] Indicates the field in the request which caused the error. 1190 * [Output Only] Indicates the field in the request which caused the error.
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
884 if (value != null) { 1284 if (value != null) {
885 _json["value"] = value; 1285 _json["value"] = value;
886 } 1286 }
887 return _json; 1287 return _json;
888 } 1288 }
889 } 1289 }
890 1290
891 1291
892 /** Not documented yet. */ 1292 /** Not documented yet. */
893 class OperationWarnings { 1293 class OperationWarnings {
894 /** [Output only] The warning type identifier for this warning. */ 1294 /**
1295 * [Output only] The warning type identifier for this warning.
1296 * Possible string values are:
1297 * - "DEPRECATED_RESOURCE_USED"
1298 * - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE"
1299 * - "INJECTED_KERNELS_DEPRECATED"
1300 * - "NEXT_HOP_ADDRESS_NOT_ASSIGNED"
1301 * - "NEXT_HOP_CANNOT_IP_FORWARD"
1302 * - "NEXT_HOP_INSTANCE_NOT_FOUND"
1303 * - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK"
1304 * - "NEXT_HOP_NOT_RUNNING"
1305 * - "NO_RESULTS_ON_PAGE"
1306 * - "REQUIRED_TOS_AGREEMENT"
1307 * - "RESOURCE_NOT_DELETED"
1308 * - "UNREACHABLE"
1309 */
895 core.String code; 1310 core.String code;
896 1311
897 /** [Output only] Metadata for this warning in key:value format. */ 1312 /** [Output only] Metadata for this warning in key:value format. */
898 core.List<OperationWarningsData> data; 1313 core.List<OperationWarningsData> data;
899 1314
900 /** [Output only] Optional human-readable details for this warning. */ 1315 /** [Output only] Optional human-readable details for this warning. */
901 core.String message; 1316 core.String message;
902 1317
903 1318
904 OperationWarnings(); 1319 OperationWarnings();
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
1004 1419
1005 /** [Output Only] Server-defined fully-qualified URL for this resource. */ 1420 /** [Output Only] Server-defined fully-qualified URL for this resource. */
1006 core.String selfLink; 1421 core.String selfLink;
1007 1422
1008 /** 1423 /**
1009 * [Output Only] The time that this operation was started by the server, in 1424 * [Output Only] The time that this operation was started by the server, in
1010 * RFC3339 text format. 1425 * RFC3339 text format.
1011 */ 1426 */
1012 core.String startTime; 1427 core.String startTime;
1013 1428
1014 /** [Output Only] Status of the operation. */ 1429 /**
1430 * [Output Only] Status of the operation.
1431 * Possible string values are:
1432 * - "DONE"
1433 * - "PENDING"
1434 * - "RUNNING"
1435 */
1015 core.String status; 1436 core.String status;
1016 1437
1017 /** 1438 /**
1018 * [Output Only] An optional textual description of the current status of the 1439 * [Output Only] An optional textual description of the current status of the
1019 * operation. 1440 * operation.
1020 */ 1441 */
1021 core.String statusMessage; 1442 core.String statusMessage;
1022 1443
1023 /** 1444 /**
1024 * [Output Only] Unique target ID which identifies a particular incarnation of 1445 * [Output Only] Unique target ID which identifies a particular incarnation of
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after
1247 _json["nextPageToken"] = nextPageToken; 1668 _json["nextPageToken"] = nextPageToken;
1248 } 1669 }
1249 if (selfLink != null) { 1670 if (selfLink != null) {
1250 _json["selfLink"] = selfLink; 1671 _json["selfLink"] = selfLink;
1251 } 1672 }
1252 return _json; 1673 return _json;
1253 } 1674 }
1254 } 1675 }
1255 1676
1256 1677
1257 /** The resource view object. */
1258 class ResourceView {
1259 /** The creation time of the resource view. */
1260 core.String creationTimestamp;
1261
1262 /** The detailed description of the resource view. */
1263 core.String description;
1264
1265 /** Services endpoint information. */
1266 core.List<ServiceEndpoint> endpoints;
1267
1268 /** The fingerprint of the service endpoint information. */
1269 core.String fingerprint;
1270
1271 /** [Output Only] The ID of the resource view. */
1272 core.String id;
1273
1274 /** Type of the resource. */
1275 core.String kind;
1276
1277 /** The labels for events. */
1278 core.List<Label> labels;
1279
1280 /** The name of the resource view. */
1281 core.String name;
1282
1283 /**
1284 * The URL of a Compute Engine network to which the resources in the view
1285 * belong.
1286 */
1287 core.String network;
1288
1289 /** A list of all resources in the resource view. */
1290 core.List<core.String> resources;
1291
1292 /** [Output Only] A self-link to the resource view. */
1293 core.String selfLink;
1294
1295 /** The total number of resources in the resource view. */
1296 core.int size;
1297
1298
1299 ResourceView();
1300
1301 ResourceView.fromJson(core.Map _json) {
1302 if (_json.containsKey("creationTimestamp")) {
1303 creationTimestamp = _json["creationTimestamp"];
1304 }
1305 if (_json.containsKey("description")) {
1306 description = _json["description"];
1307 }
1308 if (_json.containsKey("endpoints")) {
1309 endpoints = _json["endpoints"].map((value) => new ServiceEndpoint.fromJson (value)).toList();
1310 }
1311 if (_json.containsKey("fingerprint")) {
1312 fingerprint = _json["fingerprint"];
1313 }
1314 if (_json.containsKey("id")) {
1315 id = _json["id"];
1316 }
1317 if (_json.containsKey("kind")) {
1318 kind = _json["kind"];
1319 }
1320 if (_json.containsKey("labels")) {
1321 labels = _json["labels"].map((value) => new Label.fromJson(value)).toList( );
1322 }
1323 if (_json.containsKey("name")) {
1324 name = _json["name"];
1325 }
1326 if (_json.containsKey("network")) {
1327 network = _json["network"];
1328 }
1329 if (_json.containsKey("resources")) {
1330 resources = _json["resources"];
1331 }
1332 if (_json.containsKey("selfLink")) {
1333 selfLink = _json["selfLink"];
1334 }
1335 if (_json.containsKey("size")) {
1336 size = _json["size"];
1337 }
1338 }
1339
1340 core.Map toJson() {
1341 var _json = new core.Map();
1342 if (creationTimestamp != null) {
1343 _json["creationTimestamp"] = creationTimestamp;
1344 }
1345 if (description != null) {
1346 _json["description"] = description;
1347 }
1348 if (endpoints != null) {
1349 _json["endpoints"] = endpoints.map((value) => (value).toJson()).toList();
1350 }
1351 if (fingerprint != null) {
1352 _json["fingerprint"] = fingerprint;
1353 }
1354 if (id != null) {
1355 _json["id"] = id;
1356 }
1357 if (kind != null) {
1358 _json["kind"] = kind;
1359 }
1360 if (labels != null) {
1361 _json["labels"] = labels.map((value) => (value).toJson()).toList();
1362 }
1363 if (name != null) {
1364 _json["name"] = name;
1365 }
1366 if (network != null) {
1367 _json["network"] = network;
1368 }
1369 if (resources != null) {
1370 _json["resources"] = resources;
1371 }
1372 if (selfLink != null) {
1373 _json["selfLink"] = selfLink;
1374 }
1375 if (size != null) {
1376 _json["size"] = size;
1377 }
1378 return _json;
1379 }
1380 }
1381
1382
1383 /** The service endpoint that may be started in a VM. */
1384 class ServiceEndpoint {
1385 /** The name of the service endpoint. */
1386 core.String name;
1387
1388 /** The port of the service endpoint. */
1389 core.int port;
1390
1391
1392 ServiceEndpoint();
1393
1394 ServiceEndpoint.fromJson(core.Map _json) {
1395 if (_json.containsKey("name")) {
1396 name = _json["name"];
1397 }
1398 if (_json.containsKey("port")) {
1399 port = _json["port"];
1400 }
1401 }
1402
1403 core.Map toJson() {
1404 var _json = new core.Map();
1405 if (name != null) {
1406 _json["name"] = name;
1407 }
1408 if (port != null) {
1409 _json["port"] = port;
1410 }
1411 return _json;
1412 }
1413 }
1414
1415
1416 /** The request to add resources to the resource view. */
1417 class ZoneViewsAddResourcesRequest {
1418 /** The list of resources to be added. */
1419 core.List<core.String> resources;
1420
1421
1422 ZoneViewsAddResourcesRequest();
1423
1424 ZoneViewsAddResourcesRequest.fromJson(core.Map _json) {
1425 if (_json.containsKey("resources")) {
1426 resources = _json["resources"];
1427 }
1428 }
1429
1430 core.Map toJson() {
1431 var _json = new core.Map();
1432 if (resources != null) {
1433 _json["resources"] = resources;
1434 }
1435 return _json;
1436 }
1437 }
1438
1439
1440 /** Not documented yet. */
1441 class ZoneViewsGetServiceResponse {
1442 /** The service information. */
1443 core.List<ServiceEndpoint> endpoints;
1444
1445 /** The fingerprint of the service information. */
1446 core.String fingerprint;
1447
1448
1449 ZoneViewsGetServiceResponse();
1450
1451 ZoneViewsGetServiceResponse.fromJson(core.Map _json) {
1452 if (_json.containsKey("endpoints")) {
1453 endpoints = _json["endpoints"].map((value) => new ServiceEndpoint.fromJson (value)).toList();
1454 }
1455 if (_json.containsKey("fingerprint")) {
1456 fingerprint = _json["fingerprint"];
1457 }
1458 }
1459
1460 core.Map toJson() {
1461 var _json = new core.Map();
1462 if (endpoints != null) {
1463 _json["endpoints"] = endpoints.map((value) => (value).toJson()).toList();
1464 }
1465 if (fingerprint != null) {
1466 _json["fingerprint"] = fingerprint;
1467 }
1468 return _json;
1469 }
1470 }
1471
1472
1473 /** The response to a list request. */
1474 class ZoneViewsList {
1475 /** The result that contains all resource views that meet the criteria. */
1476 core.List<ResourceView> items;
1477
1478 /** Type of resource. */
1479 core.String kind;
1480
1481 /** A token used for pagination. */
1482 core.String nextPageToken;
1483
1484 /** Server defined URL for this resource (output only). */
1485 core.String selfLink;
1486
1487
1488 ZoneViewsList();
1489
1490 ZoneViewsList.fromJson(core.Map _json) {
1491 if (_json.containsKey("items")) {
1492 items = _json["items"].map((value) => new ResourceView.fromJson(value)).to List();
1493 }
1494 if (_json.containsKey("kind")) {
1495 kind = _json["kind"];
1496 }
1497 if (_json.containsKey("nextPageToken")) {
1498 nextPageToken = _json["nextPageToken"];
1499 }
1500 if (_json.containsKey("selfLink")) {
1501 selfLink = _json["selfLink"];
1502 }
1503 }
1504
1505 core.Map toJson() {
1506 var _json = new core.Map();
1507 if (items != null) {
1508 _json["items"] = items.map((value) => (value).toJson()).toList();
1509 }
1510 if (kind != null) {
1511 _json["kind"] = kind;
1512 }
1513 if (nextPageToken != null) {
1514 _json["nextPageToken"] = nextPageToken;
1515 }
1516 if (selfLink != null) {
1517 _json["selfLink"] = selfLink;
1518 }
1519 return _json;
1520 }
1521 }
1522
1523
1524 /** The response to a list resource request. */
1525 class ZoneViewsListResourcesResponse {
1526 /** The formatted JSON that is requested by the user. */
1527 core.List<ListResourceResponseItem> items;
1528
1529 /**
1530 * The URL of a Compute Engine network to which the resources in the view
1531 * belong.
1532 */
1533 core.String network;
1534
1535 /** A token used for pagination. */
1536 core.String nextPageToken;
1537
1538
1539 ZoneViewsListResourcesResponse();
1540
1541 ZoneViewsListResourcesResponse.fromJson(core.Map _json) {
1542 if (_json.containsKey("items")) {
1543 items = _json["items"].map((value) => new ListResourceResponseItem.fromJso n(value)).toList();
1544 }
1545 if (_json.containsKey("network")) {
1546 network = _json["network"];
1547 }
1548 if (_json.containsKey("nextPageToken")) {
1549 nextPageToken = _json["nextPageToken"];
1550 }
1551 }
1552
1553 core.Map toJson() {
1554 var _json = new core.Map();
1555 if (items != null) {
1556 _json["items"] = items.map((value) => (value).toJson()).toList();
1557 }
1558 if (network != null) {
1559 _json["network"] = network;
1560 }
1561 if (nextPageToken != null) {
1562 _json["nextPageToken"] = nextPageToken;
1563 }
1564 return _json;
1565 }
1566 }
1567
1568
1569 /** The request to remove resources from the resource view. */
1570 class ZoneViewsRemoveResourcesRequest {
1571 /** The list of resources to be removed. */
1572 core.List<core.String> resources;
1573
1574
1575 ZoneViewsRemoveResourcesRequest();
1576
1577 ZoneViewsRemoveResourcesRequest.fromJson(core.Map _json) {
1578 if (_json.containsKey("resources")) {
1579 resources = _json["resources"];
1580 }
1581 }
1582
1583 core.Map toJson() {
1584 var _json = new core.Map();
1585 if (resources != null) {
1586 _json["resources"] = resources;
1587 }
1588 return _json;
1589 }
1590 }
1591
1592
1593 /** Not documented yet. */
1594 class ZoneViewsSetServiceRequest {
1595 /** The service information to be updated. */
1596 core.List<ServiceEndpoint> endpoints;
1597
1598 /**
1599 * Fingerprint of the service information; a hash of the contents. This field
1600 * is used for optimistic locking when updating the service entries.
1601 */
1602 core.String fingerprint;
1603
1604 /**
1605 * The name of the resource if user wants to update the service information of
1606 * the resource.
1607 */
1608 core.String resourceName;
1609
1610
1611 ZoneViewsSetServiceRequest();
1612
1613 ZoneViewsSetServiceRequest.fromJson(core.Map _json) {
1614 if (_json.containsKey("endpoints")) {
1615 endpoints = _json["endpoints"].map((value) => new ServiceEndpoint.fromJson (value)).toList();
1616 }
1617 if (_json.containsKey("fingerprint")) {
1618 fingerprint = _json["fingerprint"];
1619 }
1620 if (_json.containsKey("resourceName")) {
1621 resourceName = _json["resourceName"];
1622 }
1623 }
1624
1625 core.Map toJson() {
1626 var _json = new core.Map();
1627 if (endpoints != null) {
1628 _json["endpoints"] = endpoints.map((value) => (value).toJson()).toList();
1629 }
1630 if (fingerprint != null) {
1631 _json["fingerprint"] = fingerprint;
1632 }
1633 if (resourceName != null) {
1634 _json["resourceName"] = resourceName;
1635 }
1636 return _json;
1637 }
1638 }
1639
1640
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698