|
| 1 | +// NOTE: This file was generated by the ServiceGenerator. |
| 2 | + |
| 3 | +// ---------------------------------------------------------------------------- |
| 4 | +// API: |
| 5 | +// Accelerated Mobile Pages (AMP) URL API (acceleratedmobilepageurl/v1) |
| 6 | +// Description: |
| 7 | +// Retrieves the list of AMP URL (and equivalent AMP Cache URL) for a given |
| 8 | +// list of public URL(s). |
| 9 | +// Documentation: |
| 10 | +// https://developers.google.com/amp/cache/ |
| 11 | + |
| 12 | +#if GTLR_BUILT_AS_FRAMEWORK |
| 13 | + #import "GTLR/GTLRObject.h" |
| 14 | +#else |
| 15 | + #import "GTLRObject.h" |
| 16 | +#endif |
| 17 | + |
| 18 | +#if GTLR_RUNTIME_VERSION != 3000 |
| 19 | +#error This file was generated by a different version of ServiceGenerator which is incompatible with this GTLR library source. |
| 20 | +#endif |
| 21 | + |
| 22 | +@class GTLRAcceleratedmobilepageurl_AmpUrl; |
| 23 | +@class GTLRAcceleratedmobilepageurl_AmpUrlError; |
| 24 | + |
| 25 | +NS_ASSUME_NONNULL_BEGIN |
| 26 | + |
| 27 | +// ---------------------------------------------------------------------------- |
| 28 | +// Constants - For some of the classes' properties below. |
| 29 | + |
| 30 | +// ---------------------------------------------------------------------------- |
| 31 | +// GTLRAcceleratedmobilepageurl_AmpUrlError.errorCode |
| 32 | + |
| 33 | +/** |
| 34 | + * Indicates some kind of application error occurred at the server. |
| 35 | + * Client advised to retry. |
| 36 | + * |
| 37 | + * Value: "APPLICATION_ERROR" |
| 38 | + */ |
| 39 | +GTLR_EXTERN NSString * const kGTLRAcceleratedmobilepageurl_AmpUrlError_ErrorCode_ApplicationError; |
| 40 | +/** |
| 41 | + * Not specified error. |
| 42 | + * |
| 43 | + * Value: "ERROR_CODE_UNSPECIFIED" |
| 44 | + */ |
| 45 | +GTLR_EXTERN NSString * const kGTLRAcceleratedmobilepageurl_AmpUrlError_ErrorCode_ErrorCodeUnspecified; |
| 46 | +/** |
| 47 | + * Indicates the requested URL is not found in the index, possibly because |
| 48 | + * it's unable to be found, not able to be accessed by Googlebot, or some |
| 49 | + * other error. |
| 50 | + * |
| 51 | + * Value: "INPUT_URL_NOT_FOUND" |
| 52 | + */ |
| 53 | +GTLR_EXTERN NSString * const kGTLRAcceleratedmobilepageurl_AmpUrlError_ErrorCode_InputUrlNotFound; |
| 54 | +/** |
| 55 | + * Indicates no AMP URL has been found that corresponds to the requested |
| 56 | + * URL. |
| 57 | + * |
| 58 | + * Value: "NO_AMP_URL" |
| 59 | + */ |
| 60 | +GTLR_EXTERN NSString * const kGTLRAcceleratedmobilepageurl_AmpUrlError_ErrorCode_NoAmpUrl; |
| 61 | +/** |
| 62 | + * Indicates that an AMP URL has been found that corresponds to the request |
| 63 | + * URL, but it is not valid AMP HTML. |
| 64 | + * |
| 65 | + * Value: "URL_IS_INVALID_AMP" |
| 66 | + */ |
| 67 | +GTLR_EXTERN NSString * const kGTLRAcceleratedmobilepageurl_AmpUrlError_ErrorCode_UrlIsInvalidAmp; |
| 68 | +/** |
| 69 | + * DEPRECATED: Indicates the requested URL is a valid AMP URL. This is a |
| 70 | + * non-error state, should not be relied upon as a sign of success or |
| 71 | + * failure. It will be removed in future versions of the API. |
| 72 | + * |
| 73 | + * Value: "URL_IS_VALID_AMP" |
| 74 | + */ |
| 75 | +GTLR_EXTERN NSString * const kGTLRAcceleratedmobilepageurl_AmpUrlError_ErrorCode_UrlIsValidAmp; |
| 76 | + |
| 77 | +// ---------------------------------------------------------------------------- |
| 78 | +// GTLRAcceleratedmobilepageurl_BatchGetAmpUrlsRequest.lookupStrategy |
| 79 | + |
| 80 | +/** |
| 81 | + * FETCH_LIVE_DOC strategy involves live document fetch of URLs not found in |
| 82 | + * the index. Any request URL not found in the index is crawled in realtime |
| 83 | + * to validate if there is a corresponding AMP URL. This strategy has higher |
| 84 | + * coverage but with extra latency introduced by realtime crawling. This is |
| 85 | + * the default strategy. Applications using this strategy should set higher |
| 86 | + * HTTP timeouts of the API calls. |
| 87 | + * |
| 88 | + * Value: "FETCH_LIVE_DOC" |
| 89 | + */ |
| 90 | +GTLR_EXTERN NSString * const kGTLRAcceleratedmobilepageurl_BatchGetAmpUrlsRequest_LookupStrategy_FetchLiveDoc; |
| 91 | +/** |
| 92 | + * IN_INDEX_DOC strategy skips fetching live documents of URL(s) not found |
| 93 | + * in index. For applications which need low latency use of IN_INDEX_DOC |
| 94 | + * strategy is recommended. |
| 95 | + * |
| 96 | + * Value: "IN_INDEX_DOC" |
| 97 | + */ |
| 98 | +GTLR_EXTERN NSString * const kGTLRAcceleratedmobilepageurl_BatchGetAmpUrlsRequest_LookupStrategy_InIndexDoc; |
| 99 | + |
| 100 | +/** |
| 101 | + * AMP URL response for a requested URL. |
| 102 | + */ |
| 103 | +@interface GTLRAcceleratedmobilepageurl_AmpUrl : GTLRObject |
| 104 | + |
| 105 | +/** The AMP URL pointing to the publisher's web server. */ |
| 106 | +@property(nonatomic, copy, nullable) NSString *ampUrl; |
| 107 | + |
| 108 | +/** |
| 109 | + * The [AMP Cache URL](/amp/cache/overview#amp-cache-url-format) pointing to |
| 110 | + * the cached document in the Google AMP Cache. |
| 111 | + */ |
| 112 | +@property(nonatomic, copy, nullable) NSString *cdnAmpUrl; |
| 113 | + |
| 114 | +/** The original non-AMP URL. */ |
| 115 | +@property(nonatomic, copy, nullable) NSString *originalUrl; |
| 116 | + |
| 117 | +@end |
| 118 | + |
| 119 | + |
| 120 | +/** |
| 121 | + * AMP URL Error resource for a requested URL that couldn't be found. |
| 122 | + */ |
| 123 | +@interface GTLRAcceleratedmobilepageurl_AmpUrlError : GTLRObject |
| 124 | + |
| 125 | +/** |
| 126 | + * The error code of an API call. |
| 127 | + * |
| 128 | + * Likely values: |
| 129 | + * @arg @c kGTLRAcceleratedmobilepageurl_AmpUrlError_ErrorCode_ApplicationError |
| 130 | + * Indicates some kind of application error occurred at the server. |
| 131 | + * Client advised to retry. (Value: "APPLICATION_ERROR") |
| 132 | + * @arg @c kGTLRAcceleratedmobilepageurl_AmpUrlError_ErrorCode_ErrorCodeUnspecified |
| 133 | + * Not specified error. (Value: "ERROR_CODE_UNSPECIFIED") |
| 134 | + * @arg @c kGTLRAcceleratedmobilepageurl_AmpUrlError_ErrorCode_InputUrlNotFound |
| 135 | + * Indicates the requested URL is not found in the index, possibly |
| 136 | + * because |
| 137 | + * it's unable to be found, not able to be accessed by Googlebot, or some |
| 138 | + * other error. (Value: "INPUT_URL_NOT_FOUND") |
| 139 | + * @arg @c kGTLRAcceleratedmobilepageurl_AmpUrlError_ErrorCode_NoAmpUrl |
| 140 | + * Indicates no AMP URL has been found that corresponds to the requested |
| 141 | + * URL. (Value: "NO_AMP_URL") |
| 142 | + * @arg @c kGTLRAcceleratedmobilepageurl_AmpUrlError_ErrorCode_UrlIsInvalidAmp |
| 143 | + * Indicates that an AMP URL has been found that corresponds to the |
| 144 | + * request |
| 145 | + * URL, but it is not valid AMP HTML. (Value: "URL_IS_INVALID_AMP") |
| 146 | + * @arg @c kGTLRAcceleratedmobilepageurl_AmpUrlError_ErrorCode_UrlIsValidAmp |
| 147 | + * DEPRECATED: Indicates the requested URL is a valid AMP URL. This is a |
| 148 | + * non-error state, should not be relied upon as a sign of success or |
| 149 | + * failure. It will be removed in future versions of the API. (Value: |
| 150 | + * "URL_IS_VALID_AMP") |
| 151 | + */ |
| 152 | +@property(nonatomic, copy, nullable) NSString *errorCode; |
| 153 | + |
| 154 | +/** An optional descriptive error message. */ |
| 155 | +@property(nonatomic, copy, nullable) NSString *errorMessage; |
| 156 | + |
| 157 | +/** The original non-AMP URL. */ |
| 158 | +@property(nonatomic, copy, nullable) NSString *originalUrl; |
| 159 | + |
| 160 | +@end |
| 161 | + |
| 162 | + |
| 163 | +/** |
| 164 | + * AMP URL request for a batch of URLs. |
| 165 | + */ |
| 166 | +@interface GTLRAcceleratedmobilepageurl_BatchGetAmpUrlsRequest : GTLRObject |
| 167 | + |
| 168 | +/** |
| 169 | + * The lookup_strategy being requested. |
| 170 | + * |
| 171 | + * Likely values: |
| 172 | + * @arg @c kGTLRAcceleratedmobilepageurl_BatchGetAmpUrlsRequest_LookupStrategy_FetchLiveDoc |
| 173 | + * FETCH_LIVE_DOC strategy involves live document fetch of URLs not found |
| 174 | + * in |
| 175 | + * the index. Any request URL not found in the index is crawled in |
| 176 | + * realtime |
| 177 | + * to validate if there is a corresponding AMP URL. This strategy has |
| 178 | + * higher |
| 179 | + * coverage but with extra latency introduced by realtime crawling. This |
| 180 | + * is |
| 181 | + * the default strategy. Applications using this strategy should set |
| 182 | + * higher |
| 183 | + * HTTP timeouts of the API calls. (Value: "FETCH_LIVE_DOC") |
| 184 | + * @arg @c kGTLRAcceleratedmobilepageurl_BatchGetAmpUrlsRequest_LookupStrategy_InIndexDoc |
| 185 | + * IN_INDEX_DOC strategy skips fetching live documents of URL(s) not |
| 186 | + * found |
| 187 | + * in index. For applications which need low latency use of IN_INDEX_DOC |
| 188 | + * strategy is recommended. (Value: "IN_INDEX_DOC") |
| 189 | + */ |
| 190 | +@property(nonatomic, copy, nullable) NSString *lookupStrategy; |
| 191 | + |
| 192 | +/** |
| 193 | + * List of URLs to look up for the paired AMP URLs. |
| 194 | + * The URLs are case-sensitive. Up to 50 URLs per lookup |
| 195 | + * (see [Usage Limits](/amp/cache/reference/limits)). |
| 196 | + */ |
| 197 | +@property(nonatomic, strong, nullable) NSArray<NSString *> *urls; |
| 198 | + |
| 199 | +@end |
| 200 | + |
| 201 | + |
| 202 | +/** |
| 203 | + * Batch AMP URL response. |
| 204 | + */ |
| 205 | +@interface GTLRAcceleratedmobilepageurl_BatchGetAmpUrlsResponse : GTLRObject |
| 206 | + |
| 207 | +/** |
| 208 | + * For each URL in BatchAmpUrlsRequest, the URL response. The response might |
| 209 | + * not be in the same order as URLs in the batch request. |
| 210 | + * If BatchAmpUrlsRequest contains duplicate URLs, AmpUrl is generated |
| 211 | + * only once. |
| 212 | + */ |
| 213 | +@property(nonatomic, strong, nullable) NSArray<GTLRAcceleratedmobilepageurl_AmpUrl *> *ampUrls; |
| 214 | + |
| 215 | +/** The errors for requested URLs that have no AMP URL. */ |
| 216 | +@property(nonatomic, strong, nullable) NSArray<GTLRAcceleratedmobilepageurl_AmpUrlError *> *urlErrors; |
| 217 | + |
| 218 | +@end |
| 219 | + |
| 220 | +NS_ASSUME_NONNULL_END |
0 commit comments