| 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.adexperiencereport.v1; | 3 library googleapis.adexperiencereport.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 22 matching lines...) Expand all Loading... |
| 33 } | 33 } |
| 34 | 34 |
| 35 | 35 |
| 36 class SitesResourceApi { | 36 class SitesResourceApi { |
| 37 final commons.ApiRequester _requester; | 37 final commons.ApiRequester _requester; |
| 38 | 38 |
| 39 SitesResourceApi(commons.ApiRequester client) : | 39 SitesResourceApi(commons.ApiRequester client) : |
| 40 _requester = client; | 40 _requester = client; |
| 41 | 41 |
| 42 /** | 42 /** |
| 43 * Gets a summary of the ads rating of a site. | 43 * Gets a summary of the ad experience rating of a site. |
| 44 * | 44 * |
| 45 * Request parameters: | 45 * Request parameters: |
| 46 * | 46 * |
| 47 * [name] - The required site name. It should be a site property registered in | 47 * [name] - The required site name. It should be the site property whose ad |
| 48 * Search | 48 * experiences |
| 49 * Console. The server will return an error of BAD_REQUEST if this field is | 49 * may have been reviewed, and it should be URL-encoded. For example, |
| 50 * not filled in. | 50 * sites/https%3A%2F%2Fwww.google.com. The server will return an error of |
| 51 * BAD_REQUEST if this field is not filled in. Note that if the site property |
| 52 * is not yet verified in Search Console, the reportUrl field returned by the |
| 53 * API will lead to the verification page, prompting the user to go through |
| 54 * that process before they can gain access to the Ad Experience Report. |
| 51 * Value must have pattern "^sites/[^/]+$". | 55 * Value must have pattern "^sites/[^/]+$". |
| 52 * | 56 * |
| 53 * Completes with a [SiteSummaryResponse]. | 57 * Completes with a [SiteSummaryResponse]. |
| 54 * | 58 * |
| 55 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 59 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 56 * error. | 60 * error. |
| 57 * | 61 * |
| 58 * If the used [http.Client] completes with an error when making a REST call, | 62 * If the used [http.Client] completes with an error when making a REST call, |
| 59 * this method will complete with the same error. | 63 * this method will complete with the same error. |
| 60 */ | 64 */ |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 122 uploadOptions: _uploadOptions, | 126 uploadOptions: _uploadOptions, |
| 123 uploadMedia: _uploadMedia, | 127 uploadMedia: _uploadMedia, |
| 124 downloadOptions: _downloadOptions); | 128 downloadOptions: _downloadOptions); |
| 125 return _response.then((data) => new ViolatingSitesResponse.fromJson(data)); | 129 return _response.then((data) => new ViolatingSitesResponse.fromJson(data)); |
| 126 } | 130 } |
| 127 | 131 |
| 128 } | 132 } |
| 129 | 133 |
| 130 | 134 |
| 131 | 135 |
| 132 /** Summary of the ads rating of a site for a specific platform. */ | 136 /** Summary of the ad experience rating of a site for a specific platform. */ |
| 133 class PlatformSummary { | 137 class PlatformSummary { |
| 134 /** | 138 /** |
| 139 * The status of the site reviewed for abusive ads. |
| 140 * Possible string values are: |
| 141 * - "UNKNOWN" : Not reviewed. |
| 142 * - "PASSING" : Passing. |
| 143 * - "FAILING" : Failing. |
| 144 */ |
| 145 core.String abusiveStatus; |
| 146 /** |
| 135 * The status of the site reviewed for the Better Ads Standards. | 147 * The status of the site reviewed for the Better Ads Standards. |
| 136 * Possible string values are: | 148 * Possible string values are: |
| 137 * - "UNKNOWN" : Not reviewed. | 149 * - "UNKNOWN" : Not reviewed. |
| 138 * - "PASSING" : Passing. | 150 * - "PASSING" : Passing. |
| 139 * - "WARNING" : Warning. | 151 * - "WARNING" : Warning. |
| 140 * - "FAILING" : Failing. | 152 * - "FAILING" : Failing. |
| 141 */ | 153 */ |
| 142 core.String betterAdsStatus; | 154 core.String betterAdsStatus; |
| 143 /** | |
| 144 * The status of the site reviewed for egregious ads. | |
| 145 * Possible string values are: | |
| 146 * - "UNKNOWN" : Not reviewed. | |
| 147 * - "PASSING" : Passing. | |
| 148 * - "FAILING" : Failing. | |
| 149 */ | |
| 150 core.String egregiousStatus; | |
| 151 /** The date on which ad filtering begins. */ | 155 /** The date on which ad filtering begins. */ |
| 152 core.String enforcementTime; | 156 core.String enforcementTime; |
| 153 /** | 157 /** |
| 154 * The ad filtering status of the site. | 158 * The ad filtering status of the site. |
| 155 * Possible string values are: | 159 * Possible string values are: |
| 156 * - "UNKNOWN" : N/A. | 160 * - "UNKNOWN" : N/A. |
| 157 * - "ON" : Ad filtering is on. | 161 * - "ON" : Ad filtering is on. |
| 158 * - "OFF" : Ad filtering is off. | 162 * - "OFF" : Ad filtering is off. |
| 159 * - "PAUSED" : Ad filtering is paused. | 163 * - "PAUSED" : Ad filtering is paused. |
| 160 * - "PENDING" : Ad filtering is pending. | 164 * - "PENDING" : Ad filtering is pending. |
| 161 */ | 165 */ |
| 162 core.String filterStatus; | 166 core.String filterStatus; |
| 163 /** The last time that the site changed status. */ | 167 /** The last time that the site changed status. */ |
| 164 core.String lastChangeTime; | 168 core.String lastChangeTime; |
| 165 /** The assigned regions for the site and platform. */ | 169 /** The assigned regions for the site and platform. */ |
| 166 core.List<core.String> region; | 170 core.List<core.String> region; |
| 167 /** A link that leads to a full ad experience report. */ | 171 /** A link that leads to a full ad experience report. */ |
| 168 core.String reportUrl; | 172 core.String reportUrl; |
| 169 /** Whether the site is currently under review. */ | 173 /** Whether the site is currently under review. */ |
| 170 core.bool underReview; | 174 core.bool underReview; |
| 171 | 175 |
| 172 PlatformSummary(); | 176 PlatformSummary(); |
| 173 | 177 |
| 174 PlatformSummary.fromJson(core.Map _json) { | 178 PlatformSummary.fromJson(core.Map _json) { |
| 179 if (_json.containsKey("abusiveStatus")) { |
| 180 abusiveStatus = _json["abusiveStatus"]; |
| 181 } |
| 175 if (_json.containsKey("betterAdsStatus")) { | 182 if (_json.containsKey("betterAdsStatus")) { |
| 176 betterAdsStatus = _json["betterAdsStatus"]; | 183 betterAdsStatus = _json["betterAdsStatus"]; |
| 177 } | 184 } |
| 178 if (_json.containsKey("egregiousStatus")) { | |
| 179 egregiousStatus = _json["egregiousStatus"]; | |
| 180 } | |
| 181 if (_json.containsKey("enforcementTime")) { | 185 if (_json.containsKey("enforcementTime")) { |
| 182 enforcementTime = _json["enforcementTime"]; | 186 enforcementTime = _json["enforcementTime"]; |
| 183 } | 187 } |
| 184 if (_json.containsKey("filterStatus")) { | 188 if (_json.containsKey("filterStatus")) { |
| 185 filterStatus = _json["filterStatus"]; | 189 filterStatus = _json["filterStatus"]; |
| 186 } | 190 } |
| 187 if (_json.containsKey("lastChangeTime")) { | 191 if (_json.containsKey("lastChangeTime")) { |
| 188 lastChangeTime = _json["lastChangeTime"]; | 192 lastChangeTime = _json["lastChangeTime"]; |
| 189 } | 193 } |
| 190 if (_json.containsKey("region")) { | 194 if (_json.containsKey("region")) { |
| 191 region = _json["region"]; | 195 region = _json["region"]; |
| 192 } | 196 } |
| 193 if (_json.containsKey("reportUrl")) { | 197 if (_json.containsKey("reportUrl")) { |
| 194 reportUrl = _json["reportUrl"]; | 198 reportUrl = _json["reportUrl"]; |
| 195 } | 199 } |
| 196 if (_json.containsKey("underReview")) { | 200 if (_json.containsKey("underReview")) { |
| 197 underReview = _json["underReview"]; | 201 underReview = _json["underReview"]; |
| 198 } | 202 } |
| 199 } | 203 } |
| 200 | 204 |
| 201 core.Map<core.String, core.Object> toJson() { | 205 core.Map<core.String, core.Object> toJson() { |
| 202 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 206 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); |
| 207 if (abusiveStatus != null) { |
| 208 _json["abusiveStatus"] = abusiveStatus; |
| 209 } |
| 203 if (betterAdsStatus != null) { | 210 if (betterAdsStatus != null) { |
| 204 _json["betterAdsStatus"] = betterAdsStatus; | 211 _json["betterAdsStatus"] = betterAdsStatus; |
| 205 } | 212 } |
| 206 if (egregiousStatus != null) { | |
| 207 _json["egregiousStatus"] = egregiousStatus; | |
| 208 } | |
| 209 if (enforcementTime != null) { | 213 if (enforcementTime != null) { |
| 210 _json["enforcementTime"] = enforcementTime; | 214 _json["enforcementTime"] = enforcementTime; |
| 211 } | 215 } |
| 212 if (filterStatus != null) { | 216 if (filterStatus != null) { |
| 213 _json["filterStatus"] = filterStatus; | 217 _json["filterStatus"] = filterStatus; |
| 214 } | 218 } |
| 215 if (lastChangeTime != null) { | 219 if (lastChangeTime != null) { |
| 216 _json["lastChangeTime"] = lastChangeTime; | 220 _json["lastChangeTime"] = lastChangeTime; |
| 217 } | 221 } |
| 218 if (region != null) { | 222 if (region != null) { |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 280 } | 284 } |
| 281 | 285 |
| 282 core.Map<core.String, core.Object> toJson() { | 286 core.Map<core.String, core.Object> toJson() { |
| 283 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 287 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); |
| 284 if (violatingSites != null) { | 288 if (violatingSites != null) { |
| 285 _json["violatingSites"] = violatingSites.map((value) => (value).toJson()).
toList(); | 289 _json["violatingSites"] = violatingSites.map((value) => (value).toJson()).
toList(); |
| 286 } | 290 } |
| 287 return _json; | 291 return _json; |
| 288 } | 292 } |
| 289 } | 293 } |
| OLD | NEW |