OLD | NEW |
1 // This is a generated file (see the discoveryapis_generator project). | 1 // This is a generated file (see the discoveryapis_generator project). |
2 | 2 |
3 library googleapis.siteVerification.v1; | 3 library googleapis.siteVerification.v1; |
4 | 4 |
5 import 'dart:core' as core; | 5 import 'dart:core' as core; |
6 import 'dart:async' as async; | 6 import 'dart:async' as async; |
7 import 'dart:convert' as convert; | 7 import 'dart:convert' as convert; |
8 | 8 |
9 import 'package:_discoveryapis_commons/_discoveryapis_commons.dart' as commons; | 9 import 'package:_discoveryapis_commons/_discoveryapis_commons.dart' as commons; |
10 import 'package:http/http.dart' as http; | 10 import 'package:http/http.dart' as http; |
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 siteVerification/v1'; | 15 const core.String USER_AGENT = 'dart-api-client siteVerification/v1'; |
16 | 16 |
17 /** Verifies ownership of websites or domains with Google. */ | 17 /// Verifies ownership of websites or domains with Google. |
18 class SiteVerificationApi { | 18 class SiteVerificationApi { |
19 /** Manage the list of sites and domains you control */ | 19 /// Manage the list of sites and domains you control |
20 static const SiteverificationScope = "https://www.googleapis.com/auth/siteveri
fication"; | 20 static const SiteverificationScope = |
| 21 "https://www.googleapis.com/auth/siteverification"; |
21 | 22 |
22 /** Manage your new site verifications with Google */ | 23 /// Manage your new site verifications with Google |
23 static const SiteverificationVerifyOnlyScope = "https://www.googleapis.com/aut
h/siteverification.verify_only"; | 24 static const SiteverificationVerifyOnlyScope = |
24 | 25 "https://www.googleapis.com/auth/siteverification.verify_only"; |
25 | 26 |
26 final commons.ApiRequester _requester; | 27 final commons.ApiRequester _requester; |
27 | 28 |
28 WebResourceResourceApi get webResource => new WebResourceResourceApi(_requeste
r); | 29 WebResourceResourceApi get webResource => |
| 30 new WebResourceResourceApi(_requester); |
29 | 31 |
30 SiteVerificationApi(http.Client client, {core.String rootUrl: "https://www.goo
gleapis.com/", core.String servicePath: "siteVerification/v1/"}) : | 32 SiteVerificationApi(http.Client client, |
31 _requester = new commons.ApiRequester(client, rootUrl, servicePath, USER_A
GENT); | 33 {core.String rootUrl: "https://www.googleapis.com/", |
| 34 core.String servicePath: "siteVerification/v1/"}) |
| 35 : _requester = |
| 36 new commons.ApiRequester(client, rootUrl, servicePath, USER_AGENT); |
32 } | 37 } |
33 | 38 |
34 | |
35 class WebResourceResourceApi { | 39 class WebResourceResourceApi { |
36 final commons.ApiRequester _requester; | 40 final commons.ApiRequester _requester; |
37 | 41 |
38 WebResourceResourceApi(commons.ApiRequester client) : | 42 WebResourceResourceApi(commons.ApiRequester client) : _requester = client; |
39 _requester = client; | |
40 | 43 |
41 /** | 44 /// Relinquish ownership of a website or domain. |
42 * Relinquish ownership of a website or domain. | 45 /// |
43 * | 46 /// Request parameters: |
44 * Request parameters: | 47 /// |
45 * | 48 /// [id] - The id of a verified site or domain. |
46 * [id] - The id of a verified site or domain. | 49 /// |
47 * | 50 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
48 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 51 /// an error. |
49 * error. | 52 /// |
50 * | 53 /// If the used [http.Client] completes with an error when making a REST |
51 * If the used [http.Client] completes with an error when making a REST call, | 54 /// call, this method will complete with the same error. |
52 * this method will complete with the same error. | |
53 */ | |
54 async.Future delete(core.String id) { | 55 async.Future delete(core.String id) { |
55 var _url = null; | 56 var _url = null; |
56 var _queryParams = new core.Map(); | 57 var _queryParams = new core.Map(); |
57 var _uploadMedia = null; | 58 var _uploadMedia = null; |
58 var _uploadOptions = null; | 59 var _uploadOptions = null; |
59 var _downloadOptions = commons.DownloadOptions.Metadata; | 60 var _downloadOptions = commons.DownloadOptions.Metadata; |
60 var _body = null; | 61 var _body = null; |
61 | 62 |
62 if (id == null) { | 63 if (id == null) { |
63 throw new core.ArgumentError("Parameter id is required."); | 64 throw new core.ArgumentError("Parameter id is required."); |
64 } | 65 } |
65 | 66 |
66 _downloadOptions = null; | 67 _downloadOptions = null; |
67 | 68 |
68 _url = 'webResource/' + commons.Escaper.ecapeVariable('$id'); | 69 _url = 'webResource/' + commons.Escaper.ecapeVariable('$id'); |
69 | 70 |
70 var _response = _requester.request(_url, | 71 var _response = _requester.request(_url, "DELETE", |
71 "DELETE", | 72 body: _body, |
72 body: _body, | 73 queryParams: _queryParams, |
73 queryParams: _queryParams, | 74 uploadOptions: _uploadOptions, |
74 uploadOptions: _uploadOptions, | 75 uploadMedia: _uploadMedia, |
75 uploadMedia: _uploadMedia, | 76 downloadOptions: _downloadOptions); |
76 downloadOptions: _downloadOptions); | |
77 return _response.then((data) => null); | 77 return _response.then((data) => null); |
78 } | 78 } |
79 | 79 |
80 /** | 80 /// Get the most current data for a website or domain. |
81 * Get the most current data for a website or domain. | 81 /// |
82 * | 82 /// Request parameters: |
83 * Request parameters: | 83 /// |
84 * | 84 /// [id] - The id of a verified site or domain. |
85 * [id] - The id of a verified site or domain. | 85 /// |
86 * | 86 /// Completes with a [SiteVerificationWebResourceResource]. |
87 * Completes with a [SiteVerificationWebResourceResource]. | 87 /// |
88 * | 88 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
89 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 89 /// an error. |
90 * error. | 90 /// |
91 * | 91 /// If the used [http.Client] completes with an error when making a REST |
92 * If the used [http.Client] completes with an error when making a REST call, | 92 /// call, this method will complete with the same error. |
93 * this method will complete with the same error. | |
94 */ | |
95 async.Future<SiteVerificationWebResourceResource> get(core.String id) { | 93 async.Future<SiteVerificationWebResourceResource> get(core.String id) { |
96 var _url = null; | 94 var _url = null; |
97 var _queryParams = new core.Map(); | 95 var _queryParams = new core.Map(); |
98 var _uploadMedia = null; | 96 var _uploadMedia = null; |
99 var _uploadOptions = null; | 97 var _uploadOptions = null; |
100 var _downloadOptions = commons.DownloadOptions.Metadata; | 98 var _downloadOptions = commons.DownloadOptions.Metadata; |
101 var _body = null; | 99 var _body = null; |
102 | 100 |
103 if (id == null) { | 101 if (id == null) { |
104 throw new core.ArgumentError("Parameter id is required."); | 102 throw new core.ArgumentError("Parameter id is required."); |
105 } | 103 } |
106 | 104 |
107 _url = 'webResource/' + commons.Escaper.ecapeVariable('$id'); | 105 _url = 'webResource/' + commons.Escaper.ecapeVariable('$id'); |
108 | 106 |
109 var _response = _requester.request(_url, | 107 var _response = _requester.request(_url, "GET", |
110 "GET", | 108 body: _body, |
111 body: _body, | 109 queryParams: _queryParams, |
112 queryParams: _queryParams, | 110 uploadOptions: _uploadOptions, |
113 uploadOptions: _uploadOptions, | 111 uploadMedia: _uploadMedia, |
114 uploadMedia: _uploadMedia, | 112 downloadOptions: _downloadOptions); |
115 downloadOptions: _downloadOptions); | 113 return _response |
116 return _response.then((data) => new SiteVerificationWebResourceResource.from
Json(data)); | 114 .then((data) => new SiteVerificationWebResourceResource.fromJson(data)); |
117 } | 115 } |
118 | 116 |
119 /** | 117 /// Get a verification token for placing on a website or domain. |
120 * Get a verification token for placing on a website or domain. | 118 /// |
121 * | 119 /// [request] - The metadata request object. |
122 * [request] - The metadata request object. | 120 /// |
123 * | 121 /// Request parameters: |
124 * Request parameters: | 122 /// |
125 * | 123 /// Completes with a [SiteVerificationWebResourceGettokenResponse]. |
126 * Completes with a [SiteVerificationWebResourceGettokenResponse]. | 124 /// |
127 * | 125 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
128 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 126 /// an error. |
129 * error. | 127 /// |
130 * | 128 /// 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, | 129 /// call, this method will complete with the same error. |
132 * this method will complete with the same error. | 130 async.Future<SiteVerificationWebResourceGettokenResponse> getToken( |
133 */ | 131 SiteVerificationWebResourceGettokenRequest request) { |
134 async.Future<SiteVerificationWebResourceGettokenResponse> getToken(SiteVerific
ationWebResourceGettokenRequest request) { | |
135 var _url = null; | 132 var _url = null; |
136 var _queryParams = new core.Map(); | 133 var _queryParams = new core.Map(); |
137 var _uploadMedia = null; | 134 var _uploadMedia = null; |
138 var _uploadOptions = null; | 135 var _uploadOptions = null; |
139 var _downloadOptions = commons.DownloadOptions.Metadata; | 136 var _downloadOptions = commons.DownloadOptions.Metadata; |
140 var _body = null; | 137 var _body = null; |
141 | 138 |
142 if (request != null) { | 139 if (request != null) { |
143 _body = convert.JSON.encode((request).toJson()); | 140 _body = convert.JSON.encode((request).toJson()); |
144 } | 141 } |
145 | 142 |
146 _url = 'token'; | 143 _url = 'token'; |
147 | 144 |
148 var _response = _requester.request(_url, | 145 var _response = _requester.request(_url, "POST", |
149 "POST", | 146 body: _body, |
150 body: _body, | 147 queryParams: _queryParams, |
151 queryParams: _queryParams, | 148 uploadOptions: _uploadOptions, |
152 uploadOptions: _uploadOptions, | 149 uploadMedia: _uploadMedia, |
153 uploadMedia: _uploadMedia, | 150 downloadOptions: _downloadOptions); |
154 downloadOptions: _downloadOptions); | 151 return _response.then((data) => |
155 return _response.then((data) => new SiteVerificationWebResourceGettokenRespo
nse.fromJson(data)); | 152 new SiteVerificationWebResourceGettokenResponse.fromJson(data)); |
156 } | 153 } |
157 | 154 |
158 /** | 155 /// Attempt verification of a website or domain. |
159 * Attempt verification of a website or domain. | 156 /// |
160 * | 157 /// [request] - The metadata request object. |
161 * [request] - The metadata request object. | 158 /// |
162 * | 159 /// Request parameters: |
163 * Request parameters: | 160 /// |
164 * | 161 /// [verificationMethod] - The method to use for verifying a site or domain. |
165 * [verificationMethod] - The method to use for verifying a site or domain. | 162 /// |
166 * | 163 /// Completes with a [SiteVerificationWebResourceResource]. |
167 * Completes with a [SiteVerificationWebResourceResource]. | 164 /// |
168 * | 165 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
169 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 166 /// an error. |
170 * error. | 167 /// |
171 * | 168 /// If the used [http.Client] completes with an error when making a REST |
172 * If the used [http.Client] completes with an error when making a REST call, | 169 /// call, this method will complete with the same error. |
173 * this method will complete with the same error. | 170 async.Future<SiteVerificationWebResourceResource> insert( |
174 */ | 171 SiteVerificationWebResourceResource request, |
175 async.Future<SiteVerificationWebResourceResource> insert(SiteVerificationWebRe
sourceResource request, core.String verificationMethod) { | 172 core.String verificationMethod) { |
176 var _url = null; | 173 var _url = null; |
177 var _queryParams = new core.Map(); | 174 var _queryParams = new core.Map(); |
178 var _uploadMedia = null; | 175 var _uploadMedia = null; |
179 var _uploadOptions = null; | 176 var _uploadOptions = null; |
180 var _downloadOptions = commons.DownloadOptions.Metadata; | 177 var _downloadOptions = commons.DownloadOptions.Metadata; |
181 var _body = null; | 178 var _body = null; |
182 | 179 |
183 if (request != null) { | 180 if (request != null) { |
184 _body = convert.JSON.encode((request).toJson()); | 181 _body = convert.JSON.encode((request).toJson()); |
185 } | 182 } |
186 if (verificationMethod == null) { | 183 if (verificationMethod == null) { |
187 throw new core.ArgumentError("Parameter verificationMethod is required."); | 184 throw new core.ArgumentError("Parameter verificationMethod is required."); |
188 } | 185 } |
189 _queryParams["verificationMethod"] = [verificationMethod]; | 186 _queryParams["verificationMethod"] = [verificationMethod]; |
190 | 187 |
191 _url = 'webResource'; | 188 _url = 'webResource'; |
192 | 189 |
193 var _response = _requester.request(_url, | 190 var _response = _requester.request(_url, "POST", |
194 "POST", | 191 body: _body, |
195 body: _body, | 192 queryParams: _queryParams, |
196 queryParams: _queryParams, | 193 uploadOptions: _uploadOptions, |
197 uploadOptions: _uploadOptions, | 194 uploadMedia: _uploadMedia, |
198 uploadMedia: _uploadMedia, | 195 downloadOptions: _downloadOptions); |
199 downloadOptions: _downloadOptions); | 196 return _response |
200 return _response.then((data) => new SiteVerificationWebResourceResource.from
Json(data)); | 197 .then((data) => new SiteVerificationWebResourceResource.fromJson(data)); |
201 } | 198 } |
202 | 199 |
203 /** | 200 /// Get the list of your verified websites and domains. |
204 * Get the list of your verified websites and domains. | 201 /// |
205 * | 202 /// Request parameters: |
206 * Request parameters: | 203 /// |
207 * | 204 /// Completes with a [SiteVerificationWebResourceListResponse]. |
208 * Completes with a [SiteVerificationWebResourceListResponse]. | 205 /// |
209 * | 206 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
210 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 207 /// an error. |
211 * error. | 208 /// |
212 * | 209 /// If the used [http.Client] completes with an error when making a REST |
213 * If the used [http.Client] completes with an error when making a REST call, | 210 /// call, this method will complete with the same error. |
214 * this method will complete with the same error. | |
215 */ | |
216 async.Future<SiteVerificationWebResourceListResponse> list() { | 211 async.Future<SiteVerificationWebResourceListResponse> list() { |
217 var _url = null; | 212 var _url = null; |
218 var _queryParams = new core.Map(); | 213 var _queryParams = new core.Map(); |
219 var _uploadMedia = null; | 214 var _uploadMedia = null; |
220 var _uploadOptions = null; | 215 var _uploadOptions = null; |
221 var _downloadOptions = commons.DownloadOptions.Metadata; | 216 var _downloadOptions = commons.DownloadOptions.Metadata; |
222 var _body = null; | 217 var _body = null; |
223 | 218 |
224 | |
225 _url = 'webResource'; | 219 _url = 'webResource'; |
226 | 220 |
227 var _response = _requester.request(_url, | 221 var _response = _requester.request(_url, "GET", |
228 "GET", | 222 body: _body, |
229 body: _body, | 223 queryParams: _queryParams, |
230 queryParams: _queryParams, | 224 uploadOptions: _uploadOptions, |
231 uploadOptions: _uploadOptions, | 225 uploadMedia: _uploadMedia, |
232 uploadMedia: _uploadMedia, | 226 downloadOptions: _downloadOptions); |
233 downloadOptions: _downloadOptions); | 227 return _response.then( |
234 return _response.then((data) => new SiteVerificationWebResourceListResponse.
fromJson(data)); | 228 (data) => new SiteVerificationWebResourceListResponse.fromJson(data)); |
235 } | 229 } |
236 | 230 |
237 /** | 231 /// Modify the list of owners for your website or domain. This method |
238 * Modify the list of owners for your website or domain. This method supports | 232 /// supports patch semantics. |
239 * patch semantics. | 233 /// |
240 * | 234 /// [request] - The metadata request object. |
241 * [request] - The metadata request object. | 235 /// |
242 * | 236 /// Request parameters: |
243 * Request parameters: | 237 /// |
244 * | 238 /// [id] - The id of a verified site or domain. |
245 * [id] - The id of a verified site or domain. | 239 /// |
246 * | 240 /// Completes with a [SiteVerificationWebResourceResource]. |
247 * Completes with a [SiteVerificationWebResourceResource]. | 241 /// |
248 * | 242 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
249 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 243 /// an error. |
250 * error. | 244 /// |
251 * | 245 /// If the used [http.Client] completes with an error when making a REST |
252 * If the used [http.Client] completes with an error when making a REST call, | 246 /// call, this method will complete with the same error. |
253 * this method will complete with the same error. | 247 async.Future<SiteVerificationWebResourceResource> patch( |
254 */ | 248 SiteVerificationWebResourceResource request, core.String id) { |
255 async.Future<SiteVerificationWebResourceResource> patch(SiteVerificationWebRes
ourceResource request, core.String id) { | |
256 var _url = null; | 249 var _url = null; |
257 var _queryParams = new core.Map(); | 250 var _queryParams = new core.Map(); |
258 var _uploadMedia = null; | 251 var _uploadMedia = null; |
259 var _uploadOptions = null; | 252 var _uploadOptions = null; |
260 var _downloadOptions = commons.DownloadOptions.Metadata; | 253 var _downloadOptions = commons.DownloadOptions.Metadata; |
261 var _body = null; | 254 var _body = null; |
262 | 255 |
263 if (request != null) { | 256 if (request != null) { |
264 _body = convert.JSON.encode((request).toJson()); | 257 _body = convert.JSON.encode((request).toJson()); |
265 } | 258 } |
266 if (id == null) { | 259 if (id == null) { |
267 throw new core.ArgumentError("Parameter id is required."); | 260 throw new core.ArgumentError("Parameter id is required."); |
268 } | 261 } |
269 | 262 |
270 _url = 'webResource/' + commons.Escaper.ecapeVariable('$id'); | 263 _url = 'webResource/' + commons.Escaper.ecapeVariable('$id'); |
271 | 264 |
272 var _response = _requester.request(_url, | 265 var _response = _requester.request(_url, "PATCH", |
273 "PATCH", | 266 body: _body, |
274 body: _body, | 267 queryParams: _queryParams, |
275 queryParams: _queryParams, | 268 uploadOptions: _uploadOptions, |
276 uploadOptions: _uploadOptions, | 269 uploadMedia: _uploadMedia, |
277 uploadMedia: _uploadMedia, | 270 downloadOptions: _downloadOptions); |
278 downloadOptions: _downloadOptions); | 271 return _response |
279 return _response.then((data) => new SiteVerificationWebResourceResource.from
Json(data)); | 272 .then((data) => new SiteVerificationWebResourceResource.fromJson(data)); |
280 } | 273 } |
281 | 274 |
282 /** | 275 /// Modify the list of owners for your website or domain. |
283 * Modify the list of owners for your website or domain. | 276 /// |
284 * | 277 /// [request] - The metadata request object. |
285 * [request] - The metadata request object. | 278 /// |
286 * | 279 /// Request parameters: |
287 * Request parameters: | 280 /// |
288 * | 281 /// [id] - The id of a verified site or domain. |
289 * [id] - The id of a verified site or domain. | 282 /// |
290 * | 283 /// Completes with a [SiteVerificationWebResourceResource]. |
291 * Completes with a [SiteVerificationWebResourceResource]. | 284 /// |
292 * | 285 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
293 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 286 /// an error. |
294 * error. | 287 /// |
295 * | 288 /// If the used [http.Client] completes with an error when making a REST |
296 * If the used [http.Client] completes with an error when making a REST call, | 289 /// call, this method will complete with the same error. |
297 * this method will complete with the same error. | 290 async.Future<SiteVerificationWebResourceResource> update( |
298 */ | 291 SiteVerificationWebResourceResource request, core.String id) { |
299 async.Future<SiteVerificationWebResourceResource> update(SiteVerificationWebRe
sourceResource request, core.String id) { | |
300 var _url = null; | 292 var _url = null; |
301 var _queryParams = new core.Map(); | 293 var _queryParams = new core.Map(); |
302 var _uploadMedia = null; | 294 var _uploadMedia = null; |
303 var _uploadOptions = null; | 295 var _uploadOptions = null; |
304 var _downloadOptions = commons.DownloadOptions.Metadata; | 296 var _downloadOptions = commons.DownloadOptions.Metadata; |
305 var _body = null; | 297 var _body = null; |
306 | 298 |
307 if (request != null) { | 299 if (request != null) { |
308 _body = convert.JSON.encode((request).toJson()); | 300 _body = convert.JSON.encode((request).toJson()); |
309 } | 301 } |
310 if (id == null) { | 302 if (id == null) { |
311 throw new core.ArgumentError("Parameter id is required."); | 303 throw new core.ArgumentError("Parameter id is required."); |
312 } | 304 } |
313 | 305 |
314 _url = 'webResource/' + commons.Escaper.ecapeVariable('$id'); | 306 _url = 'webResource/' + commons.Escaper.ecapeVariable('$id'); |
315 | 307 |
316 var _response = _requester.request(_url, | 308 var _response = _requester.request(_url, "PUT", |
317 "PUT", | 309 body: _body, |
318 body: _body, | 310 queryParams: _queryParams, |
319 queryParams: _queryParams, | 311 uploadOptions: _uploadOptions, |
320 uploadOptions: _uploadOptions, | 312 uploadMedia: _uploadMedia, |
321 uploadMedia: _uploadMedia, | 313 downloadOptions: _downloadOptions); |
322 downloadOptions: _downloadOptions); | 314 return _response |
323 return _response.then((data) => new SiteVerificationWebResourceResource.from
Json(data)); | 315 .then((data) => new SiteVerificationWebResourceResource.fromJson(data)); |
324 } | 316 } |
325 | |
326 } | 317 } |
327 | 318 |
| 319 /// The site for which a verification token will be generated. |
| 320 class SiteVerificationWebResourceGettokenRequestSite { |
| 321 /// The site identifier. If the type is set to SITE, the identifier is a URL. |
| 322 /// If the type is set to INET_DOMAIN, the site identifier is a domain name. |
| 323 core.String identifier; |
328 | 324 |
329 | 325 /// The type of resource to be verified. Can be SITE or INET_DOMAIN (domain |
330 /** The site for which a verification token will be generated. */ | 326 /// name). |
331 class SiteVerificationWebResourceGettokenRequestSite { | |
332 /** | |
333 * The site identifier. If the type is set to SITE, the identifier is a URL. | |
334 * If the type is set to INET_DOMAIN, the site identifier is a domain name. | |
335 */ | |
336 core.String identifier; | |
337 /** | |
338 * The type of resource to be verified. Can be SITE or INET_DOMAIN (domain | |
339 * name). | |
340 */ | |
341 core.String type; | 327 core.String type; |
342 | 328 |
343 SiteVerificationWebResourceGettokenRequestSite(); | 329 SiteVerificationWebResourceGettokenRequestSite(); |
344 | 330 |
345 SiteVerificationWebResourceGettokenRequestSite.fromJson(core.Map _json) { | 331 SiteVerificationWebResourceGettokenRequestSite.fromJson(core.Map _json) { |
346 if (_json.containsKey("identifier")) { | 332 if (_json.containsKey("identifier")) { |
347 identifier = _json["identifier"]; | 333 identifier = _json["identifier"]; |
348 } | 334 } |
349 if (_json.containsKey("type")) { | 335 if (_json.containsKey("type")) { |
350 type = _json["type"]; | 336 type = _json["type"]; |
351 } | 337 } |
352 } | 338 } |
353 | 339 |
354 core.Map<core.String, core.Object> toJson() { | 340 core.Map<core.String, core.Object> toJson() { |
355 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 341 final core.Map<core.String, core.Object> _json = |
| 342 new core.Map<core.String, core.Object>(); |
356 if (identifier != null) { | 343 if (identifier != null) { |
357 _json["identifier"] = identifier; | 344 _json["identifier"] = identifier; |
358 } | 345 } |
359 if (type != null) { | 346 if (type != null) { |
360 _json["type"] = type; | 347 _json["type"] = type; |
361 } | 348 } |
362 return _json; | 349 return _json; |
363 } | 350 } |
364 } | 351 } |
365 | 352 |
366 class SiteVerificationWebResourceGettokenRequest { | 353 class SiteVerificationWebResourceGettokenRequest { |
367 /** The site for which a verification token will be generated. */ | 354 /// The site for which a verification token will be generated. |
368 SiteVerificationWebResourceGettokenRequestSite site; | 355 SiteVerificationWebResourceGettokenRequestSite site; |
369 /** | 356 |
370 * The verification method that will be used to verify this site. For sites, | 357 /// The verification method that will be used to verify this site. For sites, |
371 * 'FILE' or 'META' methods may be used. For domains, only 'DNS' may be used. | 358 /// 'FILE' or 'META' methods may be used. For domains, only 'DNS' may be |
372 */ | 359 /// used. |
373 core.String verificationMethod; | 360 core.String verificationMethod; |
374 | 361 |
375 SiteVerificationWebResourceGettokenRequest(); | 362 SiteVerificationWebResourceGettokenRequest(); |
376 | 363 |
377 SiteVerificationWebResourceGettokenRequest.fromJson(core.Map _json) { | 364 SiteVerificationWebResourceGettokenRequest.fromJson(core.Map _json) { |
378 if (_json.containsKey("site")) { | 365 if (_json.containsKey("site")) { |
379 site = new SiteVerificationWebResourceGettokenRequestSite.fromJson(_json["
site"]); | 366 site = new SiteVerificationWebResourceGettokenRequestSite.fromJson( |
| 367 _json["site"]); |
380 } | 368 } |
381 if (_json.containsKey("verificationMethod")) { | 369 if (_json.containsKey("verificationMethod")) { |
382 verificationMethod = _json["verificationMethod"]; | 370 verificationMethod = _json["verificationMethod"]; |
383 } | 371 } |
384 } | 372 } |
385 | 373 |
386 core.Map<core.String, core.Object> toJson() { | 374 core.Map<core.String, core.Object> toJson() { |
387 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 375 final core.Map<core.String, core.Object> _json = |
| 376 new core.Map<core.String, core.Object>(); |
388 if (site != null) { | 377 if (site != null) { |
389 _json["site"] = (site).toJson(); | 378 _json["site"] = (site).toJson(); |
390 } | 379 } |
391 if (verificationMethod != null) { | 380 if (verificationMethod != null) { |
392 _json["verificationMethod"] = verificationMethod; | 381 _json["verificationMethod"] = verificationMethod; |
393 } | 382 } |
394 return _json; | 383 return _json; |
395 } | 384 } |
396 } | 385 } |
397 | 386 |
398 class SiteVerificationWebResourceGettokenResponse { | 387 class SiteVerificationWebResourceGettokenResponse { |
399 /** | 388 /// The verification method to use in conjunction with this token. For FILE, |
400 * The verification method to use in conjunction with this token. For FILE, | 389 /// the token should be placed in the top-level directory of the site, stored |
401 * the token should be placed in the top-level directory of the site, stored | 390 /// inside a file of the same name. For META, the token should be placed in |
402 * inside a file of the same name. For META, the token should be placed in the | 391 /// the HEAD tag of the default page that is loaded for the site. For DNS, |
403 * HEAD tag of the default page that is loaded for the site. For DNS, the | 392 /// the token should be placed in a TXT record of the domain. |
404 * token should be placed in a TXT record of the domain. | |
405 */ | |
406 core.String method; | 393 core.String method; |
407 /** | 394 |
408 * The verification token. The token must be placed appropriately in order for | 395 /// The verification token. The token must be placed appropriately in order |
409 * verification to succeed. | 396 /// for verification to succeed. |
410 */ | |
411 core.String token; | 397 core.String token; |
412 | 398 |
413 SiteVerificationWebResourceGettokenResponse(); | 399 SiteVerificationWebResourceGettokenResponse(); |
414 | 400 |
415 SiteVerificationWebResourceGettokenResponse.fromJson(core.Map _json) { | 401 SiteVerificationWebResourceGettokenResponse.fromJson(core.Map _json) { |
416 if (_json.containsKey("method")) { | 402 if (_json.containsKey("method")) { |
417 method = _json["method"]; | 403 method = _json["method"]; |
418 } | 404 } |
419 if (_json.containsKey("token")) { | 405 if (_json.containsKey("token")) { |
420 token = _json["token"]; | 406 token = _json["token"]; |
421 } | 407 } |
422 } | 408 } |
423 | 409 |
424 core.Map<core.String, core.Object> toJson() { | 410 core.Map<core.String, core.Object> toJson() { |
425 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 411 final core.Map<core.String, core.Object> _json = |
| 412 new core.Map<core.String, core.Object>(); |
426 if (method != null) { | 413 if (method != null) { |
427 _json["method"] = method; | 414 _json["method"] = method; |
428 } | 415 } |
429 if (token != null) { | 416 if (token != null) { |
430 _json["token"] = token; | 417 _json["token"] = token; |
431 } | 418 } |
432 return _json; | 419 return _json; |
433 } | 420 } |
434 } | 421 } |
435 | 422 |
436 class SiteVerificationWebResourceListResponse { | 423 class SiteVerificationWebResourceListResponse { |
437 /** The list of sites that are owned by the authenticated user. */ | 424 /// The list of sites that are owned by the authenticated user. |
438 core.List<SiteVerificationWebResourceResource> items; | 425 core.List<SiteVerificationWebResourceResource> items; |
439 | 426 |
440 SiteVerificationWebResourceListResponse(); | 427 SiteVerificationWebResourceListResponse(); |
441 | 428 |
442 SiteVerificationWebResourceListResponse.fromJson(core.Map _json) { | 429 SiteVerificationWebResourceListResponse.fromJson(core.Map _json) { |
443 if (_json.containsKey("items")) { | 430 if (_json.containsKey("items")) { |
444 items = _json["items"].map((value) => new SiteVerificationWebResourceResou
rce.fromJson(value)).toList(); | 431 items = _json["items"] |
| 432 .map((value) => |
| 433 new SiteVerificationWebResourceResource.fromJson(value)) |
| 434 .toList(); |
445 } | 435 } |
446 } | 436 } |
447 | 437 |
448 core.Map<core.String, core.Object> toJson() { | 438 core.Map<core.String, core.Object> toJson() { |
449 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 439 final core.Map<core.String, core.Object> _json = |
| 440 new core.Map<core.String, core.Object>(); |
450 if (items != null) { | 441 if (items != null) { |
451 _json["items"] = items.map((value) => (value).toJson()).toList(); | 442 _json["items"] = items.map((value) => (value).toJson()).toList(); |
452 } | 443 } |
453 return _json; | 444 return _json; |
454 } | 445 } |
455 } | 446 } |
456 | 447 |
457 /** The address and type of a site that is verified or will be verified. */ | 448 /// The address and type of a site that is verified or will be verified. |
458 class SiteVerificationWebResourceResourceSite { | 449 class SiteVerificationWebResourceResourceSite { |
459 /** | 450 /// The site identifier. If the type is set to SITE, the identifier is a URL. |
460 * The site identifier. If the type is set to SITE, the identifier is a URL. | 451 /// If the type is set to INET_DOMAIN, the site identifier is a domain name. |
461 * If the type is set to INET_DOMAIN, the site identifier is a domain name. | |
462 */ | |
463 core.String identifier; | 452 core.String identifier; |
464 /** The site type. Can be SITE or INET_DOMAIN (domain name). */ | 453 |
| 454 /// The site type. Can be SITE or INET_DOMAIN (domain name). |
465 core.String type; | 455 core.String type; |
466 | 456 |
467 SiteVerificationWebResourceResourceSite(); | 457 SiteVerificationWebResourceResourceSite(); |
468 | 458 |
469 SiteVerificationWebResourceResourceSite.fromJson(core.Map _json) { | 459 SiteVerificationWebResourceResourceSite.fromJson(core.Map _json) { |
470 if (_json.containsKey("identifier")) { | 460 if (_json.containsKey("identifier")) { |
471 identifier = _json["identifier"]; | 461 identifier = _json["identifier"]; |
472 } | 462 } |
473 if (_json.containsKey("type")) { | 463 if (_json.containsKey("type")) { |
474 type = _json["type"]; | 464 type = _json["type"]; |
475 } | 465 } |
476 } | 466 } |
477 | 467 |
478 core.Map<core.String, core.Object> toJson() { | 468 core.Map<core.String, core.Object> toJson() { |
479 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 469 final core.Map<core.String, core.Object> _json = |
| 470 new core.Map<core.String, core.Object>(); |
480 if (identifier != null) { | 471 if (identifier != null) { |
481 _json["identifier"] = identifier; | 472 _json["identifier"] = identifier; |
482 } | 473 } |
483 if (type != null) { | 474 if (type != null) { |
484 _json["type"] = type; | 475 _json["type"] = type; |
485 } | 476 } |
486 return _json; | 477 return _json; |
487 } | 478 } |
488 } | 479 } |
489 | 480 |
490 class SiteVerificationWebResourceResource { | 481 class SiteVerificationWebResourceResource { |
491 /** | 482 /// The string used to identify this site. This value should be used in the |
492 * The string used to identify this site. This value should be used in the | 483 /// "id" portion of the REST URL for the Get, Update, and Delete operations. |
493 * "id" portion of the REST URL for the Get, Update, and Delete operations. | |
494 */ | |
495 core.String id; | 484 core.String id; |
496 /** The email addresses of all verified owners. */ | 485 |
| 486 /// The email addresses of all verified owners. |
497 core.List<core.String> owners; | 487 core.List<core.String> owners; |
498 /** The address and type of a site that is verified or will be verified. */ | 488 |
| 489 /// The address and type of a site that is verified or will be verified. |
499 SiteVerificationWebResourceResourceSite site; | 490 SiteVerificationWebResourceResourceSite site; |
500 | 491 |
501 SiteVerificationWebResourceResource(); | 492 SiteVerificationWebResourceResource(); |
502 | 493 |
503 SiteVerificationWebResourceResource.fromJson(core.Map _json) { | 494 SiteVerificationWebResourceResource.fromJson(core.Map _json) { |
504 if (_json.containsKey("id")) { | 495 if (_json.containsKey("id")) { |
505 id = _json["id"]; | 496 id = _json["id"]; |
506 } | 497 } |
507 if (_json.containsKey("owners")) { | 498 if (_json.containsKey("owners")) { |
508 owners = _json["owners"]; | 499 owners = _json["owners"]; |
509 } | 500 } |
510 if (_json.containsKey("site")) { | 501 if (_json.containsKey("site")) { |
511 site = new SiteVerificationWebResourceResourceSite.fromJson(_json["site"])
; | 502 site = |
| 503 new SiteVerificationWebResourceResourceSite.fromJson(_json["site"]); |
512 } | 504 } |
513 } | 505 } |
514 | 506 |
515 core.Map<core.String, core.Object> toJson() { | 507 core.Map<core.String, core.Object> toJson() { |
516 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 508 final core.Map<core.String, core.Object> _json = |
| 509 new core.Map<core.String, core.Object>(); |
517 if (id != null) { | 510 if (id != null) { |
518 _json["id"] = id; | 511 _json["id"] = id; |
519 } | 512 } |
520 if (owners != null) { | 513 if (owners != null) { |
521 _json["owners"] = owners; | 514 _json["owners"] = owners; |
522 } | 515 } |
523 if (site != null) { | 516 if (site != null) { |
524 _json["site"] = (site).toJson(); | 517 _json["site"] = (site).toJson(); |
525 } | 518 } |
526 return _json; | 519 return _json; |
527 } | 520 } |
528 } | 521 } |
OLD | NEW |