| 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.acceleratedmobilepageurl.v1; | 3 library googleapis.acceleratedmobilepageurl.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; |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 119 return _json; | 119 return _json; |
| 120 } | 120 } |
| 121 } | 121 } |
| 122 | 122 |
| 123 /** AMP URL Error resource for a requested URL that couldn't be found. */ | 123 /** AMP URL Error resource for a requested URL that couldn't be found. */ |
| 124 class AmpUrlError { | 124 class AmpUrlError { |
| 125 /** | 125 /** |
| 126 * The error code of an API call. | 126 * The error code of an API call. |
| 127 * Possible string values are: | 127 * Possible string values are: |
| 128 * - "ERROR_CODE_UNSPECIFIED" : Not specified error. | 128 * - "ERROR_CODE_UNSPECIFIED" : Not specified error. |
| 129 * - "INPUT_URL_NOT_FOUND" : Indicates the requested URL is not found for some | 129 * - "INPUT_URL_NOT_FOUND" : Indicates the requested URL is not found in the |
| 130 * reason -- for example, | 130 * index, possibly because |
| 131 * we receive an HTTP error code 404 when it is crawled. | 131 * it's unable to be found, not able to be accessed by Googlebot, or some |
| 132 * - "NO_AMP_URL" : Indicates no AMP URL has been found in the HTML of the | 132 * other error. |
| 133 * requested URL. | 133 * - "NO_AMP_URL" : Indicates no AMP URL has been found that corresponds to |
| 134 * the requested |
| 135 * URL. |
| 134 * - "APPLICATION_ERROR" : Indicates some kind of application error occurred | 136 * - "APPLICATION_ERROR" : Indicates some kind of application error occurred |
| 135 * at the server. | 137 * at the server. |
| 136 * Client advised to retry. | 138 * Client advised to retry. |
| 137 * - "URL_IS_VALID_AMP" : Indicates the requested URL is a valid AMP URL. | 139 * - "URL_IS_VALID_AMP" : DEPRECATED: Indicates the requested URL is a valid |
| 138 * DEPRECATED: API no longer returns URL_IS_INVALID_AMP error code and will | 140 * AMP URL. This is a |
| 139 * be removed in API version 2. Instead of returning error, the requested | 141 * non-error state, should not be relied upon as a sign of success or |
| 140 * URL is returned as an AMP URL in AmpUrl response. | 142 * failure. It will be removed in future versions of the API. |
| 141 * - "URL_IS_INVALID_AMP" : Indicates that the requested URL is an invalid AMP | 143 * - "URL_IS_INVALID_AMP" : Indicates that an AMP URL has been found that |
| 142 * URL. | 144 * corresponds to the request |
| 145 * URL, but it is not valid AMP HTML. |
| 143 */ | 146 */ |
| 144 core.String errorCode; | 147 core.String errorCode; |
| 145 /** An optional descriptive error message. */ | 148 /** An optional descriptive error message. */ |
| 146 core.String errorMessage; | 149 core.String errorMessage; |
| 147 /** The original non-AMP URL. */ | 150 /** The original non-AMP URL. */ |
| 148 core.String originalUrl; | 151 core.String originalUrl; |
| 149 | 152 |
| 150 AmpUrlError(); | 153 AmpUrlError(); |
| 151 | 154 |
| 152 AmpUrlError.fromJson(core.Map _json) { | 155 AmpUrlError.fromJson(core.Map _json) { |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 189 * the default strategy. Applications using this strategy should set higher | 192 * the default strategy. Applications using this strategy should set higher |
| 190 * HTTP timeouts of the API calls. | 193 * HTTP timeouts of the API calls. |
| 191 * - "IN_INDEX_DOC" : IN_INDEX_DOC strategy skips fetching live documents of | 194 * - "IN_INDEX_DOC" : IN_INDEX_DOC strategy skips fetching live documents of |
| 192 * URL(s) not found | 195 * URL(s) not found |
| 193 * in index. For applications which need low latency use of IN_INDEX_DOC | 196 * in index. For applications which need low latency use of IN_INDEX_DOC |
| 194 * strategy is recommended. | 197 * strategy is recommended. |
| 195 */ | 198 */ |
| 196 core.String lookupStrategy; | 199 core.String lookupStrategy; |
| 197 /** | 200 /** |
| 198 * List of URLs to look up for the paired AMP URLs. | 201 * List of URLs to look up for the paired AMP URLs. |
| 199 * The URLs are case-sensitive. Up to 10 URLs per lookup | 202 * The URLs are case-sensitive. Up to 50 URLs per lookup |
| 200 * (see [Usage Limits](/amp/cache/reference/limits)). | 203 * (see [Usage Limits](/amp/cache/reference/limits)). |
| 201 */ | 204 */ |
| 202 core.List<core.String> urls; | 205 core.List<core.String> urls; |
| 203 | 206 |
| 204 BatchGetAmpUrlsRequest(); | 207 BatchGetAmpUrlsRequest(); |
| 205 | 208 |
| 206 BatchGetAmpUrlsRequest.fromJson(core.Map _json) { | 209 BatchGetAmpUrlsRequest.fromJson(core.Map _json) { |
| 207 if (_json.containsKey("lookupStrategy")) { | 210 if (_json.containsKey("lookupStrategy")) { |
| 208 lookupStrategy = _json["lookupStrategy"]; | 211 lookupStrategy = _json["lookupStrategy"]; |
| 209 } | 212 } |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 251 var _json = new core.Map(); | 254 var _json = new core.Map(); |
| 252 if (ampUrls != null) { | 255 if (ampUrls != null) { |
| 253 _json["ampUrls"] = ampUrls.map((value) => (value).toJson()).toList(); | 256 _json["ampUrls"] = ampUrls.map((value) => (value).toJson()).toList(); |
| 254 } | 257 } |
| 255 if (urlErrors != null) { | 258 if (urlErrors != null) { |
| 256 _json["urlErrors"] = urlErrors.map((value) => (value).toJson()).toList(); | 259 _json["urlErrors"] = urlErrors.map((value) => (value).toJson()).toList(); |
| 257 } | 260 } |
| 258 return _json; | 261 return _json; |
| 259 } | 262 } |
| 260 } | 263 } |
| OLD | NEW |