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

Side by Side Diff: generated/googleapis_beta/lib/resourceviews/v1beta1.dart

Issue 3006323002: Api-Roll 54: 2017-09-11 (Closed)
Patch Set: use 2.0.0-dev.infinity sdk constraint in pubspecs Created 3 years, 3 months 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 // This is a generated file (see the discoveryapis_generator project). 1 // This is a generated file (see the discoveryapis_generator project).
2 2
3 library googleapis_beta.resourceviews.v1beta1; 3 library googleapis_beta.resourceviews.v1beta1;
4 4
5 import 'dart:core' as core; 5 import 'dart:core' as core;
6 import 'dart:async' as async; 6 import 'dart:async' as async;
7 import 'dart:convert' as convert; 7 import 'dart:convert' as convert;
8 8
9 import 'package:_discoveryapis_commons/_discoveryapis_commons.dart' as commons; 9 import 'package:_discoveryapis_commons/_discoveryapis_commons.dart' as commons;
10 import 'package:http/http.dart' as http; 10 import 'package:http/http.dart' as http;
11 11
12 export 'package:_discoveryapis_commons/_discoveryapis_commons.dart' show 12 export 'package:_discoveryapis_commons/_discoveryapis_commons.dart'
13 ApiRequestError, DetailedApiRequestError; 13 show ApiRequestError, DetailedApiRequestError;
14 14
15 const core.String USER_AGENT = 'dart-api-client resourceviews/v1beta1'; 15 const core.String USER_AGENT = 'dart-api-client resourceviews/v1beta1';
16 16
17 /** 17 /// The Resource View API allows users to create and manage logical sets of
18 * The Resource View API allows users to create and manage logical sets of 18 /// Google Compute Engine instances.
19 * Google Compute Engine instances.
20 */
21 class ResourceviewsApi { 19 class ResourceviewsApi {
22 /** View and manage your data across Google Cloud Platform services */ 20 /// View and manage your data across Google Cloud Platform services
23 static const CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platf orm"; 21 static const CloudPlatformScope =
22 "https://www.googleapis.com/auth/cloud-platform";
24 23
25 /** View your data across Google Cloud Platform services */ 24 /// View your data across Google Cloud Platform services
26 static const CloudPlatformReadOnlyScope = "https://www.googleapis.com/auth/clo ud-platform.read-only"; 25 static const CloudPlatformReadOnlyScope =
26 "https://www.googleapis.com/auth/cloud-platform.read-only";
27 27
28 /** View and manage your Google Compute Engine resources */ 28 /// View and manage your Google Compute Engine resources
29 static const ComputeScope = "https://www.googleapis.com/auth/compute"; 29 static const ComputeScope = "https://www.googleapis.com/auth/compute";
30 30
31 /** View your Google Compute Engine resources */ 31 /// View your Google Compute Engine resources
32 static const ComputeReadonlyScope = "https://www.googleapis.com/auth/compute.r eadonly"; 32 static const ComputeReadonlyScope =
33 "https://www.googleapis.com/auth/compute.readonly";
33 34
34 /** 35 /// View and manage your Google Cloud Platform management resources and
35 * View and manage your Google Cloud Platform management resources and 36 /// deployment status information
36 * deployment status information 37 static const NdevCloudmanScope =
37 */ 38 "https://www.googleapis.com/auth/ndev.cloudman";
38 static const NdevCloudmanScope = "https://www.googleapis.com/auth/ndev.cloudma n";
39 39
40 /** 40 /// View your Google Cloud Platform management resources and deployment
41 * View your Google Cloud Platform management resources and deployment status 41 /// status information
42 * information 42 static const NdevCloudmanReadonlyScope =
43 */ 43 "https://www.googleapis.com/auth/ndev.cloudman.readonly";
44 static const NdevCloudmanReadonlyScope = "https://www.googleapis.com/auth/ndev .cloudman.readonly";
45
46 44
47 final commons.ApiRequester _requester; 45 final commons.ApiRequester _requester;
48 46
49 RegionViewsResourceApi get regionViews => new RegionViewsResourceApi(_requeste r); 47 RegionViewsResourceApi get regionViews =>
48 new RegionViewsResourceApi(_requester);
50 ZoneViewsResourceApi get zoneViews => new ZoneViewsResourceApi(_requester); 49 ZoneViewsResourceApi get zoneViews => new ZoneViewsResourceApi(_requester);
51 50
52 ResourceviewsApi(http.Client client, {core.String rootUrl: "https://www.google apis.com/", core.String servicePath: "resourceviews/v1beta1/projects/"}) : 51 ResourceviewsApi(http.Client client,
53 _requester = new commons.ApiRequester(client, rootUrl, servicePath, USER_A GENT); 52 {core.String rootUrl: "https://www.googleapis.com/",
53 core.String servicePath: "resourceviews/v1beta1/projects/"})
54 : _requester =
55 new commons.ApiRequester(client, rootUrl, servicePath, USER_AGENT);
54 } 56 }
55 57
56
57 class RegionViewsResourceApi { 58 class RegionViewsResourceApi {
58 final commons.ApiRequester _requester; 59 final commons.ApiRequester _requester;
59 60
60 RegionViewsResourceApi(commons.ApiRequester client) : 61 RegionViewsResourceApi(commons.ApiRequester client) : _requester = client;
61 _requester = client;
62 62
63 /** 63 /// Add resources to the view.
64 * Add resources to the view. 64 ///
65 * 65 /// [request] - The metadata request object.
66 * [request] - The metadata request object. 66 ///
67 * 67 /// Request parameters:
68 * Request parameters: 68 ///
69 * 69 /// [projectName] - The project name of the resource view.
70 * [projectName] - The project name of the resource view. 70 ///
71 * 71 /// [region] - The region name of the resource view.
72 * [region] - The region name of the resource view. 72 ///
73 * 73 /// [resourceViewName] - The name of the resource view.
74 * [resourceViewName] - The name of the resource view. 74 ///
75 * 75 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
76 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 76 /// an error.
77 * error. 77 ///
78 * 78 /// If the used [http.Client] completes with an error when making a REST
79 * If the used [http.Client] completes with an error when making a REST call, 79 /// call, this method will complete with the same error.
80 * this method will complete with the same error. 80 async.Future addresources(
81 */ 81 RegionViewsAddResourcesRequest request,
82 async.Future addresources(RegionViewsAddResourcesRequest request, core.String projectName, core.String region, core.String resourceViewName) { 82 core.String projectName,
83 core.String region,
84 core.String resourceViewName) {
83 var _url = null; 85 var _url = null;
84 var _queryParams = new core.Map(); 86 var _queryParams = new core.Map();
85 var _uploadMedia = null; 87 var _uploadMedia = null;
86 var _uploadOptions = null; 88 var _uploadOptions = null;
87 var _downloadOptions = commons.DownloadOptions.Metadata; 89 var _downloadOptions = commons.DownloadOptions.Metadata;
88 var _body = null; 90 var _body = null;
89 91
90 if (request != null) { 92 if (request != null) {
91 _body = convert.JSON.encode((request).toJson()); 93 _body = convert.JSON.encode((request).toJson());
92 } 94 }
93 if (projectName == null) { 95 if (projectName == null) {
94 throw new core.ArgumentError("Parameter projectName is required."); 96 throw new core.ArgumentError("Parameter projectName is required.");
95 } 97 }
96 if (region == null) { 98 if (region == null) {
97 throw new core.ArgumentError("Parameter region is required."); 99 throw new core.ArgumentError("Parameter region is required.");
98 } 100 }
99 if (resourceViewName == null) { 101 if (resourceViewName == null) {
100 throw new core.ArgumentError("Parameter resourceViewName is required."); 102 throw new core.ArgumentError("Parameter resourceViewName is required.");
101 } 103 }
102 104
103 _downloadOptions = null; 105 _downloadOptions = null;
104 106
105 _url = commons.Escaper.ecapeVariable('$projectName') + '/regions/' + commons .Escaper.ecapeVariable('$region') + '/resourceViews/' + commons.Escaper.ecapeVar iable('$resourceViewName') + '/addResources'; 107 _url = commons.Escaper.ecapeVariable('$projectName') +
108 '/regions/' +
109 commons.Escaper.ecapeVariable('$region') +
110 '/resourceViews/' +
111 commons.Escaper.ecapeVariable('$resourceViewName') +
112 '/addResources';
106 113
107 var _response = _requester.request(_url, 114 var _response = _requester.request(_url, "POST",
108 "POST", 115 body: _body,
109 body: _body, 116 queryParams: _queryParams,
110 queryParams: _queryParams, 117 uploadOptions: _uploadOptions,
111 uploadOptions: _uploadOptions, 118 uploadMedia: _uploadMedia,
112 uploadMedia: _uploadMedia, 119 downloadOptions: _downloadOptions);
113 downloadOptions: _downloadOptions);
114 return _response.then((data) => null); 120 return _response.then((data) => null);
115 } 121 }
116 122
117 /** 123 /// Delete a resource view.
118 * Delete a resource view. 124 ///
119 * 125 /// Request parameters:
120 * Request parameters: 126 ///
121 * 127 /// [projectName] - The project name of the resource view.
122 * [projectName] - The project name of the resource view. 128 ///
123 * 129 /// [region] - The region name of the resource view.
124 * [region] - The region name of the resource view. 130 ///
125 * 131 /// [resourceViewName] - The name of the resource view.
126 * [resourceViewName] - The name of the resource view. 132 ///
127 * 133 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
128 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 134 /// an error.
129 * error. 135 ///
130 * 136 /// If the used [http.Client] completes with an error when making a REST
131 * If the used [http.Client] completes with an error when making a REST call, 137 /// call, this method will complete with the same error.
132 * this method will complete with the same error. 138 async.Future delete(core.String projectName, core.String region,
133 */ 139 core.String resourceViewName) {
134 async.Future delete(core.String projectName, core.String region, core.String r esourceViewName) {
135 var _url = null; 140 var _url = null;
136 var _queryParams = new core.Map(); 141 var _queryParams = new core.Map();
137 var _uploadMedia = null; 142 var _uploadMedia = null;
138 var _uploadOptions = null; 143 var _uploadOptions = null;
139 var _downloadOptions = commons.DownloadOptions.Metadata; 144 var _downloadOptions = commons.DownloadOptions.Metadata;
140 var _body = null; 145 var _body = null;
141 146
142 if (projectName == null) { 147 if (projectName == null) {
143 throw new core.ArgumentError("Parameter projectName is required."); 148 throw new core.ArgumentError("Parameter projectName is required.");
144 } 149 }
145 if (region == null) { 150 if (region == null) {
146 throw new core.ArgumentError("Parameter region is required."); 151 throw new core.ArgumentError("Parameter region is required.");
147 } 152 }
148 if (resourceViewName == null) { 153 if (resourceViewName == null) {
149 throw new core.ArgumentError("Parameter resourceViewName is required."); 154 throw new core.ArgumentError("Parameter resourceViewName is required.");
150 } 155 }
151 156
152 _downloadOptions = null; 157 _downloadOptions = null;
153 158
154 _url = commons.Escaper.ecapeVariable('$projectName') + '/regions/' + commons .Escaper.ecapeVariable('$region') + '/resourceViews/' + commons.Escaper.ecapeVar iable('$resourceViewName'); 159 _url = commons.Escaper.ecapeVariable('$projectName') +
160 '/regions/' +
161 commons.Escaper.ecapeVariable('$region') +
162 '/resourceViews/' +
163 commons.Escaper.ecapeVariable('$resourceViewName');
155 164
156 var _response = _requester.request(_url, 165 var _response = _requester.request(_url, "DELETE",
157 "DELETE", 166 body: _body,
158 body: _body, 167 queryParams: _queryParams,
159 queryParams: _queryParams, 168 uploadOptions: _uploadOptions,
160 uploadOptions: _uploadOptions, 169 uploadMedia: _uploadMedia,
161 uploadMedia: _uploadMedia, 170 downloadOptions: _downloadOptions);
162 downloadOptions: _downloadOptions);
163 return _response.then((data) => null); 171 return _response.then((data) => null);
164 } 172 }
165 173
166 /** 174 /// Get the information of a resource view.
167 * Get the information of a resource view. 175 ///
168 * 176 /// Request parameters:
169 * Request parameters: 177 ///
170 * 178 /// [projectName] - The project name of the resource view.
171 * [projectName] - The project name of the resource view. 179 ///
172 * 180 /// [region] - The region name of the resource view.
173 * [region] - The region name of the resource view. 181 ///
174 * 182 /// [resourceViewName] - The name of the resource view.
175 * [resourceViewName] - The name of the resource view. 183 ///
176 * 184 /// Completes with a [ResourceView].
177 * Completes with a [ResourceView]. 185 ///
178 * 186 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
179 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 187 /// an error.
180 * error. 188 ///
181 * 189 /// If the used [http.Client] completes with an error when making a REST
182 * If the used [http.Client] completes with an error when making a REST call, 190 /// call, this method will complete with the same error.
183 * this method will complete with the same error. 191 async.Future<ResourceView> get(core.String projectName, core.String region,
184 */ 192 core.String resourceViewName) {
185 async.Future<ResourceView> get(core.String projectName, core.String region, co re.String resourceViewName) {
186 var _url = null; 193 var _url = null;
187 var _queryParams = new core.Map(); 194 var _queryParams = new core.Map();
188 var _uploadMedia = null; 195 var _uploadMedia = null;
189 var _uploadOptions = null; 196 var _uploadOptions = null;
190 var _downloadOptions = commons.DownloadOptions.Metadata; 197 var _downloadOptions = commons.DownloadOptions.Metadata;
191 var _body = null; 198 var _body = null;
192 199
193 if (projectName == null) { 200 if (projectName == null) {
194 throw new core.ArgumentError("Parameter projectName is required."); 201 throw new core.ArgumentError("Parameter projectName is required.");
195 } 202 }
196 if (region == null) { 203 if (region == null) {
197 throw new core.ArgumentError("Parameter region is required."); 204 throw new core.ArgumentError("Parameter region is required.");
198 } 205 }
199 if (resourceViewName == null) { 206 if (resourceViewName == null) {
200 throw new core.ArgumentError("Parameter resourceViewName is required."); 207 throw new core.ArgumentError("Parameter resourceViewName is required.");
201 } 208 }
202 209
203 _url = commons.Escaper.ecapeVariable('$projectName') + '/regions/' + commons .Escaper.ecapeVariable('$region') + '/resourceViews/' + commons.Escaper.ecapeVar iable('$resourceViewName'); 210 _url = commons.Escaper.ecapeVariable('$projectName') +
211 '/regions/' +
212 commons.Escaper.ecapeVariable('$region') +
213 '/resourceViews/' +
214 commons.Escaper.ecapeVariable('$resourceViewName');
204 215
205 var _response = _requester.request(_url, 216 var _response = _requester.request(_url, "GET",
206 "GET", 217 body: _body,
207 body: _body, 218 queryParams: _queryParams,
208 queryParams: _queryParams, 219 uploadOptions: _uploadOptions,
209 uploadOptions: _uploadOptions, 220 uploadMedia: _uploadMedia,
210 uploadMedia: _uploadMedia, 221 downloadOptions: _downloadOptions);
211 downloadOptions: _downloadOptions);
212 return _response.then((data) => new ResourceView.fromJson(data)); 222 return _response.then((data) => new ResourceView.fromJson(data));
213 } 223 }
214 224
215 /** 225 /// Create a resource view.
216 * Create a resource view. 226 ///
217 * 227 /// [request] - The metadata request object.
218 * [request] - The metadata request object. 228 ///
219 * 229 /// Request parameters:
220 * Request parameters: 230 ///
221 * 231 /// [projectName] - The project name of the resource view.
222 * [projectName] - The project name of the resource view. 232 ///
223 * 233 /// [region] - The region name of the resource view.
224 * [region] - The region name of the resource view. 234 ///
225 * 235 /// Completes with a [RegionViewsInsertResponse].
226 * Completes with a [RegionViewsInsertResponse]. 236 ///
227 * 237 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
228 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 238 /// an error.
229 * error. 239 ///
230 * 240 /// If the used [http.Client] completes with an error when making a REST
231 * If the used [http.Client] completes with an error when making a REST call, 241 /// call, this method will complete with the same error.
232 * this method will complete with the same error. 242 async.Future<RegionViewsInsertResponse> insert(
233 */ 243 ResourceView request, core.String projectName, core.String region) {
234 async.Future<RegionViewsInsertResponse> insert(ResourceView request, core.Stri ng projectName, core.String region) {
235 var _url = null; 244 var _url = null;
236 var _queryParams = new core.Map(); 245 var _queryParams = new core.Map();
237 var _uploadMedia = null; 246 var _uploadMedia = null;
238 var _uploadOptions = null; 247 var _uploadOptions = null;
239 var _downloadOptions = commons.DownloadOptions.Metadata; 248 var _downloadOptions = commons.DownloadOptions.Metadata;
240 var _body = null; 249 var _body = null;
241 250
242 if (request != null) { 251 if (request != null) {
243 _body = convert.JSON.encode((request).toJson()); 252 _body = convert.JSON.encode((request).toJson());
244 } 253 }
245 if (projectName == null) { 254 if (projectName == null) {
246 throw new core.ArgumentError("Parameter projectName is required."); 255 throw new core.ArgumentError("Parameter projectName is required.");
247 } 256 }
248 if (region == null) { 257 if (region == null) {
249 throw new core.ArgumentError("Parameter region is required."); 258 throw new core.ArgumentError("Parameter region is required.");
250 } 259 }
251 260
252 _url = commons.Escaper.ecapeVariable('$projectName') + '/regions/' + commons .Escaper.ecapeVariable('$region') + '/resourceViews'; 261 _url = commons.Escaper.ecapeVariable('$projectName') +
262 '/regions/' +
263 commons.Escaper.ecapeVariable('$region') +
264 '/resourceViews';
253 265
254 var _response = _requester.request(_url, 266 var _response = _requester.request(_url, "POST",
255 "POST", 267 body: _body,
256 body: _body, 268 queryParams: _queryParams,
257 queryParams: _queryParams, 269 uploadOptions: _uploadOptions,
258 uploadOptions: _uploadOptions, 270 uploadMedia: _uploadMedia,
259 uploadMedia: _uploadMedia, 271 downloadOptions: _downloadOptions);
260 downloadOptions: _downloadOptions); 272 return _response
261 return _response.then((data) => new RegionViewsInsertResponse.fromJson(data) ); 273 .then((data) => new RegionViewsInsertResponse.fromJson(data));
262 } 274 }
263 275
264 /** 276 /// List resource views.
265 * List resource views. 277 ///
266 * 278 /// Request parameters:
267 * Request parameters: 279 ///
268 * 280 /// [projectName] - The project name of the resource view.
269 * [projectName] - The project name of the resource view. 281 ///
270 * 282 /// [region] - The region name of the resource view.
271 * [region] - The region name of the resource view. 283 ///
272 * 284 /// [maxResults] - Maximum count of results to be returned. Acceptable values
273 * [maxResults] - Maximum count of results to be returned. Acceptable values 285 /// are 0 to 5000, inclusive. (Default: 5000)
274 * are 0 to 5000, inclusive. (Default: 5000) 286 /// Value must be between "0" and "5000".
275 * Value must be between "0" and "5000". 287 ///
276 * 288 /// [pageToken] - Specifies a nextPageToken returned by a previous list
277 * [pageToken] - Specifies a nextPageToken returned by a previous list 289 /// request. This token can be used to request the next page of results from
278 * request. This token can be used to request the next page of results from a 290 /// a previous list request.
279 * previous list request. 291 ///
280 * 292 /// Completes with a [RegionViewsListResponse].
281 * Completes with a [RegionViewsListResponse]. 293 ///
282 * 294 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
283 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 295 /// an error.
284 * error. 296 ///
285 * 297 /// If the used [http.Client] completes with an error when making a REST
286 * If the used [http.Client] completes with an error when making a REST call, 298 /// call, this method will complete with the same error.
287 * this method will complete with the same error. 299 async.Future<RegionViewsListResponse> list(
288 */ 300 core.String projectName, core.String region,
289 async.Future<RegionViewsListResponse> list(core.String projectName, core.Strin g region, {core.int maxResults, core.String pageToken}) { 301 {core.int maxResults, core.String pageToken}) {
290 var _url = null; 302 var _url = null;
291 var _queryParams = new core.Map(); 303 var _queryParams = new core.Map();
292 var _uploadMedia = null; 304 var _uploadMedia = null;
293 var _uploadOptions = null; 305 var _uploadOptions = null;
294 var _downloadOptions = commons.DownloadOptions.Metadata; 306 var _downloadOptions = commons.DownloadOptions.Metadata;
295 var _body = null; 307 var _body = null;
296 308
297 if (projectName == null) { 309 if (projectName == null) {
298 throw new core.ArgumentError("Parameter projectName is required."); 310 throw new core.ArgumentError("Parameter projectName is required.");
299 } 311 }
300 if (region == null) { 312 if (region == null) {
301 throw new core.ArgumentError("Parameter region is required."); 313 throw new core.ArgumentError("Parameter region is required.");
302 } 314 }
303 if (maxResults != null) { 315 if (maxResults != null) {
304 _queryParams["maxResults"] = ["${maxResults}"]; 316 _queryParams["maxResults"] = ["${maxResults}"];
305 } 317 }
306 if (pageToken != null) { 318 if (pageToken != null) {
307 _queryParams["pageToken"] = [pageToken]; 319 _queryParams["pageToken"] = [pageToken];
308 } 320 }
309 321
310 _url = commons.Escaper.ecapeVariable('$projectName') + '/regions/' + commons .Escaper.ecapeVariable('$region') + '/resourceViews'; 322 _url = commons.Escaper.ecapeVariable('$projectName') +
323 '/regions/' +
324 commons.Escaper.ecapeVariable('$region') +
325 '/resourceViews';
311 326
312 var _response = _requester.request(_url, 327 var _response = _requester.request(_url, "GET",
313 "GET", 328 body: _body,
314 body: _body, 329 queryParams: _queryParams,
315 queryParams: _queryParams, 330 uploadOptions: _uploadOptions,
316 uploadOptions: _uploadOptions, 331 uploadMedia: _uploadMedia,
317 uploadMedia: _uploadMedia, 332 downloadOptions: _downloadOptions);
318 downloadOptions: _downloadOptions);
319 return _response.then((data) => new RegionViewsListResponse.fromJson(data)); 333 return _response.then((data) => new RegionViewsListResponse.fromJson(data));
320 } 334 }
321 335
322 /** 336 /// List the resources in the view.
323 * List the resources in the view. 337 ///
324 * 338 /// Request parameters:
325 * Request parameters: 339 ///
326 * 340 /// [projectName] - The project name of the resource view.
327 * [projectName] - The project name of the resource view. 341 ///
328 * 342 /// [region] - The region name of the resource view.
329 * [region] - The region name of the resource view. 343 ///
330 * 344 /// [resourceViewName] - The name of the resource view.
331 * [resourceViewName] - The name of the resource view. 345 ///
332 * 346 /// [maxResults] - Maximum count of results to be returned. Acceptable values
333 * [maxResults] - Maximum count of results to be returned. Acceptable values 347 /// are 0 to 5000, inclusive. (Default: 5000)
334 * are 0 to 5000, inclusive. (Default: 5000) 348 /// Value must be between "0" and "5000".
335 * Value must be between "0" and "5000". 349 ///
336 * 350 /// [pageToken] - Specifies a nextPageToken returned by a previous list
337 * [pageToken] - Specifies a nextPageToken returned by a previous list 351 /// request. This token can be used to request the next page of results from
338 * request. This token can be used to request the next page of results from a 352 /// a previous list request.
339 * previous list request. 353 ///
340 * 354 /// Completes with a [RegionViewsListResourcesResponse].
341 * Completes with a [RegionViewsListResourcesResponse]. 355 ///
342 * 356 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
343 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 357 /// an error.
344 * error. 358 ///
345 * 359 /// If the used [http.Client] completes with an error when making a REST
346 * If the used [http.Client] completes with an error when making a REST call, 360 /// call, this method will complete with the same error.
347 * this method will complete with the same error. 361 async.Future<RegionViewsListResourcesResponse> listresources(
348 */ 362 core.String projectName, core.String region, core.String resourceViewName,
349 async.Future<RegionViewsListResourcesResponse> listresources(core.String proje ctName, core.String region, core.String resourceViewName, {core.int maxResults, core.String pageToken}) { 363 {core.int maxResults, core.String pageToken}) {
350 var _url = null; 364 var _url = null;
351 var _queryParams = new core.Map(); 365 var _queryParams = new core.Map();
352 var _uploadMedia = null; 366 var _uploadMedia = null;
353 var _uploadOptions = null; 367 var _uploadOptions = null;
354 var _downloadOptions = commons.DownloadOptions.Metadata; 368 var _downloadOptions = commons.DownloadOptions.Metadata;
355 var _body = null; 369 var _body = null;
356 370
357 if (projectName == null) { 371 if (projectName == null) {
358 throw new core.ArgumentError("Parameter projectName is required."); 372 throw new core.ArgumentError("Parameter projectName is required.");
359 } 373 }
360 if (region == null) { 374 if (region == null) {
361 throw new core.ArgumentError("Parameter region is required."); 375 throw new core.ArgumentError("Parameter region is required.");
362 } 376 }
363 if (resourceViewName == null) { 377 if (resourceViewName == null) {
364 throw new core.ArgumentError("Parameter resourceViewName is required."); 378 throw new core.ArgumentError("Parameter resourceViewName is required.");
365 } 379 }
366 if (maxResults != null) { 380 if (maxResults != null) {
367 _queryParams["maxResults"] = ["${maxResults}"]; 381 _queryParams["maxResults"] = ["${maxResults}"];
368 } 382 }
369 if (pageToken != null) { 383 if (pageToken != null) {
370 _queryParams["pageToken"] = [pageToken]; 384 _queryParams["pageToken"] = [pageToken];
371 } 385 }
372 386
373 _url = commons.Escaper.ecapeVariable('$projectName') + '/regions/' + commons .Escaper.ecapeVariable('$region') + '/resourceViews/' + commons.Escaper.ecapeVar iable('$resourceViewName') + '/resources'; 387 _url = commons.Escaper.ecapeVariable('$projectName') +
388 '/regions/' +
389 commons.Escaper.ecapeVariable('$region') +
390 '/resourceViews/' +
391 commons.Escaper.ecapeVariable('$resourceViewName') +
392 '/resources';
374 393
375 var _response = _requester.request(_url, 394 var _response = _requester.request(_url, "POST",
376 "POST", 395 body: _body,
377 body: _body, 396 queryParams: _queryParams,
378 queryParams: _queryParams, 397 uploadOptions: _uploadOptions,
379 uploadOptions: _uploadOptions, 398 uploadMedia: _uploadMedia,
380 uploadMedia: _uploadMedia, 399 downloadOptions: _downloadOptions);
381 downloadOptions: _downloadOptions); 400 return _response
382 return _response.then((data) => new RegionViewsListResourcesResponse.fromJso n(data)); 401 .then((data) => new RegionViewsListResourcesResponse.fromJson(data));
383 } 402 }
384 403
385 /** 404 /// Remove resources from the view.
386 * Remove resources from the view. 405 ///
387 * 406 /// [request] - The metadata request object.
388 * [request] - The metadata request object. 407 ///
389 * 408 /// Request parameters:
390 * Request parameters: 409 ///
391 * 410 /// [projectName] - The project name of the resource view.
392 * [projectName] - The project name of the resource view. 411 ///
393 * 412 /// [region] - The region name of the resource view.
394 * [region] - The region name of the resource view. 413 ///
395 * 414 /// [resourceViewName] - The name of the resource view.
396 * [resourceViewName] - The name of the resource view. 415 ///
397 * 416 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
398 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 417 /// an error.
399 * error. 418 ///
400 * 419 /// If the used [http.Client] completes with an error when making a REST
401 * If the used [http.Client] completes with an error when making a REST call, 420 /// call, this method will complete with the same error.
402 * this method will complete with the same error. 421 async.Future removeresources(
403 */ 422 RegionViewsRemoveResourcesRequest request,
404 async.Future removeresources(RegionViewsRemoveResourcesRequest request, core.S tring projectName, core.String region, core.String resourceViewName) { 423 core.String projectName,
424 core.String region,
425 core.String resourceViewName) {
405 var _url = null; 426 var _url = null;
406 var _queryParams = new core.Map(); 427 var _queryParams = new core.Map();
407 var _uploadMedia = null; 428 var _uploadMedia = null;
408 var _uploadOptions = null; 429 var _uploadOptions = null;
409 var _downloadOptions = commons.DownloadOptions.Metadata; 430 var _downloadOptions = commons.DownloadOptions.Metadata;
410 var _body = null; 431 var _body = null;
411 432
412 if (request != null) { 433 if (request != null) {
413 _body = convert.JSON.encode((request).toJson()); 434 _body = convert.JSON.encode((request).toJson());
414 } 435 }
415 if (projectName == null) { 436 if (projectName == null) {
416 throw new core.ArgumentError("Parameter projectName is required."); 437 throw new core.ArgumentError("Parameter projectName is required.");
417 } 438 }
418 if (region == null) { 439 if (region == null) {
419 throw new core.ArgumentError("Parameter region is required."); 440 throw new core.ArgumentError("Parameter region is required.");
420 } 441 }
421 if (resourceViewName == null) { 442 if (resourceViewName == null) {
422 throw new core.ArgumentError("Parameter resourceViewName is required."); 443 throw new core.ArgumentError("Parameter resourceViewName is required.");
423 } 444 }
424 445
425 _downloadOptions = null; 446 _downloadOptions = null;
426 447
427 _url = commons.Escaper.ecapeVariable('$projectName') + '/regions/' + commons .Escaper.ecapeVariable('$region') + '/resourceViews/' + commons.Escaper.ecapeVar iable('$resourceViewName') + '/removeResources'; 448 _url = commons.Escaper.ecapeVariable('$projectName') +
449 '/regions/' +
450 commons.Escaper.ecapeVariable('$region') +
451 '/resourceViews/' +
452 commons.Escaper.ecapeVariable('$resourceViewName') +
453 '/removeResources';
428 454
429 var _response = _requester.request(_url, 455 var _response = _requester.request(_url, "POST",
430 "POST", 456 body: _body,
431 body: _body, 457 queryParams: _queryParams,
432 queryParams: _queryParams, 458 uploadOptions: _uploadOptions,
433 uploadOptions: _uploadOptions, 459 uploadMedia: _uploadMedia,
434 uploadMedia: _uploadMedia, 460 downloadOptions: _downloadOptions);
435 downloadOptions: _downloadOptions);
436 return _response.then((data) => null); 461 return _response.then((data) => null);
437 } 462 }
438
439 } 463 }
440 464
441
442 class ZoneViewsResourceApi { 465 class ZoneViewsResourceApi {
443 final commons.ApiRequester _requester; 466 final commons.ApiRequester _requester;
444 467
445 ZoneViewsResourceApi(commons.ApiRequester client) : 468 ZoneViewsResourceApi(commons.ApiRequester client) : _requester = client;
446 _requester = client;
447 469
448 /** 470 /// Add resources to the view.
449 * Add resources to the view. 471 ///
450 * 472 /// [request] - The metadata request object.
451 * [request] - The metadata request object. 473 ///
452 * 474 /// Request parameters:
453 * Request parameters: 475 ///
454 * 476 /// [projectName] - The project name of the resource view.
455 * [projectName] - The project name of the resource view. 477 ///
456 * 478 /// [zone] - The zone name of the resource view.
457 * [zone] - The zone name of the resource view. 479 ///
458 * 480 /// [resourceViewName] - The name of the resource view.
459 * [resourceViewName] - The name of the resource view. 481 ///
460 * 482 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
461 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 483 /// an error.
462 * error. 484 ///
463 * 485 /// If the used [http.Client] completes with an error when making a REST
464 * If the used [http.Client] completes with an error when making a REST call, 486 /// call, this method will complete with the same error.
465 * this method will complete with the same error. 487 async.Future addresources(ZoneViewsAddResourcesRequest request,
466 */ 488 core.String projectName, core.String zone, core.String resourceViewName) {
467 async.Future addresources(ZoneViewsAddResourcesRequest request, core.String pr ojectName, core.String zone, core.String resourceViewName) {
468 var _url = null; 489 var _url = null;
469 var _queryParams = new core.Map(); 490 var _queryParams = new core.Map();
470 var _uploadMedia = null; 491 var _uploadMedia = null;
471 var _uploadOptions = null; 492 var _uploadOptions = null;
472 var _downloadOptions = commons.DownloadOptions.Metadata; 493 var _downloadOptions = commons.DownloadOptions.Metadata;
473 var _body = null; 494 var _body = null;
474 495
475 if (request != null) { 496 if (request != null) {
476 _body = convert.JSON.encode((request).toJson()); 497 _body = convert.JSON.encode((request).toJson());
477 } 498 }
478 if (projectName == null) { 499 if (projectName == null) {
479 throw new core.ArgumentError("Parameter projectName is required."); 500 throw new core.ArgumentError("Parameter projectName is required.");
480 } 501 }
481 if (zone == null) { 502 if (zone == null) {
482 throw new core.ArgumentError("Parameter zone is required."); 503 throw new core.ArgumentError("Parameter zone is required.");
483 } 504 }
484 if (resourceViewName == null) { 505 if (resourceViewName == null) {
485 throw new core.ArgumentError("Parameter resourceViewName is required."); 506 throw new core.ArgumentError("Parameter resourceViewName is required.");
486 } 507 }
487 508
488 _downloadOptions = null; 509 _downloadOptions = null;
489 510
490 _url = commons.Escaper.ecapeVariable('$projectName') + '/zones/' + commons.E scaper.ecapeVariable('$zone') + '/resourceViews/' + commons.Escaper.ecapeVariabl e('$resourceViewName') + '/addResources'; 511 _url = commons.Escaper.ecapeVariable('$projectName') +
512 '/zones/' +
513 commons.Escaper.ecapeVariable('$zone') +
514 '/resourceViews/' +
515 commons.Escaper.ecapeVariable('$resourceViewName') +
516 '/addResources';
491 517
492 var _response = _requester.request(_url, 518 var _response = _requester.request(_url, "POST",
493 "POST", 519 body: _body,
494 body: _body, 520 queryParams: _queryParams,
495 queryParams: _queryParams, 521 uploadOptions: _uploadOptions,
496 uploadOptions: _uploadOptions, 522 uploadMedia: _uploadMedia,
497 uploadMedia: _uploadMedia, 523 downloadOptions: _downloadOptions);
498 downloadOptions: _downloadOptions);
499 return _response.then((data) => null); 524 return _response.then((data) => null);
500 } 525 }
501 526
502 /** 527 /// Delete a resource view.
503 * Delete a resource view. 528 ///
504 * 529 /// Request parameters:
505 * Request parameters: 530 ///
506 * 531 /// [projectName] - The project name of the resource view.
507 * [projectName] - The project name of the resource view. 532 ///
508 * 533 /// [zone] - The zone name of the resource view.
509 * [zone] - The zone name of the resource view. 534 ///
510 * 535 /// [resourceViewName] - The name of the resource view.
511 * [resourceViewName] - The name of the resource view. 536 ///
512 * 537 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
513 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 538 /// an error.
514 * error. 539 ///
515 * 540 /// If the used [http.Client] completes with an error when making a REST
516 * If the used [http.Client] completes with an error when making a REST call, 541 /// call, this method will complete with the same error.
517 * this method will complete with the same error. 542 async.Future delete(
518 */ 543 core.String projectName, core.String zone, core.String resourceViewName) {
519 async.Future delete(core.String projectName, core.String zone, core.String res ourceViewName) {
520 var _url = null; 544 var _url = null;
521 var _queryParams = new core.Map(); 545 var _queryParams = new core.Map();
522 var _uploadMedia = null; 546 var _uploadMedia = null;
523 var _uploadOptions = null; 547 var _uploadOptions = null;
524 var _downloadOptions = commons.DownloadOptions.Metadata; 548 var _downloadOptions = commons.DownloadOptions.Metadata;
525 var _body = null; 549 var _body = null;
526 550
527 if (projectName == null) { 551 if (projectName == null) {
528 throw new core.ArgumentError("Parameter projectName is required."); 552 throw new core.ArgumentError("Parameter projectName is required.");
529 } 553 }
530 if (zone == null) { 554 if (zone == null) {
531 throw new core.ArgumentError("Parameter zone is required."); 555 throw new core.ArgumentError("Parameter zone is required.");
532 } 556 }
533 if (resourceViewName == null) { 557 if (resourceViewName == null) {
534 throw new core.ArgumentError("Parameter resourceViewName is required."); 558 throw new core.ArgumentError("Parameter resourceViewName is required.");
535 } 559 }
536 560
537 _downloadOptions = null; 561 _downloadOptions = null;
538 562
539 _url = commons.Escaper.ecapeVariable('$projectName') + '/zones/' + commons.E scaper.ecapeVariable('$zone') + '/resourceViews/' + commons.Escaper.ecapeVariabl e('$resourceViewName'); 563 _url = commons.Escaper.ecapeVariable('$projectName') +
564 '/zones/' +
565 commons.Escaper.ecapeVariable('$zone') +
566 '/resourceViews/' +
567 commons.Escaper.ecapeVariable('$resourceViewName');
540 568
541 var _response = _requester.request(_url, 569 var _response = _requester.request(_url, "DELETE",
542 "DELETE", 570 body: _body,
543 body: _body, 571 queryParams: _queryParams,
544 queryParams: _queryParams, 572 uploadOptions: _uploadOptions,
545 uploadOptions: _uploadOptions, 573 uploadMedia: _uploadMedia,
546 uploadMedia: _uploadMedia, 574 downloadOptions: _downloadOptions);
547 downloadOptions: _downloadOptions);
548 return _response.then((data) => null); 575 return _response.then((data) => null);
549 } 576 }
550 577
551 /** 578 /// Get the information of a zonal resource view.
552 * Get the information of a zonal resource view. 579 ///
553 * 580 /// Request parameters:
554 * Request parameters: 581 ///
555 * 582 /// [projectName] - The project name of the resource view.
556 * [projectName] - The project name of the resource view. 583 ///
557 * 584 /// [zone] - The zone name of the resource view.
558 * [zone] - The zone name of the resource view. 585 ///
559 * 586 /// [resourceViewName] - The name of the resource view.
560 * [resourceViewName] - The name of the resource view. 587 ///
561 * 588 /// Completes with a [ResourceView].
562 * Completes with a [ResourceView]. 589 ///
563 * 590 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
564 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 591 /// an error.
565 * error. 592 ///
566 * 593 /// If the used [http.Client] completes with an error when making a REST
567 * If the used [http.Client] completes with an error when making a REST call, 594 /// call, this method will complete with the same error.
568 * this method will complete with the same error. 595 async.Future<ResourceView> get(
569 */ 596 core.String projectName, core.String zone, core.String resourceViewName) {
570 async.Future<ResourceView> get(core.String projectName, core.String zone, core .String resourceViewName) {
571 var _url = null; 597 var _url = null;
572 var _queryParams = new core.Map(); 598 var _queryParams = new core.Map();
573 var _uploadMedia = null; 599 var _uploadMedia = null;
574 var _uploadOptions = null; 600 var _uploadOptions = null;
575 var _downloadOptions = commons.DownloadOptions.Metadata; 601 var _downloadOptions = commons.DownloadOptions.Metadata;
576 var _body = null; 602 var _body = null;
577 603
578 if (projectName == null) { 604 if (projectName == null) {
579 throw new core.ArgumentError("Parameter projectName is required."); 605 throw new core.ArgumentError("Parameter projectName is required.");
580 } 606 }
581 if (zone == null) { 607 if (zone == null) {
582 throw new core.ArgumentError("Parameter zone is required."); 608 throw new core.ArgumentError("Parameter zone is required.");
583 } 609 }
584 if (resourceViewName == null) { 610 if (resourceViewName == null) {
585 throw new core.ArgumentError("Parameter resourceViewName is required."); 611 throw new core.ArgumentError("Parameter resourceViewName is required.");
586 } 612 }
587 613
588 _url = commons.Escaper.ecapeVariable('$projectName') + '/zones/' + commons.E scaper.ecapeVariable('$zone') + '/resourceViews/' + commons.Escaper.ecapeVariabl e('$resourceViewName'); 614 _url = commons.Escaper.ecapeVariable('$projectName') +
615 '/zones/' +
616 commons.Escaper.ecapeVariable('$zone') +
617 '/resourceViews/' +
618 commons.Escaper.ecapeVariable('$resourceViewName');
589 619
590 var _response = _requester.request(_url, 620 var _response = _requester.request(_url, "GET",
591 "GET", 621 body: _body,
592 body: _body, 622 queryParams: _queryParams,
593 queryParams: _queryParams, 623 uploadOptions: _uploadOptions,
594 uploadOptions: _uploadOptions, 624 uploadMedia: _uploadMedia,
595 uploadMedia: _uploadMedia, 625 downloadOptions: _downloadOptions);
596 downloadOptions: _downloadOptions);
597 return _response.then((data) => new ResourceView.fromJson(data)); 626 return _response.then((data) => new ResourceView.fromJson(data));
598 } 627 }
599 628
600 /** 629 /// Create a resource view.
601 * Create a resource view. 630 ///
602 * 631 /// [request] - The metadata request object.
603 * [request] - The metadata request object. 632 ///
604 * 633 /// Request parameters:
605 * Request parameters: 634 ///
606 * 635 /// [projectName] - The project name of the resource view.
607 * [projectName] - The project name of the resource view. 636 ///
608 * 637 /// [zone] - The zone name of the resource view.
609 * [zone] - The zone name of the resource view. 638 ///
610 * 639 /// Completes with a [ZoneViewsInsertResponse].
611 * Completes with a [ZoneViewsInsertResponse]. 640 ///
612 * 641 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
613 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 642 /// an error.
614 * error. 643 ///
615 * 644 /// If the used [http.Client] completes with an error when making a REST
616 * If the used [http.Client] completes with an error when making a REST call, 645 /// call, this method will complete with the same error.
617 * this method will complete with the same error. 646 async.Future<ZoneViewsInsertResponse> insert(
618 */ 647 ResourceView request, core.String projectName, core.String zone) {
619 async.Future<ZoneViewsInsertResponse> insert(ResourceView request, core.String projectName, core.String zone) {
620 var _url = null; 648 var _url = null;
621 var _queryParams = new core.Map(); 649 var _queryParams = new core.Map();
622 var _uploadMedia = null; 650 var _uploadMedia = null;
623 var _uploadOptions = null; 651 var _uploadOptions = null;
624 var _downloadOptions = commons.DownloadOptions.Metadata; 652 var _downloadOptions = commons.DownloadOptions.Metadata;
625 var _body = null; 653 var _body = null;
626 654
627 if (request != null) { 655 if (request != null) {
628 _body = convert.JSON.encode((request).toJson()); 656 _body = convert.JSON.encode((request).toJson());
629 } 657 }
630 if (projectName == null) { 658 if (projectName == null) {
631 throw new core.ArgumentError("Parameter projectName is required."); 659 throw new core.ArgumentError("Parameter projectName is required.");
632 } 660 }
633 if (zone == null) { 661 if (zone == null) {
634 throw new core.ArgumentError("Parameter zone is required."); 662 throw new core.ArgumentError("Parameter zone is required.");
635 } 663 }
636 664
637 _url = commons.Escaper.ecapeVariable('$projectName') + '/zones/' + commons.E scaper.ecapeVariable('$zone') + '/resourceViews'; 665 _url = commons.Escaper.ecapeVariable('$projectName') +
666 '/zones/' +
667 commons.Escaper.ecapeVariable('$zone') +
668 '/resourceViews';
638 669
639 var _response = _requester.request(_url, 670 var _response = _requester.request(_url, "POST",
640 "POST", 671 body: _body,
641 body: _body, 672 queryParams: _queryParams,
642 queryParams: _queryParams, 673 uploadOptions: _uploadOptions,
643 uploadOptions: _uploadOptions, 674 uploadMedia: _uploadMedia,
644 uploadMedia: _uploadMedia, 675 downloadOptions: _downloadOptions);
645 downloadOptions: _downloadOptions);
646 return _response.then((data) => new ZoneViewsInsertResponse.fromJson(data)); 676 return _response.then((data) => new ZoneViewsInsertResponse.fromJson(data));
647 } 677 }
648 678
649 /** 679 /// List resource views.
650 * List resource views. 680 ///
651 * 681 /// Request parameters:
652 * Request parameters: 682 ///
653 * 683 /// [projectName] - The project name of the resource view.
654 * [projectName] - The project name of the resource view. 684 ///
655 * 685 /// [zone] - The zone name of the resource view.
656 * [zone] - The zone name of the resource view. 686 ///
657 * 687 /// [maxResults] - Maximum count of results to be returned. Acceptable values
658 * [maxResults] - Maximum count of results to be returned. Acceptable values 688 /// are 0 to 5000, inclusive. (Default: 5000)
659 * are 0 to 5000, inclusive. (Default: 5000) 689 /// Value must be between "0" and "5000".
660 * Value must be between "0" and "5000". 690 ///
661 * 691 /// [pageToken] - Specifies a nextPageToken returned by a previous list
662 * [pageToken] - Specifies a nextPageToken returned by a previous list 692 /// request. This token can be used to request the next page of results from
663 * request. This token can be used to request the next page of results from a 693 /// a previous list request.
664 * previous list request. 694 ///
665 * 695 /// Completes with a [ZoneViewsListResponse].
666 * Completes with a [ZoneViewsListResponse]. 696 ///
667 * 697 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
668 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 698 /// an error.
669 * error. 699 ///
670 * 700 /// If the used [http.Client] completes with an error when making a REST
671 * If the used [http.Client] completes with an error when making a REST call, 701 /// call, this method will complete with the same error.
672 * this method will complete with the same error. 702 async.Future<ZoneViewsListResponse> list(
673 */ 703 core.String projectName, core.String zone,
674 async.Future<ZoneViewsListResponse> list(core.String projectName, core.String zone, {core.int maxResults, core.String pageToken}) { 704 {core.int maxResults, core.String pageToken}) {
675 var _url = null; 705 var _url = null;
676 var _queryParams = new core.Map(); 706 var _queryParams = new core.Map();
677 var _uploadMedia = null; 707 var _uploadMedia = null;
678 var _uploadOptions = null; 708 var _uploadOptions = null;
679 var _downloadOptions = commons.DownloadOptions.Metadata; 709 var _downloadOptions = commons.DownloadOptions.Metadata;
680 var _body = null; 710 var _body = null;
681 711
682 if (projectName == null) { 712 if (projectName == null) {
683 throw new core.ArgumentError("Parameter projectName is required."); 713 throw new core.ArgumentError("Parameter projectName is required.");
684 } 714 }
685 if (zone == null) { 715 if (zone == null) {
686 throw new core.ArgumentError("Parameter zone is required."); 716 throw new core.ArgumentError("Parameter zone is required.");
687 } 717 }
688 if (maxResults != null) { 718 if (maxResults != null) {
689 _queryParams["maxResults"] = ["${maxResults}"]; 719 _queryParams["maxResults"] = ["${maxResults}"];
690 } 720 }
691 if (pageToken != null) { 721 if (pageToken != null) {
692 _queryParams["pageToken"] = [pageToken]; 722 _queryParams["pageToken"] = [pageToken];
693 } 723 }
694 724
695 _url = commons.Escaper.ecapeVariable('$projectName') + '/zones/' + commons.E scaper.ecapeVariable('$zone') + '/resourceViews'; 725 _url = commons.Escaper.ecapeVariable('$projectName') +
726 '/zones/' +
727 commons.Escaper.ecapeVariable('$zone') +
728 '/resourceViews';
696 729
697 var _response = _requester.request(_url, 730 var _response = _requester.request(_url, "GET",
698 "GET", 731 body: _body,
699 body: _body, 732 queryParams: _queryParams,
700 queryParams: _queryParams, 733 uploadOptions: _uploadOptions,
701 uploadOptions: _uploadOptions, 734 uploadMedia: _uploadMedia,
702 uploadMedia: _uploadMedia, 735 downloadOptions: _downloadOptions);
703 downloadOptions: _downloadOptions);
704 return _response.then((data) => new ZoneViewsListResponse.fromJson(data)); 736 return _response.then((data) => new ZoneViewsListResponse.fromJson(data));
705 } 737 }
706 738
707 /** 739 /// List the resources of the resource view.
708 * List the resources of the resource view. 740 ///
709 * 741 /// Request parameters:
710 * Request parameters: 742 ///
711 * 743 /// [projectName] - The project name of the resource view.
712 * [projectName] - The project name of the resource view. 744 ///
713 * 745 /// [zone] - The zone name of the resource view.
714 * [zone] - The zone name of the resource view. 746 ///
715 * 747 /// [resourceViewName] - The name of the resource view.
716 * [resourceViewName] - The name of the resource view. 748 ///
717 * 749 /// [maxResults] - Maximum count of results to be returned. Acceptable values
718 * [maxResults] - Maximum count of results to be returned. Acceptable values 750 /// are 0 to 5000, inclusive. (Default: 5000)
719 * are 0 to 5000, inclusive. (Default: 5000) 751 /// Value must be between "0" and "5000".
720 * Value must be between "0" and "5000". 752 ///
721 * 753 /// [pageToken] - Specifies a nextPageToken returned by a previous list
722 * [pageToken] - Specifies a nextPageToken returned by a previous list 754 /// request. This token can be used to request the next page of results from
723 * request. This token can be used to request the next page of results from a 755 /// a previous list request.
724 * previous list request. 756 ///
725 * 757 /// Completes with a [ZoneViewsListResourcesResponse].
726 * Completes with a [ZoneViewsListResourcesResponse]. 758 ///
727 * 759 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
728 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 760 /// an error.
729 * error. 761 ///
730 * 762 /// If the used [http.Client] completes with an error when making a REST
731 * If the used [http.Client] completes with an error when making a REST call, 763 /// call, this method will complete with the same error.
732 * this method will complete with the same error. 764 async.Future<ZoneViewsListResourcesResponse> listresources(
733 */ 765 core.String projectName, core.String zone, core.String resourceViewName,
734 async.Future<ZoneViewsListResourcesResponse> listresources(core.String project Name, core.String zone, core.String resourceViewName, {core.int maxResults, core .String pageToken}) { 766 {core.int maxResults, core.String pageToken}) {
735 var _url = null; 767 var _url = null;
736 var _queryParams = new core.Map(); 768 var _queryParams = new core.Map();
737 var _uploadMedia = null; 769 var _uploadMedia = null;
738 var _uploadOptions = null; 770 var _uploadOptions = null;
739 var _downloadOptions = commons.DownloadOptions.Metadata; 771 var _downloadOptions = commons.DownloadOptions.Metadata;
740 var _body = null; 772 var _body = null;
741 773
742 if (projectName == null) { 774 if (projectName == null) {
743 throw new core.ArgumentError("Parameter projectName is required."); 775 throw new core.ArgumentError("Parameter projectName is required.");
744 } 776 }
745 if (zone == null) { 777 if (zone == null) {
746 throw new core.ArgumentError("Parameter zone is required."); 778 throw new core.ArgumentError("Parameter zone is required.");
747 } 779 }
748 if (resourceViewName == null) { 780 if (resourceViewName == null) {
749 throw new core.ArgumentError("Parameter resourceViewName is required."); 781 throw new core.ArgumentError("Parameter resourceViewName is required.");
750 } 782 }
751 if (maxResults != null) { 783 if (maxResults != null) {
752 _queryParams["maxResults"] = ["${maxResults}"]; 784 _queryParams["maxResults"] = ["${maxResults}"];
753 } 785 }
754 if (pageToken != null) { 786 if (pageToken != null) {
755 _queryParams["pageToken"] = [pageToken]; 787 _queryParams["pageToken"] = [pageToken];
756 } 788 }
757 789
758 _url = commons.Escaper.ecapeVariable('$projectName') + '/zones/' + commons.E scaper.ecapeVariable('$zone') + '/resourceViews/' + commons.Escaper.ecapeVariabl e('$resourceViewName') + '/resources'; 790 _url = commons.Escaper.ecapeVariable('$projectName') +
791 '/zones/' +
792 commons.Escaper.ecapeVariable('$zone') +
793 '/resourceViews/' +
794 commons.Escaper.ecapeVariable('$resourceViewName') +
795 '/resources';
759 796
760 var _response = _requester.request(_url, 797 var _response = _requester.request(_url, "POST",
761 "POST", 798 body: _body,
762 body: _body, 799 queryParams: _queryParams,
763 queryParams: _queryParams, 800 uploadOptions: _uploadOptions,
764 uploadOptions: _uploadOptions, 801 uploadMedia: _uploadMedia,
765 uploadMedia: _uploadMedia, 802 downloadOptions: _downloadOptions);
766 downloadOptions: _downloadOptions); 803 return _response
767 return _response.then((data) => new ZoneViewsListResourcesResponse.fromJson( data)); 804 .then((data) => new ZoneViewsListResourcesResponse.fromJson(data));
768 } 805 }
769 806
770 /** 807 /// Remove resources from the view.
771 * Remove resources from the view. 808 ///
772 * 809 /// [request] - The metadata request object.
773 * [request] - The metadata request object. 810 ///
774 * 811 /// Request parameters:
775 * Request parameters: 812 ///
776 * 813 /// [projectName] - The project name of the resource view.
777 * [projectName] - The project name of the resource view. 814 ///
778 * 815 /// [zone] - The zone name of the resource view.
779 * [zone] - The zone name of the resource view. 816 ///
780 * 817 /// [resourceViewName] - The name of the resource view.
781 * [resourceViewName] - The name of the resource view. 818 ///
782 * 819 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
783 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 820 /// an error.
784 * error. 821 ///
785 * 822 /// If the used [http.Client] completes with an error when making a REST
786 * If the used [http.Client] completes with an error when making a REST call, 823 /// call, this method will complete with the same error.
787 * this method will complete with the same error. 824 async.Future removeresources(ZoneViewsRemoveResourcesRequest request,
788 */ 825 core.String projectName, core.String zone, core.String resourceViewName) {
789 async.Future removeresources(ZoneViewsRemoveResourcesRequest request, core.Str ing projectName, core.String zone, core.String resourceViewName) {
790 var _url = null; 826 var _url = null;
791 var _queryParams = new core.Map(); 827 var _queryParams = new core.Map();
792 var _uploadMedia = null; 828 var _uploadMedia = null;
793 var _uploadOptions = null; 829 var _uploadOptions = null;
794 var _downloadOptions = commons.DownloadOptions.Metadata; 830 var _downloadOptions = commons.DownloadOptions.Metadata;
795 var _body = null; 831 var _body = null;
796 832
797 if (request != null) { 833 if (request != null) {
798 _body = convert.JSON.encode((request).toJson()); 834 _body = convert.JSON.encode((request).toJson());
799 } 835 }
800 if (projectName == null) { 836 if (projectName == null) {
801 throw new core.ArgumentError("Parameter projectName is required."); 837 throw new core.ArgumentError("Parameter projectName is required.");
802 } 838 }
803 if (zone == null) { 839 if (zone == null) {
804 throw new core.ArgumentError("Parameter zone is required."); 840 throw new core.ArgumentError("Parameter zone is required.");
805 } 841 }
806 if (resourceViewName == null) { 842 if (resourceViewName == null) {
807 throw new core.ArgumentError("Parameter resourceViewName is required."); 843 throw new core.ArgumentError("Parameter resourceViewName is required.");
808 } 844 }
809 845
810 _downloadOptions = null; 846 _downloadOptions = null;
811 847
812 _url = commons.Escaper.ecapeVariable('$projectName') + '/zones/' + commons.E scaper.ecapeVariable('$zone') + '/resourceViews/' + commons.Escaper.ecapeVariabl e('$resourceViewName') + '/removeResources'; 848 _url = commons.Escaper.ecapeVariable('$projectName') +
849 '/zones/' +
850 commons.Escaper.ecapeVariable('$zone') +
851 '/resourceViews/' +
852 commons.Escaper.ecapeVariable('$resourceViewName') +
853 '/removeResources';
813 854
814 var _response = _requester.request(_url, 855 var _response = _requester.request(_url, "POST",
815 "POST", 856 body: _body,
816 body: _body, 857 queryParams: _queryParams,
817 queryParams: _queryParams, 858 uploadOptions: _uploadOptions,
818 uploadOptions: _uploadOptions, 859 uploadMedia: _uploadMedia,
819 uploadMedia: _uploadMedia, 860 downloadOptions: _downloadOptions);
820 downloadOptions: _downloadOptions);
821 return _response.then((data) => null); 861 return _response.then((data) => null);
822 } 862 }
823
824 } 863 }
825 864
865 /// The Label to be applied to the resource views.
866 class Label {
867 /// Key of the label.
868 core.String key;
826 869
827 870 /// Value of the label.
828 /** The Label to be applied to the resource views. */
829 class Label {
830 /** Key of the label. */
831 core.String key;
832 /** Value of the label. */
833 core.String value; 871 core.String value;
834 872
835 Label(); 873 Label();
836 874
837 Label.fromJson(core.Map _json) { 875 Label.fromJson(core.Map _json) {
838 if (_json.containsKey("key")) { 876 if (_json.containsKey("key")) {
839 key = _json["key"]; 877 key = _json["key"];
840 } 878 }
841 if (_json.containsKey("value")) { 879 if (_json.containsKey("value")) {
842 value = _json["value"]; 880 value = _json["value"];
843 } 881 }
844 } 882 }
845 883
846 core.Map<core.String, core.Object> toJson() { 884 core.Map<core.String, core.Object> toJson() {
847 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 885 final core.Map<core.String, core.Object> _json =
886 new core.Map<core.String, core.Object>();
848 if (key != null) { 887 if (key != null) {
849 _json["key"] = key; 888 _json["key"] = key;
850 } 889 }
851 if (value != null) { 890 if (value != null) {
852 _json["value"] = value; 891 _json["value"] = value;
853 } 892 }
854 return _json; 893 return _json;
855 } 894 }
856 } 895 }
857 896
858 /** The request to add resources to the resource view. */ 897 /// The request to add resources to the resource view.
859 class RegionViewsAddResourcesRequest { 898 class RegionViewsAddResourcesRequest {
860 /** The list of resources to be added. */ 899 /// The list of resources to be added.
861 core.List<core.String> resources; 900 core.List<core.String> resources;
862 901
863 RegionViewsAddResourcesRequest(); 902 RegionViewsAddResourcesRequest();
864 903
865 RegionViewsAddResourcesRequest.fromJson(core.Map _json) { 904 RegionViewsAddResourcesRequest.fromJson(core.Map _json) {
866 if (_json.containsKey("resources")) { 905 if (_json.containsKey("resources")) {
867 resources = _json["resources"]; 906 resources = _json["resources"];
868 } 907 }
869 } 908 }
870 909
871 core.Map<core.String, core.Object> toJson() { 910 core.Map<core.String, core.Object> toJson() {
872 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 911 final core.Map<core.String, core.Object> _json =
912 new core.Map<core.String, core.Object>();
873 if (resources != null) { 913 if (resources != null) {
874 _json["resources"] = resources; 914 _json["resources"] = resources;
875 } 915 }
876 return _json; 916 return _json;
877 } 917 }
878 } 918 }
879 919
880 /** The response to a resource view insert request. */ 920 /// The response to a resource view insert request.
881 class RegionViewsInsertResponse { 921 class RegionViewsInsertResponse {
882 /** The resource view object inserted. */ 922 /// The resource view object inserted.
883 ResourceView resource; 923 ResourceView resource;
884 924
885 RegionViewsInsertResponse(); 925 RegionViewsInsertResponse();
886 926
887 RegionViewsInsertResponse.fromJson(core.Map _json) { 927 RegionViewsInsertResponse.fromJson(core.Map _json) {
888 if (_json.containsKey("resource")) { 928 if (_json.containsKey("resource")) {
889 resource = new ResourceView.fromJson(_json["resource"]); 929 resource = new ResourceView.fromJson(_json["resource"]);
890 } 930 }
891 } 931 }
892 932
893 core.Map<core.String, core.Object> toJson() { 933 core.Map<core.String, core.Object> toJson() {
894 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 934 final core.Map<core.String, core.Object> _json =
935 new core.Map<core.String, core.Object>();
895 if (resource != null) { 936 if (resource != null) {
896 _json["resource"] = (resource).toJson(); 937 _json["resource"] = (resource).toJson();
897 } 938 }
898 return _json; 939 return _json;
899 } 940 }
900 } 941 }
901 942
902 /** The response to the list resource request. */ 943 /// The response to the list resource request.
903 class RegionViewsListResourcesResponse { 944 class RegionViewsListResourcesResponse {
904 /** The resources in the view. */ 945 /// The resources in the view.
905 core.List<core.String> members; 946 core.List<core.String> members;
906 /** A token used for pagination. */ 947
948 /// A token used for pagination.
907 core.String nextPageToken; 949 core.String nextPageToken;
908 950
909 RegionViewsListResourcesResponse(); 951 RegionViewsListResourcesResponse();
910 952
911 RegionViewsListResourcesResponse.fromJson(core.Map _json) { 953 RegionViewsListResourcesResponse.fromJson(core.Map _json) {
912 if (_json.containsKey("members")) { 954 if (_json.containsKey("members")) {
913 members = _json["members"]; 955 members = _json["members"];
914 } 956 }
915 if (_json.containsKey("nextPageToken")) { 957 if (_json.containsKey("nextPageToken")) {
916 nextPageToken = _json["nextPageToken"]; 958 nextPageToken = _json["nextPageToken"];
917 } 959 }
918 } 960 }
919 961
920 core.Map<core.String, core.Object> toJson() { 962 core.Map<core.String, core.Object> toJson() {
921 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 963 final core.Map<core.String, core.Object> _json =
964 new core.Map<core.String, core.Object>();
922 if (members != null) { 965 if (members != null) {
923 _json["members"] = members; 966 _json["members"] = members;
924 } 967 }
925 if (nextPageToken != null) { 968 if (nextPageToken != null) {
926 _json["nextPageToken"] = nextPageToken; 969 _json["nextPageToken"] = nextPageToken;
927 } 970 }
928 return _json; 971 return _json;
929 } 972 }
930 } 973 }
931 974
932 /** The response to the list resource view request. */ 975 /// The response to the list resource view request.
933 class RegionViewsListResponse { 976 class RegionViewsListResponse {
934 /** A token used for pagination. */ 977 /// A token used for pagination.
935 core.String nextPageToken; 978 core.String nextPageToken;
936 /** The list of resource views that meet the criteria. */ 979
980 /// The list of resource views that meet the criteria.
937 core.List<ResourceView> resourceViews; 981 core.List<ResourceView> resourceViews;
938 982
939 RegionViewsListResponse(); 983 RegionViewsListResponse();
940 984
941 RegionViewsListResponse.fromJson(core.Map _json) { 985 RegionViewsListResponse.fromJson(core.Map _json) {
942 if (_json.containsKey("nextPageToken")) { 986 if (_json.containsKey("nextPageToken")) {
943 nextPageToken = _json["nextPageToken"]; 987 nextPageToken = _json["nextPageToken"];
944 } 988 }
945 if (_json.containsKey("resourceViews")) { 989 if (_json.containsKey("resourceViews")) {
946 resourceViews = _json["resourceViews"].map((value) => new ResourceView.fro mJson(value)).toList(); 990 resourceViews = _json["resourceViews"]
991 .map((value) => new ResourceView.fromJson(value))
992 .toList();
947 } 993 }
948 } 994 }
949 995
950 core.Map<core.String, core.Object> toJson() { 996 core.Map<core.String, core.Object> toJson() {
951 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 997 final core.Map<core.String, core.Object> _json =
998 new core.Map<core.String, core.Object>();
952 if (nextPageToken != null) { 999 if (nextPageToken != null) {
953 _json["nextPageToken"] = nextPageToken; 1000 _json["nextPageToken"] = nextPageToken;
954 } 1001 }
955 if (resourceViews != null) { 1002 if (resourceViews != null) {
956 _json["resourceViews"] = resourceViews.map((value) => (value).toJson()).to List(); 1003 _json["resourceViews"] =
1004 resourceViews.map((value) => (value).toJson()).toList();
957 } 1005 }
958 return _json; 1006 return _json;
959 } 1007 }
960 } 1008 }
961 1009
962 /** The request to remove resources from the resource view. */ 1010 /// The request to remove resources from the resource view.
963 class RegionViewsRemoveResourcesRequest { 1011 class RegionViewsRemoveResourcesRequest {
964 /** The list of resources to be removed. */ 1012 /// The list of resources to be removed.
965 core.List<core.String> resources; 1013 core.List<core.String> resources;
966 1014
967 RegionViewsRemoveResourcesRequest(); 1015 RegionViewsRemoveResourcesRequest();
968 1016
969 RegionViewsRemoveResourcesRequest.fromJson(core.Map _json) { 1017 RegionViewsRemoveResourcesRequest.fromJson(core.Map _json) {
970 if (_json.containsKey("resources")) { 1018 if (_json.containsKey("resources")) {
971 resources = _json["resources"]; 1019 resources = _json["resources"];
972 } 1020 }
973 } 1021 }
974 1022
975 core.Map<core.String, core.Object> toJson() { 1023 core.Map<core.String, core.Object> toJson() {
976 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 1024 final core.Map<core.String, core.Object> _json =
1025 new core.Map<core.String, core.Object>();
977 if (resources != null) { 1026 if (resources != null) {
978 _json["resources"] = resources; 1027 _json["resources"] = resources;
979 } 1028 }
980 return _json; 1029 return _json;
981 } 1030 }
982 } 1031 }
983 1032
984 /** The resource view object. */ 1033 /// The resource view object.
985 class ResourceView { 1034 class ResourceView {
986 /** The creation time of the resource view. */ 1035 /// The creation time of the resource view.
987 core.String creationTime; 1036 core.String creationTime;
988 /** The detailed description of the resource view. */ 1037
1038 /// The detailed description of the resource view.
989 core.String description; 1039 core.String description;
990 /** [Output Only] The ID of the resource view. */ 1040
1041 /// [Output Only] The ID of the resource view.
991 core.String id; 1042 core.String id;
992 /** Type of the resource. */ 1043
1044 /// Type of the resource.
993 core.String kind; 1045 core.String kind;
994 /** The labels for events. */ 1046
1047 /// The labels for events.
995 core.List<Label> labels; 1048 core.List<Label> labels;
996 /** The last modified time of the view. Not supported yet. */ 1049
1050 /// The last modified time of the view. Not supported yet.
997 core.String lastModified; 1051 core.String lastModified;
998 /** A list of all resources in the resource view. */ 1052
1053 /// A list of all resources in the resource view.
999 core.List<core.String> members; 1054 core.List<core.String> members;
1000 /** The name of the resource view. */ 1055
1056 /// The name of the resource view.
1001 core.String name; 1057 core.String name;
1002 /** The total number of resources in the resource view. */ 1058
1059 /// The total number of resources in the resource view.
1003 core.int numMembers; 1060 core.int numMembers;
1004 /** [Output Only] A self-link to the resource view. */ 1061
1062 /// [Output Only] A self-link to the resource view.
1005 core.String selfLink; 1063 core.String selfLink;
1006 1064
1007 ResourceView(); 1065 ResourceView();
1008 1066
1009 ResourceView.fromJson(core.Map _json) { 1067 ResourceView.fromJson(core.Map _json) {
1010 if (_json.containsKey("creationTime")) { 1068 if (_json.containsKey("creationTime")) {
1011 creationTime = _json["creationTime"]; 1069 creationTime = _json["creationTime"];
1012 } 1070 }
1013 if (_json.containsKey("description")) { 1071 if (_json.containsKey("description")) {
1014 description = _json["description"]; 1072 description = _json["description"];
1015 } 1073 }
1016 if (_json.containsKey("id")) { 1074 if (_json.containsKey("id")) {
1017 id = _json["id"]; 1075 id = _json["id"];
1018 } 1076 }
1019 if (_json.containsKey("kind")) { 1077 if (_json.containsKey("kind")) {
1020 kind = _json["kind"]; 1078 kind = _json["kind"];
1021 } 1079 }
1022 if (_json.containsKey("labels")) { 1080 if (_json.containsKey("labels")) {
1023 labels = _json["labels"].map((value) => new Label.fromJson(value)).toList( ); 1081 labels =
1082 _json["labels"].map((value) => new Label.fromJson(value)).toList();
1024 } 1083 }
1025 if (_json.containsKey("lastModified")) { 1084 if (_json.containsKey("lastModified")) {
1026 lastModified = _json["lastModified"]; 1085 lastModified = _json["lastModified"];
1027 } 1086 }
1028 if (_json.containsKey("members")) { 1087 if (_json.containsKey("members")) {
1029 members = _json["members"]; 1088 members = _json["members"];
1030 } 1089 }
1031 if (_json.containsKey("name")) { 1090 if (_json.containsKey("name")) {
1032 name = _json["name"]; 1091 name = _json["name"];
1033 } 1092 }
1034 if (_json.containsKey("numMembers")) { 1093 if (_json.containsKey("numMembers")) {
1035 numMembers = _json["numMembers"]; 1094 numMembers = _json["numMembers"];
1036 } 1095 }
1037 if (_json.containsKey("selfLink")) { 1096 if (_json.containsKey("selfLink")) {
1038 selfLink = _json["selfLink"]; 1097 selfLink = _json["selfLink"];
1039 } 1098 }
1040 } 1099 }
1041 1100
1042 core.Map<core.String, core.Object> toJson() { 1101 core.Map<core.String, core.Object> toJson() {
1043 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 1102 final core.Map<core.String, core.Object> _json =
1103 new core.Map<core.String, core.Object>();
1044 if (creationTime != null) { 1104 if (creationTime != null) {
1045 _json["creationTime"] = creationTime; 1105 _json["creationTime"] = creationTime;
1046 } 1106 }
1047 if (description != null) { 1107 if (description != null) {
1048 _json["description"] = description; 1108 _json["description"] = description;
1049 } 1109 }
1050 if (id != null) { 1110 if (id != null) {
1051 _json["id"] = id; 1111 _json["id"] = id;
1052 } 1112 }
1053 if (kind != null) { 1113 if (kind != null) {
(...skipping 14 matching lines...) Expand all
1068 if (numMembers != null) { 1128 if (numMembers != null) {
1069 _json["numMembers"] = numMembers; 1129 _json["numMembers"] = numMembers;
1070 } 1130 }
1071 if (selfLink != null) { 1131 if (selfLink != null) {
1072 _json["selfLink"] = selfLink; 1132 _json["selfLink"] = selfLink;
1073 } 1133 }
1074 return _json; 1134 return _json;
1075 } 1135 }
1076 } 1136 }
1077 1137
1078 /** The request to add resources to the resource view. */ 1138 /// The request to add resources to the resource view.
1079 class ZoneViewsAddResourcesRequest { 1139 class ZoneViewsAddResourcesRequest {
1080 /** The list of resources to be added. */ 1140 /// The list of resources to be added.
1081 core.List<core.String> resources; 1141 core.List<core.String> resources;
1082 1142
1083 ZoneViewsAddResourcesRequest(); 1143 ZoneViewsAddResourcesRequest();
1084 1144
1085 ZoneViewsAddResourcesRequest.fromJson(core.Map _json) { 1145 ZoneViewsAddResourcesRequest.fromJson(core.Map _json) {
1086 if (_json.containsKey("resources")) { 1146 if (_json.containsKey("resources")) {
1087 resources = _json["resources"]; 1147 resources = _json["resources"];
1088 } 1148 }
1089 } 1149 }
1090 1150
1091 core.Map<core.String, core.Object> toJson() { 1151 core.Map<core.String, core.Object> toJson() {
1092 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 1152 final core.Map<core.String, core.Object> _json =
1153 new core.Map<core.String, core.Object>();
1093 if (resources != null) { 1154 if (resources != null) {
1094 _json["resources"] = resources; 1155 _json["resources"] = resources;
1095 } 1156 }
1096 return _json; 1157 return _json;
1097 } 1158 }
1098 } 1159 }
1099 1160
1100 /** The response to an insert request. */ 1161 /// The response to an insert request.
1101 class ZoneViewsInsertResponse { 1162 class ZoneViewsInsertResponse {
1102 /** The resource view object that has been inserted. */ 1163 /// The resource view object that has been inserted.
1103 ResourceView resource; 1164 ResourceView resource;
1104 1165
1105 ZoneViewsInsertResponse(); 1166 ZoneViewsInsertResponse();
1106 1167
1107 ZoneViewsInsertResponse.fromJson(core.Map _json) { 1168 ZoneViewsInsertResponse.fromJson(core.Map _json) {
1108 if (_json.containsKey("resource")) { 1169 if (_json.containsKey("resource")) {
1109 resource = new ResourceView.fromJson(_json["resource"]); 1170 resource = new ResourceView.fromJson(_json["resource"]);
1110 } 1171 }
1111 } 1172 }
1112 1173
1113 core.Map<core.String, core.Object> toJson() { 1174 core.Map<core.String, core.Object> toJson() {
1114 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 1175 final core.Map<core.String, core.Object> _json =
1176 new core.Map<core.String, core.Object>();
1115 if (resource != null) { 1177 if (resource != null) {
1116 _json["resource"] = (resource).toJson(); 1178 _json["resource"] = (resource).toJson();
1117 } 1179 }
1118 return _json; 1180 return _json;
1119 } 1181 }
1120 } 1182 }
1121 1183
1122 /** The response to a list resource request. */ 1184 /// The response to a list resource request.
1123 class ZoneViewsListResourcesResponse { 1185 class ZoneViewsListResourcesResponse {
1124 /** The full URL of resources in the view. */ 1186 /// The full URL of resources in the view.
1125 core.List<core.String> members; 1187 core.List<core.String> members;
1126 /** A token used for pagination. */ 1188
1189 /// A token used for pagination.
1127 core.String nextPageToken; 1190 core.String nextPageToken;
1128 1191
1129 ZoneViewsListResourcesResponse(); 1192 ZoneViewsListResourcesResponse();
1130 1193
1131 ZoneViewsListResourcesResponse.fromJson(core.Map _json) { 1194 ZoneViewsListResourcesResponse.fromJson(core.Map _json) {
1132 if (_json.containsKey("members")) { 1195 if (_json.containsKey("members")) {
1133 members = _json["members"]; 1196 members = _json["members"];
1134 } 1197 }
1135 if (_json.containsKey("nextPageToken")) { 1198 if (_json.containsKey("nextPageToken")) {
1136 nextPageToken = _json["nextPageToken"]; 1199 nextPageToken = _json["nextPageToken"];
1137 } 1200 }
1138 } 1201 }
1139 1202
1140 core.Map<core.String, core.Object> toJson() { 1203 core.Map<core.String, core.Object> toJson() {
1141 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 1204 final core.Map<core.String, core.Object> _json =
1205 new core.Map<core.String, core.Object>();
1142 if (members != null) { 1206 if (members != null) {
1143 _json["members"] = members; 1207 _json["members"] = members;
1144 } 1208 }
1145 if (nextPageToken != null) { 1209 if (nextPageToken != null) {
1146 _json["nextPageToken"] = nextPageToken; 1210 _json["nextPageToken"] = nextPageToken;
1147 } 1211 }
1148 return _json; 1212 return _json;
1149 } 1213 }
1150 } 1214 }
1151 1215
1152 /** The response to a list request. */ 1216 /// The response to a list request.
1153 class ZoneViewsListResponse { 1217 class ZoneViewsListResponse {
1154 /** A token used for pagination. */ 1218 /// A token used for pagination.
1155 core.String nextPageToken; 1219 core.String nextPageToken;
1156 /** The result that contains all resource views that meet the criteria. */ 1220
1221 /// The result that contains all resource views that meet the criteria.
1157 core.List<ResourceView> resourceViews; 1222 core.List<ResourceView> resourceViews;
1158 1223
1159 ZoneViewsListResponse(); 1224 ZoneViewsListResponse();
1160 1225
1161 ZoneViewsListResponse.fromJson(core.Map _json) { 1226 ZoneViewsListResponse.fromJson(core.Map _json) {
1162 if (_json.containsKey("nextPageToken")) { 1227 if (_json.containsKey("nextPageToken")) {
1163 nextPageToken = _json["nextPageToken"]; 1228 nextPageToken = _json["nextPageToken"];
1164 } 1229 }
1165 if (_json.containsKey("resourceViews")) { 1230 if (_json.containsKey("resourceViews")) {
1166 resourceViews = _json["resourceViews"].map((value) => new ResourceView.fro mJson(value)).toList(); 1231 resourceViews = _json["resourceViews"]
1232 .map((value) => new ResourceView.fromJson(value))
1233 .toList();
1167 } 1234 }
1168 } 1235 }
1169 1236
1170 core.Map<core.String, core.Object> toJson() { 1237 core.Map<core.String, core.Object> toJson() {
1171 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 1238 final core.Map<core.String, core.Object> _json =
1239 new core.Map<core.String, core.Object>();
1172 if (nextPageToken != null) { 1240 if (nextPageToken != null) {
1173 _json["nextPageToken"] = nextPageToken; 1241 _json["nextPageToken"] = nextPageToken;
1174 } 1242 }
1175 if (resourceViews != null) { 1243 if (resourceViews != null) {
1176 _json["resourceViews"] = resourceViews.map((value) => (value).toJson()).to List(); 1244 _json["resourceViews"] =
1245 resourceViews.map((value) => (value).toJson()).toList();
1177 } 1246 }
1178 return _json; 1247 return _json;
1179 } 1248 }
1180 } 1249 }
1181 1250
1182 /** The request to remove resources from the resource view. */ 1251 /// The request to remove resources from the resource view.
1183 class ZoneViewsRemoveResourcesRequest { 1252 class ZoneViewsRemoveResourcesRequest {
1184 /** The list of resources to be removed. */ 1253 /// The list of resources to be removed.
1185 core.List<core.String> resources; 1254 core.List<core.String> resources;
1186 1255
1187 ZoneViewsRemoveResourcesRequest(); 1256 ZoneViewsRemoveResourcesRequest();
1188 1257
1189 ZoneViewsRemoveResourcesRequest.fromJson(core.Map _json) { 1258 ZoneViewsRemoveResourcesRequest.fromJson(core.Map _json) {
1190 if (_json.containsKey("resources")) { 1259 if (_json.containsKey("resources")) {
1191 resources = _json["resources"]; 1260 resources = _json["resources"];
1192 } 1261 }
1193 } 1262 }
1194 1263
1195 core.Map<core.String, core.Object> toJson() { 1264 core.Map<core.String, core.Object> toJson() {
1196 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 1265 final core.Map<core.String, core.Object> _json =
1266 new core.Map<core.String, core.Object>();
1197 if (resources != null) { 1267 if (resources != null) {
1198 _json["resources"] = resources; 1268 _json["resources"] = resources;
1199 } 1269 }
1200 return _json; 1270 return _json;
1201 } 1271 }
1202 } 1272 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698